Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
08bde6f597
|
@ -314,4 +314,18 @@ public class CensusController {
|
|||
return new Result().ok(resourceService.capabilityTypeCapabilitySet());
|
||||
}
|
||||
|
||||
@GetMapping("/applicationAreaCapabilitySet")
|
||||
@ApiOperation("资源图谱-应用领域-能力集")
|
||||
@LogOperation("资源图谱-应用领域-能力集")
|
||||
public Result applicationAreaCapabilitySet() {
|
||||
return new Result().ok(resourceService.applicationAreaCapabilitySet());
|
||||
}
|
||||
|
||||
@GetMapping("/selectResourceListByType")
|
||||
@ApiOperation("资源图谱-能力类型-能力集-根据类型查能力")
|
||||
@LogOperation("资源图谱-能力类型-能力集-根据类型查能力")
|
||||
public Result selectResourceListByType(String type) {
|
||||
return new Result().ok(resourceService.selectResourceListByType(type));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -69,4 +69,7 @@ public interface ResourceService extends CrudService<ResourceEntity, ResourceDTO
|
|||
|
||||
Object capabilityTypeCapabilitySet();
|
||||
|
||||
Object applicationAreaCapabilitySet();
|
||||
|
||||
Object selectResourceListByType(String type);
|
||||
}
|
|
@ -518,4 +518,23 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object applicationAreaCapabilitySet() {
|
||||
HashMap<String, Object> resultMap = new HashMap<>();
|
||||
//List<String> types = resourceDao.selectMaxAppArea();
|
||||
//List<Map> resourceList = resourceDao.selectByApparea(types.get(0));
|
||||
//HashMap<String, Object> maxdeptMap = new HashMap<>();
|
||||
//maxdeptMap.put("resourceList", resourceList);
|
||||
//maxdeptMap.put("typeName", types.get(0));
|
||||
//resultMap.put("maxDept", maxdeptMap);
|
||||
//List<Map> deptList = resourceDao.selectTypeCountList();
|
||||
//resultMap.put("typeList", deptList);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object selectResourceListByType(String type) {
|
||||
return resourceDao.selectByType(type);
|
||||
}
|
||||
|
||||
}
|
|
@ -59,17 +59,17 @@ public class ResourceBrowseServiceImpl extends CrudServiceImpl<ResourceBrowseDao
|
|||
Date startDay = DateUtils.parse(startDate, DateUtils.DATE_PATTERN);
|
||||
Date endDay = DateUtils.parse(endDate, DateUtils.DATE_PATTERN);
|
||||
ArrayList<String> dayList = new ArrayList<>();
|
||||
while (startDay.before(endDay)) {
|
||||
while (startDay.before(endDay) || startDay.compareTo(endDay) == 0) {
|
||||
dayList.add(DateUtils.format(startDay, DateUtils.DATE_PATTERN));
|
||||
startDay = DateUtils.addDateDays(startDay, 1);
|
||||
}
|
||||
ArrayList<Map<String, Integer>> resultMap = new ArrayList<>();
|
||||
ArrayList<Map<String, Object>> resultMap = new ArrayList<>();
|
||||
for (int i = 0; i < dayList.size(); i++) {
|
||||
HashMap<String, Integer> dayMap = new HashMap<>();
|
||||
HashMap<String, Object> dayMap = new HashMap<>();
|
||||
dayMap.put(dayList.get(i), 0);
|
||||
for (Map map : maps) {
|
||||
if (dayList.get(i).equals(map.get("date"))) {
|
||||
dayMap.put(dayList.get(i), (Integer) map.get("count"));
|
||||
dayMap.put(dayList.get(i), map.get("count"));
|
||||
}
|
||||
}
|
||||
resultMap.add(dayMap);
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
WHERE
|
||||
1 = 1
|
||||
AND state = 0
|
||||
AND SUBSTR(create_date, 1, 10) BETWEEN ${startDate} AND ${endDate}
|
||||
AND SUBSTR(create_date, 1, 10) BETWEEN #{startDate} AND #{endDate}
|
||||
GROUP BY
|
||||
SUBSTR(create_date, 1, 10)
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue