fix
This commit is contained in:
@@ -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
|
||||
<where>
|
||||
<if test="query.dept_id != null">
|
||||
and
|
||||
|
||||
@@ -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<Object> getSupplierNameList(){
|
||||
return new ResponseEntity<>(TableDataInfo.build(reportService.getSupplierNameList()),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getProductDescriptionList")
|
||||
@Log("查询物料名称列表")
|
||||
@ApiOperation("查询物料名称列表")
|
||||
//@SaCheckPermission("@el.check('material:list')")
|
||||
public ResponseEntity<Object> getProductDescriptionList(){
|
||||
return new ResponseEntity<>(TableDataInfo.build(reportService.getProductDescriptionList()),HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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<ReportDto> {
|
||||
|
||||
@@ -17,4 +19,8 @@ public interface IReportService extends IService<ReportDto> {
|
||||
*/
|
||||
IPage<ReportDto> queryAll(ReportQuery whereJson, PageQuery pageable);
|
||||
|
||||
List<String> getSupplierNameList();
|
||||
|
||||
List<String> getProductDescriptionList();
|
||||
|
||||
}
|
||||
|
||||
@@ -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<ReportDto> {
|
||||
* @return
|
||||
*/
|
||||
IPage<ReportDto> queryReport(IPage<ReportDto> pages, ReportQuery query);
|
||||
|
||||
@Select("select supplierName from sch_base_material group by supplierName")
|
||||
List<String> getSupplierNameList();
|
||||
|
||||
@Select("select productDescription from sch_base_material group by productDescription")
|
||||
List<String> getProductDescriptionList();
|
||||
}
|
||||
|
||||
@@ -36,5 +36,13 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportDto> impl
|
||||
|
||||
}
|
||||
|
||||
public List<String> getSupplierNameList(){
|
||||
return reportMapper.getSupplierNameList();
|
||||
}
|
||||
|
||||
public List<String> getProductDescriptionList(){
|
||||
return reportMapper.getProductDescriptionList();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -11,22 +11,34 @@
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="供应商名称">
|
||||
<el-input
|
||||
<el-select
|
||||
v-model="query.supplierName"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="供应商名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in supplierNameList"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称">
|
||||
<el-input
|
||||
<el-select
|
||||
v-model="query.productDescription"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in productDescriptionList"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
@@ -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
|
||||
|
||||
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user