commit
236ec9c3af
@ -0,0 +1,102 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.product;
|
||||
|
||||
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.product.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.product.ProductDO;
|
||||
import com.yunxi.scm.module.xxjj.convert.product.ProductConvert;
|
||||
import com.yunxi.scm.module.xxjj.service.product.ProductService;
|
||||
|
||||
@Tag(name = "管理后台 - 产品")
|
||||
@RestController
|
||||
@RequestMapping("/xxjj/product")
|
||||
@Validated
|
||||
public class ProductController {
|
||||
|
||||
@Resource
|
||||
private ProductService productService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建产品")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product:create')")
|
||||
public CommonResult<Long> createProduct(@Valid @RequestBody ProductCreateReqVO createReqVO) {
|
||||
return success(productService.createProduct(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新产品")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product:update')")
|
||||
public CommonResult<Boolean> updateProduct(@Valid @RequestBody ProductUpdateReqVO updateReqVO) {
|
||||
productService.updateProduct(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除产品")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product:delete')")
|
||||
public CommonResult<Boolean> deleteProduct(@RequestParam("id") Long id) {
|
||||
productService.deleteProduct(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得产品")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product:query')")
|
||||
public CommonResult<ProductRespVO> getProduct(@RequestParam("id") Long id) {
|
||||
ProductDO product = productService.getProduct(id);
|
||||
return success(ProductConvert.INSTANCE.convert(product));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得产品列表")
|
||||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product:query')")
|
||||
public CommonResult<List<ProductRespVO>> getProductList(@RequestParam("ids") Collection<Long> ids) {
|
||||
List<ProductDO> list = productService.getProductList(ids);
|
||||
return success(ProductConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得产品分页")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product:query')")
|
||||
public CommonResult<PageResult<ProductRespVO>> getProductPage(@Valid ProductPageReqVO pageVO) {
|
||||
PageResult<ProductDO> pageResult = productService.getProductPage(pageVO);
|
||||
return success(ProductConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出产品 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportProductExcel(@Valid ProductExportReqVO exportReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<ProductDO> list = productService.getProductList(exportReqVO);
|
||||
// 导出 Excel
|
||||
List<ProductExcelVO> datas = ProductConvert.INSTANCE.convertList02(list);
|
||||
ExcelUtils.write(response, "产品.xls", "数据", ProductExcelVO.class, datas);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.product.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 ProductCreateReqVO extends ProductBaseVO {
|
||||
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.product.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
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 ProductExcelVO {
|
||||
|
||||
@ExcelProperty("自增主键")
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("产品编码")
|
||||
private String productCode;
|
||||
|
||||
@ExcelProperty("产品名称")
|
||||
private String productName;
|
||||
|
||||
@ExcelProperty("产品图片")
|
||||
private String productPicture;
|
||||
|
||||
@ExcelProperty(value = "产品类别", converter = DictConvert.class)
|
||||
@DictFormat("product_class") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
||||
private String classId;
|
||||
|
||||
@ExcelProperty(value = "产品类型", converter = DictConvert.class)
|
||||
@DictFormat("product_type") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
||||
private String typeId;
|
||||
|
||||
@ExcelProperty("产品分类")
|
||||
private Long categoryId;
|
||||
|
||||
@ExcelProperty("产品规格")
|
||||
private String spec;
|
||||
|
||||
@ExcelProperty("标准单价")
|
||||
private BigDecimal singlePrice;
|
||||
|
||||
@ExcelProperty("首选供应商")
|
||||
private Long supplyId;
|
||||
|
||||
@ExcelProperty(value = "采购模式", converter = DictConvert.class)
|
||||
@DictFormat("purchase_way") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
||||
private String purchaseWay;
|
||||
|
||||
@ExcelProperty(value = "存货类型", converter = DictConvert.class)
|
||||
@DictFormat("save_type") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
||||
private String saveType;
|
||||
|
||||
@ExcelProperty("产品品牌")
|
||||
private Long brandId;
|
||||
|
||||
@ExcelProperty("产地")
|
||||
private String productAddress;
|
||||
|
||||
@ExcelProperty(value = "配送方式", converter = DictConvert.class)
|
||||
@DictFormat("delivery_way") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
||||
private String deliveryWay;
|
||||
|
||||
@ExcelProperty(value = "产品来源", converter = DictConvert.class)
|
||||
@DictFormat("product_source") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
||||
private String productSource;
|
||||
|
||||
@ExcelProperty(value = "产品状态", converter = DictConvert.class)
|
||||
@DictFormat("product_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
||||
private String productStatus;
|
||||
|
||||
@ExcelProperty(value = "销售状态", converter = DictConvert.class)
|
||||
@DictFormat("sale_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
||||
private String saleStatus;
|
||||
|
||||
@ExcelProperty(value = "生命周期", converter = DictConvert.class)
|
||||
@DictFormat("life_cycle") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
||||
private String lifeCycle;
|
||||
|
||||
@ExcelProperty("预计上市时间")
|
||||
private LocalDateTime ipoDate;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ExcelProperty(value = "审核状态", converter = DictConvert.class)
|
||||
@DictFormat("audit_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
||||
private String auditStatus;
|
||||
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.product.vo;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
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 ProductPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "产品编码")
|
||||
private String productCode;
|
||||
|
||||
@Schema(description = "产品名称", example = "芋艿")
|
||||
private String productName;
|
||||
|
||||
@Schema(description = "产品图片", example = "芋艿")
|
||||
private String productPicture;
|
||||
|
||||
|
||||
@Schema(description = "产品类别", example = "28952")
|
||||
private String classId;
|
||||
|
||||
@Schema(description = "产品类型", example = "4846")
|
||||
private String typeId;
|
||||
|
||||
@Schema(description = "产品分类", example = "30850")
|
||||
private Long categoryId;
|
||||
|
||||
@Schema(description = "产品规格")
|
||||
private String spec;
|
||||
|
||||
@Schema(description = "标准单价", example = "19894")
|
||||
private BigDecimal singlePrice;
|
||||
|
||||
@Schema(description = "首选供应商", example = "2309")
|
||||
private Long supplyId;
|
||||
|
||||
@Schema(description = "采购模式")
|
||||
private String purchaseWay;
|
||||
|
||||
@Schema(description = "存货类型", example = "2")
|
||||
private String saveType;
|
||||
|
||||
@Schema(description = "产品品牌", example = "29464")
|
||||
private Long brandId;
|
||||
|
||||
@Schema(description = "产地")
|
||||
private String productAddress;
|
||||
|
||||
@Schema(description = "配送方式")
|
||||
private String deliveryWay;
|
||||
|
||||
@Schema(description = "产品来源")
|
||||
private String productSource;
|
||||
|
||||
@Schema(description = "产品状态", example = "2")
|
||||
private String productStatus;
|
||||
|
||||
@Schema(description = "销售状态", example = "2")
|
||||
private String saleStatus;
|
||||
|
||||
@Schema(description = "生命周期")
|
||||
private String lifeCycle;
|
||||
|
||||
@Schema(description = "预计上市时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] ipoDate;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "审核状态", example = "2")
|
||||
private String auditStatus;
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.product.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 ProductRespVO extends ProductBaseVO {
|
||||
|
||||
@Schema(description = "自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7034")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.product.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 ProductUpdateReqVO extends ProductBaseVO {
|
||||
|
||||
@Schema(description = "自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7034")
|
||||
@NotNull(message = "自增主键不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.productcategory;
|
||||
|
||||
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.productcategory.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.productcategory.ProductCategoryDO;
|
||||
import com.yunxi.scm.module.xxjj.convert.productcategory.ProductCategoryConvert;
|
||||
import com.yunxi.scm.module.xxjj.service.productcategory.ProductCategoryService;
|
||||
|
||||
@Tag(name = "管理后台 - 产品分类")
|
||||
@RestController
|
||||
@RequestMapping("/xxjj/product-category")
|
||||
@Validated
|
||||
public class ProductCategoryController {
|
||||
|
||||
@Resource
|
||||
private ProductCategoryService productCategoryService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建产品分类")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-category:create')")
|
||||
public CommonResult<Long> createProductCategory(@Valid @RequestBody ProductCategoryCreateReqVO createReqVO) {
|
||||
return success(productCategoryService.createProductCategory(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新产品分类")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-category:update')")
|
||||
public CommonResult<Boolean> updateProductCategory(@Valid @RequestBody ProductCategoryUpdateReqVO updateReqVO) {
|
||||
productCategoryService.updateProductCategory(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除产品分类")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-category:delete')")
|
||||
public CommonResult<Boolean> deleteProductCategory(@RequestParam("id") Long id) {
|
||||
productCategoryService.deleteProductCategory(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得产品分类")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-category:query')")
|
||||
public CommonResult<ProductCategoryRespVO> getProductCategory(@RequestParam("id") Long id) {
|
||||
ProductCategoryDO productCategory = productCategoryService.getProductCategory(id);
|
||||
return success(ProductCategoryConvert.INSTANCE.convert(productCategory));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得产品分类列表")
|
||||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-category:query')")
|
||||
public CommonResult<List<ProductCategoryRespVO>> getProductCategoryList(@RequestParam("ids") Collection<Long> ids) {
|
||||
List<ProductCategoryDO> list = productCategoryService.getProductCategoryList(ids);
|
||||
return success(ProductCategoryConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得产品分类分页")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-category:query')")
|
||||
public CommonResult<PageResult<ProductCategoryRespVO>> getProductCategoryPage(@Valid ProductCategoryPageReqVO pageVO) {
|
||||
PageResult<ProductCategoryDO> pageResult = productCategoryService.getProductCategoryPage(pageVO);
|
||||
return success(ProductCategoryConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出产品分类 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-category:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportProductCategoryExcel(@Valid ProductCategoryExportReqVO exportReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<ProductCategoryDO> list = productCategoryService.getProductCategoryList(exportReqVO);
|
||||
// 导出 Excel
|
||||
List<ProductCategoryExcelVO> datas = ProductCategoryConvert.INSTANCE.convertList02(list);
|
||||
ExcelUtils.write(response, "产品分类.xls", "数据", ProductCategoryExcelVO.class, datas);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.productcategory.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 ProductCategoryCreateReqVO extends ProductCategoryBaseVO {
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.productcategory.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
||||
/**
|
||||
* 产品分类 Excel VO
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Data
|
||||
public class ProductCategoryExcelVO {
|
||||
|
||||
@ExcelProperty("分类id")
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("分类编码")
|
||||
private String code;
|
||||
|
||||
@ExcelProperty("分类名称")
|
||||
private String name;
|
||||
|
||||
@ExcelProperty("父分类id")
|
||||
private Long parentId;
|
||||
|
||||
@ExcelProperty("显示顺序")
|
||||
private Integer sort;
|
||||
|
||||
@ExcelProperty("分类描述")
|
||||
private String description;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.productcategory.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 ProductCategoryPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "分类名称", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.productcategory.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 ProductCategoryRespVO extends ProductCategoryBaseVO {
|
||||
|
||||
@Schema(description = "分类id", requiredMode = Schema.RequiredMode.REQUIRED, example = "32020")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.productcategory.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 ProductCategoryUpdateReqVO extends ProductCategoryBaseVO {
|
||||
|
||||
@Schema(description = "分类id", requiredMode = Schema.RequiredMode.REQUIRED, example = "32020")
|
||||
@NotNull(message = "分类id不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.productclass;
|
||||
|
||||
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.productclass.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.productclass.ProductClassDO;
|
||||
import com.yunxi.scm.module.xxjj.convert.productclass.ProductClassConvert;
|
||||
import com.yunxi.scm.module.xxjj.service.productclass.ProductClassService;
|
||||
|
||||
@Tag(name = "管理后台 - 产品类别")
|
||||
@RestController
|
||||
@RequestMapping("/xxjj/product-class")
|
||||
@Validated
|
||||
public class ProductClassController {
|
||||
|
||||
@Resource
|
||||
private ProductClassService productClassService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建产品类别")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-class:create')")
|
||||
public CommonResult<Long> createProductClass(@Valid @RequestBody ProductClassCreateReqVO createReqVO) {
|
||||
return success(productClassService.createProductClass(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新产品类别")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-class:update')")
|
||||
public CommonResult<Boolean> updateProductClass(@Valid @RequestBody ProductClassUpdateReqVO updateReqVO) {
|
||||
productClassService.updateProductClass(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除产品类别")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-class:delete')")
|
||||
public CommonResult<Boolean> deleteProductClass(@RequestParam("id") Long id) {
|
||||
productClassService.deleteProductClass(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得产品类别")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-class:query')")
|
||||
public CommonResult<ProductClassRespVO> getProductClass(@RequestParam("id") Long id) {
|
||||
ProductClassDO productClass = productClassService.getProductClass(id);
|
||||
return success(ProductClassConvert.INSTANCE.convert(productClass));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得产品类别列表")
|
||||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-class:query')")
|
||||
public CommonResult<List<ProductClassRespVO>> getProductClassList(@RequestParam("ids") Collection<Long> ids) {
|
||||
List<ProductClassDO> list = productClassService.getProductClassList(ids);
|
||||
return success(ProductClassConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得产品类别分页")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-class:query')")
|
||||
public CommonResult<PageResult<ProductClassRespVO>> getProductClassPage(@Valid ProductClassPageReqVO pageVO) {
|
||||
PageResult<ProductClassDO> pageResult = productClassService.getProductClassPage(pageVO);
|
||||
return success(ProductClassConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出产品类别 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-class:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportProductClassExcel(@Valid ProductClassExportReqVO exportReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<ProductClassDO> list = productClassService.getProductClassList(exportReqVO);
|
||||
// 导出 Excel
|
||||
List<ProductClassExcelVO> datas = ProductClassConvert.INSTANCE.convertList02(list);
|
||||
ExcelUtils.write(response, "产品类别.xls", "数据", ProductClassExcelVO.class, datas);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.productclass.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 ProductClassCreateReqVO extends ProductClassBaseVO {
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.productclass.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 ProductClassRespVO extends ProductClassBaseVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26864")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.productclass.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 ProductClassUpdateReqVO extends ProductClassBaseVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26864")
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.producttype;
|
||||
|
||||
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.producttype.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.producttype.ProductTypeDO;
|
||||
import com.yunxi.scm.module.xxjj.convert.producttype.ProductTypeConvert;
|
||||
import com.yunxi.scm.module.xxjj.service.producttype.ProductTypeService;
|
||||
|
||||
@Tag(name = "管理后台 - 产品类型")
|
||||
@RestController
|
||||
@RequestMapping("/xxjj/product-type")
|
||||
@Validated
|
||||
public class ProductTypeController {
|
||||
|
||||
@Resource
|
||||
private ProductTypeService productTypeService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建产品类型")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-type:create')")
|
||||
public CommonResult<Long> createProductType(@Valid @RequestBody ProductTypeCreateReqVO createReqVO) {
|
||||
return success(productTypeService.createProductType(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新产品类型")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-type:update')")
|
||||
public CommonResult<Boolean> updateProductType(@Valid @RequestBody ProductTypeUpdateReqVO updateReqVO) {
|
||||
productTypeService.updateProductType(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除产品类型")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-type:delete')")
|
||||
public CommonResult<Boolean> deleteProductType(@RequestParam("id") Long id) {
|
||||
productTypeService.deleteProductType(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得产品类型")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-type:query')")
|
||||
public CommonResult<ProductTypeRespVO> getProductType(@RequestParam("id") Long id) {
|
||||
ProductTypeDO productType = productTypeService.getProductType(id);
|
||||
return success(ProductTypeConvert.INSTANCE.convert(productType));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得产品类型列表")
|
||||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-type:query')")
|
||||
public CommonResult<List<ProductTypeRespVO>> getProductTypeList(@RequestParam("ids") Collection<Long> ids) {
|
||||
List<ProductTypeDO> list = productTypeService.getProductTypeList(ids);
|
||||
return success(ProductTypeConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得产品类型分页")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-type:query')")
|
||||
public CommonResult<PageResult<ProductTypeRespVO>> getProductTypePage(@Valid ProductTypePageReqVO pageVO) {
|
||||
PageResult<ProductTypeDO> pageResult = productTypeService.getProductTypePage(pageVO);
|
||||
return success(ProductTypeConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出产品类型 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:product-type:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportProductTypeExcel(@Valid ProductTypeExportReqVO exportReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<ProductTypeDO> list = productTypeService.getProductTypeList(exportReqVO);
|
||||
// 导出 Excel
|
||||
List<ProductTypeExcelVO> datas = ProductTypeConvert.INSTANCE.convertList02(list);
|
||||
ExcelUtils.write(response, "产品类型.xls", "数据", ProductTypeExcelVO.class, datas);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.producttype.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 ProductTypeCreateReqVO extends ProductTypeBaseVO {
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.producttype.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 ProductTypeRespVO extends ProductTypeBaseVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8651")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.producttype.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 ProductTypeUpdateReqVO extends ProductTypeBaseVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8651")
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.taskmanage;
|
||||
|
||||
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.taskmanage.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.taskmanage.TaskManageDO;
|
||||
import com.yunxi.scm.module.xxjj.convert.taskmanage.TaskManageConvert;
|
||||
import com.yunxi.scm.module.xxjj.service.taskmanage.TaskManageService;
|
||||
|
||||
@Tag(name = "管理后台 - 任务管理")
|
||||
@RestController
|
||||
@RequestMapping("/xxjj/task-manage")
|
||||
@Validated
|
||||
public class TaskManageController {
|
||||
|
||||
@Resource
|
||||
private TaskManageService taskManageService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建任务管理")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:task-manage:create')")
|
||||
public CommonResult<Long> createTaskManage(@Valid @RequestBody TaskManageCreateReqVO createReqVO) {
|
||||
return success(taskManageService.createTaskManage(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新任务管理")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:task-manage:update')")
|
||||
public CommonResult<Boolean> updateTaskManage(@Valid @RequestBody TaskManageUpdateReqVO updateReqVO) {
|
||||
taskManageService.updateTaskManage(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除任务管理")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:task-manage:delete')")
|
||||
public CommonResult<Boolean> deleteTaskManage(@RequestParam("id") Long id) {
|
||||
taskManageService.deleteTaskManage(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得任务管理")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:task-manage:query')")
|
||||
public CommonResult<TaskManageRespVO> getTaskManage(@RequestParam("id") Long id) {
|
||||
TaskManageDO taskManage = taskManageService.getTaskManage(id);
|
||||
return success(TaskManageConvert.INSTANCE.convert(taskManage));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得任务管理列表")
|
||||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:task-manage:query')")
|
||||
public CommonResult<List<TaskManageRespVO>> getTaskManageList(@RequestParam("ids") Collection<Long> ids) {
|
||||
List<TaskManageDO> list = taskManageService.getTaskManageList(ids);
|
||||
return success(TaskManageConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得任务管理分页")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:task-manage:query')")
|
||||
public CommonResult<PageResult<TaskManageRespVO>> getTaskManagePage(@Valid TaskManagePageReqVO pageVO) {
|
||||
PageResult<TaskManageDO> pageResult = taskManageService.getTaskManagePage(pageVO);
|
||||
return success(TaskManageConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出任务管理 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:task-manage:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportTaskManageExcel(@Valid TaskManageExportReqVO exportReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<TaskManageDO> list = taskManageService.getTaskManageList(exportReqVO);
|
||||
// 导出 Excel
|
||||
List<TaskManageExcelVO> datas = TaskManageConvert.INSTANCE.convertList02(list);
|
||||
ExcelUtils.write(response, "任务管理.xls", "数据", TaskManageExcelVO.class, datas);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.taskmanage.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 TaskManageCreateReqVO extends TaskManageBaseVO {
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.taskmanage.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 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 TaskManageExcelVO {
|
||||
|
||||
@ExcelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("任务标题")
|
||||
private String title;
|
||||
|
||||
@ExcelProperty("开始时间")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@ExcelProperty("结束时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@ExcelProperty("关联项目")
|
||||
private Long projectId;
|
||||
|
||||
@ExcelProperty("负责人员")
|
||||
private Long chargeId;
|
||||
|
||||
@ExcelProperty("参与人员")
|
||||
private Long joinId;
|
||||
|
||||
@ExcelProperty("任务标记")
|
||||
private String taskMark;
|
||||
|
||||
@ExcelProperty(value = "紧要程度", converter = DictConvert.class)
|
||||
@DictFormat("urgent_level") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
||||
private String urgentLevel;
|
||||
|
||||
@ExcelProperty(value = "任务提醒", converter = DictConvert.class)
|
||||
@DictFormat("task_remind") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
||||
private String taskRemind;
|
||||
|
||||
@ExcelProperty(value = "提醒方式", converter = DictConvert.class)
|
||||
@DictFormat("remind_way") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
||||
private String remindWay;
|
||||
|
||||
@ExcelProperty("任务描述")
|
||||
private String taskDescription;
|
||||
|
||||
@ExcelProperty("上传附件")
|
||||
private String uploadAnnex;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.taskmanage.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 TaskManagePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "任务标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "开始时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] startTime;
|
||||
|
||||
@Schema(description = "结束时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] endTime;
|
||||
|
||||
@Schema(description = "关联项目", example = "26681")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "负责人员", example = "1064")
|
||||
private Long chargeId;
|
||||
|
||||
@Schema(description = "参与人员", example = "4368")
|
||||
private Long joinId;
|
||||
|
||||
@Schema(description = "任务标记")
|
||||
private String taskMark;
|
||||
|
||||
@Schema(description = "紧要程度")
|
||||
private String urgentLevel;
|
||||
|
||||
@Schema(description = "任务提醒")
|
||||
private String taskRemind;
|
||||
|
||||
@Schema(description = "提醒方式")
|
||||
private String remindWay;
|
||||
|
||||
@Schema(description = "任务描述", example = "随便")
|
||||
private String taskDescription;
|
||||
|
||||
@Schema(description = "上传附件")
|
||||
private String uploadAnnex;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.taskmanage.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 TaskManageRespVO extends TaskManageBaseVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "25465")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.taskmanage.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 TaskManageUpdateReqVO extends TaskManageBaseVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "25465")
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.teammanage;
|
||||
|
||||
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.teammanage.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.teammanage.TeamManageDO;
|
||||
import com.yunxi.scm.module.xxjj.convert.teammanage.TeamManageConvert;
|
||||
import com.yunxi.scm.module.xxjj.service.teammanage.TeamManageService;
|
||||
|
||||
@Tag(name = "管理后台 - 团队管理")
|
||||
@RestController
|
||||
@RequestMapping("/xxjj/team-manage")
|
||||
@Validated
|
||||
public class TeamManageController {
|
||||
|
||||
@Resource
|
||||
private TeamManageService teamManageService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建团队管理")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:team-manage:create')")
|
||||
public CommonResult<Long> createTeamManage(@Valid @RequestBody TeamManageCreateReqVO createReqVO) {
|
||||
return success(teamManageService.createTeamManage(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新团队管理")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:team-manage:update')")
|
||||
public CommonResult<Boolean> updateTeamManage(@Valid @RequestBody TeamManageUpdateReqVO updateReqVO) {
|
||||
teamManageService.updateTeamManage(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除团队管理")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:team-manage:delete')")
|
||||
public CommonResult<Boolean> deleteTeamManage(@RequestParam("id") Long id) {
|
||||
teamManageService.deleteTeamManage(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得团队管理")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:team-manage:query')")
|
||||
public CommonResult<TeamManageRespVO> getTeamManage(@RequestParam("id") Long id) {
|
||||
TeamManageDO teamManage = teamManageService.getTeamManage(id);
|
||||
return success(TeamManageConvert.INSTANCE.convert(teamManage));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得团队管理列表")
|
||||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:team-manage:query')")
|
||||
public CommonResult<List<TeamManageRespVO>> getTeamManageList(@RequestParam("ids") Collection<Long> ids) {
|
||||
List<TeamManageDO> list = teamManageService.getTeamManageList(ids);
|
||||
return success(TeamManageConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得团队管理分页")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:team-manage:query')")
|
||||
public CommonResult<PageResult<TeamManageRespVO>> getTeamManagePage(@Valid TeamManagePageReqVO pageVO) {
|
||||
PageResult<TeamManageDO> pageResult = teamManageService.getTeamManagePage(pageVO);
|
||||
return success(TeamManageConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出团队管理 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:team-manage:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportTeamManageExcel(@Valid TeamManageExportReqVO exportReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<TeamManageDO> list = teamManageService.getTeamManageList(exportReqVO);
|
||||
// 导出 Excel
|
||||
List<TeamManageExcelVO> datas = TeamManageConvert.INSTANCE.convertList02(list);
|
||||
ExcelUtils.write(response, "团队管理.xls", "数据", TeamManageExcelVO.class, datas);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.teammanage.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 TeamManageCreateReqVO extends TeamManageBaseVO {
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.teammanage.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
||||
/**
|
||||
* 团队管理 Excel VO
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Data
|
||||
public class TeamManageExcelVO {
|
||||
|
||||
@ExcelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("团队名称")
|
||||
private String name;
|
||||
|
||||
@ExcelProperty("团队图片")
|
||||
private String picture;
|
||||
|
||||
@ExcelProperty("负责人员")
|
||||
private Long chargeId;
|
||||
|
||||
@ExcelProperty("团队成员")
|
||||
private Long teamId;
|
||||
|
||||
@ExcelProperty("团队描述")
|
||||
private String teamDescription;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.teammanage.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 TeamManagePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "团队名称", example = "芋艿")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "团队图片")
|
||||
private String picture;
|
||||
|
||||
@Schema(description = "负责人员", example = "3934")
|
||||
private Long chargeId;
|
||||
|
||||
@Schema(description = "团队成员", example = "169")
|
||||
private Long teamId;
|
||||
|
||||
@Schema(description = "团队描述", example = "你猜")
|
||||
private String teamDescription;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.teammanage.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 TeamManageRespVO extends TeamManageBaseVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9591")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.teammanage.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 TeamManageUpdateReqVO extends TeamManageBaseVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9591")
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.workreport;
|
||||
|
||||
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.workreport.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.workreport.WorkReportDO;
|
||||
import com.yunxi.scm.module.xxjj.convert.workreport.WorkReportConvert;
|
||||
import com.yunxi.scm.module.xxjj.service.workreport.WorkReportService;
|
||||
|
||||
@Tag(name = "管理后台 - 工作报告")
|
||||
@RestController
|
||||
@RequestMapping("/xxjj/work-report")
|
||||
@Validated
|
||||
public class WorkReportController {
|
||||
|
||||
@Resource
|
||||
private WorkReportService workReportService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建工作报告")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:work-report:create')")
|
||||
public CommonResult<Long> createWorkReport(@Valid @RequestBody WorkReportCreateReqVO createReqVO) {
|
||||
return success(workReportService.createWorkReport(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新工作报告")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:work-report:update')")
|
||||
public CommonResult<Boolean> updateWorkReport(@Valid @RequestBody WorkReportUpdateReqVO updateReqVO) {
|
||||
workReportService.updateWorkReport(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除工作报告")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:work-report:delete')")
|
||||
public CommonResult<Boolean> deleteWorkReport(@RequestParam("id") Long id) {
|
||||
workReportService.deleteWorkReport(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得工作报告")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:work-report:query')")
|
||||
public CommonResult<WorkReportRespVO> getWorkReport(@RequestParam("id") Long id) {
|
||||
WorkReportDO workReport = workReportService.getWorkReport(id);
|
||||
return success(WorkReportConvert.INSTANCE.convert(workReport));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得工作报告列表")
|
||||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:work-report:query')")
|
||||
public CommonResult<List<WorkReportRespVO>> getWorkReportList(@RequestParam("ids") Collection<Long> ids) {
|
||||
List<WorkReportDO> list = workReportService.getWorkReportList(ids);
|
||||
return success(WorkReportConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得工作报告分页")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:work-report:query')")
|
||||
public CommonResult<PageResult<WorkReportRespVO>> getWorkReportPage(@Valid WorkReportPageReqVO pageVO) {
|
||||
PageResult<WorkReportDO> pageResult = workReportService.getWorkReportPage(pageVO);
|
||||
return success(WorkReportConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出工作报告 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('xxjj:work-report:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportWorkReportExcel(@Valid WorkReportExportReqVO exportReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<WorkReportDO> list = workReportService.getWorkReportList(exportReqVO);
|
||||
// 导出 Excel
|
||||
List<WorkReportExcelVO> datas = WorkReportConvert.INSTANCE.convertList02(list);
|
||||
ExcelUtils.write(response, "工作报告.xls", "数据", WorkReportExcelVO.class, datas);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.workreport.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 WorkReportCreateReqVO extends WorkReportBaseVO {
|
||||
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.workreport.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 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 WorkReportExcelVO {
|
||||
|
||||
@ExcelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("报告标题")
|
||||
private String title;
|
||||
|
||||
@ExcelProperty("报告类型")
|
||||
private String type;
|
||||
|
||||
@ExcelProperty("报告日期")
|
||||
private LocalDateTime reportDate;
|
||||
|
||||
@ExcelProperty("工作总结")
|
||||
private String workSummary;
|
||||
|
||||
@ExcelProperty("上传附件")
|
||||
private String uploadFile;
|
||||
|
||||
@ExcelProperty("所属部门")
|
||||
private Long departmentId;
|
||||
|
||||
@ExcelProperty(value = "批阅状态", converter = DictConvert.class)
|
||||
@DictFormat("quality_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
||||
private String approvalStatus;
|
||||
|
||||
@ExcelProperty("提交人员")
|
||||
private Long commitId;
|
||||
|
||||
@ExcelProperty("提交日期")
|
||||
private LocalDateTime commitDate;
|
||||
|
||||
@ExcelProperty("批阅人员")
|
||||
private Long approvalId;
|
||||
|
||||
@ExcelProperty("抄送人员")
|
||||
private Long copyId;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.workreport.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 WorkReportPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "报告标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "报告类型", example = "2")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "报告日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] reportDate;
|
||||
|
||||
@Schema(description = "工作总结")
|
||||
private String workSummary;
|
||||
|
||||
@Schema(description = "上传附件")
|
||||
private String uploadFile;
|
||||
|
||||
@Schema(description = "所属部门", example = "27438")
|
||||
private Long departmentId;
|
||||
|
||||
@Schema(description = "批阅状态", example = "2")
|
||||
private String approvalStatus;
|
||||
|
||||
@Schema(description = "提交人员", example = "25615")
|
||||
private Long commitId;
|
||||
|
||||
@Schema(description = "提交日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] commitDate;
|
||||
|
||||
@Schema(description = "批阅人员", example = "32183")
|
||||
private Long approvalId;
|
||||
|
||||
@Schema(description = "抄送人员", example = "20683")
|
||||
private Long copyId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.workreport.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 WorkReportRespVO extends WorkReportBaseVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28679")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.yunxi.scm.module.xxjj.controller.admin.workreport.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 WorkReportUpdateReqVO extends WorkReportBaseVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28679")
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.yunxi.scm.module.xxjj.convert.product;
|
||||
|
||||
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.product.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.product.ProductDO;
|
||||
|
||||
/**
|
||||
* 产品 Convert
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductConvert {
|
||||
|
||||
ProductConvert INSTANCE = Mappers.getMapper(ProductConvert.class);
|
||||
|
||||
ProductDO convert(ProductCreateReqVO bean);
|
||||
|
||||
ProductDO convert(ProductUpdateReqVO bean);
|
||||
|
||||
ProductRespVO convert(ProductDO bean);
|
||||
|
||||
List<ProductRespVO> convertList(List<ProductDO> list);
|
||||
|
||||
PageResult<ProductRespVO> convertPage(PageResult<ProductDO> page);
|
||||
|
||||
List<ProductExcelVO> convertList02(List<ProductDO> list);
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.yunxi.scm.module.xxjj.convert.productcategory;
|
||||
|
||||
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.productcategory.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.productcategory.ProductCategoryDO;
|
||||
|
||||
/**
|
||||
* 产品分类 Convert
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductCategoryConvert {
|
||||
|
||||
ProductCategoryConvert INSTANCE = Mappers.getMapper(ProductCategoryConvert.class);
|
||||
|
||||
ProductCategoryDO convert(ProductCategoryCreateReqVO bean);
|
||||
|
||||
ProductCategoryDO convert(ProductCategoryUpdateReqVO bean);
|
||||
|
||||
ProductCategoryRespVO convert(ProductCategoryDO bean);
|
||||
|
||||
List<ProductCategoryRespVO> convertList(List<ProductCategoryDO> list);
|
||||
|
||||
PageResult<ProductCategoryRespVO> convertPage(PageResult<ProductCategoryDO> page);
|
||||
|
||||
List<ProductCategoryExcelVO> convertList02(List<ProductCategoryDO> list);
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.yunxi.scm.module.xxjj.convert.productclass;
|
||||
|
||||
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.productclass.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.productclass.ProductClassDO;
|
||||
|
||||
/**
|
||||
* 产品类别 Convert
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductClassConvert {
|
||||
|
||||
ProductClassConvert INSTANCE = Mappers.getMapper(ProductClassConvert.class);
|
||||
|
||||
ProductClassDO convert(ProductClassCreateReqVO bean);
|
||||
|
||||
ProductClassDO convert(ProductClassUpdateReqVO bean);
|
||||
|
||||
ProductClassRespVO convert(ProductClassDO bean);
|
||||
|
||||
List<ProductClassRespVO> convertList(List<ProductClassDO> list);
|
||||
|
||||
PageResult<ProductClassRespVO> convertPage(PageResult<ProductClassDO> page);
|
||||
|
||||
List<ProductClassExcelVO> convertList02(List<ProductClassDO> list);
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.yunxi.scm.module.xxjj.convert.producttype;
|
||||
|
||||
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.producttype.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.producttype.ProductTypeDO;
|
||||
|
||||
/**
|
||||
* 产品类型 Convert
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductTypeConvert {
|
||||
|
||||
ProductTypeConvert INSTANCE = Mappers.getMapper(ProductTypeConvert.class);
|
||||
|
||||
ProductTypeDO convert(ProductTypeCreateReqVO bean);
|
||||
|
||||
ProductTypeDO convert(ProductTypeUpdateReqVO bean);
|
||||
|
||||
ProductTypeRespVO convert(ProductTypeDO bean);
|
||||
|
||||
List<ProductTypeRespVO> convertList(List<ProductTypeDO> list);
|
||||
|
||||
PageResult<ProductTypeRespVO> convertPage(PageResult<ProductTypeDO> page);
|
||||
|
||||
List<ProductTypeExcelVO> convertList02(List<ProductTypeDO> list);
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.yunxi.scm.module.xxjj.convert.taskmanage;
|
||||
|
||||
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.taskmanage.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.taskmanage.TaskManageDO;
|
||||
|
||||
/**
|
||||
* 任务管理 Convert
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Mapper
|
||||
public interface TaskManageConvert {
|
||||
|
||||
TaskManageConvert INSTANCE = Mappers.getMapper(TaskManageConvert.class);
|
||||
|
||||
TaskManageDO convert(TaskManageCreateReqVO bean);
|
||||
|
||||
TaskManageDO convert(TaskManageUpdateReqVO bean);
|
||||
|
||||
TaskManageRespVO convert(TaskManageDO bean);
|
||||
|
||||
List<TaskManageRespVO> convertList(List<TaskManageDO> list);
|
||||
|
||||
PageResult<TaskManageRespVO> convertPage(PageResult<TaskManageDO> page);
|
||||
|
||||
List<TaskManageExcelVO> convertList02(List<TaskManageDO> list);
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.yunxi.scm.module.xxjj.convert.teammanage;
|
||||
|
||||
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.teammanage.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.teammanage.TeamManageDO;
|
||||
|
||||
/**
|
||||
* 团队管理 Convert
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Mapper
|
||||
public interface TeamManageConvert {
|
||||
|
||||
TeamManageConvert INSTANCE = Mappers.getMapper(TeamManageConvert.class);
|
||||
|
||||
TeamManageDO convert(TeamManageCreateReqVO bean);
|
||||
|
||||
TeamManageDO convert(TeamManageUpdateReqVO bean);
|
||||
|
||||
TeamManageRespVO convert(TeamManageDO bean);
|
||||
|
||||
List<TeamManageRespVO> convertList(List<TeamManageDO> list);
|
||||
|
||||
PageResult<TeamManageRespVO> convertPage(PageResult<TeamManageDO> page);
|
||||
|
||||
List<TeamManageExcelVO> convertList02(List<TeamManageDO> list);
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.yunxi.scm.module.xxjj.convert.workreport;
|
||||
|
||||
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.workreport.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.workreport.WorkReportDO;
|
||||
|
||||
/**
|
||||
* 工作报告 Convert
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Mapper
|
||||
public interface WorkReportConvert {
|
||||
|
||||
WorkReportConvert INSTANCE = Mappers.getMapper(WorkReportConvert.class);
|
||||
|
||||
WorkReportDO convert(WorkReportCreateReqVO bean);
|
||||
|
||||
WorkReportDO convert(WorkReportUpdateReqVO bean);
|
||||
|
||||
WorkReportRespVO convert(WorkReportDO bean);
|
||||
|
||||
List<WorkReportRespVO> convertList(List<WorkReportDO> list);
|
||||
|
||||
PageResult<WorkReportRespVO> convertPage(PageResult<WorkReportDO> page);
|
||||
|
||||
List<WorkReportExcelVO> convertList02(List<WorkReportDO> list);
|
||||
|
||||
}
|
@ -0,0 +1,134 @@
|
||||
package com.yunxi.scm.module.xxjj.dal.dataobject.product;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
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("yx_product")
|
||||
@KeySequence("yx_product_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProductDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 产品编码
|
||||
*/
|
||||
private String productCode;
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String productName;
|
||||
/**
|
||||
* 产品图片
|
||||
*/
|
||||
private String productPicture;
|
||||
/**
|
||||
* 产品类别
|
||||
*
|
||||
* 枚举 {@link TODO product_class 对应的类}
|
||||
*/
|
||||
private String classId;
|
||||
/**
|
||||
* 产品类型
|
||||
*
|
||||
* 枚举 {@link TODO product_type 对应的类}
|
||||
*/
|
||||
private String typeId;
|
||||
/**
|
||||
* 产品分类
|
||||
*/
|
||||
private Long categoryId;
|
||||
/**
|
||||
* 产品规格
|
||||
*/
|
||||
private String spec;
|
||||
/**
|
||||
* 标准单价
|
||||
*/
|
||||
private BigDecimal singlePrice;
|
||||
/**
|
||||
* 首选供应商
|
||||
*/
|
||||
private Long supplyId;
|
||||
/**
|
||||
* 采购模式
|
||||
*
|
||||
* 枚举 {@link TODO purchase_way 对应的类}
|
||||
*/
|
||||
private String purchaseWay;
|
||||
/**
|
||||
* 存货类型
|
||||
*
|
||||
* 枚举 {@link TODO save_type 对应的类}
|
||||
*/
|
||||
private String saveType;
|
||||
/**
|
||||
* 产品品牌
|
||||
*/
|
||||
private Long brandId;
|
||||
/**
|
||||
* 产地
|
||||
*/
|
||||
private String productAddress;
|
||||
/**
|
||||
* 配送方式
|
||||
*
|
||||
* 枚举 {@link TODO delivery_way 对应的类}
|
||||
*/
|
||||
private String deliveryWay;
|
||||
/**
|
||||
* 产品来源
|
||||
*
|
||||
* 枚举 {@link TODO product_source 对应的类}
|
||||
*/
|
||||
private String productSource;
|
||||
/**
|
||||
* 产品状态
|
||||
*
|
||||
* 枚举 {@link TODO product_status 对应的类}
|
||||
*/
|
||||
private String productStatus;
|
||||
/**
|
||||
* 销售状态
|
||||
*
|
||||
* 枚举 {@link TODO sale_status 对应的类}
|
||||
*/
|
||||
private String saleStatus;
|
||||
/**
|
||||
* 生命周期
|
||||
*
|
||||
* 枚举 {@link TODO life_cycle 对应的类}
|
||||
*/
|
||||
private String lifeCycle;
|
||||
/**
|
||||
* 预计上市时间
|
||||
*/
|
||||
private LocalDateTime ipoDate;
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String categoryName;
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.yunxi.scm.module.xxjj.dal.dataobject.productcategory;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
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("yx_product_category")
|
||||
@KeySequence("yx_product_category_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProductCategoryDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 分类id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 分类编码
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 父分类id
|
||||
*/
|
||||
private Long parentId;
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 分类描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package com.yunxi.scm.module.xxjj.dal.dataobject.taskmanage;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
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("yx_task_manage")
|
||||
@KeySequence("yx_task_manage_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaskManageDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 任务标题
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private LocalDateTime startTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
/**
|
||||
* 关联项目
|
||||
*/
|
||||
private Long projectId;
|
||||
/**
|
||||
* 负责人员
|
||||
*/
|
||||
private Long chargeId;
|
||||
/**
|
||||
* 参与人员
|
||||
*/
|
||||
private Long joinId;
|
||||
/**
|
||||
* 任务标记
|
||||
*/
|
||||
private String taskMark;
|
||||
/**
|
||||
* 紧要程度
|
||||
*
|
||||
* 枚举 {@link TODO urgent_level 对应的类}
|
||||
*/
|
||||
private String urgentLevel;
|
||||
/**
|
||||
* 任务提醒
|
||||
*
|
||||
* 枚举 {@link TODO task_remind 对应的类}
|
||||
*/
|
||||
private String taskRemind;
|
||||
/**
|
||||
* 提醒方式
|
||||
*
|
||||
* 枚举 {@link TODO remind_way 对应的类}
|
||||
*/
|
||||
private String remindWay;
|
||||
/**
|
||||
* 任务描述
|
||||
*/
|
||||
private String taskDescription;
|
||||
/**
|
||||
* 上传附件
|
||||
*/
|
||||
private String uploadAnnex;
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.yunxi.scm.module.xxjj.dal.dataobject.teammanage;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
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("yx_team_manage")
|
||||
@KeySequence("yx_team_manage_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TeamManageDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 团队名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 团队图片
|
||||
*/
|
||||
private String picture;
|
||||
/**
|
||||
* 负责人员
|
||||
*/
|
||||
private Long chargeId;
|
||||
/**
|
||||
* 团队成员
|
||||
*/
|
||||
private Long teamId;
|
||||
/**
|
||||
* 团队描述
|
||||
*/
|
||||
private String teamDescription;
|
||||
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.yunxi.scm.module.xxjj.dal.dataobject.workreport;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
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("yx_work_report")
|
||||
@KeySequence("yx_work_report_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class WorkReportDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 报告标题
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 报告类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 报告日期
|
||||
*/
|
||||
private LocalDateTime reportDate;
|
||||
/**
|
||||
* 工作总结
|
||||
*/
|
||||
private String workSummary;
|
||||
/**
|
||||
* 上传附件
|
||||
*/
|
||||
private String uploadFile;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
private Long departmentId;
|
||||
/**
|
||||
* 批阅状态
|
||||
*
|
||||
* 枚举 {@link TODO quality_status 对应的类}
|
||||
*/
|
||||
private String approvalStatus;
|
||||
/**
|
||||
* 提交人员
|
||||
*/
|
||||
private Long commitId;
|
||||
/**
|
||||
* 提交日期
|
||||
*/
|
||||
private LocalDateTime commitDate;
|
||||
/**
|
||||
* 批阅人员
|
||||
*/
|
||||
private Long approvalId;
|
||||
/**
|
||||
* 抄送人员
|
||||
*/
|
||||
private Long copyId;
|
||||
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package com.yunxi.scm.module.xxjj.dal.mysql.product;
|
||||
|
||||
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.product.ProductDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.product.vo.*;
|
||||
|
||||
/**
|
||||
* 产品 Mapper
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductMapper extends BaseMapperX<ProductDO> {
|
||||
|
||||
default PageResult<ProductDO> selectPage(ProductPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ProductDO>()
|
||||
.eqIfPresent(ProductDO::getProductCode, reqVO.getProductCode())
|
||||
.likeIfPresent(ProductDO::getProductName, reqVO.getProductName())
|
||||
.eqIfPresent(ProductDO::getProductPicture, reqVO.getProductPicture())
|
||||
.eqIfPresent(ProductDO::getClassId, reqVO.getClassId())
|
||||
.eqIfPresent(ProductDO::getTypeId, reqVO.getTypeId())
|
||||
.eqIfPresent(ProductDO::getCategoryId, reqVO.getCategoryId())
|
||||
.eqIfPresent(ProductDO::getSpec, reqVO.getSpec())
|
||||
.eqIfPresent(ProductDO::getSinglePrice, reqVO.getSinglePrice())
|
||||
.eqIfPresent(ProductDO::getSupplyId, reqVO.getSupplyId())
|
||||
.eqIfPresent(ProductDO::getPurchaseWay, reqVO.getPurchaseWay())
|
||||
.eqIfPresent(ProductDO::getSaveType, reqVO.getSaveType())
|
||||
.eqIfPresent(ProductDO::getBrandId, reqVO.getBrandId())
|
||||
.eqIfPresent(ProductDO::getProductAddress, reqVO.getProductAddress())
|
||||
.eqIfPresent(ProductDO::getDeliveryWay, reqVO.getDeliveryWay())
|
||||
.eqIfPresent(ProductDO::getProductSource, reqVO.getProductSource())
|
||||
.eqIfPresent(ProductDO::getProductStatus, reqVO.getProductStatus())
|
||||
.eqIfPresent(ProductDO::getSaleStatus, reqVO.getSaleStatus())
|
||||
.eqIfPresent(ProductDO::getLifeCycle, reqVO.getLifeCycle())
|
||||
.betweenIfPresent(ProductDO::getIpoDate, reqVO.getIpoDate())
|
||||
.betweenIfPresent(ProductDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ProductDO::getAuditStatus, reqVO.getAuditStatus())
|
||||
.orderByDesc(ProductDO::getId));
|
||||
}
|
||||
|
||||
default List<ProductDO> selectList(ProductExportReqVO reqVO) {
|
||||
return selectList(new LambdaQueryWrapperX<ProductDO>()
|
||||
.eqIfPresent(ProductDO::getProductCode, reqVO.getProductCode())
|
||||
.likeIfPresent(ProductDO::getProductName, reqVO.getProductName())
|
||||
.eqIfPresent(ProductDO::getProductPicture, reqVO.getProductPicture())
|
||||
.eqIfPresent(ProductDO::getClassId, reqVO.getClassId())
|
||||
.eqIfPresent(ProductDO::getTypeId, reqVO.getTypeId())
|
||||
.eqIfPresent(ProductDO::getCategoryId, reqVO.getCategoryId())
|
||||
.eqIfPresent(ProductDO::getSpec, reqVO.getSpec())
|
||||
.eqIfPresent(ProductDO::getSinglePrice, reqVO.getSinglePrice())
|
||||
.eqIfPresent(ProductDO::getSupplyId, reqVO.getSupplyId())
|
||||
.eqIfPresent(ProductDO::getPurchaseWay, reqVO.getPurchaseWay())
|
||||
.eqIfPresent(ProductDO::getSaveType, reqVO.getSaveType())
|
||||
.eqIfPresent(ProductDO::getBrandId, reqVO.getBrandId())
|
||||
.eqIfPresent(ProductDO::getProductAddress, reqVO.getProductAddress())
|
||||
.eqIfPresent(ProductDO::getDeliveryWay, reqVO.getDeliveryWay())
|
||||
.eqIfPresent(ProductDO::getProductSource, reqVO.getProductSource())
|
||||
.eqIfPresent(ProductDO::getProductStatus, reqVO.getProductStatus())
|
||||
.eqIfPresent(ProductDO::getSaleStatus, reqVO.getSaleStatus())
|
||||
.eqIfPresent(ProductDO::getLifeCycle, reqVO.getLifeCycle())
|
||||
.betweenIfPresent(ProductDO::getIpoDate, reqVO.getIpoDate())
|
||||
.betweenIfPresent(ProductDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ProductDO::getAuditStatus, reqVO.getAuditStatus())
|
||||
.orderByDesc(ProductDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.yunxi.scm.module.xxjj.dal.mysql.productcategory;
|
||||
|
||||
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.productcategory.ProductCategoryDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.productcategory.vo.*;
|
||||
|
||||
/**
|
||||
* 产品分类 Mapper
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductCategoryMapper extends BaseMapperX<ProductCategoryDO> {
|
||||
|
||||
default PageResult<ProductCategoryDO> selectPage(ProductCategoryPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ProductCategoryDO>()
|
||||
.likeIfPresent(ProductCategoryDO::getName, reqVO.getName())
|
||||
.betweenIfPresent(ProductCategoryDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(ProductCategoryDO::getId));
|
||||
}
|
||||
|
||||
default List<ProductCategoryDO> selectList(ProductCategoryExportReqVO reqVO) {
|
||||
return selectList(new LambdaQueryWrapperX<ProductCategoryDO>()
|
||||
.likeIfPresent(ProductCategoryDO::getName, reqVO.getName())
|
||||
.betweenIfPresent(ProductCategoryDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(ProductCategoryDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.yunxi.scm.module.xxjj.dal.mysql.productclass;
|
||||
|
||||
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.productclass.ProductClassDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.productclass.vo.*;
|
||||
|
||||
/**
|
||||
* 产品类别 Mapper
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductClassMapper extends BaseMapperX<ProductClassDO> {
|
||||
|
||||
default PageResult<ProductClassDO> selectPage(ProductClassPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ProductClassDO>()
|
||||
.likeIfPresent(ProductClassDO::getName, reqVO.getName())
|
||||
.eqIfPresent(ProductClassDO::getStatus, reqVO.getStatus())
|
||||
.betweenIfPresent(ProductClassDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(ProductClassDO::getId));
|
||||
}
|
||||
|
||||
default List<ProductClassDO> selectList(ProductClassExportReqVO reqVO) {
|
||||
return selectList(new LambdaQueryWrapperX<ProductClassDO>()
|
||||
.likeIfPresent(ProductClassDO::getName, reqVO.getName())
|
||||
.eqIfPresent(ProductClassDO::getStatus, reqVO.getStatus())
|
||||
.betweenIfPresent(ProductClassDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(ProductClassDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.yunxi.scm.module.xxjj.dal.mysql.producttype;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
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.producttype.ProductTypeDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.producttype.vo.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
|
||||
/**
|
||||
* 产品类型 Mapper
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProductTypeMapper extends BaseMapperX<ProductTypeDO> {
|
||||
|
||||
default PageResult<ProductTypeDO> selectPage(ProductTypePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ProductTypeDO>()
|
||||
.eqIfPresent(ProductTypeDO::getClassId, reqVO.getClassId())
|
||||
.likeIfPresent(ProductTypeDO::getName, reqVO.getName())
|
||||
.eqIfPresent(ProductTypeDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(ProductTypeDO::getNum, reqVO.getNum())
|
||||
.eqIfPresent(ProductTypeDO::getDescription, reqVO.getDescription())
|
||||
.betweenIfPresent(ProductTypeDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(ProductTypeDO::getId));
|
||||
}
|
||||
|
||||
default List<ProductTypeDO> selectList(ProductTypeExportReqVO reqVO) {
|
||||
return selectList(new LambdaQueryWrapperX<ProductTypeDO>()
|
||||
.eqIfPresent(ProductTypeDO::getClassId, reqVO.getClassId())
|
||||
.likeIfPresent(ProductTypeDO::getName, reqVO.getName())
|
||||
.eqIfPresent(ProductTypeDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(ProductTypeDO::getNum, reqVO.getNum())
|
||||
.eqIfPresent(ProductTypeDO::getDescription, reqVO.getDescription())
|
||||
.betweenIfPresent(ProductTypeDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(ProductTypeDO::getId));
|
||||
}
|
||||
|
||||
IPage<ProductTypeDO> queryProductPage(@Param("mpPage") IPage<ProductTypeDO> mpPage, @Param("reqVO") ProductTypePageReqVO reqVO);
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.yunxi.scm.module.xxjj.dal.mysql.taskmanage;
|
||||
|
||||
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.taskmanage.TaskManageDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.taskmanage.vo.*;
|
||||
|
||||
/**
|
||||
* 任务管理 Mapper
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Mapper
|
||||
public interface TaskManageMapper extends BaseMapperX<TaskManageDO> {
|
||||
|
||||
default PageResult<TaskManageDO> selectPage(TaskManagePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<TaskManageDO>()
|
||||
.eqIfPresent(TaskManageDO::getTitle, reqVO.getTitle())
|
||||
.betweenIfPresent(TaskManageDO::getStartTime, reqVO.getStartTime())
|
||||
.betweenIfPresent(TaskManageDO::getEndTime, reqVO.getEndTime())
|
||||
.eqIfPresent(TaskManageDO::getProjectId, reqVO.getProjectId())
|
||||
.eqIfPresent(TaskManageDO::getChargeId, reqVO.getChargeId())
|
||||
.eqIfPresent(TaskManageDO::getJoinId, reqVO.getJoinId())
|
||||
.eqIfPresent(TaskManageDO::getTaskMark, reqVO.getTaskMark())
|
||||
.eqIfPresent(TaskManageDO::getUrgentLevel, reqVO.getUrgentLevel())
|
||||
.eqIfPresent(TaskManageDO::getTaskRemind, reqVO.getTaskRemind())
|
||||
.eqIfPresent(TaskManageDO::getRemindWay, reqVO.getRemindWay())
|
||||
.eqIfPresent(TaskManageDO::getTaskDescription, reqVO.getTaskDescription())
|
||||
.eqIfPresent(TaskManageDO::getUploadAnnex, reqVO.getUploadAnnex())
|
||||
.betweenIfPresent(TaskManageDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(TaskManageDO::getId));
|
||||
}
|
||||
|
||||
default List<TaskManageDO> selectList(TaskManageExportReqVO reqVO) {
|
||||
return selectList(new LambdaQueryWrapperX<TaskManageDO>()
|
||||
.eqIfPresent(TaskManageDO::getTitle, reqVO.getTitle())
|
||||
.betweenIfPresent(TaskManageDO::getStartTime, reqVO.getStartTime())
|
||||
.betweenIfPresent(TaskManageDO::getEndTime, reqVO.getEndTime())
|
||||
.eqIfPresent(TaskManageDO::getProjectId, reqVO.getProjectId())
|
||||
.eqIfPresent(TaskManageDO::getChargeId, reqVO.getChargeId())
|
||||
.eqIfPresent(TaskManageDO::getJoinId, reqVO.getJoinId())
|
||||
.eqIfPresent(TaskManageDO::getTaskMark, reqVO.getTaskMark())
|
||||
.eqIfPresent(TaskManageDO::getUrgentLevel, reqVO.getUrgentLevel())
|
||||
.eqIfPresent(TaskManageDO::getTaskRemind, reqVO.getTaskRemind())
|
||||
.eqIfPresent(TaskManageDO::getRemindWay, reqVO.getRemindWay())
|
||||
.eqIfPresent(TaskManageDO::getTaskDescription, reqVO.getTaskDescription())
|
||||
.eqIfPresent(TaskManageDO::getUploadAnnex, reqVO.getUploadAnnex())
|
||||
.betweenIfPresent(TaskManageDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(TaskManageDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.yunxi.scm.module.xxjj.dal.mysql.teammanage;
|
||||
|
||||
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.teammanage.TeamManageDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.teammanage.vo.*;
|
||||
|
||||
/**
|
||||
* 团队管理 Mapper
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Mapper
|
||||
public interface TeamManageMapper extends BaseMapperX<TeamManageDO> {
|
||||
|
||||
default PageResult<TeamManageDO> selectPage(TeamManagePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<TeamManageDO>()
|
||||
.likeIfPresent(TeamManageDO::getName, reqVO.getName())
|
||||
.eqIfPresent(TeamManageDO::getPicture, reqVO.getPicture())
|
||||
.eqIfPresent(TeamManageDO::getChargeId, reqVO.getChargeId())
|
||||
.eqIfPresent(TeamManageDO::getTeamId, reqVO.getTeamId())
|
||||
.eqIfPresent(TeamManageDO::getTeamDescription, reqVO.getTeamDescription())
|
||||
.betweenIfPresent(TeamManageDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(TeamManageDO::getId));
|
||||
}
|
||||
|
||||
default List<TeamManageDO> selectList(TeamManageExportReqVO reqVO) {
|
||||
return selectList(new LambdaQueryWrapperX<TeamManageDO>()
|
||||
.likeIfPresent(TeamManageDO::getName, reqVO.getName())
|
||||
.eqIfPresent(TeamManageDO::getPicture, reqVO.getPicture())
|
||||
.eqIfPresent(TeamManageDO::getChargeId, reqVO.getChargeId())
|
||||
.eqIfPresent(TeamManageDO::getTeamId, reqVO.getTeamId())
|
||||
.eqIfPresent(TeamManageDO::getTeamDescription, reqVO.getTeamDescription())
|
||||
.betweenIfPresent(TeamManageDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(TeamManageDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.yunxi.scm.module.xxjj.dal.mysql.workreport;
|
||||
|
||||
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.workreport.WorkReportDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.workreport.vo.*;
|
||||
|
||||
/**
|
||||
* 工作报告 Mapper
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
@Mapper
|
||||
public interface WorkReportMapper extends BaseMapperX<WorkReportDO> {
|
||||
|
||||
default PageResult<WorkReportDO> selectPage(WorkReportPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<WorkReportDO>()
|
||||
.eqIfPresent(WorkReportDO::getTitle, reqVO.getTitle())
|
||||
.eqIfPresent(WorkReportDO::getType, reqVO.getType())
|
||||
.betweenIfPresent(WorkReportDO::getReportDate, reqVO.getReportDate())
|
||||
.eqIfPresent(WorkReportDO::getWorkSummary, reqVO.getWorkSummary())
|
||||
.eqIfPresent(WorkReportDO::getUploadFile, reqVO.getUploadFile())
|
||||
.eqIfPresent(WorkReportDO::getDepartmentId, reqVO.getDepartmentId())
|
||||
.eqIfPresent(WorkReportDO::getApprovalStatus, reqVO.getApprovalStatus())
|
||||
.eqIfPresent(WorkReportDO::getCommitId, reqVO.getCommitId())
|
||||
.betweenIfPresent(WorkReportDO::getCommitDate, reqVO.getCommitDate())
|
||||
.eqIfPresent(WorkReportDO::getApprovalId, reqVO.getApprovalId())
|
||||
.eqIfPresent(WorkReportDO::getCopyId, reqVO.getCopyId())
|
||||
.betweenIfPresent(WorkReportDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(WorkReportDO::getId));
|
||||
}
|
||||
|
||||
default List<WorkReportDO> selectList(WorkReportExportReqVO reqVO) {
|
||||
return selectList(new LambdaQueryWrapperX<WorkReportDO>()
|
||||
.eqIfPresent(WorkReportDO::getTitle, reqVO.getTitle())
|
||||
.eqIfPresent(WorkReportDO::getType, reqVO.getType())
|
||||
.betweenIfPresent(WorkReportDO::getReportDate, reqVO.getReportDate())
|
||||
.eqIfPresent(WorkReportDO::getWorkSummary, reqVO.getWorkSummary())
|
||||
.eqIfPresent(WorkReportDO::getUploadFile, reqVO.getUploadFile())
|
||||
.eqIfPresent(WorkReportDO::getDepartmentId, reqVO.getDepartmentId())
|
||||
.eqIfPresent(WorkReportDO::getApprovalStatus, reqVO.getApprovalStatus())
|
||||
.eqIfPresent(WorkReportDO::getCommitId, reqVO.getCommitId())
|
||||
.betweenIfPresent(WorkReportDO::getCommitDate, reqVO.getCommitDate())
|
||||
.eqIfPresent(WorkReportDO::getApprovalId, reqVO.getApprovalId())
|
||||
.eqIfPresent(WorkReportDO::getCopyId, reqVO.getCopyId())
|
||||
.betweenIfPresent(WorkReportDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(WorkReportDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.yunxi.scm.module.xxjj.service.product;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.product.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.product.ProductDO;
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 产品 Service 接口
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
public interface ProductService {
|
||||
|
||||
/**
|
||||
* 创建产品
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createProduct(@Valid ProductCreateReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新产品
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateProduct(@Valid ProductUpdateReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除产品
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteProduct(Long id);
|
||||
|
||||
/**
|
||||
* 获得产品
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 产品
|
||||
*/
|
||||
ProductDO getProduct(Long id);
|
||||
|
||||
/**
|
||||
* 获得产品列表
|
||||
*
|
||||
* @param ids 编号
|
||||
* @return 产品列表
|
||||
*/
|
||||
List<ProductDO> getProductList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得产品分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 产品分页
|
||||
*/
|
||||
PageResult<ProductDO> getProductPage(ProductPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得产品列表, 用于 Excel 导出
|
||||
*
|
||||
* @param exportReqVO 查询条件
|
||||
* @return 产品列表
|
||||
*/
|
||||
List<ProductDO> getProductList(ProductExportReqVO exportReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
package com.yunxi.scm.module.xxjj.service.product;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.material.MaterialDO;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.materialcategory.MaterialCategoryDO;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.productcategory.ProductCategoryDO;
|
||||
import com.yunxi.scm.module.xxjj.dal.mysql.materialcategory.MaterialCategoryMapper;
|
||||
import com.yunxi.scm.module.xxjj.dal.mysql.productcategory.ProductCategoryMapper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
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.product.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.product.ProductDO;
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
import com.yunxi.scm.module.xxjj.convert.product.ProductConvert;
|
||||
import com.yunxi.scm.module.xxjj.dal.mysql.product.ProductMapper;
|
||||
|
||||
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 ProductServiceImpl implements ProductService {
|
||||
|
||||
@Resource
|
||||
private ProductMapper productMapper;
|
||||
@Resource
|
||||
private ProductCategoryMapper productCategoryMapper;
|
||||
|
||||
@Override
|
||||
public Long createProduct(ProductCreateReqVO createReqVO) {
|
||||
// 插入
|
||||
ProductDO product = ProductConvert.INSTANCE.convert(createReqVO);
|
||||
productMapper.insert(product);
|
||||
// 返回
|
||||
return product.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProduct(ProductUpdateReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateProductExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ProductDO updateObj = ProductConvert.INSTANCE.convert(updateReqVO);
|
||||
productMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteProduct(Long id) {
|
||||
// 校验存在
|
||||
validateProductExists(id);
|
||||
// 删除
|
||||
productMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateProductExists(Long id) {
|
||||
if (productMapper.selectById(id) == null) {
|
||||
throw exception(PRODUCT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductDO getProduct(Long id) {
|
||||
return productMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductDO> getProductList(Collection<Long> ids) {
|
||||
return productMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ProductDO> getProductPage(ProductPageReqVO pageReqVO) {
|
||||
PageResult<ProductDO> product = productMapper.selectPage(pageReqVO);
|
||||
List<ProductDO> productList = product.getList();
|
||||
ProductCategoryDO PCD = new ProductCategoryDO();
|
||||
if (productList != null && productList.size() > 0){
|
||||
for (ProductDO entity : productList){
|
||||
String materialCategoryName = "";
|
||||
ProductCategoryDO productCategoryDO = productCategoryMapper.selectById(entity.getCategoryId());
|
||||
PCD = productCategoryDO;
|
||||
if (ObjectUtil.isNotEmpty(PCD)){
|
||||
while (PCD.getParentId() != 0 ) {
|
||||
materialCategoryName = PCD.getName() + ">" + materialCategoryName;
|
||||
PCD = productCategoryMapper.selectById(PCD.getParentId());
|
||||
if (ObjectUtil.isEmpty(PCD)){
|
||||
PCD.setParentId((long) 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotEmpty(materialCategoryName)){
|
||||
materialCategoryName = PCD.getName() + ">" + materialCategoryName;
|
||||
materialCategoryName = materialCategoryName.substring(0,materialCategoryName.length()-1);
|
||||
entity.setCategoryName(materialCategoryName);
|
||||
}else{
|
||||
if (ObjectUtil.isNotEmpty(productCategoryDO)) {
|
||||
entity.setCategoryName(productCategoryDO.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return product;
|
||||
// return productMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductDO> getProductList(ProductExportReqVO exportReqVO) {
|
||||
return productMapper.selectList(exportReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.yunxi.scm.module.xxjj.service.productcategory;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.productcategory.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.productcategory.ProductCategoryDO;
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 产品分类 Service 接口
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
public interface ProductCategoryService {
|
||||
|
||||
/**
|
||||
* 创建产品分类
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createProductCategory(@Valid ProductCategoryCreateReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新产品分类
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateProductCategory(@Valid ProductCategoryUpdateReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除产品分类
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteProductCategory(Long id);
|
||||
|
||||
/**
|
||||
* 获得产品分类
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 产品分类
|
||||
*/
|
||||
ProductCategoryDO getProductCategory(Long id);
|
||||
|
||||
/**
|
||||
* 获得产品分类列表
|
||||
*
|
||||
* @param ids 编号
|
||||
* @return 产品分类列表
|
||||
*/
|
||||
List<ProductCategoryDO> getProductCategoryList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得产品分类分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 产品分类分页
|
||||
*/
|
||||
PageResult<ProductCategoryDO> getProductCategoryPage(ProductCategoryPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得产品分类列表, 用于 Excel 导出
|
||||
*
|
||||
* @param exportReqVO 查询条件
|
||||
* @return 产品分类列表
|
||||
*/
|
||||
List<ProductCategoryDO> getProductCategoryList(ProductCategoryExportReqVO exportReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package com.yunxi.scm.module.xxjj.service.productcategory;
|
||||
|
||||
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.productcategory.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.productcategory.ProductCategoryDO;
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
import com.yunxi.scm.module.xxjj.convert.productcategory.ProductCategoryConvert;
|
||||
import com.yunxi.scm.module.xxjj.dal.mysql.productcategory.ProductCategoryMapper;
|
||||
|
||||
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 ProductCategoryServiceImpl implements ProductCategoryService {
|
||||
|
||||
@Resource
|
||||
private ProductCategoryMapper productCategoryMapper;
|
||||
|
||||
@Override
|
||||
public Long createProductCategory(ProductCategoryCreateReqVO createReqVO) {
|
||||
// 插入
|
||||
ProductCategoryDO productCategory = ProductCategoryConvert.INSTANCE.convert(createReqVO);
|
||||
productCategoryMapper.insert(productCategory);
|
||||
// 返回
|
||||
return productCategory.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProductCategory(ProductCategoryUpdateReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateProductCategoryExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ProductCategoryDO updateObj = ProductCategoryConvert.INSTANCE.convert(updateReqVO);
|
||||
productCategoryMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteProductCategory(Long id) {
|
||||
// 校验存在
|
||||
validateProductCategoryExists(id);
|
||||
// 删除
|
||||
productCategoryMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateProductCategoryExists(Long id) {
|
||||
if (productCategoryMapper.selectById(id) == null) {
|
||||
throw exception(PRODUCT_CATEGORY_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductCategoryDO getProductCategory(Long id) {
|
||||
return productCategoryMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductCategoryDO> getProductCategoryList(Collection<Long> ids) {
|
||||
return productCategoryMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ProductCategoryDO> getProductCategoryPage(ProductCategoryPageReqVO pageReqVO) {
|
||||
return productCategoryMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductCategoryDO> getProductCategoryList(ProductCategoryExportReqVO exportReqVO) {
|
||||
return productCategoryMapper.selectList(exportReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.yunxi.scm.module.xxjj.service.productclass;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.productclass.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.productclass.ProductClassDO;
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 产品类别 Service 接口
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
public interface ProductClassService {
|
||||
|
||||
/**
|
||||
* 创建产品类别
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createProductClass(@Valid ProductClassCreateReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新产品类别
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateProductClass(@Valid ProductClassUpdateReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除产品类别
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteProductClass(Long id);
|
||||
|
||||
/**
|
||||
* 获得产品类别
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 产品类别
|
||||
*/
|
||||
ProductClassDO getProductClass(Long id);
|
||||
|
||||
/**
|
||||
* 获得产品类别列表
|
||||
*
|
||||
* @param ids 编号
|
||||
* @return 产品类别列表
|
||||
*/
|
||||
List<ProductClassDO> getProductClassList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得产品类别分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 产品类别分页
|
||||
*/
|
||||
PageResult<ProductClassDO> getProductClassPage(ProductClassPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得产品类别列表, 用于 Excel 导出
|
||||
*
|
||||
* @param exportReqVO 查询条件
|
||||
* @return 产品类别列表
|
||||
*/
|
||||
List<ProductClassDO> getProductClassList(ProductClassExportReqVO exportReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package com.yunxi.scm.module.xxjj.service.productclass;
|
||||
|
||||
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.productclass.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.productclass.ProductClassDO;
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
import com.yunxi.scm.module.xxjj.convert.productclass.ProductClassConvert;
|
||||
import com.yunxi.scm.module.xxjj.dal.mysql.productclass.ProductClassMapper;
|
||||
|
||||
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 ProductClassServiceImpl implements ProductClassService {
|
||||
|
||||
@Resource
|
||||
private ProductClassMapper productClassMapper;
|
||||
|
||||
@Override
|
||||
public Long createProductClass(ProductClassCreateReqVO createReqVO) {
|
||||
// 插入
|
||||
ProductClassDO productClass = ProductClassConvert.INSTANCE.convert(createReqVO);
|
||||
productClassMapper.insert(productClass);
|
||||
// 返回
|
||||
return productClass.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProductClass(ProductClassUpdateReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateProductClassExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ProductClassDO updateObj = ProductClassConvert.INSTANCE.convert(updateReqVO);
|
||||
productClassMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteProductClass(Long id) {
|
||||
// 校验存在
|
||||
validateProductClassExists(id);
|
||||
// 删除
|
||||
productClassMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateProductClassExists(Long id) {
|
||||
if (productClassMapper.selectById(id) == null) {
|
||||
throw exception(PRODUCT_CLASS_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductClassDO getProductClass(Long id) {
|
||||
return productClassMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductClassDO> getProductClassList(Collection<Long> ids) {
|
||||
return productClassMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ProductClassDO> getProductClassPage(ProductClassPageReqVO pageReqVO) {
|
||||
return productClassMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductClassDO> getProductClassList(ProductClassExportReqVO exportReqVO) {
|
||||
return productClassMapper.selectList(exportReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.yunxi.scm.module.xxjj.service.producttype;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.producttype.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.producttype.ProductTypeDO;
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 产品类型 Service 接口
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
public interface ProductTypeService {
|
||||
|
||||
/**
|
||||
* 创建产品类型
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createProductType(@Valid ProductTypeCreateReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新产品类型
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateProductType(@Valid ProductTypeUpdateReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除产品类型
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteProductType(Long id);
|
||||
|
||||
/**
|
||||
* 获得产品类型
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 产品类型
|
||||
*/
|
||||
ProductTypeDO getProductType(Long id);
|
||||
|
||||
/**
|
||||
* 获得产品类型列表
|
||||
*
|
||||
* @param ids 编号
|
||||
* @return 产品类型列表
|
||||
*/
|
||||
List<ProductTypeDO> getProductTypeList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得产品类型分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 产品类型分页
|
||||
*/
|
||||
PageResult<ProductTypeDO> getProductTypePage(ProductTypePageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得产品类型列表, 用于 Excel 导出
|
||||
*
|
||||
* @param exportReqVO 查询条件
|
||||
* @return 产品类型列表
|
||||
*/
|
||||
List<ProductTypeDO> getProductTypeList(ProductTypeExportReqVO exportReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.yunxi.scm.module.xxjj.service.producttype;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yunxi.scm.framework.common.pojo.PageParam;
|
||||
import com.yunxi.scm.framework.mybatis.core.util.MyBatisUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
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.producttype.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.producttype.ProductTypeDO;
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
import com.yunxi.scm.module.xxjj.convert.producttype.ProductTypeConvert;
|
||||
import com.yunxi.scm.module.xxjj.dal.mysql.producttype.ProductTypeMapper;
|
||||
|
||||
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 ProductTypeServiceImpl implements ProductTypeService {
|
||||
|
||||
@Resource
|
||||
private ProductTypeMapper productTypeMapper;
|
||||
|
||||
@Override
|
||||
public Long createProductType(ProductTypeCreateReqVO createReqVO) {
|
||||
// 插入
|
||||
ProductTypeDO productType = ProductTypeConvert.INSTANCE.convert(createReqVO);
|
||||
productTypeMapper.insert(productType);
|
||||
// 返回
|
||||
return productType.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProductType(ProductTypeUpdateReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateProductTypeExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ProductTypeDO updateObj = ProductTypeConvert.INSTANCE.convert(updateReqVO);
|
||||
productTypeMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteProductType(Long id) {
|
||||
// 校验存在
|
||||
validateProductTypeExists(id);
|
||||
// 删除
|
||||
productTypeMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateProductTypeExists(Long id) {
|
||||
if (productTypeMapper.selectById(id) == null) {
|
||||
throw exception(PRODUCT_TYPE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProductTypeDO getProductType(Long id) {
|
||||
return productTypeMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductTypeDO> getProductTypeList(Collection<Long> ids) {
|
||||
return productTypeMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ProductTypeDO> getProductTypePage(ProductTypePageReqVO pageReqVO) {
|
||||
// return productTypeMapper.selectPage(pageReqVO);
|
||||
IPage<ProductTypeDO> mpPage = MyBatisUtils.buildPage(pageReqVO);
|
||||
IPage<ProductTypeDO> productTypeDOIPage = productTypeMapper.queryProductPage(mpPage,pageReqVO);
|
||||
PageResult<ProductTypeDO> pageResult = new PageResult<>();
|
||||
pageResult.setList(productTypeDOIPage.getRecords());
|
||||
pageResult.setTotal(productTypeDOIPage.getTotal());
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductTypeDO> getProductTypeList(ProductTypeExportReqVO exportReqVO) {
|
||||
return productTypeMapper.selectList(exportReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.yunxi.scm.module.xxjj.service.taskmanage;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.taskmanage.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.taskmanage.TaskManageDO;
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 任务管理 Service 接口
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
public interface TaskManageService {
|
||||
|
||||
/**
|
||||
* 创建任务管理
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createTaskManage(@Valid TaskManageCreateReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新任务管理
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateTaskManage(@Valid TaskManageUpdateReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除任务管理
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteTaskManage(Long id);
|
||||
|
||||
/**
|
||||
* 获得任务管理
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 任务管理
|
||||
*/
|
||||
TaskManageDO getTaskManage(Long id);
|
||||
|
||||
/**
|
||||
* 获得任务管理列表
|
||||
*
|
||||
* @param ids 编号
|
||||
* @return 任务管理列表
|
||||
*/
|
||||
List<TaskManageDO> getTaskManageList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得任务管理分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 任务管理分页
|
||||
*/
|
||||
PageResult<TaskManageDO> getTaskManagePage(TaskManagePageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得任务管理列表, 用于 Excel 导出
|
||||
*
|
||||
* @param exportReqVO 查询条件
|
||||
* @return 任务管理列表
|
||||
*/
|
||||
List<TaskManageDO> getTaskManageList(TaskManageExportReqVO exportReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package com.yunxi.scm.module.xxjj.service.taskmanage;
|
||||
|
||||
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.taskmanage.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.taskmanage.TaskManageDO;
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
import com.yunxi.scm.module.xxjj.convert.taskmanage.TaskManageConvert;
|
||||
import com.yunxi.scm.module.xxjj.dal.mysql.taskmanage.TaskManageMapper;
|
||||
|
||||
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 TaskManageServiceImpl implements TaskManageService {
|
||||
|
||||
@Resource
|
||||
private TaskManageMapper taskManageMapper;
|
||||
|
||||
@Override
|
||||
public Long createTaskManage(TaskManageCreateReqVO createReqVO) {
|
||||
// 插入
|
||||
TaskManageDO taskManage = TaskManageConvert.INSTANCE.convert(createReqVO);
|
||||
taskManageMapper.insert(taskManage);
|
||||
// 返回
|
||||
return taskManage.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTaskManage(TaskManageUpdateReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateTaskManageExists(updateReqVO.getId());
|
||||
// 更新
|
||||
TaskManageDO updateObj = TaskManageConvert.INSTANCE.convert(updateReqVO);
|
||||
taskManageMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteTaskManage(Long id) {
|
||||
// 校验存在
|
||||
validateTaskManageExists(id);
|
||||
// 删除
|
||||
taskManageMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateTaskManageExists(Long id) {
|
||||
if (taskManageMapper.selectById(id) == null) {
|
||||
throw exception(TASK_MANAGE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaskManageDO getTaskManage(Long id) {
|
||||
return taskManageMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TaskManageDO> getTaskManageList(Collection<Long> ids) {
|
||||
return taskManageMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<TaskManageDO> getTaskManagePage(TaskManagePageReqVO pageReqVO) {
|
||||
return taskManageMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TaskManageDO> getTaskManageList(TaskManageExportReqVO exportReqVO) {
|
||||
return taskManageMapper.selectList(exportReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.yunxi.scm.module.xxjj.service.teammanage;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.teammanage.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.teammanage.TeamManageDO;
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 团队管理 Service 接口
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
public interface TeamManageService {
|
||||
|
||||
/**
|
||||
* 创建团队管理
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createTeamManage(@Valid TeamManageCreateReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新团队管理
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateTeamManage(@Valid TeamManageUpdateReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除团队管理
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteTeamManage(Long id);
|
||||
|
||||
/**
|
||||
* 获得团队管理
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 团队管理
|
||||
*/
|
||||
TeamManageDO getTeamManage(Long id);
|
||||
|
||||
/**
|
||||
* 获得团队管理列表
|
||||
*
|
||||
* @param ids 编号
|
||||
* @return 团队管理列表
|
||||
*/
|
||||
List<TeamManageDO> getTeamManageList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得团队管理分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 团队管理分页
|
||||
*/
|
||||
PageResult<TeamManageDO> getTeamManagePage(TeamManagePageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得团队管理列表, 用于 Excel 导出
|
||||
*
|
||||
* @param exportReqVO 查询条件
|
||||
* @return 团队管理列表
|
||||
*/
|
||||
List<TeamManageDO> getTeamManageList(TeamManageExportReqVO exportReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package com.yunxi.scm.module.xxjj.service.teammanage;
|
||||
|
||||
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.teammanage.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.teammanage.TeamManageDO;
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
import com.yunxi.scm.module.xxjj.convert.teammanage.TeamManageConvert;
|
||||
import com.yunxi.scm.module.xxjj.dal.mysql.teammanage.TeamManageMapper;
|
||||
|
||||
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 TeamManageServiceImpl implements TeamManageService {
|
||||
|
||||
@Resource
|
||||
private TeamManageMapper teamManageMapper;
|
||||
|
||||
@Override
|
||||
public Long createTeamManage(TeamManageCreateReqVO createReqVO) {
|
||||
// 插入
|
||||
TeamManageDO teamManage = TeamManageConvert.INSTANCE.convert(createReqVO);
|
||||
teamManageMapper.insert(teamManage);
|
||||
// 返回
|
||||
return teamManage.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTeamManage(TeamManageUpdateReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateTeamManageExists(updateReqVO.getId());
|
||||
// 更新
|
||||
TeamManageDO updateObj = TeamManageConvert.INSTANCE.convert(updateReqVO);
|
||||
teamManageMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteTeamManage(Long id) {
|
||||
// 校验存在
|
||||
validateTeamManageExists(id);
|
||||
// 删除
|
||||
teamManageMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateTeamManageExists(Long id) {
|
||||
if (teamManageMapper.selectById(id) == null) {
|
||||
throw exception(TEAM_MANAGE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TeamManageDO getTeamManage(Long id) {
|
||||
return teamManageMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TeamManageDO> getTeamManageList(Collection<Long> ids) {
|
||||
return teamManageMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<TeamManageDO> getTeamManagePage(TeamManagePageReqVO pageReqVO) {
|
||||
return teamManageMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TeamManageDO> getTeamManageList(TeamManageExportReqVO exportReqVO) {
|
||||
return teamManageMapper.selectList(exportReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.yunxi.scm.module.xxjj.service.workreport;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import com.yunxi.scm.module.xxjj.controller.admin.workreport.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.workreport.WorkReportDO;
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 工作报告 Service 接口
|
||||
*
|
||||
* @author 长江云息
|
||||
*/
|
||||
public interface WorkReportService {
|
||||
|
||||
/**
|
||||
* 创建工作报告
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createWorkReport(@Valid WorkReportCreateReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新工作报告
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateWorkReport(@Valid WorkReportUpdateReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除工作报告
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteWorkReport(Long id);
|
||||
|
||||
/**
|
||||
* 获得工作报告
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 工作报告
|
||||
*/
|
||||
WorkReportDO getWorkReport(Long id);
|
||||
|
||||
/**
|
||||
* 获得工作报告列表
|
||||
*
|
||||
* @param ids 编号
|
||||
* @return 工作报告列表
|
||||
*/
|
||||
List<WorkReportDO> getWorkReportList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得工作报告分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 工作报告分页
|
||||
*/
|
||||
PageResult<WorkReportDO> getWorkReportPage(WorkReportPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得工作报告列表, 用于 Excel 导出
|
||||
*
|
||||
* @param exportReqVO 查询条件
|
||||
* @return 工作报告列表
|
||||
*/
|
||||
List<WorkReportDO> getWorkReportList(WorkReportExportReqVO exportReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package com.yunxi.scm.module.xxjj.service.workreport;
|
||||
|
||||
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.workreport.vo.*;
|
||||
import com.yunxi.scm.module.xxjj.dal.dataobject.workreport.WorkReportDO;
|
||||
import com.yunxi.scm.framework.common.pojo.PageResult;
|
||||
|
||||
import com.yunxi.scm.module.xxjj.convert.workreport.WorkReportConvert;
|
||||
import com.yunxi.scm.module.xxjj.dal.mysql.workreport.WorkReportMapper;
|
||||
|
||||
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 WorkReportServiceImpl implements WorkReportService {
|
||||
|
||||
@Resource
|
||||
private WorkReportMapper workReportMapper;
|
||||
|
||||
@Override
|
||||
public Long createWorkReport(WorkReportCreateReqVO createReqVO) {
|
||||
// 插入
|
||||
WorkReportDO workReport = WorkReportConvert.INSTANCE.convert(createReqVO);
|
||||
workReportMapper.insert(workReport);
|
||||
// 返回
|
||||
return workReport.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateWorkReport(WorkReportUpdateReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateWorkReportExists(updateReqVO.getId());
|
||||
// 更新
|
||||
WorkReportDO updateObj = WorkReportConvert.INSTANCE.convert(updateReqVO);
|
||||
workReportMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteWorkReport(Long id) {
|
||||
// 校验存在
|
||||
validateWorkReportExists(id);
|
||||
// 删除
|
||||
workReportMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateWorkReportExists(Long id) {
|
||||
if (workReportMapper.selectById(id) == null) {
|
||||
throw exception(WORK_REPORT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public WorkReportDO getWorkReport(Long id) {
|
||||
return workReportMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WorkReportDO> getWorkReportList(Collection<Long> ids) {
|
||||
return workReportMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<WorkReportDO> getWorkReportPage(WorkReportPageReqVO pageReqVO) {
|
||||
return workReportMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WorkReportDO> getWorkReportList(WorkReportExportReqVO exportReqVO) {
|
||||
return workReportMapper.selectList(exportReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yunxi.scm.module.xxjj.dal.mysql.producttype.ProductTypeMapper">
|
||||
|
||||
<select id="queryProductPage" resultType="com.yunxi.scm.module.xxjj.dal.dataobject.producttype.ProductTypeDO">
|
||||
SELECT
|
||||
a.*,
|
||||
b.name className
|
||||
FROM
|
||||
yx_product_type a
|
||||
LEFT JOIN yx_product_class b ON a.class_id = b.id
|
||||
WHERE 1=1
|
||||
<if test="reqVO.className != null and reqVO.className != ''">
|
||||
and b.name like CONCAT('%',#{reqVO.className},'%')
|
||||
</if>
|
||||
<if test="reqVO.name != null and reqVO.name != ''">
|
||||
and a.name like CONCAT('%',#{reqVO.name},'%')
|
||||
</if>
|
||||
<if test="reqVO.status != null and reqVO.status != ''">
|
||||
and a.status = #{reqVO.status}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue