From fed98212792e5a84949ab1cb3345e247522adfde Mon Sep 17 00:00:00 2001 From: psh Date: Mon, 6 May 2024 09:11:11 +0800 Subject: [PATCH] fix --- .../service/user/dao/mapper/SysUserMapper.xml | 2 +- .../nl/wms/sch/report/ReportController.java | 15 ++++++++ .../sch/report/service/IReportService.java | 6 +++ .../service/dao/mapper/ReportMapper.java | 7 ++++ .../service/impl/ReportServiceImpl.java | 8 ++++ .../src/views/wms/sch/report/index.vue | 38 ++++++++++++++++--- .../src/views/wms/sch/report/report.js | 18 ++++++++- 7 files changed, 86 insertions(+), 8 deletions(-) diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/user/dao/mapper/SysUserMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/user/dao/mapper/SysUserMapper.xml index a871fc6..dfef20c 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/user/dao/mapper/SysUserMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/user/dao/mapper/SysUserMapper.xml @@ -73,7 +73,7 @@ left join sys_user_dept on sys_user.user_id = sys_user_dept.user_id left join sys_users_roles on sys_users_roles.user_id = sys_user.user_id left join sys_dept on sys_user_dept.dept_id = sys_dept.dept_id - left join sys_role on sys_users_roles.role_id = sys_role.create_id + left join sys_role on sys_users_roles.role_id = sys_role.role_id and diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/ReportController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/ReportController.java index 7f799cd..00e0f06 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/ReportController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/ReportController.java @@ -30,6 +30,21 @@ public class ReportController { return new ResponseEntity<>(TableDataInfo.build(reportService.queryAll(whereJson,page)),HttpStatus.OK); } + @GetMapping("/getSupplierNameList") + @Log("查询供应商名称列表") + @ApiOperation("查询供应商名称列表") + //@SaCheckPermission("@el.check('material:list')") + public ResponseEntity getSupplierNameList(){ + return new ResponseEntity<>(TableDataInfo.build(reportService.getSupplierNameList()),HttpStatus.OK); + } + + @GetMapping("/getProductDescriptionList") + @Log("查询物料名称列表") + @ApiOperation("查询物料名称列表") + //@SaCheckPermission("@el.check('material:list')") + public ResponseEntity getProductDescriptionList(){ + return new ResponseEntity<>(TableDataInfo.build(reportService.getProductDescriptionList()),HttpStatus.OK); + } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/IReportService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/IReportService.java index c446621..bfac45e 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/IReportService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/IReportService.java @@ -6,6 +6,8 @@ import org.nl.common.domain.query.PageQuery; import org.nl.wms.sch.report.service.dto.ReportDto; import org.nl.wms.sch.report.service.dto.ReportQuery; +import java.util.List; + public interface IReportService extends IService { @@ -17,4 +19,8 @@ public interface IReportService extends IService { */ IPage queryAll(ReportQuery whereJson, PageQuery pageable); + List getSupplierNameList(); + + List getProductDescriptionList(); + } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/dao/mapper/ReportMapper.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/dao/mapper/ReportMapper.java index eed4a48..8e6b7d5 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/dao/mapper/ReportMapper.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/dao/mapper/ReportMapper.java @@ -2,6 +2,7 @@ package org.nl.wms.sch.report.service.dao.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import org.apache.ibatis.annotations.Select; import org.nl.wms.pdm.service.dao.PdmBdWorkorder; import org.nl.wms.pdm.service.dto.PdmBdWorkorderQuery; import org.nl.wms.sch.report.service.dto.ReportDto; @@ -20,4 +21,10 @@ public interface ReportMapper extends BaseMapper { * @return */ IPage queryReport(IPage pages, ReportQuery query); + + @Select("select supplierName from sch_base_material group by supplierName") + List getSupplierNameList(); + + @Select("select productDescription from sch_base_material group by productDescription") + List getProductDescriptionList(); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/impl/ReportServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/impl/ReportServiceImpl.java index 583334a..6883fbe 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/impl/ReportServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/report/service/impl/ReportServiceImpl.java @@ -36,5 +36,13 @@ public class ReportServiceImpl extends ServiceImpl impl } + public List getSupplierNameList(){ + return reportMapper.getSupplierNameList(); + } + + public List getProductDescriptionList(){ + return reportMapper.getProductDescriptionList(); + } + } diff --git a/lms/nladmin-ui/src/views/wms/sch/report/index.vue b/lms/nladmin-ui/src/views/wms/sch/report/index.vue index 09b93fe..a0b10c1 100644 --- a/lms/nladmin-ui/src/views/wms/sch/report/index.vue +++ b/lms/nladmin-ui/src/views/wms/sch/report/index.vue @@ -11,22 +11,34 @@ label-suffix=":" > - + class="filter-item" + > + + - + class="filter-item" + > + + @@ -274,6 +286,8 @@ export default { workShopList: [], pointList: [], regionList: [], + supplierNameList: [], + productDescriptionList: [], choose: '物料' } }, @@ -281,6 +295,8 @@ export default { this.getWorkShopList() this.getPointList() this.getRegionList() + this.getSupplierNameList() + this.getProductDescriptionList() }, methods: { // 钩子:在获取表格数据之前执行,false 则代表不获取数据 @@ -302,6 +318,16 @@ export default { this.pointList = res }) }, + getSupplierNameList(){ + crudMaterial.getSupplierNameList().then(res => { + this.supplierNameList = res.content + }) + }, + getProductDescriptionList(){ + crudMaterial.getProductDescriptionList().then(res => { + this.productDescriptionList = res.content + }) + }, tableChanged(row) { this.form.material_name = row.material_name this.form.material_id = row.material_id diff --git a/lms/nladmin-ui/src/views/wms/sch/report/report.js b/lms/nladmin-ui/src/views/wms/sch/report/report.js index e14bdf0..e8514b7 100644 --- a/lms/nladmin-ui/src/views/wms/sch/report/report.js +++ b/lms/nladmin-ui/src/views/wms/sch/report/report.js @@ -32,4 +32,20 @@ export function getGroup(data) { }) } -export default { add, edit, del, getGroup } +export function getSupplierNameList(data) { + return request({ + url: 'api/report/getSupplierNameList', + method: 'get', + data + }) +} + +export function getProductDescriptionList(data) { + return request({ + url: 'api/report/getProductDescriptionList', + method: 'get', + data + }) +} + +export default { add, edit, del, getGroup,getSupplierNameList,getProductDescriptionList }