add: 区域编码

This commit is contained in:
2023-04-17 09:28:16 +08:00
parent e31a7e5891
commit ccee11b0db
8 changed files with 61 additions and 4 deletions

View File

@@ -74,4 +74,12 @@ public class DeviceController {
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@GetMapping("/getAllRegions")
@Log("查询生产设备")
@ApiOperation("查询生产设备")
//@SaCheckPermission("device:list")
public ResponseEntity<Object> getAllRegions(){
return new ResponseEntity<>(deviceService.getAllRegions(),HttpStatus.OK);
}
}

View File

@@ -1,6 +1,7 @@
package org.nl.wms.pdm.service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.nl.wms.pdm.service.dto.DeviceDto;
import org.springframework.data.domain.Pageable;
@@ -65,4 +66,10 @@ public interface DeviceService {
void changeActive(JSONObject json);
/**
* 获取所有区域信息
* @return
*/
JSONArray getAllRegions();
}

View File

@@ -51,6 +51,7 @@ public class DeviceDto implements Serializable {
* 是否启用
*/
private String is_active;
private String region_code;
/**
* 创建人

View File

@@ -135,4 +135,11 @@ public class DeviceServiceImpl implements DeviceService {
WQLObject.getWQLObject("PDM_BI_Device").update(json);
}
@Override
public JSONArray getAllRegions() {
WQLObject wo = WQLObject.getWQLObject("SCH_BASE_Region");
JSONArray resultJSONArray = wo.query().getResultJSONArray(0);
return resultJSONArray;
}
}

View File

@@ -42,9 +42,11 @@
IF 输入.flag = "1"
PAGEQUERY
SELECT
device.*
device.*,
region.region_name
FROM
PDM_BI_Device device
LEFT JOIN sch_base_region region ON region.region_code = device.region_code
WHERE
device.is_delete = '0'
@@ -55,4 +57,4 @@
ENDSELECT
ENDPAGEQUERY
ENDIF
ENDIF