* 'dev' of http://192.168.124.50/wangliwen/share-platform:
  能力下架 npe
  统计报表去掉已下架、审批时间单位、增加恩科用户
  1.能力广场列表查询增加图片 2.门户首页-能力汇聚-基础设施增加会客厅和视频会议数量查询
  审核人为默认时 允许转办
  知识库数目不一致的问题处理
  全局搜索数量支持非中文
  pageWithAttrs 支持非中文试用 like 查询模式
This commit is contained in:
huangweixiong 2022-10-26 19:43:05 +08:00
commit 4042a71e4d
15 changed files with 147 additions and 70 deletions

View File

@ -39,6 +39,16 @@ VALUES (11, '市公安局', '市公安局', '127.0.0.1', '127.0.0.1', '2022-09-1
INSERT INTO `enke_hostinfo`
VALUES (12, '市交通运输局', '市交通运输局', '127.0.0.1', '127.0.0.1', '2022-09-11 09:20:07');
INSERT INTO `enke_hostinfo`
VALUES (13, '一网统揽平台组', '一网统揽平台组', '127.0.0.1', '127.0.0.1', '2022-09-10 09:20:07');
VALUES (13, '一网统揽平台组', '一网统揽平台组', '127.0.0.1', '127.0.0.1', '2022-09-29 09:20:07');
INSERT INTO `enke_hostinfo`
VALUES (14, '青岛市一网统揽项目组', '青岛市一网统揽项目组', '127.0.0.1', '127.0.0.1', '2022-09-09 09:20:07');
VALUES (14, '青岛市一网统揽项目组', '青岛市一网统揽项目组', '127.0.0.1', '127.0.0.1', '2022-09-30 09:20:07');
INSERT INTO `enke_hostinfo`
VALUES (15, '市北区一网统揽项目组', '市北区一网统揽项目组', '127.0.0.1', '127.0.0.1', '2022-09-28 09:20:07');
INSERT INTO `enke_hostinfo`
VALUES (16, '李沧区一网统揽项目组', '李沧区一网统揽项目组', '127.0.0.1', '127.0.0.1', '2022-09-27 09:20:07');
INSERT INTO `enke_hostinfo`
VALUES (17, '崂山区一网统揽项目组', '崂山区一网统揽项目组', '127.0.0.1', '127.0.0.1', '2022-09-26 09:20:07');
INSERT INTO `enke_hostinfo`
VALUES (18, ' 西海岸新区一网统揽项目组', ' 西海岸新区一网统揽项目组', '127.0.0.1', '127.0.0.1', '2022-09-25 09:20:07');
INSERT INTO `enke_hostinfo`
VALUES (19, ' 城阳区一网统揽项目组', ' 城阳区一网统揽项目组', '127.0.0.1', '127.0.0.1', '2022-09-24 09:20:07');

View File

@ -93,16 +93,16 @@ public class ActivitiServiceImpl extends BaseServiceImpl<ProcessActivityDao, Pro
StringBuilder builder = new StringBuilder();
Duration duration = Duration.ofSeconds(second);
if (duration.toDays() > 0) {
builder.append(duration.toDays() + "d ");
builder.append(duration.minus(Duration.ofDays(duration.toDays())).toHours() + "h");
builder.append(duration.toDays() + " ");
builder.append(duration.minus(Duration.ofDays(duration.toDays())).toHours() + "");
} else if (duration.toHours() > 0) {
builder.append(duration.toHours() + "h ");
builder.append(duration.minus(Duration.ofHours(duration.toHours())).toMinutes() + "m");
builder.append(duration.toHours() + " ");
builder.append(duration.minus(Duration.ofHours(duration.toHours())).toMinutes() + "");
} else if (duration.toMinutes() > 0) {
builder.append(duration.toMinutes() + "m ");
builder.append(duration.minus(Duration.ofMinutes(duration.toMinutes())).getSeconds() + "s");
builder.append(duration.toMinutes() + " ");
builder.append(duration.minus(Duration.ofMinutes(duration.toMinutes())).getSeconds() + "");
} else {
builder.append(second + "s");
builder.append(second + "");
}
return builder.toString();
}

