修改后提交

tx
tengxi 1 year ago
commit 236ec9c3af

@ -45,7 +45,8 @@ public class MenuServiceImpl implements MenuService {
private TenantService tenantService;
@Override
@CacheEvict(value = RedisKeyConstants.PERMISSION_MENU_ID_LIST, key = "#reqVO.permission")
//!!!在@CacheEvict里加入condition解决新建目录时出现系统异常问题
@CacheEvict(value = RedisKeyConstants.PERMISSION_MENU_ID_LIST, key = "#reqVO.permission", condition = "#reqVO.permission != null")
public Long createMenu(MenuCreateReqVO reqVO) {
// 校验父菜单存在
validateParentMenu(reqVO.getParentId(), null);

@ -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,96 @@
package com.yunxi.scm.module.xxjj.controller.admin.product.vo;
import com.baomidou.mybatisplus.annotation.TableField;
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 javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* Base VO VO 使
* VO Swagger
*/
@Data
public class ProductBaseVO {
@Schema(description = "产品编码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "产品编码不能为空")
private String productCode;
@Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
@NotNull(message = "产品名称不能为空")
private String productName;
@Schema(description = "产品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
@NotNull(message = "产品图片不能为空")
private String productPicture;
@Schema(description = "产品类别", requiredMode = Schema.RequiredMode.REQUIRED, example = "28952")
@NotNull(message = "产品类别不能为空")
private String classId;
@Schema(description = "产品类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "4846")
@NotNull(message = "产品类型不能为空")
private String typeId;
@Schema(description = "产品分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "30850")
@NotNull(message = "产品分类不能为空")
private Long categoryId;
@Schema(description = "产品规格")
private String spec;
@Schema(description = "标准单价", requiredMode = Schema.RequiredMode.REQUIRED, example = "19894")
@NotNull(message = "标准单价不能为空")
private BigDecimal singlePrice;
@Schema(description = "首选供应商", example = "2309")
private Long supplyId;
@Schema(description = "采购模式", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "采购模式不能为空")
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 = "产品状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "产品状态不能为空")
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 = "审核状态")
private String auditStatus;
@TableField(exist = false)
private String categoryName;
}

@ -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,83 @@
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 java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 产品 Excel 导出 Request VO参数和 ProductPageReqVO 是一致的")
@Data
public class ProductExportReqVO {
@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,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,34 @@
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 javax.validation.constraints.*;
/**
* Base VO VO 使
* VO Swagger
*/
@Data
public class ProductCategoryBaseVO {
@Schema(description = "分类编码")
private String code;
@Schema(description = "分类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
@NotNull(message = "分类名称不能为空")
private String name;
@Schema(description = "父分类id", example = "6365")
private Long parentId;
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "显示顺序不能为空")
private Integer sort;
@Schema(description = "分类描述", example = "你说的对")
private String description;
}

@ -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,23 @@
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 java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 产品分类 Excel 导出 Request VO参数和 ProductCategoryPageReqVO 是一致的")
@Data
public class ProductCategoryExportReqVO {
@Schema(description = "分类名称", example = "张三")
private String name;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
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,31 @@
package com.yunxi.scm.module.xxjj.controller.admin.productclass.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
/**
* Base VO VO 使
* VO Swagger
*/
@Data
public class ProductClassBaseVO {
@Schema(description = "类别名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
@NotNull(message = "类别名称不能为空")
private String name;
@Schema(description = "状态(0:启用1禁用)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "状态(0:启用1禁用)不能为空")
private String status;
@Schema(description = "商品数量")
private Integer num;
@Schema(description = "类别描述", example = "随便")
private String description;
}

@ -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,41 @@
package com.yunxi.scm.module.xxjj.controller.admin.productclass.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;
import com.yunxi.scm.framework.excel.core.annotations.DictFormat;
import com.yunxi.scm.framework.excel.core.convert.DictConvert;
/**
* Excel VO
*
* @author
*/
@Data
public class ProductClassExcelVO {
@ExcelProperty("id")
private Long id;
@ExcelProperty("类别名称")
private String name;
@ExcelProperty(value = "状态(0:启用1禁用)", converter = DictConvert.class)
@DictFormat("class_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String status;
@ExcelProperty("商品数量")
private Integer num;
@ExcelProperty("类别描述")
private String description;
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}

@ -0,0 +1,26 @@
package com.yunxi.scm.module.xxjj.controller.admin.productclass.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.yunxi.scm.framework.common.pojo.PageParam;
import java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 产品类别 Excel 导出 Request VO参数和 ProductClassPageReqVO 是一致的")
@Data
public class ProductClassExportReqVO {
@Schema(description = "类别名称", example = "王五")
private String name;
@Schema(description = "状态(0:启用1禁用)", example = "1")
private String status;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

@ -0,0 +1,28 @@
package com.yunxi.scm.module.xxjj.controller.admin.productclass.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 ProductClassPageReqVO extends PageParam {
@Schema(description = "类别名称", example = "王五")
private String name;
@Schema(description = "状态(0:启用1禁用)", example = "1")
private String status;
@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.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,38 @@
package com.yunxi.scm.module.xxjj.controller.admin.producttype.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
/**
* Base VO VO 使
* VO Swagger
*/
@Data
public class ProductTypeBaseVO {
@Schema(description = "类别id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23579")
@NotNull(message = "类别id不能为空")
private Long classId;
@Schema(description = "类型名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
@NotNull(message = "类型名称不能为空")
private String name;
@Schema(description = "状态(0:启用1禁用)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "状态(0:启用1禁用)不能为空")
private String status;
@Schema(description = "商品数量")
private Integer num;
@Schema(description = "类型描述", example = "你猜")
private String description;
@Schema(description = "类别名称")
private String className;
}

@ -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,44 @@
package com.yunxi.scm.module.xxjj.controller.admin.producttype.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;
import com.yunxi.scm.framework.excel.core.annotations.DictFormat;
import com.yunxi.scm.framework.excel.core.convert.DictConvert;
/**
* Excel VO
*
* @author
*/
@Data
public class ProductTypeExcelVO {
@ExcelProperty("id")
private Long id;
@ExcelProperty("类别id")
private Long classId;
@ExcelProperty("类型名称")
private String name;
@ExcelProperty(value = "状态(0:启用1禁用)", converter = DictConvert.class)
@DictFormat("class_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
private String status;
@ExcelProperty("商品数量")
private Integer num;
@ExcelProperty("类型描述")
private String description;
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}

@ -0,0 +1,35 @@
package com.yunxi.scm.module.xxjj.controller.admin.producttype.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.yunxi.scm.framework.common.pojo.PageParam;
import java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 产品类型 Excel 导出 Request VO参数和 ProductTypePageReqVO 是一致的")
@Data
public class ProductTypeExportReqVO {
@Schema(description = "类别id", example = "23579")
private Long classId;
@Schema(description = "类型名称", example = "芋艿")
private String name;
@Schema(description = "状态(0:启用1禁用)", example = "1")
private String status;
@Schema(description = "商品数量")
private Integer num;
@Schema(description = "类型描述", example = "你猜")
private String description;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

@ -0,0 +1,40 @@
package com.yunxi.scm.module.xxjj.controller.admin.producttype.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 ProductTypePageReqVO extends PageParam {
@Schema(description = "类别id", example = "23579")
private Long classId;
@Schema(description = "类型名称", example = "芋艿")
private String name;
@Schema(description = "状态(0:启用1禁用)", example = "1")
private String status;
@Schema(description = "商品数量")
private Integer num;
@Schema(description = "类型描述", example = "你猜")
private String description;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "类别名称")
private String className;
}

@ -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,71 @@
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 javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* Base VO VO 使
* VO Swagger
*/
@Data
public class TaskManageBaseVO {
@Schema(description = "任务标题", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "任务标题不能为空")
private String title;
@Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "开始时间不能为空")
@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 = "关联项目", requiredMode = Schema.RequiredMode.REQUIRED, example = "26681")
@NotNull(message = "关联项目不能为空")
private Long projectId;
@Schema(description = "负责人员", requiredMode = Schema.RequiredMode.REQUIRED, example = "1064")
@NotNull(message = "负责人员不能为空")
private Long chargeId;
@Schema(description = "参与人员", requiredMode = Schema.RequiredMode.REQUIRED, example = "4368")
@NotNull(message = "参与人员不能为空")
private Long joinId;
@Schema(description = "任务标记", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "任务标记不能为空")
private String taskMark;
@Schema(description = "紧要程度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "紧要程度不能为空")
private String urgentLevel;
@Schema(description = "任务提醒", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "任务提醒不能为空")
private String taskRemind;
@Schema(description = "提醒方式", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "提醒方式不能为空")
private String remindWay;
@Schema(description = "任务描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便")
@NotNull(message = "任务描述不能为空")
private String taskDescription;
@Schema(description = "上传附件", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "上传附件不能为空")
private String uploadAnnex;
}

@ -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,58 @@
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 java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 任务管理 Excel 导出 Request VO参数和 TaskManagePageReqVO 是一致的")
@Data
public class TaskManageExportReqVO {
@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,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,36 @@
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 javax.validation.constraints.*;
/**
* Base VO VO 使
* VO Swagger
*/
@Data
public class TeamManageBaseVO {
@Schema(description = "团队名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
@NotNull(message = "团队名称不能为空")
private String name;
@Schema(description = "团队图片", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "团队图片不能为空")
private String picture;
@Schema(description = "负责人员", requiredMode = Schema.RequiredMode.REQUIRED, example = "3934")
@NotNull(message = "负责人员不能为空")
private Long chargeId;
@Schema(description = "团队成员", requiredMode = Schema.RequiredMode.REQUIRED, example = "169")
@NotNull(message = "团队成员不能为空")
private Long teamId;
@Schema(description = "团队描述", example = "你猜")
private String teamDescription;
}

@ -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,35 @@
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 java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 团队管理 Excel 导出 Request VO参数和 TeamManagePageReqVO 是一致的")
@Data
public class TeamManageExportReqVO {
@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,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,66 @@
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 javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* Base VO VO 使
* VO Swagger
*/
@Data
public class WorkReportBaseVO {
@Schema(description = "报告标题", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "报告标题不能为空")
private String title;
@Schema(description = "报告类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "报告类型不能为空")
private String type;
@Schema(description = "报告日期", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "报告日期不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime reportDate;
@Schema(description = "工作总结", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "工作总结不能为空")
private String workSummary;
@Schema(description = "上传附件")
private String uploadFile;
@Schema(description = "所属部门", requiredMode = Schema.RequiredMode.REQUIRED, example = "27438")
@NotNull(message = "所属部门不能为空")
private Long departmentId;
@Schema(description = "批阅状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "批阅状态不能为空")
private String approvalStatus;
@Schema(description = "提交人员", requiredMode = Schema.RequiredMode.REQUIRED, example = "25615")
@NotNull(message = "提交人员不能为空")
private Long commitId;
@Schema(description = "提交日期", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "提交日期不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime commitDate;
@Schema(description = "批阅人员", requiredMode = Schema.RequiredMode.REQUIRED, example = "32183")
@NotNull(message = "批阅人员不能为空")
private Long approvalId;
@Schema(description = "抄送人员", example = "20683")
private Long copyId;
}

@ -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,55 @@
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 java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import static com.yunxi.scm.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 工作报告 Excel 导出 Request VO参数和 WorkReportPageReqVO 是一致的")
@Data
public class WorkReportExportReqVO {
@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,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,49 @@
package com.yunxi.scm.module.xxjj.dal.dataobject.productclass;
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_class")
@KeySequence("yx_product_class_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ProductClassDO extends BaseDO {
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String name;
/**
* (0:1)
*
* {@link TODO class_status }
*/
private String status;
/**
*
*/
private Integer num;
/**
*
*/
private String description;
}

@ -0,0 +1,56 @@
package com.yunxi.scm.module.xxjj.dal.dataobject.producttype;
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_type")
@KeySequence("yx_product_type_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ProductTypeDO extends BaseDO {
/**
* id
*/
@TableId
private Long id;
/**
* id
*/
private Long classId;
/**
*
*/
private String name;
/**
* (0:1)
*
* {@link TODO class_status }
*/
private String status;
/**
*
*/
private Integer num;
/**
*
*/
private String description;
@TableField(exist = false)
private String className;
}

@ -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));
}
}

@ -29,10 +29,26 @@ public interface ErrorCodeConstants {
ErrorCode WAREHOUSE_RECEIPT_NOT_EXISTS = new ErrorCode(1002025013, "入库单不存在");
// ========== 领料单 TODO 补充编号 ==========
ErrorCode WAREHOUSE_OUT_NOT_EXISTS = new ErrorCode(1002025014, "领料单不存在");
// ========== 任务 TODO 补充编号 ==========
ErrorCode TASK_NOT_EXISTS = new ErrorCode(1002025071, "任务不存在");
// ========== 项目管理 TODO 补充编号 ==========
ErrorCode PROJECT_NOT_EXISTS = new ErrorCode(1002025072, "项目管理不存在");
// ========== 产品 TODO 补充编号 ==========
ErrorCode PRODUCT_NOT_EXISTS = new ErrorCode(1002023001, "产品不存在");
// ========== 产品分类 TODO 补充编号 ==========
ErrorCode PRODUCT_CATEGORY_NOT_EXISTS = new ErrorCode(1002023002, "产品分类不存在");
// ========== 产品类别 TODO 补充编号 ==========
ErrorCode PRODUCT_CLASS_NOT_EXISTS = new ErrorCode(1002023003, "产品类别不存在");
// ========== 产品类型 TODO 补充编号 ==========
ErrorCode PRODUCT_TYPE_NOT_EXISTS = new ErrorCode(1002023004, "产品类型不存在");
// ========== 任务管理 TODO 补充编号 ==========
ErrorCode TASK_MANAGE_NOT_EXISTS = new ErrorCode(1002023005, "任务管理不存在");
// ========== 团队管理 TODO 补充编号 ==========
ErrorCode TEAM_MANAGE_NOT_EXISTS = new ErrorCode(1002023006, "团队管理不存在");
// ========== 工作报告 TODO 补充编号 ==========
ErrorCode WORK_REPORT_NOT_EXISTS = new ErrorCode(1002023007, "工作报告不存在");
// ========== 部门模块 1002004000 ==========
ErrorCode MaterialCategory_NAME_DUPLICATE = new ErrorCode(1002004000, "已经存在该名字的部门");
ErrorCode MaterialCategory_PARENT_NOT_EXITS = new ErrorCode(1002004001,"父级部门不存在");

@ -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,12 @@
<?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.product.ProductMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

@ -0,0 +1,12 @@
<?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.productcategory.ProductCategoryMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

@ -0,0 +1,12 @@
<?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.productclass.ProductClassMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

@ -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>

@ -0,0 +1,12 @@
<?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.taskmanage.TaskManageMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

@ -0,0 +1,12 @@
<?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.teammanage.TeamManageMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

@ -0,0 +1,12 @@
<?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.workreport.WorkReportMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save