rev 区域筛选

This commit is contained in:
周俊杰
2023-07-28 09:44:35 +08:00
parent 0913a4aad7
commit 3b21a4d4c1
4 changed files with 60 additions and 25 deletions

View File

@@ -25,7 +25,7 @@ import java.util.Map;
@RestController
@RequiredArgsConstructor
@Api(tags = "设备采集项管理")
@RequestMapping("/api/deviceDbitem")
@RequestMapping("Dbitem")
public class DeviceDbitemController {
private final DeviceDbitemService deviceDbitemService;

View File

@@ -78,15 +78,20 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
@Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
logger.info("Hello World");
HashMap param = new HashMap();
param.put("flag", "01");
if (whereJson.get("blurry") != null) {
param.put("blurry", "%" + whereJson.get("blurry") + "%");
}
param.put("device_type", whereJson.get("device_type"));
if (whereJson.get("region") != null) {
param.put("region", whereJson.get("region"));
}
if (whereJson.get("device_type") != null) {
param.put("device_type", whereJson.get("device_type"));
}
JSONObject json = WQL.getWO("Qdevice_query_002").addParamMap(param).pageQuery(WqlUtil.getHttpContext(page), "is_config asc,seq_num desc,update_time desc");
return json;
}
@Override
@@ -269,25 +274,14 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
@Override
public void download(List<DeviceDto> all, HttpServletResponse response) throws IOException {
List<Map<String, Object>> list = new ArrayList<>();
for (DeviceDto device : all) {
Map<String, Object> map = new LinkedHashMap<>();
map.put("生产厂家", device.getManufacturer());
map.put("厂家电话", device.getManufacturer_phone());
map.put("opcServer标识", device.getOpc_server_id());
map.put("opcPlc标识", device.getOpc_plc_id());
map.put("是否启用", device.getIs_active());
map.put("是否删除", device.getIs_delete());
map.put("创建者", device.getCreate_by());
map.put("创建时间", device.getCreate_time());
map.put("修改者", device.getUpdate_by());
map.put("修改时间", device.getUpdate_time());
map.put("设备编码", device.getDevice_code());
map.put("设备名字", device.getDevice_name());
map.put("设备类型", device.getDevice_type());
map.put("是否配置", device.getIs_config());
map.put("备注", device.getRemark());
map.put("device_code",null);
map.put("device_name",null);
map.put("device_type",null);
map.put("is_config",null);
map.put("is_route",null);
map.put("region",null);
list.add(map);
}
FileUtil.downloadExcel(list, response);
}

View File

@@ -23,6 +23,7 @@
输入.methods_code TYPEAS s_string
输入.methods_id TYPEAS s_string
输入.blurry TYPEAS s_string
输入.region TYPEAS s_string
[临时表]
--这边列出来的临时表就会在运行期动态创建
@@ -60,9 +61,12 @@
OPTION 输入.blurry <> ""
( d.device_code LIKE 输入.blurry or d.device_name LIKE 输入.blurry)
ENDOPTION
OPTION 输入.region <> ""
d.region = 输入.region
ENDOPTION
OPTION 输入.device_type <> ""
d.device_type = 输入.device_type
ENDOPTION
ENDOPTION
ENDSELECT
ENDPAGEQUERY
ENDIF
@@ -134,4 +138,4 @@
address.methods_id = 输入.methods_id
ENDOPTION
ENDSELECT
ENDIF
ENDIF