zbj//1.资源管理(查询数据)
This commit is contained in:
@@ -6,6 +6,7 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
|||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.device.pq.pojo.param.LargeScreenParam;
|
import com.njcn.device.pq.pojo.param.LargeScreenParam;
|
||||||
|
import com.njcn.device.pq.pojo.po.ResourceData;
|
||||||
import com.njcn.device.pq.pojo.vo.MonitoringPointScaleVO;
|
import com.njcn.device.pq.pojo.vo.MonitoringPointScaleVO;
|
||||||
import com.njcn.device.pq.service.LargeScreenService;
|
import com.njcn.device.pq.service.LargeScreenService;
|
||||||
import com.njcn.device.pq.service.ResourceService;
|
import com.njcn.device.pq.service.ResourceService;
|
||||||
@@ -53,21 +54,21 @@ public class ResourceController extends BaseController {
|
|||||||
Boolean flag = iResourceAdministrationService.uploadFile(multipartFile, picture, name, type);
|
Boolean flag = iResourceAdministrationService.uploadFile(multipartFile, picture, name, type);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
*//**
|
/**
|
||||||
* 查询数据
|
* 查询数据
|
||||||
*//*
|
* @return List<ResourceData>
|
||||||
|
*/
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/queryData")
|
@PostMapping("/queryData")
|
||||||
@ApiOperation("查询数据")
|
@ApiOperation("查询数据")
|
||||||
@ApiImplicitParam(name = "resinformation", value = "查询数据", required = true)
|
public HttpResult<List<ResourceData>> queryData() {
|
||||||
public HttpResult<List<Resinformation>> queryData(@RequestBody Resinformation resinformation) {
|
|
||||||
String methodDescribe = getMethodDescribe("queryData");
|
String methodDescribe = getMethodDescribe("queryData");
|
||||||
List<Resinformation> result = iResourceAdministrationService.queryData(resinformation);
|
List<ResourceData> result = iResourceAdministrationService.queryData();
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
*//**
|
/**
|
||||||
* 修改资源
|
* 修改资源
|
||||||
*//*
|
*//*
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
|||||||
@@ -12,5 +12,4 @@ import java.util.List;
|
|||||||
* @date: 2023/05/25
|
* @date: 2023/05/25
|
||||||
*/
|
*/
|
||||||
public interface ResourceMapper extends BaseMapper<ResourceData> {
|
public interface ResourceMapper extends BaseMapper<ResourceData> {
|
||||||
List<ResinformationParam> listAll();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.njcn.device.pq.mapper.ResourceMapper">
|
<mapper namespace="com.njcn.device.pq.mapper.ResourceMapper">
|
||||||
<select id="listAll" resultType="com.njcn.system.pojo.po.ResinformationParam">
|
|
||||||
SELECT pr.`NAME` "name", sdd.`Name` "type", pr.DESCRIPTION "description", pr.UPDATETIME "time"
|
|
||||||
FROM pqs_resinformation pr
|
|
||||||
left join sys_dict_data sdd on sdd.Id = pr.TYPE
|
|
||||||
</select>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ public interface ResourceService extends IService<ResourceData> {
|
|||||||
|
|
||||||
Boolean uploadFile(MultipartFile multipartFile, MultipartFile picture, String name, Integer type);
|
Boolean uploadFile(MultipartFile multipartFile, MultipartFile picture, String name, Integer type);
|
||||||
|
|
||||||
/* List<Resinformation> queryData(Resinformation resinformation);
|
List<ResourceData> queryData();
|
||||||
|
/*
|
||||||
Boolean updateFile(MultipartFile multipartFile, String id, String name, String type, String description, String systemType);
|
Boolean updateFile(MultipartFile multipartFile, String id, String name, String type, String description, String systemType);
|
||||||
|
|
||||||
Boolean deleteFile(String id);
|
Boolean deleteFile(String id);
|
||||||
|
|||||||
@@ -72,36 +72,13 @@ public class ResourceServiceImpl extends ServiceImpl<ResourceMapper, ResourceDat
|
|||||||
resourceData.setType(type);
|
resourceData.setType(type);
|
||||||
return this.save(resourceData);
|
return this.save(resourceData);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Resinformation> queryData(Resinformation resinformation) {
|
public List<ResourceData> queryData() {
|
||||||
|
return this.list();
|
||||||
if (StringUtils.isNotBlank(resinformation.getType()) && StringUtils.isNotBlank(resinformation.getSystemType())) {
|
|
||||||
LambdaQueryWrapper<Resinformation> wrapper = new LambdaQueryWrapper<>();
|
|
||||||
//type
|
|
||||||
wrapper.eq(Resinformation::getType, resinformation.getType());
|
|
||||||
//sysType
|
|
||||||
wrapper.eq(Resinformation::getSystemType, resinformation.getSystemType());
|
|
||||||
return resourceAdministrationMapper.selectList(wrapper);
|
|
||||||
|
|
||||||
} else if (StringUtils.isBlank(resinformation.getType()) && StringUtils.isBlank(resinformation.getSystemType())) {
|
|
||||||
|
|
||||||
return this.list();
|
|
||||||
|
|
||||||
} else if (StringUtils.isNotBlank(resinformation.getType()) && StringUtils.isBlank(resinformation.getSystemType())) {
|
|
||||||
LambdaQueryWrapper<Resinformation> wrapper = new LambdaQueryWrapper<>();
|
|
||||||
//type
|
|
||||||
wrapper.eq(Resinformation::getType, resinformation.getType());
|
|
||||||
return resourceAdministrationMapper.selectList(wrapper);
|
|
||||||
} else {
|
|
||||||
LambdaQueryWrapper<Resinformation> wrapper = new LambdaQueryWrapper<>();
|
|
||||||
//sysType
|
|
||||||
wrapper.eq(Resinformation::getSystemType, resinformation.getSystemType());
|
|
||||||
return resourceAdministrationMapper.selectList(wrapper);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
@Override
|
@Override
|
||||||
public Boolean updateFile(MultipartFile multipartFile, String id, String name, String type, String description, String systemType) {
|
public Boolean updateFile(MultipartFile multipartFile, String id, String name, String type, String description, String systemType) {
|
||||||
Resinformation resinformation = resourceAdministrationMapper.selectById(id);
|
Resinformation resinformation = resourceAdministrationMapper.selectById(id);
|
||||||
|
|||||||
Reference in New Issue
Block a user