parent
63b1b48d73
commit
6a709b2a42
@ -0,0 +1,102 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.businesswarehouse;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
import com.yunxi.scm.framework.common.pojo.CommonResult;
|
||||
import static com.yunxi.scm.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.yunxi.scm.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.yunxi.scm.framework.operatelog.core.annotations.OperateLog;
|
||||
import static com.yunxi.scm.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.businesswarehouse.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.businesswarehouse.BusinessWarehouseDO;
|
||||
import com.yunxi.scm.module.xxjj.convert.businesswarehouse.BusinessWarehouseConvert;
|
||||
import com.yunxi.scm.module.xxjj.service.businesswarehouse.BusinessWarehouseService;
|
||||
|
||||
@Tag(name = "管理后台 - 业务线/仓库")
|
||||
@RestController
|
||||
@RequestMapping("/xxjj/business-warehouse")
|
||||
@Validated
|
||||
public class BusinessWarehouseController {
|
||||
|
||||
@Resource
|
||||
private BusinessWarehouseService businessWarehouseService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建业务线/仓库")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:business-warehouse:create')")
|
||||
public CommonResult<Long> createBusinessWarehouse(@Valid @RequestBody BusinessWarehouseCreateReqVO createReqVO) {
|
||||
return success(businessWarehouseService.createBusinessWarehouse(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新业务线/仓库")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:business-warehouse:update')")
|
||||
public CommonResult<Boolean> updateBusinessWarehouse(@Valid @RequestBody BusinessWarehouseUpdateReqVO updateReqVO) {
|
||||
businessWarehouseService.updateBusinessWarehouse(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除业务线/仓库")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:business-warehouse:delete')")
|
||||
public CommonResult<Boolean> deleteBusinessWarehouse(@RequestParam("id") Long id) {
|
||||
businessWarehouseService.deleteBusinessWarehouse(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得业务线/仓库")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:business-warehouse:query')")
|
||||
public CommonResult<BusinessWarehouseRespVO> getBusinessWarehouse(@RequestParam("id") Long id) {
|
||||
BusinessWarehouseDO businessWarehouse = businessWarehouseService.getBusinessWarehouse(id);
|
||||
return success(BusinessWarehouseConvert.INSTANCE.convert(businessWarehouse));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得业务线/仓库列表")
|
||||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:business-warehouse:query')")
|
||||
public CommonResult<List<BusinessWarehouseRespVO>> getBusinessWarehouseList(@RequestParam("ids") Collection<Long> ids) {
|
||||
List<BusinessWarehouseDO> list = businessWarehouseService.getBusinessWarehouseList(ids);
|
||||
return success(BusinessWarehouseConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得业务线/仓库分页")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:business-warehouse:query')")
|
||||
public CommonResult<PageResult<BusinessWarehouseRespVO>> getBusinessWarehousePage(@Valid BusinessWarehousePageReqVO pageVO) {
|
||||
PageResult<BusinessWarehouseDO> pageResult = businessWarehouseService.getBusinessWarehousePage(pageVO);
|
||||
return success(BusinessWarehouseConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出业务线/仓库 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:business-warehouse:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportBusinessWarehouseExcel(@Valid BusinessWarehouseExportReqVO exportReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<BusinessWarehouseDO> list = businessWarehouseService.getBusinessWarehouseList(exportReqVO);
|
||||
// 导出 Excel
|
||||
List<BusinessWarehouseExcelVO> datas = BusinessWarehouseConvert.INSTANCE.convertList02(list);
|
||||
ExcelUtils.write(response, "业务线/仓库.xls", "数据", BusinessWarehouseExcelVO.class, datas);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.businesswarehouse.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 业务线/仓库创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BusinessWarehouseCreateReqVO extends BusinessWarehouseBaseVO {
|
||||
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.businesswarehouse.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.yunxi.scm.framework.excel.core.annotations.DictFormat;
|
||||
import com.yunxi.scm.framework.excel.core.convert.DictConvert;
|
||||
|
||||
|
||||
/**
|
||||
* 业务线/仓库 Excel VO
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Data
|
||||
public class BusinessWarehouseExcelVO {
|
||||
|
||||
@ExcelProperty("业务id")
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("业务线编号")
|
||||
private String businessCode;
|
||||
|
||||
@ExcelProperty("业务线名称")
|
||||
private String name;
|
||||
|
||||
@ExcelProperty("业务线简称")
|
||||
private String businessSimple;
|
||||
|
||||
@ExcelProperty("业务线LOGO")
|
||||
private String businessLogo;
|
||||
|
||||
@ExcelProperty("父id")
|
||||
private Long parentId;
|
||||
|
||||
@ExcelProperty("类型")
|
||||
private String type;
|
||||
|
||||
@ExcelProperty(value = "所属行业", converter = DictConvert.class)
|
||||
@DictFormat("duty_type") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
||||
private String industry;
|
||||
|
||||
@ExcelProperty("所在城市")
|
||||
private String city;
|
||||
|
||||
@ExcelProperty("成立时间")
|
||||
private LocalDateTime establishDate;
|
||||
|
||||
@ExcelProperty("归属人员")
|
||||
private Long belongUserId;
|
||||
|
||||
@ExcelProperty("品牌/业务线/事业群名称")
|
||||
private String brandName;
|
||||
|
||||
@ExcelProperty("电话")
|
||||
private Integer phone;
|
||||
|
||||
@ExcelProperty("传真")
|
||||
private String fax;
|
||||
|
||||
@ExcelProperty("网址")
|
||||
private String url;
|
||||
|
||||
@ExcelProperty("介绍")
|
||||
private String description;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ExcelProperty("区分标志")
|
||||
private String diffFlag;
|
||||
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.businesswarehouse.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.yunxi.scm.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 业务线/仓库分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BusinessWarehousePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "业务线编号")
|
||||
private String businessCode;
|
||||
|
||||
@Schema(description = "业务线名称", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "业务线简称")
|
||||
private String businessSimple;
|
||||
|
||||
@Schema(description = "业务线LOGO")
|
||||
private String businessLogo;
|
||||
|
||||
@Schema(description = "父id", example = "6675")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "类型", example = "1")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "所属行业")
|
||||
private String industry;
|
||||
|
||||
@Schema(description = "所在城市")
|
||||
private String city;
|
||||
|
||||
@Schema(description = "成立时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] establishDate;
|
||||
|
||||
@Schema(description = "归属人员", example = "19777")
|
||||
private Long belongUserId;
|
||||
|
||||
@Schema(description = "品牌/业务线/事业群名称", example = "王五")
|
||||
private String brandName;
|
||||
|
||||
@Schema(description = "电话")
|
||||
private Integer phone;
|
||||
|
||||
@Schema(description = "传真")
|
||||
private String fax;
|
||||
|
||||
@Schema(description = "网址", example = "https://www.iocoder.cn")
|
||||
private String url;
|
||||
|
||||
@Schema(description = "介绍", example = "你猜")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "区分标志", example = "你猜")
|
||||
private String diffFlag;
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.businesswarehouse.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 业务线/仓库 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BusinessWarehouseRespVO extends BusinessWarehouseBaseVO {
|
||||
|
||||
@Schema(description = "业务id", requiredMode = Schema.RequiredMode.REQUIRED, example = "27714")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.businesswarehouse.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 业务线/仓库更新 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BusinessWarehouseUpdateReqVO extends BusinessWarehouseBaseVO {
|
||||
|
||||
@Schema(description = "业务id", requiredMode = Schema.RequiredMode.REQUIRED, example = "27714")
|
||||
@NotNull(message = "业务id不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.yunxi.scm.module.xxjj.convert.businesswarehouse;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.businesswarehouse.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.businesswarehouse.BusinessWarehouseDO;
|
||||
|
||||
/**
|
||||
* 业务线/仓库 Convert
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusinessWarehouseConvert {
|
||||
|
||||
BusinessWarehouseConvert INSTANCE = Mappers.getMapper(BusinessWarehouseConvert.class);
|
||||
|
||||
BusinessWarehouseDO convert(BusinessWarehouseCreateReqVO bean);
|
||||
|
||||
BusinessWarehouseDO convert(BusinessWarehouseUpdateReqVO bean);
|
||||
|
||||
BusinessWarehouseRespVO convert(BusinessWarehouseDO bean);
|
||||
|
||||
List<BusinessWarehouseRespVO> convertList(List<BusinessWarehouseDO> list);
|
||||
|
||||
PageResult<BusinessWarehouseRespVO> convertPage(PageResult<BusinessWarehouseDO> page);
|
||||
|
||||
List<BusinessWarehouseExcelVO> convertList02(List<BusinessWarehouseDO> list);
|
||||
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package com.yunxi.scm.module.xxjj.dal.dataobject.businesswarehouse;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.yunxi.scm.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 业务线/仓库 DO
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@TableName("xxjj_business_warehouse")
|
||||
@KeySequence("xxjj_business_warehouse_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BusinessWarehouseDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 业务线编号
|
||||
*/
|
||||
private String businessCode;
|
||||
/**
|
||||
* 业务线名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 业务线简称
|
||||
*/
|
||||
private String businessSimple;
|
||||
/**
|
||||
* 业务线LOGO
|
||||
*/
|
||||
private String businessLogo;
|
||||
/**
|
||||
* 父id
|
||||
*/
|
||||
private Long parentId;
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 所属行业
|
||||
*
|
||||
* 枚举 {@link TODO duty_type 对应的类}
|
||||
*/
|
||||
private String industry;
|
||||
/**
|
||||
* 所在城市
|
||||
*/
|
||||
private String city;
|
||||
/**
|
||||
* 成立时间
|
||||
*/
|
||||
private LocalDateTime establishDate;
|
||||
/**
|
||||
* 归属人员
|
||||
*/
|
||||
private Long belongUserId;
|
||||
/**
|
||||
* 品牌/业务线/事业群名称
|
||||
*/
|
||||
private String brandName;
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
private Integer phone;
|
||||
/**
|
||||
* 传真
|
||||
*/
|
||||
private String fax;
|
||||
/**
|
||||
* 网址
|
||||
*/
|
||||
private String url;
|
||||
/**
|
||||
* 介绍
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 区分标志
|
||||
*/
|
||||
private String diffFlag;
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.yunxi.scm.module.xxjj.dal.mysql.businesswarehouse;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
import com.yunxi.scm.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.yunxi.scm.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.businesswarehouse.BusinessWarehouseDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.businesswarehouse.vo.*;
|
||||
|
||||
/**
|
||||
* 业务线/仓库 Mapper
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusinessWarehouseMapper extends BaseMapperX<BusinessWarehouseDO> {
|
||||
|
||||
default PageResult<BusinessWarehouseDO> selectPage(BusinessWarehousePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BusinessWarehouseDO>()
|
||||
.eqIfPresent(BusinessWarehouseDO::getBusinessCode, reqVO.getBusinessCode())
|
||||
.likeIfPresent(BusinessWarehouseDO::getName, reqVO.getName())
|
||||
.eqIfPresent(BusinessWarehouseDO::getBusinessSimple, reqVO.getBusinessSimple())
|
||||
.eqIfPresent(BusinessWarehouseDO::getBusinessLogo, reqVO.getBusinessLogo())
|
||||
.eqIfPresent(BusinessWarehouseDO::getParentId, reqVO.getParentId())
|
||||
.eqIfPresent(BusinessWarehouseDO::getType, reqVO.getType())
|
||||
.eqIfPresent(BusinessWarehouseDO::getIndustry, reqVO.getIndustry())
|
||||
.eqIfPresent(BusinessWarehouseDO::getCity, reqVO.getCity())
|
||||
.betweenIfPresent(BusinessWarehouseDO::getEstablishDate, reqVO.getEstablishDate())
|
||||
.eqIfPresent(BusinessWarehouseDO::getBelongUserId, reqVO.getBelongUserId())
|
||||
.likeIfPresent(BusinessWarehouseDO::getBrandName, reqVO.getBrandName())
|
||||
.eqIfPresent(BusinessWarehouseDO::getPhone, reqVO.getPhone())
|
||||
.eqIfPresent(BusinessWarehouseDO::getFax, reqVO.getFax())
|
||||
.eqIfPresent(BusinessWarehouseDO::getUrl, reqVO.getUrl())
|
||||
.eqIfPresent(BusinessWarehouseDO::getDescription, reqVO.getDescription())
|
||||
.betweenIfPresent(BusinessWarehouseDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(BusinessWarehouseDO::getId));
|
||||
}
|
||||
|
||||
default List<BusinessWarehouseDO> selectList(BusinessWarehouseExportReqVO reqVO) {
|
||||
return selectList(new LambdaQueryWrapperX<BusinessWarehouseDO>()
|
||||
.eqIfPresent(BusinessWarehouseDO::getBusinessCode, reqVO.getBusinessCode())
|
||||
.likeIfPresent(BusinessWarehouseDO::getName, reqVO.getName())
|
||||
.eqIfPresent(BusinessWarehouseDO::getBusinessSimple, reqVO.getBusinessSimple())
|
||||
.eqIfPresent(BusinessWarehouseDO::getBusinessLogo, reqVO.getBusinessLogo())
|
||||
.eqIfPresent(BusinessWarehouseDO::getParentId, reqVO.getParentId())
|
||||
.eqIfPresent(BusinessWarehouseDO::getType, reqVO.getType())
|
||||
.eqIfPresent(BusinessWarehouseDO::getIndustry, reqVO.getIndustry())
|
||||
.eqIfPresent(BusinessWarehouseDO::getCity, reqVO.getCity())
|
||||
.betweenIfPresent(BusinessWarehouseDO::getEstablishDate, reqVO.getEstablishDate())
|
||||
.eqIfPresent(BusinessWarehouseDO::getBelongUserId, reqVO.getBelongUserId())
|
||||
.likeIfPresent(BusinessWarehouseDO::getBrandName, reqVO.getBrandName())
|
||||
.eqIfPresent(BusinessWarehouseDO::getPhone, reqVO.getPhone())
|
||||
.eqIfPresent(BusinessWarehouseDO::getFax, reqVO.getFax())
|
||||
.eqIfPresent(BusinessWarehouseDO::getUrl, reqVO.getUrl())
|
||||
.eqIfPresent(BusinessWarehouseDO::getDescription, reqVO.getDescription())
|
||||
.betweenIfPresent(BusinessWarehouseDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(BusinessWarehouseDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.yunxi.scm.module.xxjj.service.businesswarehouse;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.businesswarehouse.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.businesswarehouse.BusinessWarehouseDO;
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 业务线/仓库 Service 接口
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
public interface BusinessWarehouseService {
|
||||
|
||||
/**
|
||||
* 创建业务线/仓库
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createBusinessWarehouse(@Valid BusinessWarehouseCreateReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新业务线/仓库
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateBusinessWarehouse(@Valid BusinessWarehouseUpdateReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除业务线/仓库
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteBusinessWarehouse(Long id);
|
||||
|
||||
/**
|
||||
* 获得业务线/仓库
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 业务线/仓库
|
||||
*/
|
||||
BusinessWarehouseDO getBusinessWarehouse(Long id);
|
||||
|
||||
/**
|
||||
* 获得业务线/仓库列表
|
||||
*
|
||||
* @param ids 编号
|
||||
* @return 业务线/仓库列表
|
||||
*/
|
||||
List<BusinessWarehouseDO> getBusinessWarehouseList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得业务线/仓库分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 业务线/仓库分页
|
||||
*/
|
||||
PageResult<BusinessWarehouseDO> getBusinessWarehousePage(BusinessWarehousePageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得业务线/仓库列表, 用于 Excel 导出
|
||||
*
|
||||
* @param exportReqVO 查询条件
|
||||
* @return 业务线/仓库列表
|
||||
*/
|
||||
List<BusinessWarehouseDO> getBusinessWarehouseList(BusinessWarehouseExportReqVO exportReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package com.yunxi.scm.module.xxjj.service.businesswarehouse;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.*;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.businesswarehouse.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.businesswarehouse.BusinessWarehouseDO;
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
import com.yunxi.scm.module.xxjj.convert.businesswarehouse.BusinessWarehouseConvert;
|
||||
import com.yunxi.scm.module.xxjj.dal.mysql.businesswarehouse.BusinessWarehouseMapper;
|
||||
|
||||
import static com.yunxi.scm.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.yunxi.scm.module.xxjj.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 业务线/仓库 Service 实现类
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class BusinessWarehouseServiceImpl implements BusinessWarehouseService {
|
||||
|
||||
@Resource
|
||||
private BusinessWarehouseMapper businessWarehouseMapper;
|
||||
|
||||
@Override
|
||||
public Long createBusinessWarehouse(BusinessWarehouseCreateReqVO createReqVO) {
|
||||
// 插入
|
||||
BusinessWarehouseDO businessWarehouse = BusinessWarehouseConvert.INSTANCE.convert(createReqVO);
|
||||
businessWarehouseMapper.insert(businessWarehouse);
|
||||
// 返回
|
||||
return businessWarehouse.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBusinessWarehouse(BusinessWarehouseUpdateReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateBusinessWarehouseExists(updateReqVO.getId());
|
||||
// 更新
|
||||
BusinessWarehouseDO updateObj = BusinessWarehouseConvert.INSTANCE.convert(updateReqVO);
|
||||
businessWarehouseMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBusinessWarehouse(Long id) {
|
||||
// 校验存在
|
||||
validateBusinessWarehouseExists(id);
|
||||
// 删除
|
||||
businessWarehouseMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateBusinessWarehouseExists(Long id) {
|
||||
if (businessWarehouseMapper.selectById(id) == null) {
|
||||
throw exception(BUSINESS_WAREHOUSE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessWarehouseDO getBusinessWarehouse(Long id) {
|
||||
return businessWarehouseMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessWarehouseDO> getBusinessWarehouseList(Collection<Long> ids) {
|
||||
return businessWarehouseMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<BusinessWarehouseDO> getBusinessWarehousePage(BusinessWarehousePageReqVO pageReqVO) {
|
||||
return businessWarehouseMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessWarehouseDO> getBusinessWarehouseList(BusinessWarehouseExportReqVO exportReqVO) {
|
||||
return businessWarehouseMapper.selectList(exportReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,278 @@
|
||||
package com.yunxi.scm.module.xxjj.service.businesswarehouse;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.mock.mockito.MockBean;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.yunxi.scm.framework.test.core.ut.BaseDbUnitTest;
|
||||
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.businesswarehouse.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.businesswarehouse.BusinessWarehouseDO;
|
||||
import com.yunxi.scm.module.xxjj.dal.mysql.businesswarehouse.BusinessWarehouseMapper;
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.hutool.core.util.RandomUtil.*;
|
||||
import static com.yunxi.scm.module.xxjj.enums.ErrorCodeConstants.*;
|
||||
import static com.yunxi.scm.framework.test.core.util.AssertUtils.*;
|
||||
import static com.yunxi.scm.framework.test.core.util.RandomUtils.*;
|
||||
import static com.yunxi.scm.framework.common.util.date.LocalDateTimeUtils.*;
|
||||
import static com.yunxi.scm.framework.common.util.object.ObjectUtils.*;
|
||||
import static com.yunxi.scm.framework.common.util.date.DateUtils.*;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
/**
|
||||
* {@link BusinessWarehouseServiceImpl} 的单元测试类
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Import(BusinessWarehouseServiceImpl.class)
|
||||
public class BusinessWarehouseServiceImplTest extends BaseDbUnitTest {
|
||||
|
||||
@Resource
|
||||
private BusinessWarehouseServiceImpl businessWarehouseService;
|
||||
|
||||
@Resource
|
||||
private BusinessWarehouseMapper businessWarehouseMapper;
|
||||
|
||||
@Test
|
||||
public void testCreateBusinessWarehouse_success() {
|
||||
// 准备参数
|
||||
BusinessWarehouseCreateReqVO reqVO = randomPojo(BusinessWarehouseCreateReqVO.class);
|
||||
|
||||
// 调用
|
||||
Long businessWarehouseId = businessWarehouseService.createBusinessWarehouse(reqVO);
|
||||
// 断言
|
||||
assertNotNull(businessWarehouseId);
|
||||
// 校验记录的属性是否正确
|
||||
BusinessWarehouseDO businessWarehouse = businessWarehouseMapper.selectById(businessWarehouseId);
|
||||
assertPojoEquals(reqVO, businessWarehouse);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateBusinessWarehouse_success() {
|
||||
// mock 数据
|
||||
BusinessWarehouseDO dbBusinessWarehouse = randomPojo(BusinessWarehouseDO.class);
|
||||
businessWarehouseMapper.insert(dbBusinessWarehouse);// @Sql: 先插入出一条存在的数据
|
||||
// 准备参数
|
||||
BusinessWarehouseUpdateReqVO reqVO = randomPojo(BusinessWarehouseUpdateReqVO.class, o -> {
|
||||
o.setId(dbBusinessWarehouse.getId()); // 设置更新的 ID
|
||||
});
|
||||
|
||||
// 调用
|
||||
businessWarehouseService.updateBusinessWarehouse(reqVO);
|
||||
// 校验是否更新正确
|
||||
BusinessWarehouseDO businessWarehouse = businessWarehouseMapper.selectById(reqVO.getId()); // 获取最新的
|
||||
assertPojoEquals(reqVO, businessWarehouse);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateBusinessWarehouse_notExists() {
|
||||
// 准备参数
|
||||
BusinessWarehouseUpdateReqVO reqVO = randomPojo(BusinessWarehouseUpdateReqVO.class);
|
||||
|
||||
// 调用, 并断言异常
|
||||
assertServiceException(() -> businessWarehouseService.updateBusinessWarehouse(reqVO), BUSINESS_WAREHOUSE_NOT_EXISTS);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeleteBusinessWarehouse_success() {
|
||||
// mock 数据
|
||||
BusinessWarehouseDO dbBusinessWarehouse = randomPojo(BusinessWarehouseDO.class);
|
||||
businessWarehouseMapper.insert(dbBusinessWarehouse);// @Sql: 先插入出一条存在的数据
|
||||
// 准备参数
|
||||
Long id = dbBusinessWarehouse.getId();
|
||||
|
||||
// 调用
|
||||
businessWarehouseService.deleteBusinessWarehouse(id);
|
||||
// 校验数据不存在了
|
||||
assertNull(businessWarehouseMapper.selectById(id));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeleteBusinessWarehouse_notExists() {
|
||||
// 准备参数
|
||||
Long id = randomLongId();
|
||||
|
||||
// 调用, 并断言异常
|
||||
assertServiceException(() -> businessWarehouseService.deleteBusinessWarehouse(id), BUSINESS_WAREHOUSE_NOT_EXISTS);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled // TODO 请修改 null 为需要的值,然后删除 @Disabled 注解
|
||||
public void testGetBusinessWarehousePage() {
|
||||
// mock 数据
|
||||
BusinessWarehouseDO dbBusinessWarehouse = randomPojo(BusinessWarehouseDO.class, o -> { // 等会查询到
|
||||
o.setBusinessCode(null);
|
||||
o.setName(null);
|
||||
o.setBusinessSimple(null);
|
||||
o.setBusinessLogo(null);
|
||||
o.setParentId(null);
|
||||
o.setType(null);
|
||||
o.setIndustry(null);
|
||||
o.setCity(null);
|
||||
o.setEstablishDate(null);
|
||||
o.setBelongUserId(null);
|
||||
o.setBrandName(null);
|
||||
o.setPhone(null);
|
||||
o.setFax(null);
|
||||
o.setUrl(null);
|
||||
o.setDescription(null);
|
||||
o.setCreateTime(null);
|
||||
o.setDiffFlag(null);
|
||||
});
|
||||
businessWarehouseMapper.insert(dbBusinessWarehouse);
|
||||
// 测试 businessCode 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setBusinessCode(null)));
|
||||
// 测试 businessName 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setName(null)));
|
||||
// 测试 businessSimple 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setBusinessSimple(null)));
|
||||
// 测试 businessLogo 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setBusinessLogo(null)));
|
||||
// 测试 parentId 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setParentId(null)));
|
||||
// 测试 type 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setType(null)));
|
||||
// 测试 industry 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setIndustry(null)));
|
||||
// 测试 city 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setCity(null)));
|
||||
// 测试 establishDate 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setEstablishDate(null)));
|
||||
// 测试 belongUserId 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setBelongUserId(null)));
|
||||
// 测试 brandName 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setBrandName(null)));
|
||||
// 测试 phone 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setPhone(null)));
|
||||
// 测试 fax 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setFax(null)));
|
||||
// 测试 url 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setUrl(null)));
|
||||
// 测试 description 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setDescription(null)));
|
||||
// 测试 createTime 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setCreateTime(null)));
|
||||
// 测试 diffFlag 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setDiffFlag(null)));
|
||||
// 准备参数
|
||||
BusinessWarehousePageReqVO reqVO = new BusinessWarehousePageReqVO();
|
||||
reqVO.setBusinessCode(null);
|
||||
reqVO.setName(null);
|
||||
reqVO.setBusinessSimple(null);
|
||||
reqVO.setBusinessLogo(null);
|
||||
reqVO.setParentId(null);
|
||||
reqVO.setType(null);
|
||||
reqVO.setIndustry(null);
|
||||
reqVO.setCity(null);
|
||||
reqVO.setEstablishDate(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
|
||||
reqVO.setBelongUserId(null);
|
||||
reqVO.setBrandName(null);
|
||||
reqVO.setPhone(null);
|
||||
reqVO.setFax(null);
|
||||
reqVO.setUrl(null);
|
||||
reqVO.setDescription(null);
|
||||
reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
|
||||
reqVO.setDiffFlag(null);
|
||||
// 调用
|
||||
PageResult<BusinessWarehouseDO> pageResult = businessWarehouseService.getBusinessWarehousePage(reqVO);
|
||||
// 断言
|
||||
assertEquals(1, pageResult.getTotal());
|
||||
assertEquals(1, pageResult.getList().size());
|
||||
assertPojoEquals(dbBusinessWarehouse, pageResult.getList().get(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled // TODO 请修改 null 为需要的值,然后删除 @Disabled 注解
|
||||
public void testGetBusinessWarehouseList() {
|
||||
// mock 数据
|
||||
BusinessWarehouseDO dbBusinessWarehouse = randomPojo(BusinessWarehouseDO.class, o -> { // 等会查询到
|
||||
o.setBusinessCode(null);
|
||||
o.setName(null);
|
||||
o.setBusinessSimple(null);
|
||||
o.setBusinessLogo(null);
|
||||
o.setParentId(null);
|
||||
o.setType(null);
|
||||
o.setIndustry(null);
|
||||
o.setCity(null);
|
||||
o.setEstablishDate(null);
|
||||
o.setBelongUserId(null);
|
||||
o.setBrandName(null);
|
||||
o.setPhone(null);
|
||||
o.setFax(null);
|
||||
o.setUrl(null);
|
||||
o.setDescription(null);
|
||||
o.setCreateTime(null);
|
||||
o.setDiffFlag(null);
|
||||
});
|
||||
businessWarehouseMapper.insert(dbBusinessWarehouse);
|
||||
// 测试 businessCode 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setBusinessCode(null)));
|
||||
// 测试 businessName 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setName(null)));
|
||||
// 测试 businessSimple 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setBusinessSimple(null)));
|
||||
// 测试 businessLogo 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setBusinessLogo(null)));
|
||||
// 测试 parentId 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setParentId(null)));
|
||||
// 测试 type 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setType(null)));
|
||||
// 测试 industry 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setIndustry(null)));
|
||||
// 测试 city 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setCity(null)));
|
||||
// 测试 establishDate 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setEstablishDate(null)));
|
||||
// 测试 belongUserId 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setBelongUserId(null)));
|
||||
// 测试 brandName 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setBrandName(null)));
|
||||
// 测试 phone 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setPhone(null)));
|
||||
// 测试 fax 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setFax(null)));
|
||||
// 测试 url 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setUrl(null)));
|
||||
// 测试 description 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setDescription(null)));
|
||||
// 测试 createTime 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setCreateTime(null)));
|
||||
// 测试 diffFlag 不匹配
|
||||
businessWarehouseMapper.insert(cloneIgnoreId(dbBusinessWarehouse, o -> o.setDiffFlag(null)));
|
||||
// 准备参数
|
||||
BusinessWarehouseExportReqVO reqVO = new BusinessWarehouseExportReqVO();
|
||||
reqVO.setBusinessCode(null);
|
||||
reqVO.setName(null);
|
||||
reqVO.setBusinessSimple(null);
|
||||
reqVO.setBusinessLogo(null);
|
||||
reqVO.setParentId(null);
|
||||
reqVO.setType(null);
|
||||
reqVO.setIndustry(null);
|
||||
reqVO.setCity(null);
|
||||
reqVO.setEstablishDate(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
|
||||
reqVO.setBelongUserId(null);
|
||||
reqVO.setBrandName(null);
|
||||
reqVO.setPhone(null);
|
||||
reqVO.setFax(null);
|
||||
reqVO.setUrl(null);
|
||||
reqVO.setDescription(null);
|
||||
reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
|
||||
reqVO.setDiffFlag(null);
|
||||
|
||||
// 调用
|
||||
List<BusinessWarehouseDO> list = businessWarehouseService.getBusinessWarehouseList(reqVO);
|
||||
// 断言
|
||||
assertEquals(1, list.size());
|
||||
assertPojoEquals(dbBusinessWarehouse, list.get(0));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建业务线/仓库
|
||||
export function createBusinessWarehouse(data) {
|
||||
return request({
|
||||
url: '/xxjj/business-warehouse/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新业务线/仓库
|
||||
export function updateBusinessWarehouse(data) {
|
||||
return request({
|
||||
url: '/xxjj/business-warehouse/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除业务线/仓库
|
||||
export function deleteBusinessWarehouse(id) {
|
||||
return request({
|
||||
url: '/xxjj/business-warehouse/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得业务线/仓库
|
||||
export function getBusinessWarehouse(id) {
|
||||
return request({
|
||||
url: '/xxjj/business-warehouse/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得业务线/仓库分页
|
||||
export function getBusinessWarehousePage(query) {
|
||||
return request({
|
||||
url: '/xxjj/business-warehouse/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 导出业务线/仓库 Excel
|
||||
export function exportBusinessWarehouseExcel(query) {
|
||||
return request({
|
||||
url: '/xxjj/business-warehouse/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
Loading…
Reference in new issue