|
|
|
@ -1,64 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package jnpf.warehouse.controller;
|
|
|
|
|
|
|
|
|
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
|
|
|
|
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
|
|
|
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
|
|
|
|
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import jnpf.base.ActionResult;
|
|
|
|
|
import jnpf.base.vo.PageListVO;
|
|
|
|
|
import jnpf.base.vo.PaginationVO;
|
|
|
|
|
import jnpf.base.UserInfo;
|
|
|
|
|
import jnpf.base.vo.DownloadVO;
|
|
|
|
|
import jnpf.base.vo.PageListVO;
|
|
|
|
|
import jnpf.base.vo.PaginationVO;
|
|
|
|
|
import jnpf.config.ConfigValueUtil;
|
|
|
|
|
import jnpf.exception.DataException;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
import jnpf.base.entity.ProvinceEntity;
|
|
|
|
|
import jnpf.warehouse.model.warehouse.*;
|
|
|
|
|
import jnpf.warehouse.model.warehouse.WarehousePagination;
|
|
|
|
|
import jnpf.entity.*;
|
|
|
|
|
import jnpf.util.*;
|
|
|
|
|
import jnpf.base.util.*;
|
|
|
|
|
import jnpf.base.vo.ListVO;
|
|
|
|
|
import jnpf.util.context.SpringContext;
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import jnpf.util.enums.FileTypeEnum;
|
|
|
|
|
import jnpf.util.file.UploadUtil;
|
|
|
|
|
import jnpf.warehouse.entity.WareHouseEntity;
|
|
|
|
|
import jnpf.warehouse.model.warehouse.*;
|
|
|
|
|
import jnpf.warehouse.service.WareHouseService;
|
|
|
|
|
import lombok.Cleanup;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
|
|
import org.apache.poi.ss.usermodel.Workbook;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
import jnpf.warehouse.entity.WarehouseEntity;
|
|
|
|
|
import jnpf.warehouse.service.WarehouseService;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
import java.io.FileNotFoundException;
|
|
|
|
|
import java.io.FileOutputStream;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import jnpf.util.GeneraterSwapUtil;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
import jnpf.util.file.UploadUtil;
|
|
|
|
|
import jnpf.util.enums.FileTypeEnum;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* warehouse
|
|
|
|
|
* 仓库管理
|
|
|
|
|
* @版本: V3.2.0
|
|
|
|
|
* @版权: LINKAGE-BOOT
|
|
|
|
|
* @作者: LINKAGE-BOOT研发团队
|
|
|
|
|
* @日期: 2023-01-05
|
|
|
|
|
* @日期: 2023-02-13
|
|
|
|
|
*/
|
|
|
|
|
@Slf4j
|
|
|
|
|
@RestController
|
|
|
|
|
@Api(tags = "warehouse" , value = "warehouse")
|
|
|
|
|
@RequestMapping("/api/warehouse/Warehouse")
|
|
|
|
|
public class WarehouseController {
|
|
|
|
|
@Api(tags = "仓库管理" , value = "example")
|
|
|
|
|
@RequestMapping("/api/example/WareHouse")
|
|
|
|
|
public class WareHouseController {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private GeneraterSwapUtil generaterSwapUtil;
|
|
|
|
@ -70,7 +61,7 @@ public class WarehouseController {
|
|
|
|
|
private UserProvider userProvider;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private WarehouseService warehouseService;
|
|
|
|
|
private WareHouseService wareHouseService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -78,24 +69,31 @@ public class WarehouseController {
|
|
|
|
|
/**
|
|
|
|
|
* 列表
|
|
|
|
|
*
|
|
|
|
|
* @param warehousePagination
|
|
|
|
|
* @param wareHousePagination
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@ApiOperation("列表")
|
|
|
|
|
@PostMapping("/getList")
|
|
|
|
|
public ActionResult list(@RequestBody WarehousePagination warehousePagination)throws IOException{
|
|
|
|
|
List<WarehouseEntity> list= warehouseService.getList(warehousePagination);
|
|
|
|
|
public ActionResult list(@RequestBody WareHousePagination wareHousePagination)throws IOException{
|
|
|
|
|
List<WareHouseEntity> list= wareHouseService.getList(wareHousePagination);
|
|
|
|
|
//处理id字段转名称,若无需转或者为空可删除
|
|
|
|
|
for(WarehouseEntity entity:list){
|
|
|
|
|
for(WareHouseEntity entity:list){
|
|
|
|
|
Map<String,Object> companyCodeMap = new HashMap<>();
|
|
|
|
|
entity.setCompanyCode(generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",entity.getCompanyCode(),companyCodeMap));
|
|
|
|
|
Map<String,Object> sublibraryMap = new HashMap<>();
|
|
|
|
|
entity.setSublibrary(generaterSwapUtil.getPopupSelectValue("394818245032483845","id","inventory_org_detail_name",entity.getSublibrary(),sublibraryMap));
|
|
|
|
|
entity.setCreatorUserName(generaterSwapUtil.userSelectValue(entity.getCreatorUserName()));
|
|
|
|
|
entity.setLastModifyUserName(generaterSwapUtil.userSelectValue(entity.getLastModifyUserName()));
|
|
|
|
|
// entity.setOrgId(generaterSwapUtil.comSelectValue(entity.getOrgId(), "all"));
|
|
|
|
|
// entity.setDepartmentId(generaterSwapUtil.posSelectValue(entity.getDepartmentId()));
|
|
|
|
|
}
|
|
|
|
|
List<WarehouseListVO> listVO=JsonUtil.getJsonToList(list,WarehouseListVO.class);
|
|
|
|
|
for(WarehouseListVO warehouseVO:listVO){
|
|
|
|
|
List<WareHouseListVO> listVO=JsonUtil.getJsonToList(list,WareHouseListVO.class);
|
|
|
|
|
for(WareHouseListVO wareHouseVO:listVO){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PageListVO vo=new PageListVO();
|
|
|
|
|
vo.setList(listVO);
|
|
|
|
|
PaginationVO page=JsonUtil.getJsonToBean(warehousePagination,PaginationVO.class);
|
|
|
|
|
PaginationVO page=JsonUtil.getJsonToBean(wareHousePagination,PaginationVO.class);
|
|
|
|
|
vo.setPagination(page);
|
|
|
|
|
return ActionResult.success(vo);
|
|
|
|
|
}
|
|
|
|
@ -104,17 +102,23 @@ public class WarehouseController {
|
|
|
|
|
/**
|
|
|
|
|
* 创建
|
|
|
|
|
*
|
|
|
|
|
* @param warehouseCrForm
|
|
|
|
|
* @param wareHouseCrForm
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping
|
|
|
|
|
@Transactional
|
|
|
|
|
public ActionResult create(@RequestBody @Valid WarehouseCrForm warehouseCrForm) throws DataException {
|
|
|
|
|
public ActionResult create(@RequestBody @Valid WareHouseCrForm wareHouseCrForm) throws DataException {
|
|
|
|
|
String mainId =RandomUtil.uuId();
|
|
|
|
|
UserInfo userInfo=userProvider.get();
|
|
|
|
|
WarehouseEntity entity = JsonUtil.getJsonToBean(warehouseCrForm, WarehouseEntity.class);
|
|
|
|
|
wareHouseCrForm.setCreatorUserName(userInfo.getUserId());
|
|
|
|
|
wareHouseCrForm.setCreatorTime(DateUtil.getNow());
|
|
|
|
|
wareHouseCrForm.setOrgId(StringUtil.isEmpty(userInfo.getDepartmentId()) ? userInfo.getOrganizeId() : userInfo.getDepartmentId());
|
|
|
|
|
if(userInfo.getPositionIds()!=null&&userInfo.getPositionIds().length>0){
|
|
|
|
|
wareHouseCrForm.setDepartmentId(userInfo.getPositionIds()[0]);
|
|
|
|
|
}
|
|
|
|
|
WareHouseEntity entity = JsonUtil.getJsonToBean(wareHouseCrForm, WareHouseEntity.class);
|
|
|
|
|
entity.setId(mainId);
|
|
|
|
|
warehouseService.save(entity);
|
|
|
|
|
wareHouseService.save(entity);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ActionResult.success("创建成功");
|
|
|
|
@ -147,22 +151,30 @@ public class WarehouseController {
|
|
|
|
|
*/
|
|
|
|
|
@ApiOperation("导出Excel")
|
|
|
|
|
@GetMapping("/Actions/Export")
|
|
|
|
|
public ActionResult Export(WarehousePaginationExportModel warehousePaginationExportModel) throws IOException {
|
|
|
|
|
if (StringUtil.isEmpty(warehousePaginationExportModel.getSelectKey())){
|
|
|
|
|
public ActionResult Export(WareHousePaginationExportModel wareHousePaginationExportModel) throws IOException {
|
|
|
|
|
if (StringUtil.isEmpty(wareHousePaginationExportModel.getSelectKey())){
|
|
|
|
|
return ActionResult.fail("请选择导出字段");
|
|
|
|
|
}
|
|
|
|
|
WarehousePagination warehousePagination=JsonUtil.getJsonToBean(warehousePaginationExportModel, WarehousePagination.class);
|
|
|
|
|
List<WarehouseEntity> list= warehouseService.getTypeList(warehousePagination,warehousePaginationExportModel.getDataType());
|
|
|
|
|
WareHousePagination wareHousePagination=JsonUtil.getJsonToBean(wareHousePaginationExportModel, WareHousePagination.class);
|
|
|
|
|
List<WareHouseEntity> list= wareHouseService.getTypeList(wareHousePagination,wareHousePaginationExportModel.getDataType());
|
|
|
|
|
//处理id字段转名称,若无需转或者为空可删除
|
|
|
|
|
for(WarehouseEntity entity:list){
|
|
|
|
|
for(WareHouseEntity entity:list){
|
|
|
|
|
Map<String,Object> companyCodeMap = new HashMap<>();
|
|
|
|
|
entity.setCompanyCode(generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",entity.getCompanyCode(),companyCodeMap));
|
|
|
|
|
Map<String,Object> sublibraryMap = new HashMap<>();
|
|
|
|
|
entity.setSublibrary(generaterSwapUtil.getPopupSelectValue("394818245032483845","id","inventory_org_detail_name",entity.getSublibrary(),sublibraryMap));
|
|
|
|
|
entity.setCreatorUserName(generaterSwapUtil.userSelectValue(entity.getCreatorUserName()));
|
|
|
|
|
entity.setLastModifyUserName(generaterSwapUtil.userSelectValue(entity.getLastModifyUserName()));
|
|
|
|
|
entity.setOrgId(generaterSwapUtil.comSelectValue(entity.getOrgId(), "all"));
|
|
|
|
|
entity.setDepartmentId(generaterSwapUtil.posSelectValue(entity.getDepartmentId()));
|
|
|
|
|
}
|
|
|
|
|
List<WarehouseListVO> listVO=JsonUtil.getJsonToList(list,WarehouseListVO.class);
|
|
|
|
|
for(WarehouseListVO warehouseVO:listVO){
|
|
|
|
|
List<WareHouseListVO> listVO=JsonUtil.getJsonToList(list,WareHouseListVO.class);
|
|
|
|
|
for(WareHouseListVO wareHouseVO:listVO){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//转换为map输出
|
|
|
|
|
List<Map<String, Object>>mapList=JsonUtil.getJsonToListMap(JsonUtil.getObjectToStringDateFormat(listVO,"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
String[]keys=!StringUtil.isEmpty(warehousePaginationExportModel.getSelectKey())?warehousePaginationExportModel.getSelectKey().split(","):new String[0];
|
|
|
|
|
String[]keys=!StringUtil.isEmpty(wareHousePaginationExportModel.getSelectKey())?wareHousePaginationExportModel.getSelectKey().split(","):new String[0];
|
|
|
|
|
UserInfo userInfo=userProvider.get();
|
|
|
|
|
DownloadVO vo=this.creatModelExcel(configValueUtil.getTemporaryFilePath(),mapList,keys,userInfo);
|
|
|
|
|
return ActionResult.success(vo);
|
|
|
|
@ -177,11 +189,11 @@ public class WarehouseController {
|
|
|
|
|
case "code" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("仓库编码" ,"code"));
|
|
|
|
|
break;
|
|
|
|
|
case "companyCode" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("公司代码" ,"companyCode"));
|
|
|
|
|
case "name" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("仓库名称" ,"name"));
|
|
|
|
|
break;
|
|
|
|
|
case "companyName" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("公司名称" ,"companyName"));
|
|
|
|
|
case "companyCode" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("公司" ,"companyCode"));
|
|
|
|
|
break;
|
|
|
|
|
case "location" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("仓库位置" ,"location"));
|
|
|
|
@ -189,9 +201,6 @@ public class WarehouseController {
|
|
|
|
|
case "type" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("仓库类型" ,"type"));
|
|
|
|
|
break;
|
|
|
|
|
case "organization" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("ERP库存组织" ,"organization"));
|
|
|
|
|
break;
|
|
|
|
|
case "sublibrary" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("ERP子库" ,"sublibrary"));
|
|
|
|
|
break;
|
|
|
|
@ -201,17 +210,23 @@ public class WarehouseController {
|
|
|
|
|
case "remark" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("备注" ,"remark"));
|
|
|
|
|
break;
|
|
|
|
|
case "creatorusername" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("创建人名称" ,"creatorusername"));
|
|
|
|
|
case "creatorUserName" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("创建人名称" ,"creatorUserName"));
|
|
|
|
|
break;
|
|
|
|
|
case "creatorTime" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("创建时间" ,"creatorTime"));
|
|
|
|
|
break;
|
|
|
|
|
case "creatortime" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("创建时间" ,"creatortime"));
|
|
|
|
|
case "lastModifyUserName" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("修改人名称" ,"lastModifyUserName"));
|
|
|
|
|
break;
|
|
|
|
|
case "lastmodifyusername" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("修改人名称" ,"lastmodifyusername"));
|
|
|
|
|
case "lastModifyTime" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("修改时间" ,"lastModifyTime"));
|
|
|
|
|
break;
|
|
|
|
|
case "lastmodifytime" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("修改时间" ,"lastmodifytime"));
|
|
|
|
|
case "orgId" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("组织ID" ,"orgId"));
|
|
|
|
|
break;
|
|
|
|
|
case "departmentId" :
|
|
|
|
|
entitys.add(new ExcelExportEntity("部门ID" ,"departmentId"));
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
@ -273,9 +288,19 @@ public class WarehouseController {
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/{id}")
|
|
|
|
|
public ActionResult<WarehouseInfoVO> info(@PathVariable("id") String id){
|
|
|
|
|
WarehouseEntity entity= warehouseService.getInfo(id);
|
|
|
|
|
WarehouseInfoVO vo=JsonUtil.getJsonToBean(entity, WarehouseInfoVO.class);
|
|
|
|
|
public ActionResult<WareHouseInfoVO> info(@PathVariable("id") String id){
|
|
|
|
|
WareHouseEntity entity= wareHouseService.getInfo(id);
|
|
|
|
|
WareHouseInfoVO vo=JsonUtil.getJsonToBean(entity, WareHouseInfoVO.class);
|
|
|
|
|
vo.setCreatorUserName(generaterSwapUtil.userSelectValue(vo.getCreatorUserName()));
|
|
|
|
|
if(vo.getCreatorTime()!=null){
|
|
|
|
|
vo.setCreatorTime(vo.getCreatorTime());
|
|
|
|
|
}
|
|
|
|
|
vo.setLastModifyUserName(generaterSwapUtil.userSelectValue(vo.getLastModifyUserName()));
|
|
|
|
|
if(vo.getLastModifyTime()!=null){
|
|
|
|
|
vo.setLastModifyTime(vo.getLastModifyTime());
|
|
|
|
|
}
|
|
|
|
|
// vo.setOrgId(generaterSwapUtil.comSelectValue(vo.getOrgId(), "all"));
|
|
|
|
|
// vo.setDepartmentId(generaterSwapUtil.posSelectValue(vo.getDepartmentId()));
|
|
|
|
|
|
|
|
|
|
//子表
|
|
|
|
|
//副表
|
|
|
|
@ -289,15 +314,23 @@ public class WarehouseController {
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/detail/{id}")
|
|
|
|
|
public ActionResult<WarehouseInfoVO> detailInfo(@PathVariable("id") String id){
|
|
|
|
|
WarehouseEntity entity= warehouseService.getInfo(id);
|
|
|
|
|
WarehouseInfoVO vo=JsonUtil.getJsonToBean(entity, WarehouseInfoVO.class);
|
|
|
|
|
public ActionResult<WareHouseInfoVO> detailInfo(@PathVariable("id") String id){
|
|
|
|
|
WareHouseEntity entity= wareHouseService.getInfo(id);
|
|
|
|
|
WareHouseInfoVO vo=JsonUtil.getJsonToBean(entity, WareHouseInfoVO.class);
|
|
|
|
|
|
|
|
|
|
//子表数据转换
|
|
|
|
|
|
|
|
|
|
//附表数据转换
|
|
|
|
|
|
|
|
|
|
//添加到详情表单对象中
|
|
|
|
|
Map<String,Object> companyCodeMap = new HashMap<>();
|
|
|
|
|
vo.setCompanyCode(generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",vo.getCompanyCode(),companyCodeMap));
|
|
|
|
|
Map<String,Object> sublibraryMap = new HashMap<>();
|
|
|
|
|
vo.setSublibrary(generaterSwapUtil.getPopupSelectValue("394818245032483845","id","inventory_org_detail_name",vo.getSublibrary(),sublibraryMap));
|
|
|
|
|
vo.setCreatorUserName(generaterSwapUtil.userSelectValue(vo.getCreatorUserName()));
|
|
|
|
|
vo.setLastModifyUserName(generaterSwapUtil.userSelectValue(vo.getLastModifyUserName()));
|
|
|
|
|
vo.setOrgId(generaterSwapUtil.comSelectValue(vo.getOrgId(), "all"));
|
|
|
|
|
vo.setDepartmentId(generaterSwapUtil.posSelectValue(vo.getDepartmentId()));
|
|
|
|
|
|
|
|
|
|
return ActionResult.success(vo);
|
|
|
|
|
}
|
|
|
|
@ -313,12 +346,18 @@ public class WarehouseController {
|
|
|
|
|
*/
|
|
|
|
|
@PutMapping("/{id}")
|
|
|
|
|
@Transactional
|
|
|
|
|
public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid WarehouseUpForm warehouseUpForm) throws DataException {
|
|
|
|
|
public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid WareHouseUpForm wareHouseUpForm) throws DataException {
|
|
|
|
|
UserInfo userInfo=userProvider.get();
|
|
|
|
|
WarehouseEntity entity= warehouseService.getInfo(id);
|
|
|
|
|
WareHouseEntity entity= wareHouseService.getInfo(id);
|
|
|
|
|
if(entity!=null){
|
|
|
|
|
WarehouseEntity subentity=JsonUtil.getJsonToBean(warehouseUpForm, WarehouseEntity.class);
|
|
|
|
|
warehouseService.update(id, subentity);
|
|
|
|
|
wareHouseUpForm.setLastModifyUserName(userInfo.getUserId());
|
|
|
|
|
wareHouseUpForm.setLastModifyTime(DateUtil.getNow());
|
|
|
|
|
wareHouseUpForm.setOrgId(entity.getOrgId());
|
|
|
|
|
wareHouseUpForm.setDepartmentId(entity.getDepartmentId());
|
|
|
|
|
WareHouseEntity subentity=JsonUtil.getJsonToBean(wareHouseUpForm, WareHouseEntity.class);
|
|
|
|
|
subentity.setCreatorUserName(entity.getCreatorUserName());
|
|
|
|
|
subentity.setCreatorTime(entity.getCreatorTime());
|
|
|
|
|
wareHouseService.update(id, subentity);
|
|
|
|
|
return ActionResult.success("更新成功");
|
|
|
|
|
}else{
|
|
|
|
|
return ActionResult.fail("更新失败,数据不存在");
|
|
|
|
@ -336,9 +375,9 @@ public class WarehouseController {
|
|
|
|
|
@DeleteMapping("/{id}")
|
|
|
|
|
@Transactional
|
|
|
|
|
public ActionResult delete(@PathVariable("id") String id){
|
|
|
|
|
WarehouseEntity entity= warehouseService.getInfo(id);
|
|
|
|
|
WareHouseEntity entity= wareHouseService.getInfo(id);
|
|
|
|
|
if(entity!=null){
|
|
|
|
|
warehouseService.delete(entity);
|
|
|
|
|
wareHouseService.delete(entity);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return ActionResult.success("删除成功");
|