View File

@ -146,6 +146,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
logger.error("未查到该部门对应的{} ", roleName);
taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId);
assignee = defaultAssigneeRoleId;
taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托
}
} else { // 填入大数据审批人
logger.error("大数据局名称:{}", bigDateDeptName);
@ -157,10 +158,12 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
logger.error("大数据审批人id:{}", userDTO.getId());
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
assignee = userDTO.getId().toString();
taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托
} else {
taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId);
logger.error("未查到大数据部门对应 {}", roleName);
assignee = defaultAssigneeRoleId;
taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托
}
}

View File

@ -142,6 +142,7 @@ public class CommentListener implements TaskListener, ExecutionListener, Activit
delegateTask.setAssignee(defaultAssigneeRoleId);
logger.error("未查到该部门对应 {}", roleName);
assignee = defaultAssigneeRoleId;
taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托
}
Map<String, Object> kv = delegateTask.getVariables();

View File

@ -113,6 +113,7 @@ public class DataCenterListener implements TaskListener, ExecutionListener, Acti
logger.error("审批人id:" + userDTO.getId());
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
assignee = userDTO.getId().toString();
taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托
} else {
delegateTask.setAssignee(defaultAssigneeRoleId);
logger.error("未查到该部门对应 " + roleName);

View File

@ -185,6 +185,7 @@ public class CorrectionListenerV2 implements TaskListener, ExecutionListener, Ac
logger.error("未查到该部门 {} 对应的 {}", deptId, roleName);
taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId);
assignee = defaultAssigneeRoleId;
taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托
}
if (kv.containsKey("tAbilityApplicationDTOList")) {
List<TAbilityApplicationDTO> dtoList = (List<TAbilityApplicationDTO>) kv.get("tAbilityApplicationDTOList");

View File

@ -636,8 +636,8 @@ public class ResourceController {
@GetMapping("/getCountByFuzzyQuery")
@ApiOperation("获取各类资源模糊查询总数")
@LogOperation("获取各类资源模糊查询总数")
public Result getCountByFuzzyQuery(@RequestParam String keyWorld) {
return new Result<>().ok(resourceService.getCountByFuzzyQuery(keyWorld));
public Result getCountByFuzzyQuery(@RequestParam String keyWorld, @RequestParam String nonChinese) {
return new Result<>().ok(resourceService.getCountByFuzzyQuery(keyWorld, nonChinese));
}

View File

@ -26,7 +26,9 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
@Cacheable(value = "selectWithAttrs", key = "#p0+'-'+#orderField+'-'+#orderType")
List<ResourceDTO> selectWithAttrs(@Param("dto") ResourceDTO resourceDTO,
@Param("orderField") String orderField,
@Param("orderType") String orderType);
@Param("orderType") String orderType,
@Param("nonChinese") Boolean nonChinese
);
List<Map> selectTypeCount(String type);
@ -39,7 +41,8 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
@Param("pageSize") Integer pageSize,
@Param("orderField") String orderField,
@Param("orderType") String orderType,
@Param("ids") List<Long> ids
@Param("ids") List<Long> ids,
@Param("nonChinese") Boolean nonChinese
);
/**
@ -173,9 +176,9 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
List<Map> selectAppList(@Param("pageNum") int pageNum, @Param("type") Integer type, @Param("area") String area);
String selectPicByResId(@Param("id") String id);
String selectPicByResId(@Param("id") String id, @Param("resourceType") String resourceType);
List<Map> selectTypeCountByName(@Param("keyWorld") String keyWorld);
List<Map> selectTypeCountByName(@Param("keyWorld") String keyWorld, @Param("nonChinese") Boolean nonChinese);
List<Map> countByCIMType(@Param("deptId") Long deptId);

View File

@ -143,9 +143,11 @@ public class ResourceUndercarriageListener implements TaskListener, ExecutionLis
} else {
logger.error("未查到该部门对应的 " + roleName + " 将使用大数据部门审核人");
assignee = defaultUser(delegateTask.getId(), roleDTO);
taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托
}
} else {
assignee = defaultUser(delegateTask.getId(), roleDTO);
taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托
}
if (StringUtils.isNotEmpty(assignee)

View File

@ -140,7 +140,7 @@ public interface ResourceService extends CrudService<ResourceEntity, ResourceDTO
Object selectAppList(Map params);
Object getCountByFuzzyQuery(String keyWorld);
Object getCountByFuzzyQuery(String keyWorld, String nonChinese);
Object selectApplyDeptDetailTypeCountList(Map params);

View File

@ -16,7 +16,9 @@ import io.renren.common.domain.Tsingtao_xhaProperties;
import io.renren.common.page.PageData;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.utils.DateUtils;
import io.renren.modules.enke.service.EnkeService;
import io.renren.modules.meeting.dao.TMeetingroomMapper;
import io.renren.modules.meeting.entity.TMeetingroom;
import io.renren.modules.monitor.dto.CameraChannelDto1;
import io.renren.modules.monitor.entity.CameraChannel;
import io.renren.modules.monitor.mapper.CameraChannelMapper;
@ -191,6 +193,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
@Resource
private TMeetingroomMapper tMeetingroomMapper;
@Autowired
private EnkeService enkeService;
@Override
public QueryWrapper<ResourceEntity> getWrapper(Map<String, Object> params) {
@ -404,6 +409,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
resourceDTO.setCreator(SecurityUser.getUser().getId());
Integer pageNum = jsonObject.getInteger("pageNum");
Integer pageSize = jsonObject.getInteger("pageSize");
Boolean nonChinese = jsonObject.containsKey("nonChinese") ? jsonObject.getBoolean("nonChinese") : Boolean.FALSE; // 不传默认为中文走全文索引
//默认按上架时间降序排列
String orderField;
if (StringUtils.isBlank(jsonObject.getString("orderField"))) {
@ -416,7 +422,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
case TSINGTAO:
case BAOTOU: { // 包头青岛
resultPage = common(resultPage, selectDTOPageSpecilTotal, resourceDTO, orderField, orderType, pageNum, pageSize);
resultPage = common(resultPage, selectDTOPageSpecilTotal, resourceDTO, orderField, orderType, pageNum, pageSize, nonChinese);
}
break;
case TSINGTAO_XHA: {
@ -463,7 +469,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
}
} else { // 西海岸普通资源
logger.info("西海岸普通");
resultPage = common(resultPage, selectDTOPageSpecilTotal, resourceDTO, orderField, orderType, pageNum, pageSize);
resultPage = common(resultPage, selectDTOPageSpecilTotal, resourceDTO, orderField, orderType, pageNum, pageSize, nonChinese);
}
}
break;
@ -476,7 +482,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
* 从本库内查询
*/
@SneakyThrows
private Page<ResourceDTO> common(Page<ResourceDTO> resultPage, List<Map> selectDTOPageSpecilTotal, ResourceDTO resourceDTO, String orderField, String orderType, Integer pageNum, Integer pageSize) {
private Page<ResourceDTO> common(Page<ResourceDTO> resultPage, List<Map> selectDTOPageSpecilTotal, ResourceDTO resourceDTO, String orderField, String orderType, Integer pageNum, Integer pageSize, Boolean nonChinese) {
if (resourceDTO.getInfoList().isEmpty()) {
List<ResourceDTO> resourceDTOS;
if (orderField.equals("total")) { // 对总体评价特殊处理
@ -514,7 +520,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
}).get();
break;
}
resourceDTOS = resourceDao.selectDTOPage(resourceDTO, null, null, null, null, ids);
resourceDTOS = resourceDao.selectDTOPage(resourceDTO, null, null, null, null, ids, nonChinese);
if ("DESC".equals(orderType)) {
resourceDTOS = resourceDTOS.stream().sorted(Comparator.comparing(x -> {
ResourceDTO index = (ResourceDTO) x;
@ -544,13 +550,13 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
}
customThreadPool.shutdown();
} else { // 非总体评价排序时
resourceDTOS = resourceDao.selectDTOPage(resourceDTO, (pageNum - 1) * pageSize, pageSize, orderField, orderType, null);
resourceDTOS = resourceDao.selectDTOPage(resourceDTO, (pageNum - 1) * pageSize, pageSize, orderField, orderType, null, nonChinese);
}
resultPage.setRecords(resourceDTOS);
resultPage.setTotal(resourceDao.selectDTOPageCount(resourceDTO));
} else {
logger.info("排序要求 orderField:{} orderType:{}", orderField, orderType);
List<ResourceDTO> resourceDTOS = resourceDao.selectWithAttrs(resourceDTO, orderField, orderType);
List<ResourceDTO> resourceDTOS = resourceDao.selectWithAttrs(resourceDTO, orderField, orderType, nonChinese);
if (resourceDTOS.isEmpty()) {
resultPage.setRecords(new ArrayList<>());
resultPage.setTotal(0);
@ -1499,9 +1505,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
Integer type = params.containsKey("type") ? Integer.parseInt(params.get("type").toString()) : null;
String area = params.containsKey("area") ? params.get("area").toString() : null;
List<Map> maps = resourceDao.selectAppList((pageNum - 1) * 9, type, area);
maps.forEach(x -> x.put("pic", resourceDao.selectPicByResId(x.get("id").toString())));
maps.forEach(x -> x.put("pic", resourceDao.selectPicByResId(x.get("id").toString(), "应用资源")));
return new HashMap() {{
put("appList",maps);
put("appList", maps);
put("total", resourceDao.selectAppListCount(type, area));
}};
}
@ -1876,14 +1882,33 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
@Override
public Object selectInfrastructureList() {
HashMap<String, Object> resultMap = new HashMap<>();
Map map = (Map) selectTotal();
List<Map<String, Object>> list = (List<Map<String, Object>>) map.get("total");
list.forEach(index -> {
if ("基础设施".equals(index.get("type").toString())) {
resultMap.put("视频资源", Integer.parseInt(index.get("count").toString()));
}
});
resultMap.put("云资源", 0);
//视频资源
CompletableFuture<Void> jcss = CompletableFuture.runAsync(() -> {
Map map = (Map) selectTotal();
List<Map<String, Object>> list = (List<Map<String, Object>>) map.get("total");
list.forEach(index -> {
if ("基础设施".equals(index.get("type").toString())) {
resultMap.put("视频资源", Integer.parseInt(index.get("count").toString()));
}
});
}, executor);
//新增会客厅和视频会议统计
//会客厅
CompletableFuture<Void> hkt = CompletableFuture.runAsync(() -> {
QueryWrapper<TMeetingroom> wrapper = new QueryWrapper<>();
resultMap.put("会客厅", tMeetingroomMapper.selectCount(wrapper));
}, executor);
//视频会议
CompletableFuture<Void> sphy = CompletableFuture.runAsync(() -> {
resultMap.put("视频会议", enkeService.page(new HashMap<>()).getTotal());
}, executor);
CompletableFuture<Void> all = CompletableFuture.allOf(jcss, hkt, sphy);
all.join();
return resultMap;
}
@ -1976,9 +2001,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
}
@Override
public Object getCountByFuzzyQuery(String keyWorld) {
public Object getCountByFuzzyQuery(String keyWorld, String nonChinese) {
ArrayList<Map> resultList = new ArrayList<>();
CompletableFuture<Void> DBresourceCount = CompletableFuture.runAsync(() -> resultList.addAll(resourceDao.selectTypeCountByName(keyWorld)));
Boolean nonChinese_ = Boolean.getBoolean(nonChinese);// 不传默认为中文走全文索引
CompletableFuture<Void> DBresourceCount = CompletableFuture.runAsync(() -> resultList.addAll(resourceDao.selectTypeCountByName(keyWorld, nonChinese_)));
final Integer[] meetCountNew = new Integer[1];
switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
case TSINGTAO: {
@ -2402,7 +2428,6 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
@Override
public Object getStarList() {
return resourceDao.getStarList();
}
@ -2422,8 +2447,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
Integer pageNum = jsonObject.getInteger("pageNum");
Integer pageSize = jsonObject.getInteger("pageSize");
Integer i = (pageNum - 1) * pageSize;
List<Map> maps = resourceDao.getSquareList(type, deptType, area, i, pageSize);
maps.forEach(x -> x.put("pic", resourceDao.selectPicByResId(x.get("id").toString(), type)));
return new HashMap() {{
put("list", resourceDao.getSquareList(type, deptType, area, i, pageSize));
put("list", maps);
put("total", resourceDao.getSquareListCount(type, deptType, area));
}};
}

View File

@ -68,11 +68,13 @@ public class TResourceMountApplyController {
// @RequiresPermissions("resourceMountApply:tresourcemountapply:info")
public Result<TResourceMountApplyDTO> get(@PathVariable("id") Long id) {
TResourceMountApplyDTO data = tResourceMountApplyService.get(id);
SysDeptDTO sysDeptDTO = sysDeptService.get(Long.valueOf(data.getDeptId()));
if (sysDeptDTO != null) {
ResourceDTO resourceDTO = data.getResourceDTO();
resourceDTO.setDeptName(sysDeptDTO.getName());
data.setResourceDTO(resourceDTO);
if (data.getDeptId() != null) {
SysDeptDTO sysDeptDTO = sysDeptService.get(Long.valueOf(data.getDeptId()));
if (sysDeptDTO != null) {
ResourceDTO resourceDTO = data.getResourceDTO();
resourceDTO.setDeptName(sysDeptDTO.getName());
data.setResourceDTO(resourceDTO);
}
}
return new Result<TResourceMountApplyDTO>().ok(data);
}

View File

@ -215,6 +215,7 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A
logger.error("未查到该部门对应的 " + roleName);
taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId);
assignee = defaultAssigneeRoleId;
taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托
}
} else if (resourceMountApplyDTO.getDeptId() != null) {
SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(Long.valueOf(resourceMountApplyDTO.getDeptId()), roleDTO.getId());
@ -226,6 +227,7 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A
taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId);
logger.error("未查到部门对应 " + resourceMountApplyDTO.getDeptId());
assignee = defaultAssigneeRoleId;
taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托
}
} else {
logger.error("大数据局名称:" + bigDateDeptName);
@ -241,6 +243,7 @@ public class ResourceOwnerListener implements TaskListener, ExecutionListener, A
taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId);
logger.error("未查到大数据部门对应 " + roleName);
assignee = defaultAssigneeRoleId;
taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托
}
}

