权限修改

This commit is contained in:
yinjinlu-pc\尹金路 2023-11-11 18:32:53 +08:00
parent a50e82fd3e
commit 54dab08194
14 changed files with 132 additions and 53 deletions

View File

@ -39,7 +39,7 @@ public class MdProductBomController extends BaseController
/**
* 查询产品BOM关系列表
*/
@PreAuthorize("@ss.hasPermi('mes:md:bom:list')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:list')")
@GetMapping("/list")
public TableDataInfo list(MdProductBom mdProductBom)
{
@ -51,7 +51,7 @@ public class MdProductBomController extends BaseController
/**
* 导出产品BOM关系列表
*/
@PreAuthorize("@ss.hasPermi('mes:md:bom:export')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:export')")
@Log(title = "产品BOM关系", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MdProductBom mdProductBom)
@ -64,7 +64,7 @@ public class MdProductBomController extends BaseController
/**
* 获取产品BOM关系详细信息
*/
@PreAuthorize("@ss.hasPermi('mes:md:bom:query')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:query')")
@GetMapping(value = "/{bomId}")
public AjaxResult getInfo(@PathVariable("bomId") Long bomId)
{
@ -74,7 +74,7 @@ public class MdProductBomController extends BaseController
/**
* 新增产品BOM关系
*/
@PreAuthorize("@ss.hasPermi('mes:md:bom:add')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:add')")
@Log(title = "产品BOM关系", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MdProductBom mdProductBom)
@ -89,7 +89,7 @@ public class MdProductBomController extends BaseController
/**
* 修改产品BOM关系
*/
@PreAuthorize("@ss.hasPermi('mes:md:bom:edit')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:edit')")
@Log(title = "产品BOM关系", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MdProductBom mdProductBom)
@ -100,7 +100,7 @@ public class MdProductBomController extends BaseController
/**
* 删除产品BOM关系
*/
@PreAuthorize("@ss.hasPermi('mes:md:bom:remove')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:remove')")
@Log(title = "产品BOM关系", businessType = BusinessType.DELETE)
@DeleteMapping("/{bomIds}")
public AjaxResult remove(@PathVariable Long[] bomIds)

View File

@ -37,7 +37,7 @@ public class MdProductSipController extends BaseController
/**
* 查询产品SIP列表
*/
@PreAuthorize("@ss.hasPermi('mes:md:sip:list')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:list')")
@GetMapping("/list")
public TableDataInfo list(MdProductSip mdProductSip)
{
@ -49,7 +49,7 @@ public class MdProductSipController extends BaseController
/**
* 导出产品SIP列表
*/
@PreAuthorize("@ss.hasPermi('mes:md:sip:export')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:export')")
@Log(title = "产品SIP", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MdProductSip mdProductSip)
@ -62,7 +62,7 @@ public class MdProductSipController extends BaseController
/**
* 获取产品SIP详细信息
*/
@PreAuthorize("@ss.hasPermi('mes:md:sip:query')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:query')")
@GetMapping(value = "/{sipId}")
public AjaxResult getInfo(@PathVariable("sipId") Long sipId)
{
@ -72,7 +72,7 @@ public class MdProductSipController extends BaseController
/**
* 新增产品SIP
*/
@PreAuthorize("@ss.hasPermi('mes:md:sip:add')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:add')")
@Log(title = "产品SIP", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MdProductSip mdProductSip)
@ -83,7 +83,7 @@ public class MdProductSipController extends BaseController
/**
* 修改产品SIP
*/
@PreAuthorize("@ss.hasPermi('mes:md:sip:edit')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:edit')")
@Log(title = "产品SIP", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MdProductSip mdProductSip)
@ -94,7 +94,7 @@ public class MdProductSipController extends BaseController
/**
* 删除产品SIP
*/
@PreAuthorize("@ss.hasPermi('mes:md:sip:remove')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:remove')")
@Log(title = "产品SIP", businessType = BusinessType.DELETE)
@DeleteMapping("/{sipIds}")
public AjaxResult remove(@PathVariable Long[] sipIds)

View File

@ -37,7 +37,7 @@ public class MdProductSopController extends BaseController
/**
* 查询产品SOP列表
*/
@PreAuthorize("@ss.hasPermi('mes:md:sop:list')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:list')")
@GetMapping("/list")
public TableDataInfo list(MdProductSop mdProdutSop)
{
@ -49,7 +49,7 @@ public class MdProductSopController extends BaseController
/**
* 导出产品SOP列表
*/
@PreAuthorize("@ss.hasPermi('mes:md:sop:export')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:export')")
@Log(title = "产品SOP", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MdProductSop mdProdutSop)
@ -62,7 +62,7 @@ public class MdProductSopController extends BaseController
/**
* 获取产品SOP详细信息
*/
@PreAuthorize("@ss.hasPermi('mes:md:sop:query')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:query')")
@GetMapping(value = "/{sopId}")
public AjaxResult getInfo(@PathVariable("sopId") Long sopId)
{
@ -72,7 +72,7 @@ public class MdProductSopController extends BaseController
/**
* 新增产品SOP
*/
@PreAuthorize("@ss.hasPermi('mes:md:sop:add')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:add')")
@Log(title = "产品SOP", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MdProductSop mdProdutSop)
@ -83,7 +83,7 @@ public class MdProductSopController extends BaseController
/**
* 修改产品SOP
*/
@PreAuthorize("@ss.hasPermi('mes:md:sop:edit')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:edit')")
@Log(title = "产品SOP", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MdProductSop mdProdutSop)
@ -94,7 +94,7 @@ public class MdProductSopController extends BaseController
/**
* 删除产品SOP
*/
@PreAuthorize("@ss.hasPermi('mes:md:sop:remove')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:remove')")
@Log(title = "产品SOP", businessType = BusinessType.DELETE)
@DeleteMapping("/{sopIds}")
public AjaxResult remove(@PathVariable Long[] sopIds)

View File

@ -23,7 +23,7 @@ public class MdProductSOPMobController extends BaseController {
* 查询产品SOP列表
*/
@ApiOperation("查询产品SOP信息")
@PreAuthorize("@ss.hasPermi('mes:md:sop:list')")
@PreAuthorize("@ss.hasPermi('mes:md:mditem:list')")
@GetMapping("/list")
public AjaxResult list(MdProductSop mdProdutSop)
{

View File

@ -1,4 +1,4 @@
package com.ktg.mes.md.controller;
package com.ktg.mes.md.controller.mobile;
import cn.hutool.core.collection.CollectionUtil;
import com.ktg.common.constant.UserConstants;

View File

@ -52,7 +52,7 @@ public class ProRouteProcessController extends BaseController
/**
* 查询工艺组成列表
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeprocess:list')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:list')")
@GetMapping("/list")
public TableDataInfo list(ProRouteProcess proRouteProcess)
{
@ -66,7 +66,7 @@ public class ProRouteProcessController extends BaseController
* 查询指定产品的工艺组成
* @return
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeproduct:list')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:list')")
@GetMapping("/listProductProcess/{productId}")
public AjaxResult listProductProcess(@PathVariable("productId") Long productId){
ProRouteProduct proRouteProduct = new ProRouteProduct();
@ -86,7 +86,7 @@ public class ProRouteProcessController extends BaseController
/**
* 导出工艺组成列表
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeprocess:export')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:export')")
@Log(title = "工艺组成", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ProRouteProcess proRouteProcess)
@ -99,7 +99,7 @@ public class ProRouteProcessController extends BaseController
/**
* 获取工艺组成详细信息
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeprocess:query')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:query')")
@GetMapping(value = "/{recordId}")
public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
{
@ -109,7 +109,7 @@ public class ProRouteProcessController extends BaseController
/**
* 新增工艺组成
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeprocess:add')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:add')")
@Log(title = "工艺组成", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ProRouteProcess proRouteProcess)
@ -153,7 +153,7 @@ public class ProRouteProcessController extends BaseController
/**
* 修改工艺组成
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeprocess:edit')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:edit')")
@Log(title = "工艺组成", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ProRouteProcess proRouteProcess)
@ -197,7 +197,7 @@ public class ProRouteProcessController extends BaseController
/**
* 删除工艺组成
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeprocess:remove')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:remove')")
@Log(title = "工艺组成", businessType = BusinessType.DELETE)
@DeleteMapping("/{recordIds}")
public AjaxResult remove(@PathVariable Long[] recordIds)

View File

@ -39,7 +39,7 @@ public class ProRouteProductBomController extends BaseController
/**
* 查询产品制程物料BOM列表
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeproductbom:list')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:list')")
@GetMapping("/list")
public TableDataInfo list(ProRouteProductBom proRouteProductBom)
{
@ -51,7 +51,7 @@ public class ProRouteProductBomController extends BaseController
/**
* 导出产品制程物料BOM列表
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeproductbom:export')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:export')")
@Log(title = "产品制程物料BOM", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ProRouteProductBom proRouteProductBom)
@ -64,7 +64,7 @@ public class ProRouteProductBomController extends BaseController
/**
* 获取产品制程物料BOM详细信息
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeproductbom:query')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:query')")
@GetMapping(value = "/{recordId}")
public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
{
@ -74,7 +74,7 @@ public class ProRouteProductBomController extends BaseController
/**
* 新增产品制程物料BOM
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeproductbom:add')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:add')")
@Log(title = "产品制程物料BOM", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ProRouteProductBom proRouteProductBom)
@ -88,7 +88,7 @@ public class ProRouteProductBomController extends BaseController
/**
* 修改产品制程物料BOM
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeproductbom:edit')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:edit')")
@Log(title = "产品制程物料BOM", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ProRouteProductBom proRouteProductBom)
@ -102,7 +102,7 @@ public class ProRouteProductBomController extends BaseController
/**
* 删除产品制程物料BOM
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeproductbom:remove')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:remove')")
@Log(title = "产品制程物料BOM", businessType = BusinessType.DELETE)
@DeleteMapping("/{recordIds}")
public AjaxResult remove(@PathVariable Long[] recordIds)

View File

@ -46,7 +46,7 @@ public class ProRouteProductController extends BaseController
/**
* 查询产品制程列表
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeproduct:list')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:list')")
@GetMapping("/list")
public TableDataInfo list(ProRouteProduct proRouteProduct)
{
@ -59,7 +59,7 @@ public class ProRouteProductController extends BaseController
/**
* 导出产品制程列表
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeproduct:export')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:export')")
@Log(title = "产品制程", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ProRouteProduct proRouteProduct)
@ -72,7 +72,7 @@ public class ProRouteProductController extends BaseController
/**
* 获取产品制程详细信息
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeproduct:query')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:query')")
@GetMapping(value = "/{recordId}")
public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
{
@ -82,7 +82,7 @@ public class ProRouteProductController extends BaseController
/**
* 新增产品制程
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeproduct:add')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:add')")
@Log(title = "产品制程", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ProRouteProduct proRouteProduct)
@ -96,7 +96,7 @@ public class ProRouteProductController extends BaseController
/**
* 修改产品制程
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeproduct:edit')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:edit')")
@Log(title = "产品制程", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ProRouteProduct proRouteProduct)
@ -110,7 +110,7 @@ public class ProRouteProductController extends BaseController
/**
* 更改产品的生产路线
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeproduct:edit')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:edit')")
@Log(title = "产品制程", businessType = BusinessType.UPDATE)
@PutMapping("/move")
public AjaxResult move(@RequestBody ProRouteProduct proRouteProduct){
@ -131,7 +131,7 @@ public class ProRouteProductController extends BaseController
/**
* 删除产品制程
*/
@PreAuthorize("@ss.hasPermi('mes:pro:routeproduct:remove')")
@PreAuthorize("@ss.hasPermi('mes:pro:proroute:remove')")
@Log(title = "产品制程", businessType = BusinessType.DELETE)
@Transactional
@DeleteMapping("/{recordIds}")

View File

@ -41,7 +41,7 @@ public class ProTaskIssueController extends BaseController
/**
* 查询生产任务投料列表
*/
@PreAuthorize("@ss.hasPermi('mes:pro:taskissue:list')")
@PreAuthorize("@ss.hasPermi('mes:pro:protask:list')")
@GetMapping("/list")
public TableDataInfo list(ProTaskIssue proTaskIssue)
{
@ -53,7 +53,7 @@ public class ProTaskIssueController extends BaseController
/**
* 导出生产任务投料列表
*/
@PreAuthorize("@ss.hasPermi('mes:pro:taskissue:export')")
@PreAuthorize("@ss.hasPermi('mes:pro:protask:export')")
@Log(title = "生产任务投料", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ProTaskIssue proTaskIssue)
@ -66,7 +66,7 @@ public class ProTaskIssueController extends BaseController
/**
* 获取生产任务投料详细信息
*/
@PreAuthorize("@ss.hasPermi('mes:pro:taskissue:query')")
@PreAuthorize("@ss.hasPermi('mes:pro:protask:query')")
@GetMapping(value = "/{recordId}")
public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
{
@ -76,7 +76,7 @@ public class ProTaskIssueController extends BaseController
/**
* 新增生产任务投料
*/
@PreAuthorize("@ss.hasPermi('mes:pro:taskissue:add')")
@PreAuthorize("@ss.hasPermi('mes:pro:protask:add')")
@Log(title = "生产任务投料", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ProTaskIssue proTaskIssue)
@ -87,7 +87,7 @@ public class ProTaskIssueController extends BaseController
/**
* 修改生产任务投料
*/
@PreAuthorize("@ss.hasPermi('mes:pro:taskissue:edit')")
@PreAuthorize("@ss.hasPermi('mes:pro:protask:edit')")
@Log(title = "生产任务投料", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ProTaskIssue proTaskIssue)
@ -98,7 +98,7 @@ public class ProTaskIssueController extends BaseController
/**
* 删除生产任务投料
*/
@PreAuthorize("@ss.hasPermi('mes:pro:taskissue:remove')")
@PreAuthorize("@ss.hasPermi('mes:pro:protask:remove')")
@Log(title = "生产任务投料", businessType = BusinessType.DELETE)
@DeleteMapping("/{recordIds}")
public AjaxResult remove(@PathVariable Long[] recordIds)

View File

@ -1,4 +1,4 @@
package com.ktg.mes.pro.controller;
package com.ktg.mes.pro.controller.mobile;
import com.ktg.common.annotation.Log;
import com.ktg.common.core.controller.BaseController;

View File

@ -33,7 +33,7 @@ public class WmIssueLineMobController extends BaseController {
* 查询生产领料单行列表
*/
@ApiOperation("查询生产领导单行信息接口")
@PreAuthorize("@ss.hasPermi('mes:wm:issueline:list')")
@PreAuthorize("@ss.hasPermi('mes:wm:issueheader:list')")
@GetMapping("/list")
public TableDataInfo list(WmIssueLine wmIssueLine)
{
@ -46,7 +46,7 @@ public class WmIssueLineMobController extends BaseController {
* 获取生产领料单行详细信息
*/
@ApiOperation("获取生产领料单行明细信息接口")
@PreAuthorize("@ss.hasPermi('mes:wm:issueline:query')")
@PreAuthorize("@ss.hasPermi('mes:wm:issueheader:query')")
@GetMapping(value = "/{lineId}")
public AjaxResult getInfo(@PathVariable("lineId") Long lineId)
{
@ -57,7 +57,7 @@ public class WmIssueLineMobController extends BaseController {
* 新增生产领料单行
*/
@ApiOperation("新增生产领料单行信息接口")
@PreAuthorize("@ss.hasPermi('mes:wm:issueline:add')")
@PreAuthorize("@ss.hasPermi('mes:wm:issueheader:add')")
@Log(title = "生产领料单行", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody WmIssueLine wmIssueLine)
@ -90,7 +90,7 @@ public class WmIssueLineMobController extends BaseController {
* 修改生产领料单行
*/
@ApiOperation("更新生产领料单行信息接口")
@PreAuthorize("@ss.hasPermi('mes:wm:issueline:edit')")
@PreAuthorize("@ss.hasPermi('mes:wm:issueheader:edit')")
@Log(title = "生产领料单行", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody WmIssueLine wmIssueLine)
@ -121,7 +121,7 @@ public class WmIssueLineMobController extends BaseController {
* 删除生产领料单行
*/
@ApiOperation("删除生产领料单行信息接口")
@PreAuthorize("@ss.hasPermi('mes:wm:issueline:remove')")
@PreAuthorize("@ss.hasPermi('mes:wm:issueheader:remove')")
@Log(title = "生产领料单行", businessType = BusinessType.DELETE)
@DeleteMapping("/{lineIds}")
public AjaxResult remove(@PathVariable Long[] lineIds)

View File

@ -46,4 +46,19 @@ public class WmMaterialStockMobController extends BaseController {
{
return AjaxResult.success(wmMaterialStockService.selectWmMaterialStockByMaterialStockId(materialStockId));
}
/**
* 查询库存记录列表
*/
@ApiOperation("查询库存现有量")
@PreAuthorize("@ss.hasPermi('mes:wm:wmstock:list')")
@GetMapping("/query")
public TableDataInfo query(WmMaterialStock wmMaterialStock)
{
startPage();
List<WmMaterialStock> list = wmMaterialStockService.queryWmMaterialStockList(wmMaterialStock);
return getDataTable(list);
}
}

View File

@ -89,7 +89,8 @@ public class WmRtVendorMobController extends BaseController {
}
wmRtVendor.setCreateBy(getUsername());
return toAjax(wmRtVendorService.insertWmRtVendor(wmRtVendor));
wmRtVendorService.insertWmRtVendor(wmRtVendor);
return AjaxResult.success(wmRtVendor);
}
/**

View File

@ -2,13 +2,22 @@ package com.ktg.mes.wm.controller.mobile;
import com.ktg.common.core.controller.BaseController;
import com.ktg.common.core.domain.AjaxResult;
import com.ktg.common.core.page.TableDataInfo;
import com.ktg.common.utils.StringUtils;
import com.ktg.mes.wm.domain.*;
import com.ktg.mes.wm.service.IWmStorageAreaService;
import com.ktg.mes.wm.service.IWmStorageLocationService;
import com.ktg.mes.wm.service.IWmWarehouseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Api("仓库存储位置信息")
@RestController
@RequestMapping("/mobile/wm/warehouse")
@ -17,12 +26,66 @@ public class WmWarehouseMobController extends BaseController {
@Autowired
private IWmWarehouseService wmWarehouseService;
@Autowired
private IWmStorageAreaService wmStorageAreaService;
@Autowired
private IWmStorageLocationService wmStorageLocationService;
/**
* 查询库存盘点记录列表
*/
@ApiOperation("查询仓库列表接口")
@PreAuthorize("@ss.hasPermi('wm:stocktaking:list')")
@GetMapping("/list")
public TableDataInfo list(WmWarehouse warehouse)
{
startPage();
List<WmWarehouse> list = wmWarehouseService.selectWmWarehouseList(warehouse);
return getDataTable(list);
}
/**
* 查询树型的列表
* @return
*/
@ApiOperation("查询树形结构的完整仓库信息接口")
@GetMapping("/getTreeList")
public AjaxResult getTreeList(){
return AjaxResult.success(wmWarehouseService.getTreeList());
}
@ApiOperation("根据库位编码/ID查询完整的储位信息")
@GetMapping("/getAreaFullInfo")
public AjaxResult getAreaFullInfo(WmPosition position){
WmPosition thePosition = null;
WmStorageArea area = null;
if(StringUtils.isNotNull(position.getAreaId())){
area = wmStorageAreaService.selectWmStorageAreaByAreaId(area.getAreaId());
}
if(StringUtils.isNotNull(position.getAreaCode())){
area = wmStorageAreaService.selectWmStorageAreaByAreaCode(area.getAreaCode());
}
if(area != null){
thePosition.setAreaId(area.getAreaId());
thePosition.setAreaCode(area.getAreaCode());
thePosition.setAreaName(area.getAreaName());
WmStorageLocation location = wmStorageLocationService.selectWmStorageLocationByLocationId(area.getLocationId());
thePosition.setLocationCode(location.getLocationCode());
thePosition.setLocationName(location.getLocationName());
WmWarehouse warehouse = wmWarehouseService.selectWmWarehouseByWarehouseId(location.getWarehouseId());
thePosition.setWarehouseId(location.getWarehouseId());
thePosition.setWarehouseCode(warehouse.getWarehouseCode());
thePosition.setWarehouseName(warehouse.getWarehouseName());
}
return AjaxResult.success(thePosition);
}
}