|
|
@ -5,7 +5,9 @@ import java.io.IOException;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
|
|
import com.hw.wms.domain.WmsBaseCategory;
|
|
|
|
import com.hw.wms.domain.WmsBaseCategory;
|
|
|
|
|
|
|
|
import com.hw.wms.domain.WmsWarehouseMaterial;
|
|
|
|
import com.hw.wms.service.IWmsBaseCategoryService;
|
|
|
|
import com.hw.wms.service.IWmsBaseCategoryService;
|
|
|
|
|
|
|
|
import com.hw.wms.service.IWmsWarehouseMaterialService;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
@ -41,6 +43,9 @@ public class WmsBaseWarehouseController extends BaseController
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private IWmsBaseCategoryService wmsBaseCategoryService;
|
|
|
|
private IWmsBaseCategoryService wmsBaseCategoryService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private IWmsWarehouseMaterialService wmsWarehouseMaterialService;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询仓库列表
|
|
|
|
* 查询仓库列表
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -57,7 +62,7 @@ public class WmsBaseWarehouseController extends BaseController
|
|
|
|
* 导出仓库列表
|
|
|
|
* 导出仓库列表
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequiresPermissions("wms:wmswarehouse:export")
|
|
|
|
@RequiresPermissions("wms:wmswarehouse:export")
|
|
|
|
@Log(title = "仓库", businessType = BusinessType.EXPORT)
|
|
|
|
@Log(title = "仓库管理", businessType = BusinessType.EXPORT)
|
|
|
|
@PostMapping("/export")
|
|
|
|
@PostMapping("/export")
|
|
|
|
public void export(HttpServletResponse response, WmsBaseWarehouse wmsBaseWarehouse)
|
|
|
|
public void export(HttpServletResponse response, WmsBaseWarehouse wmsBaseWarehouse)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -80,7 +85,7 @@ public class WmsBaseWarehouseController extends BaseController
|
|
|
|
* 新增仓库
|
|
|
|
* 新增仓库
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequiresPermissions("wms:wmswarehouse:add")
|
|
|
|
@RequiresPermissions("wms:wmswarehouse:add")
|
|
|
|
@Log(title = "仓库", businessType = BusinessType.INSERT)
|
|
|
|
@Log(title = "仓库管理", businessType = BusinessType.INSERT)
|
|
|
|
@PostMapping
|
|
|
|
@PostMapping
|
|
|
|
public AjaxResult add(@RequestBody WmsBaseWarehouse wmsBaseWarehouse)
|
|
|
|
public AjaxResult add(@RequestBody WmsBaseWarehouse wmsBaseWarehouse)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -91,7 +96,7 @@ public class WmsBaseWarehouseController extends BaseController
|
|
|
|
* 修改仓库
|
|
|
|
* 修改仓库
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequiresPermissions("wms:wmswarehouse:edit")
|
|
|
|
@RequiresPermissions("wms:wmswarehouse:edit")
|
|
|
|
@Log(title = "仓库", businessType = BusinessType.UPDATE)
|
|
|
|
@Log(title = "仓库管理", businessType = BusinessType.UPDATE)
|
|
|
|
@PutMapping
|
|
|
|
@PutMapping
|
|
|
|
public AjaxResult edit(@RequestBody WmsBaseWarehouse wmsBaseWarehouse)
|
|
|
|
public AjaxResult edit(@RequestBody WmsBaseWarehouse wmsBaseWarehouse)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -102,7 +107,7 @@ public class WmsBaseWarehouseController extends BaseController
|
|
|
|
* 删除仓库
|
|
|
|
* 删除仓库
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@RequiresPermissions("wms:wmswarehouse:remove")
|
|
|
|
@RequiresPermissions("wms:wmswarehouse:remove")
|
|
|
|
@Log(title = "仓库", businessType = BusinessType.DELETE)
|
|
|
|
@Log(title = "仓库管理", businessType = BusinessType.DELETE)
|
|
|
|
@DeleteMapping("/{warehouseIds}")
|
|
|
|
@DeleteMapping("/{warehouseIds}")
|
|
|
|
public AjaxResult remove(@PathVariable Long[] warehouseIds)
|
|
|
|
public AjaxResult remove(@PathVariable Long[] warehouseIds)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -121,4 +126,62 @@ public class WmsBaseWarehouseController extends BaseController
|
|
|
|
return success(list);
|
|
|
|
return success(list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 查询已分配物料
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@RequiresPermissions("wms:wmswarehouse:materialallocate")
|
|
|
|
|
|
|
|
@GetMapping("/selectWmsWarehouseMaterialList")
|
|
|
|
|
|
|
|
public TableDataInfo selectWmsWarehouseMaterialList(WmsWarehouseMaterial wmsWarehouseMaterial)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
startPage();
|
|
|
|
|
|
|
|
List<WmsWarehouseMaterial> warehouseMaterials = wmsWarehouseMaterialService.selectWmsWarehouseMaterialJoinList(wmsWarehouseMaterial);
|
|
|
|
|
|
|
|
return getDataTable(warehouseMaterials);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 分配仓库可入物料
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@RequiresPermissions("wms:wmswarehouse:materialallocate")
|
|
|
|
|
|
|
|
@Log(title = "仓库管理", businessType = BusinessType.ALLOCATE)
|
|
|
|
|
|
|
|
@PutMapping("/allocateMaterials")
|
|
|
|
|
|
|
|
public AjaxResult allocateMaterials(Long warehouseId, Long[] materialIds)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
wmsWarehouseMaterialService.batchInsertWarehouseMaterial(warehouseId, materialIds);
|
|
|
|
|
|
|
|
return success();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 删除仓库配置的物料信息
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@RequiresPermissions("wms:wmswarehouse:materialallocate")
|
|
|
|
|
|
|
|
@Log(title = "仓库管理", businessType = BusinessType.UNALLOCATE)
|
|
|
|
|
|
|
|
@PostMapping("/unallocateMaterials")
|
|
|
|
|
|
|
|
public AjaxResult unallocateMaterials(Long[] warehouseMaterialIds)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return toAjax(wmsWarehouseMaterialService.deleteWmsWarehouseMaterialByWarehouseMaterialIds(warehouseMaterialIds));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
|
|
|
// * 根据仓库分配可入库物料信息
|
|
|
|
|
|
|
|
// */
|
|
|
|
|
|
|
|
// @RequiresPermissions("wms:wmswarehouse:materialallocate")
|
|
|
|
|
|
|
|
// @GetMapping("/allocateMaterial/{warehouseId}")
|
|
|
|
|
|
|
|
// public AjaxResult allocateMaterial(@PathVariable("warehouseId") Long warehouseId)
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// AjaxResult ajax = AjaxResult.success();
|
|
|
|
|
|
|
|
// WmsBaseWarehouse warehouse = wmsBaseWarehouseService.selectWmsBaseWarehouseByWarehouseId(warehouseId);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// WmsWarehouseMaterial queryWarehouseMaterial = new WmsWarehouseMaterial();
|
|
|
|
|
|
|
|
// queryWarehouseMaterial.setWarehouseId(warehouseId);
|
|
|
|
|
|
|
|
// queryWarehouseMaterial.setStorageType(WmsConstants.WMS_WAREHOUSE_MATERIAL_STORAGE_TYPE_MATERIAL);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// List<WmsWarehouseMaterial> warehouseMaterials = wmsWarehouseMaterialService.selectWmsWarehouseMaterialList(queryWarehouseMaterial);
|
|
|
|
|
|
|
|
// ajax.put("warehouse", warehouse);
|
|
|
|
|
|
|
|
// ajax.put("warehouseMaterials", warehouseMaterials);
|
|
|
|
|
|
|
|
// return ajax;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|