Merge branch 'dev' of http://221.0.232.152:9393/ability-center/share-platform into dev
* 'dev' of http://221.0.232.152:9393/ability-center/share-platform: (25 commits) 置顶存在缓存 ... 会议室预约的表描述字段扩增 菜单新增会议室 会议室预约的新增表 能力广场和能力集市资源排序按指定方式排序修改 门户首页最新,最热查询排除知识库 total 排序将置顶放前面 ... 能力广场和能力集市资源排序按指定方式排序 npe ... npe npe 归并为一个排序 屮 ... ... 屮 stream 的排序模式 。。。 ...
This commit is contained in:
commit
98a18a1ddd
|
@ -257,6 +257,8 @@ public class ResourceController {
|
|||
if ("f".equals(source)) {
|
||||
dto.setDelFlag(2); // 来自前端页面 走审批流程
|
||||
}
|
||||
dto.setPinTop(0);
|
||||
dto.setPinTopTime(new Date(0));
|
||||
logger.info(dto.toString());
|
||||
resourceService.insertWithAttrs(dto);
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@ import io.renren.modules.resource.entity.ResourceEntity;
|
|||
import io.renren.modules.resource.entity.ResourceEntityDelFlag;
|
||||
import io.renren.modules.resource.entity.TbDataResourceRelEntity;
|
||||
import io.renren.modules.resource.service.ResourceService;
|
||||
import io.renren.modules.resourceBrowse.dao.ResourceBrowseDao;
|
||||
import io.renren.modules.resourceCar.dao.ResourceCarDao;
|
||||
import io.renren.modules.resourceCollection.dao.ResourceCollectionDao;
|
||||
import io.renren.modules.resourceMountApply.dto.TResourceMountApplyDTO;
|
||||
|
@ -43,6 +42,7 @@ import io.renren.modules.resourceMountApply.service.TResourceMountApplyService;
|
|||
import io.renren.modules.resourceScore.dao.ResourceScoreDao;
|
||||
import io.renren.modules.security.user.SecurityUser;
|
||||
import io.renren.modules.sys.dao.SysDeptDao;
|
||||
import io.renren.modules.sys.dao.SysRegionDao;
|
||||
import io.renren.modules.sys.dto.SysUserDTO;
|
||||
import io.renren.modules.sys.service.SysDeptService;
|
||||
import io.renren.modules.sys.service.SysUserService;
|
||||
|
@ -94,6 +94,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
|
||||
private static final String SELECT_DEPT_LIST_KEY = "selectDeptList";
|
||||
private static final String SELECT_DTO_PAGE_SPECIAL_TOTAL_KEY = "selectDTOPageSpecilTotal";
|
||||
private static final String SELECTWITHATTRS_KEY = "selectWithAttrs";
|
||||
|
||||
@Value("${system.startDay}")
|
||||
private String systemDay;
|
||||
|
@ -143,9 +144,6 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
@Autowired
|
||||
private AttrDao attrDao;
|
||||
|
||||
@Autowired
|
||||
private ResourceBrowseDao resourceBrowseDao;
|
||||
|
||||
@Autowired
|
||||
private SysDeptDao sysDeptDao;
|
||||
|
||||
|
@ -180,6 +178,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
@Autowired
|
||||
private TbDataResourceRelDao tbDataResourceRelDao;
|
||||
|
||||
@Autowired
|
||||
private SysRegionDao sysRegionDao;
|
||||
|
||||
@Value("${census.type}")
|
||||
private String[] censusTypes; // 需要进行统计的资源类型
|
||||
|
||||
|
@ -214,9 +215,22 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
@CacheEvict(cacheNames = {SELECT_DEPT_LIST_KEY, SELECT_DTO_PAGE_SPECIAL_TOTAL_KEY, SELECTWITHATTRS_KEY}, allEntries = true)
|
||||
public void save(ResourceDTO dto) {
|
||||
super.save(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
@CacheEvict(cacheNames = {SELECT_DEPT_LIST_KEY, SELECT_DTO_PAGE_SPECIAL_TOTAL_KEY, SELECTWITHATTRS_KEY}, allEntries = true)
|
||||
public void update(ResourceDTO dto) {
|
||||
super.update(dto);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@CacheEvict(cacheNames = {SELECT_DEPT_LIST_KEY, SELECT_DTO_PAGE_SPECIAL_TOTAL_KEY}, allEntries = true)
|
||||
@CacheEvict(cacheNames = {SELECT_DEPT_LIST_KEY, SELECT_DTO_PAGE_SPECIAL_TOTAL_KEY, SELECTWITHATTRS_KEY}, allEntries = true)
|
||||
public void insertWithAttrs(ResourceDTO dto) {
|
||||
ResourceEntity resourceEntity = new ResourceEntity();
|
||||
BeanUtils.copyProperties(dto, resourceEntity);
|
||||
|
@ -280,7 +294,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
|
||||
@Override
|
||||
@Transactional
|
||||
@CacheEvict(cacheNames = {SELECT_DEPT_LIST_KEY, SELECT_DTO_PAGE_SPECIAL_TOTAL_KEY}, allEntries = true)
|
||||
@CacheEvict(cacheNames = {SELECT_DEPT_LIST_KEY, SELECT_DTO_PAGE_SPECIAL_TOTAL_KEY, SELECTWITHATTRS_KEY}, allEntries = true)
|
||||
public void createMixAbility(ResourceDTO dto) {
|
||||
ResourceEntity resourceEntity = new ResourceEntity();
|
||||
BeanUtils.copyProperties(dto, resourceEntity);
|
||||
|
@ -324,7 +338,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
|
||||
@Override
|
||||
@Transactional
|
||||
@CacheEvict(cacheNames = {SELECT_DEPT_LIST_KEY, SELECT_DTO_PAGE_SPECIAL_TOTAL_KEY}, allEntries = true)
|
||||
@CacheEvict(cacheNames = {SELECT_DEPT_LIST_KEY, SELECT_DTO_PAGE_SPECIAL_TOTAL_KEY, SELECTWITHATTRS_KEY}, allEntries = true)
|
||||
public void deleteWithAttrs(JSONObject jsonObject) {
|
||||
JSONArray jsonArray = jsonObject.getJSONArray("ids");
|
||||
List<Long> idList = jsonArray.toJavaList(Long.class);
|
||||
|
@ -338,7 +352,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
|
||||
@Override
|
||||
@Transactional
|
||||
@CacheEvict(cacheNames = {SELECT_DEPT_LIST_KEY, SELECT_DTO_PAGE_SPECIAL_TOTAL_KEY}, allEntries = true)
|
||||
@CacheEvict(cacheNames = {SELECT_DEPT_LIST_KEY, SELECT_DTO_PAGE_SPECIAL_TOTAL_KEY, SELECTWITHATTRS_KEY}, allEntries = true)
|
||||
public void updateWithAttrs(ResourceDTO dto) {
|
||||
ResourceEntity resourceEntity = new ResourceEntity();
|
||||
BeanUtils.copyProperties(dto, resourceEntity);
|
||||
|
@ -386,13 +400,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
//默认按上架时间降序排列
|
||||
String orderField;
|
||||
if (StringUtils.isBlank(jsonObject.getString("orderField"))) {
|
||||
if ("应用资源".equals(jsonObject.getString("type"))) {
|
||||
orderField = "deptSort";
|
||||
} else if ("组件服务".equals(jsonObject.getString("type"))) {
|
||||
orderField = "pin_top";
|
||||
} else {
|
||||
orderField = "total";
|
||||
}
|
||||
orderField = "visits";
|
||||
} else {
|
||||
orderField = jsonObject.getString("orderField");
|
||||
}
|
||||
|
@ -447,7 +455,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
logger.error("失败", exception);
|
||||
}
|
||||
} else { // 西海岸普通资源
|
||||
logger.info("西海岸基普通");
|
||||
logger.info("西海岸普通");
|
||||
resultPage = common(resultPage, selectDTOPageSpecilTotal, resourceDTO, orderField, orderType, pageNum, pageSize);
|
||||
}
|
||||
}
|
||||
|
@ -470,35 +478,67 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
switch (orderType.toUpperCase()) {
|
||||
case "DESC": // total 倒序
|
||||
ids = customThreadPool.submit(() -> {
|
||||
List<Long> temp = selectDTOPageSpecilTotal.parallelStream().map(Map.class::cast).sorted(Comparator.comparing(x -> {
|
||||
Map index = (Map) x;
|
||||
String string = (index.get("total") == null) ? "0" : index.get("total").toString();
|
||||
return Long.valueOf(string);
|
||||
}).reversed()).skip((long) (pageNum - 1) * pageSize).limit(pageSize).map(x -> Long.valueOf(x.get("id").toString())).limit(pageSize).collect(Collectors.toList());
|
||||
List<Long> temp = selectDTOPageSpecilTotal.parallelStream().map(Map.class::cast)
|
||||
.sorted(Comparator.comparing(x -> {
|
||||
Map index = (Map) x;
|
||||
int pingTOp_ = (index.get("pin_top") == null) ? 0 : Integer.parseInt(index.get("pin_top").toString());
|
||||
String total = (index.get("total") == null) ? "0" : index.get("total").toString();
|
||||
if (pingTOp_ <= 0) {
|
||||
return 0l + Long.valueOf(total) == 0 ? -1 : Long.valueOf(total);
|
||||
}
|
||||
long pingTOp = (index.get("pin_top_time") == null) ? 0 + (Long.valueOf(total) == 0 ? -1 : Long.valueOf(total)) : Long.parseLong(index.get("pin_top_time").toString()) + Long.valueOf(total);
|
||||
return (pingTOp % 1000) == 0 ? -1 : pingTOp % 1000;
|
||||
}).reversed()
|
||||
).skip((long) (pageNum - 1) * pageSize).limit(pageSize).map(x -> Long.valueOf(x.get("id").toString())).limit(pageSize).collect(Collectors.toList());
|
||||
return temp;
|
||||
}).get();
|
||||
break;
|
||||
case "ASC": // total 升序
|
||||
ids = customThreadPool.submit(() -> {
|
||||
List<Long> temp = selectDTOPageSpecilTotal.parallelStream().map(Map.class::cast).sorted(Comparator.comparing(x -> {
|
||||
String string = (x.get("total") == null) ? "0" : x.get("total").toString();
|
||||
return Long.valueOf(string);
|
||||
})).skip((pageNum - 1) * pageSize).limit(pageSize).map(x -> Long.valueOf(x.get("id").toString())).limit(pageSize).collect(Collectors.toList());
|
||||
List<Long> temp = selectDTOPageSpecilTotal.parallelStream().map(Map.class::cast)
|
||||
.sorted(Comparator.comparing(x -> {
|
||||
Map index = (Map) x;
|
||||
int pingTOp_ = (index.get("pin_top") == null) ? 0 : Integer.parseInt(index.get("pin_top").toString());
|
||||
String total = (index.get("total") == null) ? "0" : index.get("total").toString();
|
||||
if (pingTOp_ <= 0) {
|
||||
return 0l + Long.valueOf(total) == 0 ? -1 : Long.valueOf(total);
|
||||
}
|
||||
long pingTOp = (index.get("pin_top_time") == null) ? 0 + (Long.valueOf(total) == 0 ? -1 : Long.valueOf(total)) : Long.parseLong(index.get("pin_top_time").toString()) + Long.valueOf(total);
|
||||
return (pingTOp % 1000) == 0 ? -1 : pingTOp % 1000;
|
||||
})).skip((pageNum - 1) * pageSize).limit(pageSize).map(x -> Long.valueOf(x.get("id").toString())).limit(pageSize).collect(Collectors.toList());
|
||||
return temp;
|
||||
}).get();
|
||||
break;
|
||||
}
|
||||
resourceDTOS = resourceDao.selectDTOPage(resourceDTO, null, null, null, null, ids);
|
||||
if ("DESC".equals(orderType)) {
|
||||
resultPage.setRecords(resourceDTOS.stream().sorted(Comparator.comparing(x -> {
|
||||
ResourceDTO index = (ResourceDTO) x;
|
||||
return index.getTotal() == null ? 0L : index.getTotal();
|
||||
}).reversed()).collect(Collectors.toList()));
|
||||
resourceDTOS = resourceDTOS.stream().sorted(Comparator.comparing(x -> {
|
||||
ResourceDTO index = (ResourceDTO) x;
|
||||
int pinTop = index.getPinTop() == null ? 0 : index.getPinTop();
|
||||
long index_;
|
||||
if (pinTop > 0) {
|
||||
index_ = index.getPinTopTime() == null ? new Date(0).getTime() + (index.getTotal() == null ? -1L : index.getTotal()) : index.getPinTopTime().getTime() + (index.getTotal() == null ? -1L : index.getTotal());
|
||||
index_ = index_ % 1000;
|
||||
} else {
|
||||
index_ = (index.getTotal() == null ? -1L : (index.getTotal() == 0 ? -1 : index.getTotal()));
|
||||
}
|
||||
return index_ == 0 ? -1 : index_;
|
||||
}).reversed()
|
||||
).collect(Collectors.toList());
|
||||
} else {
|
||||
resultPage.setRecords(resourceDTOS.stream().sorted(Comparator.comparing(x -> {
|
||||
ResourceDTO index = x;
|
||||
return index.getTotal() == null ? 0L : index.getTotal();
|
||||
})).collect(Collectors.toList()));
|
||||
resourceDTOS = resourceDTOS.stream().sorted(Comparator.comparing(x -> {
|
||||
ResourceDTO index = x;
|
||||
int pinTop = index.getPinTop() == null ? 0 : index.getPinTop();
|
||||
long index_;
|
||||
if (pinTop > 0) {
|
||||
index_ = index.getPinTopTime() == null ? new Date(0).getTime() + (index.getTotal() == null ? -1L : index.getTotal()) : index.getPinTopTime().getTime() + (index.getTotal() == null ? -1L : index.getTotal());
|
||||
index_ = index_ % 1000;
|
||||
} else {
|
||||
index_ = (index.getTotal() == null ? -1L : (index.getTotal() == 0 ? -1 : index.getTotal()));
|
||||
}
|
||||
return index_ == 0 ? -1 : index_;
|
||||
})
|
||||
).collect(Collectors.toList());
|
||||
}
|
||||
customThreadPool.shutdown();
|
||||
} else { // 非总体评价排序时
|
||||
|
@ -653,7 +693,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
public Object selectNewest(JSONObject jsonObject) {
|
||||
IPage<ResourceEntity> page = new Page<>(jsonObject.getIntValue("pageNum"), jsonObject.getIntValue("pageSize"));
|
||||
QueryWrapper<ResourceEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(StringUtils.isNotBlank(jsonObject.getString("type")), "type", jsonObject.getString("type")).eq("del_flag", ResourceEntityDelFlag.NORMAL.getFlag()).orderByDesc("create_date");
|
||||
queryWrapper.eq(StringUtils.isNotBlank(jsonObject.getString("type")), "type", jsonObject.getString("type"))
|
||||
.eq("del_flag", ResourceEntityDelFlag.NORMAL.getFlag())
|
||||
.ne("type", "知识库")
|
||||
.orderByDesc("create_date");
|
||||
return resourceDao.selectPage(page, queryWrapper);
|
||||
|
||||
}
|
||||
|
@ -760,20 +803,24 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
}
|
||||
Map<String, List<Map<String, Object>>> listMap = typeMapList.stream().collect(Collectors.groupingBy(m -> m.get("type").toString()));
|
||||
//区级要根据行政区划多加一层结构
|
||||
List<CompletableFuture> tasks = listMap.entrySet().stream().filter(index -> !"区级".equals(index.getKey())).map(item -> {
|
||||
CompletableFuture task = CompletableFuture.runAsync(() -> {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("type", item.getKey());
|
||||
Integer integer = resourceDao.selectTypeCountByDept(item.getKey(), jsonObject.getString("type"));
|
||||
map.put("total", integer);
|
||||
item.getValue().forEach(item1 -> item1.remove("type"));
|
||||
map.put("dataList", item.getValue());
|
||||
if (integer != 0) {
|
||||
resultList.add(map);
|
||||
}
|
||||
}, executor);
|
||||
return task;
|
||||
}).collect(Collectors.toList());
|
||||
List<CompletableFuture> tasks =
|
||||
listMap.entrySet().stream().filter(index -> !"区级".equals(index.getKey())).map(item -> {
|
||||
CompletableFuture task = CompletableFuture.runAsync(() -> {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("type", item.getKey());
|
||||
Integer integer = resourceDao.selectTypeCountByDept(item.getKey(), jsonObject.getString("type"));
|
||||
map.put("total", integer);
|
||||
item.getValue().forEach(item1 -> {
|
||||
item1.remove("type");
|
||||
item1.remove("regionSort");
|
||||
});
|
||||
map.put("dataList", item.getValue());
|
||||
if (integer != 0) {
|
||||
resultList.add(map);
|
||||
}
|
||||
}, executor);
|
||||
return task;
|
||||
}).collect(Collectors.toList());
|
||||
CompletableFuture.allOf(tasks.toArray(new CompletableFuture[tasks.size()])).join();
|
||||
|
||||
Optional<List<Map<String, Object>>> areaList = Optional.ofNullable(listMap.get("区级"));
|
||||
|
@ -794,12 +841,14 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
map.put("total", resourceDao.selectTypeCountByDist(key, jsonObject.getString("type")));
|
||||
value.forEach(item1 -> item1.remove("type"));
|
||||
map.put("dataList", value);
|
||||
map.put("regionSort", value.get(0).get("regionSort"));
|
||||
areaListTemp.add(map);
|
||||
}, executor);
|
||||
tasksArea.add(task);
|
||||
});
|
||||
CompletableFuture.allOf(tasksArea.toArray(new CompletableFuture[tasksArea.size()])).join();
|
||||
areaMap.put("dataList", areaListTemp);
|
||||
List<Map> collect = areaListTemp.stream().sorted(Comparator.comparingInt(m -> Integer.parseInt(m.get("regionSort").toString()))).collect(Collectors.toList());
|
||||
areaMap.put("dataList", collect);
|
||||
if (integer != 0) {
|
||||
resultList.add(areaMap);
|
||||
}
|
||||
|
@ -1039,7 +1088,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
@Override
|
||||
public Object getApplyCameraList(Long instanceId) {
|
||||
QueryWrapper<TAbilityApplicationEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("instance_id", instanceId).eq("approve_status", "通过");
|
||||
queryWrapper.eq("instance_id", instanceId)
|
||||
.eq("approve_status", "通过");
|
||||
List<TAbilityApplicationEntity> applicationEntities = tAbilityApplicationDao.selectList(queryWrapper);
|
||||
ArrayList cameraList = new ArrayList();
|
||||
applicationEntities.forEach(index -> {
|
||||
|
@ -1099,7 +1149,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
* 同步知识库
|
||||
*/
|
||||
@Override
|
||||
@CacheEvict(cacheNames = {SELECT_DEPT_LIST_KEY, SELECT_DTO_PAGE_SPECIAL_TOTAL_KEY}, allEntries = true)
|
||||
@CacheEvict(cacheNames = {SELECT_DEPT_LIST_KEY, SELECT_DTO_PAGE_SPECIAL_TOTAL_KEY, SELECTWITHATTRS_KEY}, allEntries = true)
|
||||
public void KnowledgeBase() {
|
||||
final List<String> knowledgeUUID = jdbcTemplate.queryForList("SELECT note1 FROM tb_data_resource WHERE type ='知识库' AND note1 IS NOT NULL FOR UPDATE;", String.class).stream().distinct().collect(Collectors.toList());
|
||||
final int pageSize = CPU_NUM * 10;
|
||||
|
@ -1823,7 +1873,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
resourceIds.add(Long.parseLong(abilityApplicationDTO1.getResourceId()));
|
||||
} else {
|
||||
TResourceMountApplyDTO resourceMountApplyDTO = tResourceMountApplyService.get(Long.valueOf(his.getBusinessKey()));
|
||||
if (resourceMountApplyDTO != null && resourceMountApplyDTO.getResourceDTO() != null && resourceMountApplyDTO.getResourceDTO().getId() != null) {
|
||||
if (resourceMountApplyDTO != null && resourceMountApplyDTO.getResourceDTO() != null
|
||||
&& resourceMountApplyDTO.getResourceDTO().getId() != null) {
|
||||
resourceIds.add(resourceMountApplyDTO.getResourceDTO().getId());
|
||||
if (resourceMountApplyDTO.getResourceId() != null) {
|
||||
ResourceDTO resourceDTO = get(resourceMountApplyDTO.getResourceId());
|
||||
|
@ -1924,7 +1975,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
|
||||
switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
|
||||
case TSINGTAO_XHA:
|
||||
break;
|
||||
break;
|
||||
case TSINGTAO: {
|
||||
CompletableFuture<Void> dataResourceCount = CompletableFuture.runAsync(() -> { //数据资源
|
||||
//青岛市局数据资源
|
||||
|
@ -1941,7 +1992,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
|
||||
CompletableFuture<Void> infrastructureCount = CompletableFuture.runAsync(() -> { //基础设施
|
||||
HashMap<Object, Object> queryMap = new HashMap<>();
|
||||
queryMap.put("cameraName",keyWorld);
|
||||
queryMap.put("cameraName", keyWorld);
|
||||
Integer countNew = cameraChannelMapper.selectByParentIdCountNew(queryMap, null, "");
|
||||
resultList.add(new HashMap<String, Object>() {
|
||||
{
|
||||
|
|
|
@ -159,7 +159,6 @@ REPLACE INTO `sys_menu` VALUES (1481447556422651905, 1481447555369881602, 'comme
|
|||
REPLACE INTO `sys_menu` VALUES (1481447556770779137, 1481447555369881602, 'comment/bscomment', 'comment:bscomment:delete', 1, NULL, 3, 1067246875800000001, '2022-01-13 10:06:36', 1067246875800000001, '2022-01-13 10:06:36');
|
||||
REPLACE INTO `sys_menu` VALUES (1481447557123100673, 1481447555369881602, 'comment/bscomment', 'comment:bscomment:export', 1, NULL, 4, 1067246875800000001, '2022-01-13 10:06:36', 1067246875800000001, '2022-01-13 10:06:36');
|
||||
REPLACE INTO `sys_menu` VALUES (1513775256278900737, 1150941310262235138, 'activiti/demo/correction-process', '', 0, 'icon-check-circle', 0, 1067246875800000001, '2022-04-12 15:05:20', 1067246875800000001, '2022-04-12 15:08:24');
|
||||
REPLACE INTO `sys_menu` VALUES (1513797246491648001, 0, '/ability/IntegratedServices', '', 0, 'icon-medicinebox-fill', 10, 1067246875800000001, '2022-04-12 16:32:43', 1067246875800000001, '2022-07-14 10:04:35');
|
||||
REPLACE INTO `sys_menu` VALUES (1514156880712777730, 1150941310262235138, 'activiti/demo/correction-process2', '', 0, 'icon-meh', 0, 1513435534798127105, '2022-04-13 16:21:47', 1513435534798127105, '2022-04-13 16:22:11');
|
||||
REPLACE INTO `sys_menu` VALUES (1523928422334148609, 1150941310262235138, 'activiti/my-work-dynamics', 'sys:correction:all,sys:process:all,sys:running:all,sys:task:all', 0, 'icon-carryout', 6, 1067246875800000001, '2022-05-10 15:30:24', 1067246875800000001, '2022-05-10 15:30:45');
|
||||
REPLACE INTO `sys_menu` VALUES (1526084841978781697, 0, '', '', 0, 'icon-edit-square', 4, 1067246875800000001, '2022-05-16 14:19:14', 1067246875800000001, '2022-05-16 14:27:13');
|
||||
|
@ -191,6 +190,11 @@ REPLACE INTO `sys_menu` VALUES (1545312045695377410, 1541261628388888578, '/myAg
|
|||
REPLACE INTO `sys_menu` VALUES (1545313018614521857, 1541261628388888578, '/myAgent/AbilityResourcesRemoved', '', 0, 'icon-logout', 3, 1067246875800000001, '2022-07-08 15:45:09', 1067246875800000001, '2022-07-08 15:45:09');
|
||||
REPLACE INTO `sys_menu` VALUES (1545313754106699777, 1541261628388888578, '/myAgent/CommentModeration', '', 0, 'icon-reloadtime', 4, 1067246875800000001, '2022-07-08 15:48:04', 1067246875800000001, '2022-07-08 15:48:04');
|
||||
REPLACE INTO `sys_menu` VALUES (1546381109252136961, 1067246875800000046, 'sys/log-data-modification-log', '', 0, 'icon-reloadtime', 3, 1067246875800000001, '2022-07-11 14:29:21', 1067246875800000001, '2022-07-11 15:38:19');
|
||||
REPLACE INTO `sys_menu` VALUES (1554294862931562498, 1541261628388888578, '/myAgent/ConferenceRoom', '', 0, 'icon-laptop', 5, 1067246875800000001, '2022-08-02 10:35:47', 1067246875800000001, '2022-08-16 11:02:53');
|
||||
REPLACE INTO `sys_menu` VALUES (1556618294872526850, 1150941310262235138, 'activiti/RoomExamineAdmin', '', 0, 'icon-read', 7, 1067246875800000001, '2022-08-08 20:28:17', 1067246875800000001, '2022-08-08 20:32:24');
|
||||
REPLACE INTO `sys_menu` VALUES (1557271824436301825, 1479714553140961281, '/ability/IntegratedServices', '', 0, 'icon-compass', 0, 1067246875800000001, '2022-08-10 15:45:10', 1067246875800000001, '2022-08-10 15:45:10');
|
||||
REPLACE INTO `sys_menu` VALUES (1557271925414170626, 1479714553140961281, '/ability/assignedScene/index', '', 0, 'icon-control', 0, 1067246875800000001, '2022-08-10 15:45:34', 1067246875800000001, '2022-08-10 15:45:34');
|
||||
REPLACE INTO `sys_menu` VALUES (1559375615193255938, 0, '/myAgent/ConferenceRoom', '', 0, 'icon-check-circle', 0, 1067246875800000001, '2022-08-16 11:04:53', 1067246875800000001, '2022-08-16 11:04:53');
|
||||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1067246875800000002, 'name', 'Authority Management', 'en-US');
|
||||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1067246875800000002, 'name', '权限管理', 'zh-CN');
|
||||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1067246875800000002, 'name', '權限管理', 'zh-TW');
|
||||
|
@ -635,7 +639,6 @@ REPLACE INTO `sys_language` VALUES ('sys_menu', 1481447557123100673, 'name', 'Ex
|
|||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1481447557123100673, 'name', '导出', 'zh-CN');
|
||||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1481447557123100673, 'name', '導出', 'zh-TW');
|
||||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1513775256278900737, 'name', '转正表单', 'zh-CN');
|
||||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1513797246491648001, 'name', '融合服务', 'zh-CN');
|
||||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1514156880712777730, 'name', '能力申请表单', 'zh-CN');
|
||||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1523928422334148609, 'name', '工作动态', 'zh-CN');
|
||||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1526084841978781697, 'name', '算法仓管理', 'zh-CN');
|
||||
|
@ -667,3 +670,8 @@ REPLACE INTO `sys_language` VALUES ('sys_menu', 1545312045695377410, 'name', '
|
|||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1545313018614521857, 'name', '能力资源下架', 'zh-CN');
|
||||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1545313754106699777, 'name', '评论审核', 'zh-CN');
|
||||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1546381109252136961, 'name', '数据修改日志', 'zh-CN');
|
||||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1554294862931562498, 'name', '会议室', 'zh-CN');
|
||||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1556618294872526850, 'name', '会议室审核管理', 'zh-CN');
|
||||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1557271824436301825, 'name', '融合服务', 'zh-CN');
|
||||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1557271925414170626, 'name', '赋能场景', 'zh-CN');
|
||||
REPLACE INTO `sys_language` VALUES ('sys_menu', 1559375615193255938, 'name', '会议室管理', 'zh-CN');
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
CREATE TABLE `t_meetingroom` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT,
|
||||
`num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '房间号',
|
||||
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '名称',
|
||||
`area` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '面积',
|
||||
`capacity` int DEFAULT NULL COMMENT '可容纳人数',
|
||||
`pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '会议室图片',
|
||||
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '描述',
|
||||
`create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`modify_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`del_flag` int DEFAULT '0' COMMENT '是否删除',
|
||||
`creator` bigint DEFAULT NULL COMMENT '创建者',
|
||||
`modifier` bigint DEFAULT NULL COMMENT '修改者',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='会议室';
|
||||
|
||||
CREATE TABLE `t_meetingroom_book` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT,
|
||||
`room_id` bigint NOT NULL COMMENT '会议室id',
|
||||
`book_date` datetime DEFAULT NULL COMMENT '预约日期',
|
||||
`start_time` datetime DEFAULT NULL COMMENT '预约开始时间',
|
||||
`end_time` datetime DEFAULT NULL COMMENT '预约结束时间',
|
||||
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '预约人',
|
||||
`phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '联系电话',
|
||||
`dept` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '预约部门',
|
||||
`matter` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '使用事项',
|
||||
`file` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件',
|
||||
`create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`creator` bigint DEFAULT NULL COMMENT '创建者',
|
||||
`state` int DEFAULT '0' COMMENT '审核状态',
|
||||
`audit_viem` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '审核意见',
|
||||
`auditor` bigint DEFAULT NULL COMMENT '审核者',
|
||||
`audit_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '审核时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='会议室预约';
|
|
@ -0,0 +1,5 @@
|
|||
ALTER TABLE `share_platform`.`t_meetingroom`
|
||||
MODIFY COLUMN `pic` varchar(8000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '会议室图片' AFTER `capacity`;
|
||||
|
||||
ALTER TABLE `share_platform`.`t_meetingroom_book`
|
||||
MODIFY COLUMN `matter` varchar(8000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '使用事项' AFTER `dept`;
|
|
@ -103,6 +103,13 @@
|
|||
DISTINCT tdr.id,
|
||||
tdr.create_date,
|
||||
tdr.visits,
|
||||
tdr.visitor,
|
||||
tdr.pin_top,
|
||||
tdr.pin_top_time,
|
||||
tdr.dept_id,
|
||||
sd.type AS "deptType",
|
||||
sd.sort AS "deptSort",
|
||||
sr.sort AS "regionSort",
|
||||
IFNULL(taa2.approve_status, '未申请') AS "applyState",
|
||||
IFNULL(trs.score, 0 ) AS "score",
|
||||
IFNULL(taa.applyCount, 0 ) AS "applyCount",
|
||||
|
@ -135,6 +142,7 @@
|
|||
AND del_flag = 0 AND user_id = #{dto.creator} AND approve_status = '通过' GROUP BY resource_id ) taa3 ON tdr.id =
|
||||
taa3.resource_id
|
||||
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
|
||||
LEFT JOIN sys_region sr ON sd.district = sr.id
|
||||
WHERE 1 = 1
|
||||
AND tdr.del_flag = 0
|
||||
<if test="dto.type != null and dto.type != '赋能案例'">
|
||||
|
@ -191,7 +199,7 @@
|
|||
ORDER BY ${orderField} ${orderType}, pin_top_time DESC
|
||||
</if>
|
||||
<if test="orderField == 'deptSort'">
|
||||
ORDER BY sd.type, sd.sort
|
||||
ORDER BY sd.type, sr.sort, sd.sort, tdr.dept_id, tdr.visitor DESC, tdr.id DESC
|
||||
</if>
|
||||
<if test="orderField != 'pin_top' and orderField != 'deptSort'">
|
||||
ORDER BY ${orderField} ${orderType}
|
||||
|
@ -263,12 +271,12 @@
|
|||
WHERE
|
||||
1 = 1
|
||||
AND tdr.del_flag = 0
|
||||
AND tdr.type != '知识库'
|
||||
AND tdr.type != '赋能案例'
|
||||
<if test="type != null and type != ''">
|
||||
<!-- AND tdr.type LIKE CONCAT('%',#{type},'%') -->
|
||||
AND MATCH (tdr.type) AGAINST ( #{type} IN BOOLEAN MODE)
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
<!--AND tdr.name LIKE CONCAT('%',#{name},'%') -->
|
||||
AND MATCH (tdr.name) AGAINST ( #{name} IN BOOLEAN MODE)
|
||||
</if>
|
||||
ORDER BY ${orderFiled} ${orderType}
|
||||
|
@ -388,10 +396,14 @@
|
|||
tdr.total AS total,
|
||||
tdr.pin_top,
|
||||
tdr.pin_top_time,
|
||||
tdr.visitor,
|
||||
IFNULL(trs.score, 0 ) AS "score",
|
||||
IFNULL(taa.applyCount, 0 ) AS "applyCount",
|
||||
IFNULL(trc.collectCount, 0) AS "collectCount",
|
||||
sd.name AS "deptName",
|
||||
sd.type AS "deptType",
|
||||
sd.sort AS "deptSort",
|
||||
sr.sort AS "regionSort",
|
||||
IFNULL(trc2.isCollect, 'false') AS "isCollect",
|
||||
IFNULL(taa2.approve_status, '未申请') AS "applyState",
|
||||
IF ( IFNULL( trcar.car, 0 ) > 0, TRUE, FALSE ) AS "isInShoppingCart",
|
||||
|
@ -417,6 +429,7 @@
|
|||
AND del_flag = 0 AND user_id = #{dto.creator} AND approve_status = '通过' GROUP BY resource_id ) taa3 ON tdr.id =
|
||||
taa3.resource_id
|
||||
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
|
||||
LEFT JOIN sys_region sr ON sd.district = sr.id
|
||||
WHERE 1 = 1
|
||||
AND tdr.del_flag = 0
|
||||
|
||||
|
@ -463,7 +476,7 @@
|
|||
ORDER BY ${orderField} ${orderType}, pin_top_time DESC
|
||||
</if>
|
||||
<if test="orderField == 'deptSort'">
|
||||
ORDER BY sd.type, sd.sort
|
||||
ORDER BY sd.type, sr.sort, sd.sort, tdr.dept_id, tdr.visitor DESC, tdr.id DESC
|
||||
</if>
|
||||
<if test="orderField != 'pin_top' and orderField != 'deptSort'">
|
||||
ORDER BY ${orderField} ${orderType}
|
||||
|
@ -475,7 +488,9 @@
|
|||
<select id="selectDTOPageSpecilTotal" resultType="java.util.Map">
|
||||
SELECT
|
||||
tdr.id,
|
||||
tdr.total AS total
|
||||
IFNULL(tdr.total,0) AS total,
|
||||
tdr.pin_top,
|
||||
UNIX_TIMESTAMP(tdr.pin_top_time) AS pin_top_time
|
||||
FROM
|
||||
tb_data_resource tdr
|
||||
WHERE
|
||||
|
@ -600,7 +615,8 @@
|
|||
IFNULL( tdr.deptCount, 0 ) AS "deptCount",
|
||||
sd.id AS "deptId",
|
||||
sr.name AS "districtName",
|
||||
sr.id AS "districtId"
|
||||
sr.id AS "districtId",
|
||||
sr.sort AS "regionSort"
|
||||
FROM
|
||||
sys_dept sd
|
||||
LEFT JOIN ( SELECT dept_id, COUNT( id ) AS "deptCount" FROM tb_data_resource WHERE 1 = 1 AND del_flag = 0
|
||||
|
@ -1508,10 +1524,16 @@
|
|||
SELECT
|
||||
tdr.id,
|
||||
tdr.`name`,
|
||||
sd.name AS "deptName"
|
||||
tdr.dept_id,
|
||||
sd.name AS "deptName",
|
||||
sd.sort AS "deptSort",
|
||||
sd.type AS "deptType",
|
||||
sr.sort AS "regionSort",
|
||||
tdr.visitor
|
||||
FROM
|
||||
tb_data_resource tdr
|
||||
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
|
||||
LEFT JOIN sys_region sr ON sd.district = sr.id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND tdr.type = '应用资源'
|
||||
|
@ -1520,7 +1542,7 @@
|
|||
AND sd.type = #{type}
|
||||
</if>
|
||||
ORDER BY
|
||||
tdr.visitor
|
||||
sd.type, sr.sort, sd.sort, tdr.dept_id, tdr.visitor DESC, tdr.id DESC
|
||||
LIMIT ${pageNum}, 9
|
||||
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue