|
|
|
@ -5,7 +5,9 @@ import java.io.IOException;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
import com.hw.wms.domain.WmsBaseCategory;
|
|
|
|
|
import com.hw.wms.domain.WmsWarehouseMaterial;
|
|
|
|
|
import com.hw.wms.service.IWmsBaseCategoryService;
|
|
|
|
|
import com.hw.wms.service.IWmsWarehouseMaterialService;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
@ -41,6 +43,9 @@ public class WmsBaseWarehouseController extends BaseController
|
|
|
|
|
@Autowired
|
|
|
|
|
private IWmsBaseCategoryService wmsBaseCategoryService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private IWmsWarehouseMaterialService wmsWarehouseMaterialService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询仓库列表
|
|
|
|
|
*/
|
|
|
|
@ -57,7 +62,7 @@ public class WmsBaseWarehouseController extends BaseController
|
|
|
|
|
* 导出仓库列表
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("wms:wmswarehouse:export")
|
|
|
|
|
@Log(title = "仓库", businessType = BusinessType.EXPORT)
|
|
|
|
|
@Log(title = "仓库管理", businessType = BusinessType.EXPORT)
|
|
|
|
|
@PostMapping("/export")
|
|
|
|
|
public void export(HttpServletResponse response, WmsBaseWarehouse wmsBaseWarehouse)
|
|
|
|
|
{
|
|
|
|
@ -80,7 +85,7 @@ public class WmsBaseWarehouseController extends BaseController
|
|
|
|
|
* 新增仓库
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("wms:wmswarehouse:add")
|
|
|
|
|
@Log(title = "仓库", businessType = BusinessType.INSERT)
|
|
|
|
|
@Log(title = "仓库管理", businessType = BusinessType.INSERT)
|
|
|
|
|
@PostMapping
|
|
|
|
|
public AjaxResult add(@RequestBody WmsBaseWarehouse wmsBaseWarehouse)
|
|
|
|
|
{
|
|
|
|
@ -91,7 +96,7 @@ public class WmsBaseWarehouseController extends BaseController
|
|
|
|
|
* 修改仓库
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("wms:wmswarehouse:edit")
|
|
|
|
|
@Log(title = "仓库", businessType = BusinessType.UPDATE)
|
|
|
|
|
@Log(title = "仓库管理", businessType = BusinessType.UPDATE)
|
|
|
|
|
@PutMapping
|
|
|
|
|
public AjaxResult edit(@RequestBody WmsBaseWarehouse wmsBaseWarehouse)
|
|
|
|
|
{
|
|
|
|
@ -102,7 +107,7 @@ public class WmsBaseWarehouseController extends BaseController
|
|
|
|
|
* 删除仓库
|
|
|
|
|
*/
|
|
|
|
|
@RequiresPermissions("wms:wmswarehouse:remove")
|
|
|
|
|
@Log(title = "仓库", businessType = BusinessType.DELETE)
|
|
|
|
|
@Log(title = "仓库管理", businessType = BusinessType.DELETE)
|
|
|
|
|
@DeleteMapping("/{warehouseIds}")
|
|
|
|
|
public AjaxResult remove(@PathVariable Long[] warehouseIds)
|
|
|
|
|
{
|
|
|
|
@ -121,4 +126,62 @@ public class WmsBaseWarehouseController extends BaseController
|
|
|
|
|
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;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|