View File

@ -85,6 +85,7 @@ public class ShiroConfig {
filterMap.put("/census/center/**", "anon"); // 全局各类统计 包含 /census/center/v2
filterMap.put("/metrics/**", "anon");
filterMap.put("/gateway-monitor/**", "anon");
filterMap.put("/enke/**", "anon");
filterMap.put("/**", "oauth2");
shiroFilter.setFilterChainDefinitionMap(filterMap);

View File

@ -157,9 +157,12 @@
<if test="dto.type != null and dto.type != ''">
AND MATCH (tdr.type) AGAINST ( #{dto.type} IN BOOLEAN MODE)
</if>
<if test="dto.name != null and dto.name != ''">
<if test="dto.name != null and dto.name != '' and nonChinese == false">
AND MATCH (tdr.name) AGAINST ( #{dto.name} IN BOOLEAN MODE)
</if>
<if test="dto.name != null and dto.name != '' and nonChinese == true">
AND tdr.name LIKE CONCAT( '%', #{dto.name}, '%' )
</if>
<if test="dto.districtId != null and dto.districtId != ''">
AND tdr.district_id = #{dto.districtId}
</if>
@ -210,7 +213,6 @@
<if test="orderField != 'pin_top' and orderField != 'deptSort'">
ORDER BY ${orderField} ${orderType}
</if>
</if>
</select>
@ -280,7 +282,7 @@
AND tdr.type != '知识库'
AND tdr.type != '赋能案例'
<if test="type != null and type != ''">
AND MATCH (tdr.type) AGAINST ( #{type} IN BOOLEAN MODE)
AND tdr.type = #{type}
</if>
<if test="name != null and name != ''">
AND MATCH (tdr.name) AGAINST ( #{name} IN BOOLEAN MODE)
@ -442,11 +444,14 @@
<if test="dto.type != '赋能案例'">
AND tdr.type != '赋能案例'
</if>
<if test="dto.name != null and dto.name != ''">
<if test="dto.name != null and dto.name != '' and nonChinese == false">
AND MATCH (tdr.name) AGAINST ( #{dto.name} IN BOOLEAN MODE)
</if>
<if test="dto.name != null and dto.name != '' and nonChinese == true">
AND tdr.name LIKE CONCAT( '%', #{dto.name}, '%' )
</if>
<if test="dto.type != null and dto.type != '' ">
AND MATCH (tdr.type) AGAINST ( #{dto.type} IN BOOLEAN MODE)
AND tdr.type = #{dto.type}
</if>
@ -506,7 +511,7 @@
AND MATCH (tdr.name) AGAINST ( #{dto.name} IN BOOLEAN MODE)
</if>
<if test="dto.type != null and dto.type != ''">
AND MATCH (tdr.type) AGAINST ( #{dto.type} IN BOOLEAN MODE)
AND tdr.type = #{dto.type}
</if>
<if test="dto.districtId != null and dto.districtId != ''">
AND tdr.district_id = #{dto.districtId}
@ -538,7 +543,7 @@
AND MATCH (tdr.name) AGAINST ( #{dto.name} IN BOOLEAN MODE)
</if>
<if test="dto.type != null and dto.type != ''">
AND MATCH (tdr.type) AGAINST ( #{dto.type} IN BOOLEAN MODE)
AND tdr.type = #{dto.type}
</if>
<if test="dto.districtId != null and dto.districtId != ''">
AND tdr.district_id = #{dto.districtId}
@ -658,7 +663,7 @@
sys_dept sd
LEFT JOIN ( SELECT dept_id, COUNT( id ) AS "deptCount" FROM tb_data_resource WHERE 1 = 1 AND del_flag = 0
<if test="resourceType != null and resourceType != ''">
AND MATCH (type) AGAINST ( #{resourceType} IN BOOLEAN MODE)
AND type = #{resourceType}
</if>
GROUP BY dept_id ) tdr ON sd.id = tdr.dept_id
) temp1
@ -699,7 +704,7 @@
LEFT JOIN ( SELECT dept_id, COUNT( id ) AS "deptCount" FROM tb_data_resource
WHERE 1 = 1 AND del_flag = 0
<if test="resourceType != null and resourceType != ''">
AND MATCH (type) AGAINST ( #{resourceType} IN BOOLEAN MODE)
AND type = #{resourceType}
</if>
GROUP BY dept_id ) tdr ON sd.id = tdr.dept_id
LEFT JOIN sys_region sr ON sd.district = sr.id
@ -1071,7 +1076,7 @@
FROM tb_data_resource
WHERE 1 = 1
AND del_flag = 0
AND MATCH (type) AGAINST ( #{type} IN BOOLEAN MODE)
AND type = #{type}
AND type != '赋能案例'
</select>
@ -1601,7 +1606,8 @@
AND sd.type = #{type}
</if>
<if test=" area != null and area != ''">
AND JSON_EXTRACT( info_list, JSON_UNQUOTE( REPLACE ( JSON_SEARCH( info_list, 'all', '应用领域', NULL, '$[*].attrType' ), 'attrType', 'attrValue' ) ) ) LIKE CONCAT( '%', #{area}, '%' )
AND JSON_EXTRACT( info_list, JSON_UNQUOTE( REPLACE ( JSON_SEARCH( info_list, 'all', '应用领域', NULL,
'$[*].attrType' ), 'attrType', 'attrValue' ) ) ) LIKE CONCAT( '%', #{area}, '%' )
</if>
ORDER BY
sd.type, sr.sort, sd.sort, tdr.dept_id, tdr.visitor DESC, tdr.id DESC
@ -1614,8 +1620,16 @@
FROM
tb_data_attr tda
LEFT JOIN tb_data_resource tdr ON tda.data_resource_id = tdr.id
WHERE
tda.attr_type = '应用图片'
WHERE 1 = 1
<if test="resourceType == '应用资源'" >
AND tda.attr_type = '应用图片'
</if>
<if test="resourceType == '图层服务'" >
AND tda.attr_type = '图层缩略图'
</if>
<if test="resourceType == '智能算法'" >
AND tda.attr_type = '应用场景'
</if>
AND tdr.id = #{id}
AND tda.del_flag = 0
</select>
@ -1626,9 +1640,12 @@
FROM tb_data_resource
WHERE 1 = 1
AND del_flag = 0
<if test="keyWorld != null and keyWorld != ''">
<if test="keyWorld != null and keyWorld != '' and nonChinese == false">
AND MATCH (name) AGAINST ( #{keyWorld} IN BOOLEAN MODE)
</if>
<if test="keyWorld != null and keyWorld != '' and nonChinese == true">
AND name LIKE CONCAT( '%', #{keyWorld}, '%' )
</if>
AND type != '赋能案例'
GROUP BY type
ORDER BY type
@ -1838,16 +1855,16 @@
tdr.type = '业务组件')
<choose>
<when test="approveStatus != null and approveStatus == '通过'">
AND tdr.del_flag in (0, 5)
AND tdr.del_flag=0
</when>
<when test="approveStatus != null and approveStatus == '审核中'">
AND tdr.del_flag not in (0, 1, 5, 6)
AND tdr.del_flag in (2, 3, 4)
</when>
<when test="approveStatus != null and approveStatus == '不通过'">
AND tdr.del_flag=6
</when>
<otherwise>
AND tdr.del_flag != 1
AND tdr.del_flag in (0, 2, 3, 4, 6)
</otherwise>
</choose>
<if test="deptId != null and deptId != ''">
@ -1868,7 +1885,8 @@
</select>
<select id="selectCensusResourceTable" resultType="java.util.Map">
SELECT sd.name AS deptName, tdr.name AS resourceName, tdr.type, DATE_FORMAT(tdr.create_date,'%Y-%m-%d %T') AS createDate,
SELECT sd.name AS deptName, tdr.name AS resourceName, tdr.type, DATE_FORMAT(tdr.create_date,'%Y-%m-%d %T') AS
createDate,
CASE WHEN (tdr.del_flag=0 OR tdr.del_flag=5) THEN '通过' WHEN tdr.del_flag=6 THEN '不通过' ELSE '审核中' END AS
approveStatus, trma.instance_id AS applyNumber
FROM (SELECT IF(d.type='组件服务', a.attr_value, d.type) AS type, d.id, d.del_flag, d.dept_id, d.create_date,
@ -1881,16 +1899,16 @@
WHERE 1=1 AND tdr.dept_id=sd.id
<choose>
<when test="approveStatus != null and approveStatus == '通过'">
AND tdr.del_flag in (0, 5)
AND tdr.del_flag=0
</when>
<when test="approveStatus != null and approveStatus == '审核中'">
AND tdr.del_flag not in (0, 1, 5, 6)
AND tdr.del_flag in (2, 3, 4)
</when>
<when test="approveStatus != null and approveStatus == '不通过'">
AND tdr.del_flag=6
</when>
<otherwise>
AND tdr.del_flag != 1
AND tdr.del_flag in (0, 2, 3, 4, 6)
</otherwise>
</choose>
<if test="deptId != null and deptId != ''">
@ -2179,7 +2197,8 @@
AND sd.type = #{type}
</if>
<if test=" area != null and area != ''">
AND JSON_EXTRACT( info_list, JSON_UNQUOTE( REPLACE ( JSON_SEARCH( info_list, 'all', '应用领域', NULL, '$[*].attrType' ), 'attrType', 'attrValue' ) ) ) LIKE CONCAT( '%', #{area}, '%' )
AND JSON_EXTRACT( info_list, JSON_UNQUOTE( REPLACE ( JSON_SEARCH( info_list, 'all', '应用领域', NULL,
'$[*].attrType' ), 'attrType', 'attrValue' ) ) ) LIKE CONCAT( '%', #{area}, '%' )
</if>
</select>
@ -2201,12 +2220,14 @@
1 = 1
AND MATCH ( tdr.type ) AGAINST ( '组件服务' IN BOOLEAN MODE )
AND tdr.del_flag = 0
AND tdr.id IN ( SELECT data_resource_id FROM tb_data_attr WHERE attr_type = '组件类型' AND attr_value = #{type} AND del_flag = 0 )
<if test = " deptType != null and deptType != ''">
AND tdr.id IN ( SELECT data_resource_id FROM tb_data_attr WHERE attr_type = '组件类型' AND attr_value = #{type}
AND del_flag = 0 )
<if test=" deptType != null and deptType != ''">
AND sd.type = #{deptType}
</if>
<if test = " area != null and area != ''">
AND JSON_EXTRACT( info_list, JSON_UNQUOTE( REPLACE ( JSON_SEARCH( info_list, 'all', '应用领域', NULL, '$[*].attrType' ), 'attrType', 'attrValue' ) ) ) LIKE CONCAT( '%', #{area}, '%')
<if test=" area != null and area != ''">
AND JSON_EXTRACT( info_list, JSON_UNQUOTE( REPLACE ( JSON_SEARCH( info_list, 'all', '应用领域', NULL,
'$[*].attrType' ), 'attrType', 'attrValue' ) ) ) LIKE CONCAT( '%', #{area}, '%')
</if>
ORDER BY
sd.type,
@ -2226,12 +2247,14 @@
1 = 1
AND MATCH ( tdr.type ) AGAINST ( '组件服务' IN BOOLEAN MODE )
AND tdr.del_flag = 0
AND tdr.id IN ( SELECT data_resource_id FROM tb_data_attr WHERE attr_type = '组件类型' AND attr_value = #{type} AND del_flag = 0 )
<if test = " deptType != null and deptType != ''">
AND tdr.id IN ( SELECT data_resource_id FROM tb_data_attr WHERE attr_type = '组件类型' AND attr_value = #{type}
AND del_flag = 0 )
<if test=" deptType != null and deptType != ''">
AND sd.type = #{deptType}
</if>
<if test = " area != null and area != ''">
AND JSON_EXTRACT( info_list, JSON_UNQUOTE( REPLACE ( JSON_SEARCH( info_list, 'all', '应用领域', NULL, '$[*].attrType' ), 'attrType', 'attrValue' ) ) ) LIKE CONCAT( '%', #{area}, '%')
<if test=" area != null and area != ''">
AND JSON_EXTRACT( info_list, JSON_UNQUOTE( REPLACE ( JSON_SEARCH( info_list, 'all', '应用领域', NULL,
'$[*].attrType' ), 'attrType', 'attrValue' ) ) ) LIKE CONCAT( '%', #{area}, '%')
</if>
</select>