diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/rest/DeviceController.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/rest/DeviceController.java index 7dfbfbf..0b14755 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/rest/DeviceController.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/rest/DeviceController.java @@ -74,4 +74,12 @@ public class DeviceController { return new ResponseEntity<>(HttpStatus.NO_CONTENT); } + @GetMapping("/getAllRegions") + @Log("查询生产设备") + @ApiOperation("查询生产设备") + //@SaCheckPermission("device:list") + public ResponseEntity getAllRegions(){ + return new ResponseEntity<>(deviceService.getAllRegions(),HttpStatus.OK); + } + } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/DeviceService.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/DeviceService.java index 147b5b8..8492b31 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/DeviceService.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/DeviceService.java @@ -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(); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/dto/DeviceDto.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/dto/DeviceDto.java index e191895..34e6f92 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/dto/DeviceDto.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/dto/DeviceDto.java @@ -51,6 +51,7 @@ public class DeviceDto implements Serializable { * 是否启用 */ private String is_active; + private String region_code; /** * 创建人 diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DeviceServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DeviceServiceImpl.java index 14ccae5..1cd5f90 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DeviceServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/DeviceServiceImpl.java @@ -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; + } + } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/wql/PDM_BI_DEVICE01.wql b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/wql/PDM_BI_DEVICE01.wql index 0578a92..5fd0b67 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/wql/PDM_BI_DEVICE01.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/wql/PDM_BI_DEVICE01.wql @@ -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 \ No newline at end of file + ENDIF diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/wms.xls b/lms/nladmin-system/src/main/java/org/nl/wms/wms.xls index 0142a6e..8e0d61b 100644 Binary files a/lms/nladmin-system/src/main/java/org/nl/wms/wms.xls and b/lms/nladmin-system/src/main/java/org/nl/wms/wms.xls differ diff --git a/lms/nladmin-ui/src/api/wms/pdm/device.js b/lms/nladmin-ui/src/api/wms/pdm/device.js index b901755..25adbd4 100644 --- a/lms/nladmin-ui/src/api/wms/pdm/device.js +++ b/lms/nladmin-ui/src/api/wms/pdm/device.js @@ -31,6 +31,13 @@ export function getWorkprocedure() { }) } +export function getAllRegions() { + return request({ + url: 'api/device/getAllRegions', + method: 'get' + }) +} + export function getItemByDevice(data) { return request({ url: 'api/device/getItemByDevice', @@ -71,4 +78,4 @@ export function changeActive(data) { }) } -export default { add, edit, del, getWorkprocedure, getItemByDeviceId, copyAdd, changeActive } +export default { add, edit, del, getWorkprocedure, getItemByDeviceId, copyAdd, changeActive, getAllRegions } diff --git a/lms/nladmin-ui/src/views/wms/pdm/device/index.vue b/lms/nladmin-ui/src/views/wms/pdm/device/index.vue index 3562501..21cc3bb 100644 --- a/lms/nladmin-ui/src/views/wms/pdm/device/index.vue +++ b/lms/nladmin-ui/src/views/wms/pdm/device/index.vue @@ -59,6 +59,23 @@ + + + + + @@ -89,6 +106,7 @@ +