diff --git a/yudao-module-bs/yudao-module-bs-api/src/main/java/cn/iocoder/yudao/module/bs/enums/ErrorCodeConstants.java b/yudao-module-bs/yudao-module-bs-api/src/main/java/cn/iocoder/yudao/module/bs/enums/ErrorCodeConstants.java index fb6f1741..b207a6dc 100644 --- a/yudao-module-bs/yudao-module-bs-api/src/main/java/cn/iocoder/yudao/module/bs/enums/ErrorCodeConstants.java +++ b/yudao-module-bs/yudao-module-bs-api/src/main/java/cn/iocoder/yudao/module/bs/enums/ErrorCodeConstants.java @@ -17,4 +17,7 @@ public interface ErrorCodeConstants { ErrorCode EXPENSE_CLAIM_NOT_EXISTS = new ErrorCode(200700, "报销单不存在"); ErrorCode SUPPLIER_COMPANY_NOT_EXISTS = new ErrorCode(202300, "供应商信息不存在"); ErrorCode QUOTATION_SHEET_NOT_EXISTS = new ErrorCode(202400, "报价单不存在"); + ErrorCode QUOTATION_SHEET_DETAIL_NOT_EXISTS = new ErrorCode(202500, "报价单物料明细不存在"); + ErrorCode MATERIEL_NOT_EXISTS = new ErrorCode(202600, "物料不存在"); + ErrorCode QUOTATION_SHEET_BIDDING_NOT_EXISTS = new ErrorCode(202700, "报价单物料中标不存在"); } diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/MaterielController.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/MaterielController.java new file mode 100644 index 00000000..757d1d70 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/MaterielController.java @@ -0,0 +1,102 @@ +package cn.iocoder.yudao.module.bs.controller.admin.materiel; + +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 cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.bs.controller.admin.materiel.vo.*; +import cn.iocoder.yudao.module.bs.dal.dataobject.materiel.MaterielDO; +import cn.iocoder.yudao.module.bs.convert.materiel.MaterielConvert; +import cn.iocoder.yudao.module.bs.service.materiel.MaterielService; + +@Tag(name = "管理后台 - 物料") +@RestController +@RequestMapping("/bs/materiel") +@Validated +public class MaterielController { + + @Resource + private MaterielService materielService; + + @PostMapping("/create") + @Operation(summary = "创建物料") + @PreAuthorize("@ss.hasPermission('bs:materiel:create')") + public CommonResult createMateriel(@Valid @RequestBody MaterielCreateReqVO createReqVO) { + return success(materielService.createMateriel(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新物料") + @PreAuthorize("@ss.hasPermission('bs:materiel:update')") + public CommonResult updateMateriel(@Valid @RequestBody MaterielUpdateReqVO updateReqVO) { + materielService.updateMateriel(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除物料") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('bs:materiel:delete')") + public CommonResult deleteMateriel(@RequestParam("id") Long id) { + materielService.deleteMateriel(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得物料") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('bs:materiel:query')") + public CommonResult getMateriel(@RequestParam("id") Long id) { + MaterielDO materiel = materielService.getMateriel(id); + return success(MaterielConvert.INSTANCE.convert(materiel)); + } + + @GetMapping("/list") + @Operation(summary = "获得物料列表") + @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") + @PreAuthorize("@ss.hasPermission('bs:materiel:query')") + public CommonResult> getMaterielList(@RequestParam("ids") Collection ids) { + List list = materielService.getMaterielList(ids); + return success(MaterielConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @Operation(summary = "获得物料分页") + @PreAuthorize("@ss.hasPermission('bs:materiel:query')") + public CommonResult> getMaterielPage(@Valid MaterielPageReqVO pageVO) { + PageResult pageResult = materielService.getMaterielPage(pageVO); + return success(MaterielConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出物料 Excel") + @PreAuthorize("@ss.hasPermission('bs:materiel:export')") + @OperateLog(type = EXPORT) + public void exportMaterielExcel(@Valid MaterielExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = materielService.getMaterielList(exportReqVO); + // 导出 Excel + List datas = MaterielConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "物料.xls", "数据", MaterielExcelVO.class, datas); + } + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielBaseVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielBaseVO.java new file mode 100644 index 00000000..ee045bf2 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielBaseVO.java @@ -0,0 +1,51 @@ +package cn.iocoder.yudao.module.bs.controller.admin.materiel.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 MaterielBaseVO { + + @Schema(description = "状态", example = "1") + private Integer status; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "物料编码") + @NotBlank(message = "物料编码不能为空") + private String materielCode; + + @Schema(description = "物料名称", example = "王五") + @NotBlank(message = "物料名称不能为空") + private String materielName; + + @Schema(description = "物料类型", example = "1") + @NotNull(message = "物料类型不能为空") + private Integer materielType; + + @Schema(description = "单台用量") + @NotNull(message = "单台用量不能为空") + private Integer dosage; + + @Schema(description = "描述", example = "你说的对") + private String description; + + @Schema(description = "单位") + private Integer unit; + + @Schema(description = "材质") + private String quality; + + @Schema(description = "扩展") + private String extend; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielCreateReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielCreateReqVO.java new file mode 100644 index 00000000..6870f90d --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielCreateReqVO.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.bs.controller.admin.materiel.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 MaterielCreateReqVO extends MaterielBaseVO { + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielExcelVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielExcelVO.java new file mode 100644 index 00000000..6ebbcbba --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielExcelVO.java @@ -0,0 +1,55 @@ +package cn.iocoder.yudao.module.bs.controller.admin.materiel.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 MaterielExcelVO { + + @ExcelProperty("主键") + private Long id; + + @ExcelProperty("状态") + private Integer status; + + @ExcelProperty("备注") + private String remark; + + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @ExcelProperty("物料编码") + private String materielCode; + + @ExcelProperty("物料名称") + private String materielName; + + @ExcelProperty("物料类型") + private Integer materielType; + + @ExcelProperty("单台用量") + private Integer dosage; + + @ExcelProperty("描述") + private String description; + + @ExcelProperty("单位") + private Integer unit; + + @ExcelProperty("材质") + private String quality; + + @ExcelProperty("扩展") + private String extend; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielExportReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielExportReqVO.java new file mode 100644 index 00000000..936b5001 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielExportReqVO.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.bs.controller.admin.materiel.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import java.time.LocalDateTime; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 物料 Excel 导出 Request VO,参数和 MaterielPageReqVO 是一致的") +@Data +public class MaterielExportReqVO { + + @Schema(description = "状态", example = "1") + private Integer status; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "物料编码") + private String materielCode; + + @Schema(description = "物料名称", example = "王五") + private String materielName; + + @Schema(description = "物料类型", example = "1") + private Integer materielType; + + @Schema(description = "单台用量") + private Integer dosage; + + @Schema(description = "描述", example = "你说的对") + private String description; + + @Schema(description = "单位") + private Integer unit; + + @Schema(description = "材质") + private String quality; + + @Schema(description = "扩展") + private String extend; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielPageReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielPageReqVO.java new file mode 100644 index 00000000..41b04ac9 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielPageReqVO.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.bs.controller.admin.materiel.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.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 MaterielPageReqVO extends PageParam { + + @Schema(description = "状态", example = "1") + private Integer status; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "物料编码") + private String materielCode; + + @Schema(description = "物料名称", example = "王五") + private String materielName; + + @Schema(description = "物料类型", example = "1") + private Integer materielType; + + @Schema(description = "单台用量") + private Integer dosage; + + @Schema(description = "描述", example = "你说的对") + private String description; + + @Schema(description = "单位") + private Integer unit; + + @Schema(description = "材质") + private String quality; + + @Schema(description = "扩展") + private String extend; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielRespVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielRespVO.java new file mode 100644 index 00000000..1f906347 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielRespVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.bs.controller.admin.materiel.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 MaterielRespVO extends MaterielBaseVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4778") + private Long id; + + @Schema(description = "创建时间") + private LocalDateTime createTime; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielUpdateReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielUpdateReqVO.java new file mode 100644 index 00000000..c14f4a11 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/materiel/vo/MaterielUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.bs.controller.admin.materiel.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 MaterielUpdateReqVO extends MaterielBaseVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4778") + @NotNull(message = "主键不能为空") + private Long id; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetBaseVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetBaseVO.java index ba73a13b..ba637daa 100644 --- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetBaseVO.java +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetBaseVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.bs.controller.admin.quotationsheet.vo; +import cn.iocoder.yudao.framework.common.pojo.ImageVo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.util.*; @@ -24,8 +25,8 @@ public class QuotationSheetBaseVO { @Schema(description = "备注", example = "你猜") private String remark; - @Schema(description = "附件") - private String files; + @Schema(description = "附件", requiredMode = Schema.RequiredMode.REQUIRED) + private List files; @Schema(description = "报价编号") private String number; diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetExcelVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetExcelVO.java index 4f158c04..5f07a18e 100644 --- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetExcelVO.java +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetExcelVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.bs.controller.admin.quotationsheet.vo; +import cn.iocoder.yudao.framework.common.pojo.ImageVo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.util.*; @@ -26,8 +27,8 @@ public class QuotationSheetExcelVO { @ExcelProperty("备注") private String remark; - @ExcelProperty("附件") - private String files; + @Schema(description = "附件", requiredMode = Schema.RequiredMode.REQUIRED) + private List files; @ExcelProperty("创建时间") private LocalDateTime createTime; diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetExportReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetExportReqVO.java index 5bff3ba8..2deac845 100644 --- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetExportReqVO.java +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetExportReqVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.bs.controller.admin.quotationsheet.vo; +import cn.iocoder.yudao.framework.common.pojo.ImageVo; import lombok.*; import java.util.*; import io.swagger.v3.oas.annotations.media.Schema; @@ -16,8 +17,8 @@ public class QuotationSheetExportReqVO { @Schema(description = "备注", example = "你猜") private String remark; - @Schema(description = "附件") - private String files; + @Schema(description = "附件", requiredMode = Schema.RequiredMode.REQUIRED) + private List files; @Schema(description = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetPageReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetPageReqVO.java index 0616e31b..543e5ac0 100644 --- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetPageReqVO.java +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheet/vo/QuotationSheetPageReqVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.bs.controller.admin.quotationsheet.vo; +import cn.iocoder.yudao.framework.common.pojo.ImageVo; import lombok.*; import java.util.*; import io.swagger.v3.oas.annotations.media.Schema; @@ -18,8 +19,8 @@ public class QuotationSheetPageReqVO extends PageParam { @Schema(description = "备注", example = "你猜") private String remark; - @Schema(description = "附件") - private String files; + @Schema(description = "附件", requiredMode = Schema.RequiredMode.REQUIRED) + private List files; @Schema(description = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/QuotationSheetBiddingController.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/QuotationSheetBiddingController.java new file mode 100644 index 00000000..b418e79f --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/QuotationSheetBiddingController.java @@ -0,0 +1,102 @@ +package cn.iocoder.yudao.module.bs.controller.admin.quotationsheetbidding; + +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 cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.bs.controller.admin.quotationsheetbidding.vo.*; +import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheetbidding.QuotationSheetBiddingDO; +import cn.iocoder.yudao.module.bs.convert.quotationsheetbidding.QuotationSheetBiddingConvert; +import cn.iocoder.yudao.module.bs.service.quotationsheetbidding.QuotationSheetBiddingService; + +@Tag(name = "管理后台 - 报价单物料中标") +@RestController +@RequestMapping("/bs/quotation-sheet-bidding") +@Validated +public class QuotationSheetBiddingController { + + @Resource + private QuotationSheetBiddingService quotationSheetBiddingService; + + @PostMapping("/create") + @Operation(summary = "创建报价单物料中标") + @PreAuthorize("@ss.hasPermission('bs:quotation-sheet-bidding:create')") + public CommonResult createQuotationSheetBidding(@Valid @RequestBody QuotationSheetBiddingCreateReqVO createReqVO) { + return success(quotationSheetBiddingService.createQuotationSheetBidding(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新报价单物料中标") + @PreAuthorize("@ss.hasPermission('bs:quotation-sheet-bidding:update')") + public CommonResult updateQuotationSheetBidding(@Valid @RequestBody QuotationSheetBiddingUpdateReqVO updateReqVO) { + quotationSheetBiddingService.updateQuotationSheetBidding(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除报价单物料中标") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('bs:quotation-sheet-bidding:delete')") + public CommonResult deleteQuotationSheetBidding(@RequestParam("id") Long id) { + quotationSheetBiddingService.deleteQuotationSheetBidding(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得报价单物料中标") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('bs:quotation-sheet-bidding:query')") + public CommonResult getQuotationSheetBidding(@RequestParam("id") Long id) { + QuotationSheetBiddingDO quotationSheetBidding = quotationSheetBiddingService.getQuotationSheetBidding(id); + return success(QuotationSheetBiddingConvert.INSTANCE.convert(quotationSheetBidding)); + } + + @GetMapping("/list") + @Operation(summary = "获得报价单物料中标列表") + @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") + @PreAuthorize("@ss.hasPermission('bs:quotation-sheet-bidding:query')") + public CommonResult> getQuotationSheetBiddingList(@RequestParam("ids") Collection ids) { + List list = quotationSheetBiddingService.getQuotationSheetBiddingList(ids); + return success(QuotationSheetBiddingConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @Operation(summary = "获得报价单物料中标分页") + @PreAuthorize("@ss.hasPermission('bs:quotation-sheet-bidding:query')") + public CommonResult> getQuotationSheetBiddingPage(@Valid QuotationSheetBiddingPageReqVO pageVO) { + PageResult pageResult = quotationSheetBiddingService.getQuotationSheetBiddingPage(pageVO); + return success(QuotationSheetBiddingConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出报价单物料中标 Excel") + @PreAuthorize("@ss.hasPermission('bs:quotation-sheet-bidding:export')") + @OperateLog(type = EXPORT) + public void exportQuotationSheetBiddingExcel(@Valid QuotationSheetBiddingExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = quotationSheetBiddingService.getQuotationSheetBiddingList(exportReqVO); + // 导出 Excel + List datas = QuotationSheetBiddingConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "报价单物料中标.xls", "数据", QuotationSheetBiddingExcelVO.class, datas); + } + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingBaseVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingBaseVO.java new file mode 100644 index 00000000..09bec0e8 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingBaseVO.java @@ -0,0 +1,68 @@ +package cn.iocoder.yudao.module.bs.controller.admin.quotationsheetbidding.vo; + +import cn.iocoder.yudao.framework.common.pojo.ImageVo; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.math.BigDecimal; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import javax.validation.constraints.*; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +/** + * 报价单物料中标 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ +@Data +public class QuotationSheetBiddingBaseVO { + + @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotNull(message = "状态不能为空") + private Integer status; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "物料明细", example = "27461") + private Long quotationDetailId; + + @Schema(description = "物料编码") + private String materialCode; + + @Schema(description = "物料id", example = "18066") + private Long materialId; + + @Schema(description = "物料名称", example = "芋艿") + private String materialName; + + @Schema(description = "供应商id", example = "2920") + private Long companyId; + + @Schema(description = "供应商名称", example = "李四") + private String companyName; + + @Schema(description = "产品单价", example = "32067") + private BigDecimal productPrice; + + @Schema(description = "产品模具费") + private BigDecimal moldCost; + + @Schema(description = "报价时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime quotationTime; + + @Schema(description = "是否中标") + private Integer isWin; + + @Schema(description = "附件", requiredMode = Schema.RequiredMode.REQUIRED) + private List files; + + @Schema(description = "流程实例的编号", example = "1130") + private Long processInstanceId; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingCreateReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingCreateReqVO.java new file mode 100644 index 00000000..71a24b4a --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingCreateReqVO.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.bs.controller.admin.quotationsheetbidding.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 QuotationSheetBiddingCreateReqVO extends QuotationSheetBiddingBaseVO { + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingExcelVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingExcelVO.java new file mode 100644 index 00000000..e7f48f2f --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingExcelVO.java @@ -0,0 +1,71 @@ +package cn.iocoder.yudao.module.bs.controller.admin.quotationsheetbidding.vo; + +import cn.iocoder.yudao.framework.common.pojo.ImageVo; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.math.BigDecimal; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import com.alibaba.excel.annotation.ExcelProperty; + +/** + * 报价单物料中标 Excel VO + * + * @author 芋道源码 + */ +@Data +public class QuotationSheetBiddingExcelVO { + + @ExcelProperty("主键") + private Long id; + + @ExcelProperty("状态") + private Integer status; + + @ExcelProperty("备注") + private String remark; + + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @ExcelProperty("物料明细") + private Long quotationDetailId; + + @ExcelProperty("物料编码") + private String materialCode; + + @ExcelProperty("物料id") + private Long materialId; + + @ExcelProperty("物料名称") + private String materialName; + + @ExcelProperty("供应商id") + private Long companyId; + + @ExcelProperty("供应商名称") + private String companyName; + + @ExcelProperty("产品单价") + private BigDecimal productPrice; + + @ExcelProperty("产品模具费") + private BigDecimal moldCost; + + @ExcelProperty("报价时间") + private LocalDateTime quotationTime; + + @ExcelProperty("是否中标") + private Integer isWin; + + @Schema(description = "附件", requiredMode = Schema.RequiredMode.REQUIRED) + private List files; + + @ExcelProperty("流程实例的编号") + private Long processInstanceId; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingExportReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingExportReqVO.java new file mode 100644 index 00000000..7862774e --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingExportReqVO.java @@ -0,0 +1,66 @@ +package cn.iocoder.yudao.module.bs.controller.admin.quotationsheetbidding.vo; + +import cn.iocoder.yudao.framework.common.pojo.ImageVo; +import lombok.*; + +import java.math.BigDecimal; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import java.time.LocalDateTime; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 报价单物料中标 Excel 导出 Request VO,参数和 QuotationSheetBiddingPageReqVO 是一致的") +@Data +public class QuotationSheetBiddingExportReqVO { + + @Schema(description = "状态", example = "2") + private Integer status; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "物料明细", example = "27461") + private Long quotationDetailId; + + @Schema(description = "物料编码") + private String materialCode; + + @Schema(description = "物料id", example = "18066") + private Long materialId; + + @Schema(description = "物料名称", example = "芋艿") + private String materialName; + + @Schema(description = "供应商id", example = "2920") + private Long companyId; + + @Schema(description = "供应商名称", example = "李四") + private String companyName; + + @Schema(description = "产品单价", example = "32067") + private BigDecimal productPrice; + + @Schema(description = "产品模具费") + private BigDecimal moldCost; + + @Schema(description = "报价时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] quotationTime; + + @Schema(description = "是否中标") + private Integer isWin; + + @Schema(description = "附件", requiredMode = Schema.RequiredMode.REQUIRED) + private List files; + + @Schema(description = "流程实例的编号", example = "1130") + private Long processInstanceId; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingPageReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingPageReqVO.java new file mode 100644 index 00000000..6dc280ac --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingPageReqVO.java @@ -0,0 +1,68 @@ +package cn.iocoder.yudao.module.bs.controller.admin.quotationsheetbidding.vo; + +import cn.iocoder.yudao.framework.common.pojo.ImageVo; +import lombok.*; + +import java.math.BigDecimal; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.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 QuotationSheetBiddingPageReqVO extends PageParam { + + @Schema(description = "状态", example = "2") + private Integer status; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "物料明细", example = "27461") + private Long quotationDetailId; + + @Schema(description = "物料编码") + private String materialCode; + + @Schema(description = "物料id", example = "18066") + private Long materialId; + + @Schema(description = "物料名称", example = "芋艿") + private String materialName; + + @Schema(description = "供应商id", example = "2920") + private Long companyId; + + @Schema(description = "供应商名称", example = "李四") + private String companyName; + + @Schema(description = "产品单价", example = "32067") + private BigDecimal productPrice; + + @Schema(description = "产品模具费") + private BigDecimal moldCost; + + @Schema(description = "报价时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] quotationTime; + + @Schema(description = "是否中标") + private Integer isWin; + + @Schema(description = "附件", requiredMode = Schema.RequiredMode.REQUIRED) + private List files; + + @Schema(description = "流程实例的编号", example = "1130") + private Long processInstanceId; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingRespVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingRespVO.java new file mode 100644 index 00000000..3c2f82b5 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingRespVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.bs.controller.admin.quotationsheetbidding.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 QuotationSheetBiddingRespVO extends QuotationSheetBiddingBaseVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "23976") + private Long id; + + @Schema(description = "创建时间") + private LocalDateTime createTime; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingUpdateReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingUpdateReqVO.java new file mode 100644 index 00000000..92687106 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetbidding/vo/QuotationSheetBiddingUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.bs.controller.admin.quotationsheetbidding.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 QuotationSheetBiddingUpdateReqVO extends QuotationSheetBiddingBaseVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "23976") + @NotNull(message = "主键不能为空") + private Long id; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/QuotationSheetDetailController.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/QuotationSheetDetailController.java new file mode 100644 index 00000000..9773a47f --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/QuotationSheetDetailController.java @@ -0,0 +1,102 @@ +package cn.iocoder.yudao.module.bs.controller.admin.quotationsheetdetail; + +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 cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.bs.controller.admin.quotationsheetdetail.vo.*; +import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheetdetail.QuotationSheetDetailDO; +import cn.iocoder.yudao.module.bs.convert.quotationsheetdetail.QuotationSheetDetailConvert; +import cn.iocoder.yudao.module.bs.service.quotationsheetdetail.QuotationSheetDetailService; + +@Tag(name = "管理后台 - 报价单物料明细") +@RestController +@RequestMapping("/bs/quotation-sheet-detail") +@Validated +public class QuotationSheetDetailController { + + @Resource + private QuotationSheetDetailService quotationSheetDetailService; + + @PostMapping("/create") + @Operation(summary = "创建报价单物料明细") + @PreAuthorize("@ss.hasPermission('bs:quotation-sheet-detail:create')") + public CommonResult createQuotationSheetDetail(@Valid @RequestBody QuotationSheetDetailCreateReqVO createReqVO) { + return success(quotationSheetDetailService.createQuotationSheetDetail(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新报价单物料明细") + @PreAuthorize("@ss.hasPermission('bs:quotation-sheet-detail:update')") + public CommonResult updateQuotationSheetDetail(@Valid @RequestBody QuotationSheetDetailUpdateReqVO updateReqVO) { + quotationSheetDetailService.updateQuotationSheetDetail(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除报价单物料明细") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('bs:quotation-sheet-detail:delete')") + public CommonResult deleteQuotationSheetDetail(@RequestParam("id") Long id) { + quotationSheetDetailService.deleteQuotationSheetDetail(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得报价单物料明细") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('bs:quotation-sheet-detail:query')") + public CommonResult getQuotationSheetDetail(@RequestParam("id") Long id) { + QuotationSheetDetailDO quotationSheetDetail = quotationSheetDetailService.getQuotationSheetDetail(id); + return success(QuotationSheetDetailConvert.INSTANCE.convert(quotationSheetDetail)); + } + + @GetMapping("/list") + @Operation(summary = "获得报价单物料明细列表") + @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") + @PreAuthorize("@ss.hasPermission('bs:quotation-sheet-detail:query')") + public CommonResult> getQuotationSheetDetailList(@RequestParam("ids") Collection ids) { + List list = quotationSheetDetailService.getQuotationSheetDetailList(ids); + return success(QuotationSheetDetailConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @Operation(summary = "获得报价单物料明细分页") + @PreAuthorize("@ss.hasPermission('bs:quotation-sheet-detail:query')") + public CommonResult> getQuotationSheetDetailPage(@Valid QuotationSheetDetailPageReqVO pageVO) { + PageResult pageResult = quotationSheetDetailService.getQuotationSheetDetailPage(pageVO); + return success(QuotationSheetDetailConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出报价单物料明细 Excel") + @PreAuthorize("@ss.hasPermission('bs:quotation-sheet-detail:export')") + @OperateLog(type = EXPORT) + public void exportQuotationSheetDetailExcel(@Valid QuotationSheetDetailExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = quotationSheetDetailService.getQuotationSheetDetailList(exportReqVO); + // 导出 Excel + List datas = QuotationSheetDetailConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, "报价单物料明细.xls", "数据", QuotationSheetDetailExcelVO.class, datas); + } + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailBaseVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailBaseVO.java new file mode 100644 index 00000000..bba513b7 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailBaseVO.java @@ -0,0 +1,45 @@ +package cn.iocoder.yudao.module.bs.controller.admin.quotationsheetdetail.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 QuotationSheetDetailBaseVO { + + @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotNull(message = "状态不能为空") + private Integer status; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "物料编码") + private String materialCode; + + @Schema(description = "物料ID", example = "14488") + private Long materialId; + + @Schema(description = "报价单Id ", example = "16022") + private Long companyId; + + @Schema(description = "规格") + private String desc; + + @Schema(description = "用量") + private Integer dosage; + + @Schema(description = "单位") + private Integer unti; + + @Schema(description = "材质") + private String quality; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailCreateReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailCreateReqVO.java new file mode 100644 index 00000000..d990aeb0 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailCreateReqVO.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.bs.controller.admin.quotationsheetdetail.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 QuotationSheetDetailCreateReqVO extends QuotationSheetDetailBaseVO { + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailExcelVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailExcelVO.java new file mode 100644 index 00000000..30c32484 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailExcelVO.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.bs.controller.admin.quotationsheetdetail.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 QuotationSheetDetailExcelVO { + + @ExcelProperty("主键") + private Long id; + + @ExcelProperty("状态") + private Integer status; + + @ExcelProperty("备注") + private String remark; + + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @ExcelProperty("物料编码") + private String materialCode; + + @ExcelProperty("物料ID") + private Long materialId; + + @ExcelProperty("报价单Id ") + private Long companyId; + + @ExcelProperty("规格") + private String desc; + + @ExcelProperty("用量") + private Integer dosage; + + @ExcelProperty("单位") + private Integer unti; + + @ExcelProperty("材质") + private String quality; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailExportReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailExportReqVO.java new file mode 100644 index 00000000..98fe7c27 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailExportReqVO.java @@ -0,0 +1,47 @@ +package cn.iocoder.yudao.module.bs.controller.admin.quotationsheetdetail.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import java.time.LocalDateTime; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 报价单物料明细 Excel 导出 Request VO,参数和 QuotationSheetDetailPageReqVO 是一致的") +@Data +public class QuotationSheetDetailExportReqVO { + + @Schema(description = "状态", example = "2") + private Integer status; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "物料编码") + private String materialCode; + + @Schema(description = "物料ID", example = "14488") + private Long materialId; + + @Schema(description = "报价单Id ", example = "16022") + private Long companyId; + + @Schema(description = "规格") + private String desc; + + @Schema(description = "用量") + private Integer dosage; + + @Schema(description = "单位") + private Integer unti; + + @Schema(description = "材质") + private String quality; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailPageReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailPageReqVO.java new file mode 100644 index 00000000..df26d8d2 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailPageReqVO.java @@ -0,0 +1,49 @@ +package cn.iocoder.yudao.module.bs.controller.admin.quotationsheetdetail.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.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 QuotationSheetDetailPageReqVO extends PageParam { + + @Schema(description = "状态", example = "2") + private Integer status; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "物料编码") + private String materialCode; + + @Schema(description = "物料ID", example = "14488") + private Long materialId; + + @Schema(description = "报价单Id ", example = "16022") + private Long companyId; + + @Schema(description = "规格") + private String desc; + + @Schema(description = "用量") + private Integer dosage; + + @Schema(description = "单位") + private Integer unti; + + @Schema(description = "材质") + private String quality; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailRespVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailRespVO.java new file mode 100644 index 00000000..455f5c25 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailRespVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.bs.controller.admin.quotationsheetdetail.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 QuotationSheetDetailRespVO extends QuotationSheetDetailBaseVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14295") + private Long id; + + @Schema(description = "创建时间") + private LocalDateTime createTime; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailUpdateReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailUpdateReqVO.java new file mode 100644 index 00000000..6e97e01b --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/quotationsheetdetail/vo/QuotationSheetDetailUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.bs.controller.admin.quotationsheetdetail.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 QuotationSheetDetailUpdateReqVO extends QuotationSheetDetailBaseVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14295") + @NotNull(message = "主键不能为空") + private Long id; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/suppliercompany/vo/SupplierCompanyBaseVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/suppliercompany/vo/SupplierCompanyBaseVO.java index cba329c1..6a0ee11f 100644 --- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/suppliercompany/vo/SupplierCompanyBaseVO.java +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/suppliercompany/vo/SupplierCompanyBaseVO.java @@ -21,7 +21,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ public class SupplierCompanyBaseVO { @Schema(description = "供应商企业名称", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "供应商企业名称不能为空") + @NotBlank(message = "供应商企业名称不能为空") private String companyAme; @Schema(description = "供应商编码", requiredMode = Schema.RequiredMode.REQUIRED) @@ -33,19 +33,19 @@ public class SupplierCompanyBaseVO { private Integer companyType; @Schema(description = "法人代表", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "法人代表不能为空") + @NotBlank(message = "法人代表不能为空") private String legalPerson; @Schema(description = "联系方式", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "联系方式不能为空") + @NotBlank(message = "联系方式不能为空") private String phone; @Schema(description = "统一社会信用代码", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "统一社会信用代码不能为空") + @NotBlank(message = "统一社会信用代码不能为空") private String creditCode; @Schema(description = "企业地址", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "企业地址不能为空") + @NotBlank(message = "企业地址不能为空") private String address; @Schema(description = "营业期限(起)", requiredMode = Schema.RequiredMode.REQUIRED) @@ -63,15 +63,15 @@ public class SupplierCompanyBaseVO { private Integer capital; @Schema(description = "银行户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") - @NotNull(message = "银行户名不能为空") + @NotBlank(message = "银行户名不能为空") private String bankName; @Schema(description = "银行账号", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "银行账号不能为空") + @NotBlank(message = "银行账号不能为空") private String bankNumber; @Schema(description = "开户行名称", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "开户行名称不能为空") + @NotBlank(message = "开户行名称不能为空") private String bankOfDeposit; @Schema(description = "是否注册", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/suppliercompany/vo/SupplierCompanyExportReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/suppliercompany/vo/SupplierCompanyExportReqVO.java index 607b922a..fc36b8f9 100644 --- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/suppliercompany/vo/SupplierCompanyExportReqVO.java +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/suppliercompany/vo/SupplierCompanyExportReqVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.bs.controller.admin.suppliercompany.vo; +import cn.iocoder.yudao.framework.common.pojo.ImageVo; import lombok.*; import java.util.*; import io.swagger.v3.oas.annotations.media.Schema; @@ -63,8 +64,13 @@ public class SupplierCompanyExportReqVO { @Schema(description = "备注", example = "随便") private String remark; - @Schema(description = "附件") - private String files; + @Schema(description = "附件", requiredMode = Schema.RequiredMode.REQUIRED) + private List files; + + /** + * 多租户编号 + */ + private Long tenantId; @Schema(description = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/suppliercompany/vo/SupplierCompanyPageReqVO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/suppliercompany/vo/SupplierCompanyPageReqVO.java index d9169159..19aefa06 100644 --- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/suppliercompany/vo/SupplierCompanyPageReqVO.java +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/controller/admin/suppliercompany/vo/SupplierCompanyPageReqVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.bs.controller.admin.suppliercompany.vo; +import cn.iocoder.yudao.framework.common.pojo.ImageVo; import lombok.*; import java.util.*; import io.swagger.v3.oas.annotations.media.Schema; @@ -65,8 +66,13 @@ public class SupplierCompanyPageReqVO extends PageParam { @Schema(description = "备注", example = "随便") private String remark; - @Schema(description = "附件") - private String files; + @Schema(description = "附件", requiredMode = Schema.RequiredMode.REQUIRED) + private List files; + + /** + * 多租户编号 + */ + private Long tenantId; @Schema(description = "创建时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/convert/materiel/MaterielConvert.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/convert/materiel/MaterielConvert.java new file mode 100644 index 00000000..80e2cc0d --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/convert/materiel/MaterielConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.bs.convert.materiel; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.bs.controller.admin.materiel.vo.*; +import cn.iocoder.yudao.module.bs.dal.dataobject.materiel.MaterielDO; + +/** + * 物料 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface MaterielConvert { + + MaterielConvert INSTANCE = Mappers.getMapper(MaterielConvert.class); + + MaterielDO convert(MaterielCreateReqVO bean); + + MaterielDO convert(MaterielUpdateReqVO bean); + + MaterielRespVO convert(MaterielDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/convert/quotationsheetbidding/QuotationSheetBiddingConvert.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/convert/quotationsheetbidding/QuotationSheetBiddingConvert.java new file mode 100644 index 00000000..66373495 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/convert/quotationsheetbidding/QuotationSheetBiddingConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.bs.convert.quotationsheetbidding; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.bs.controller.admin.quotationsheetbidding.vo.*; +import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheetbidding.QuotationSheetBiddingDO; + +/** + * 报价单物料中标 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface QuotationSheetBiddingConvert { + + QuotationSheetBiddingConvert INSTANCE = Mappers.getMapper(QuotationSheetBiddingConvert.class); + + QuotationSheetBiddingDO convert(QuotationSheetBiddingCreateReqVO bean); + + QuotationSheetBiddingDO convert(QuotationSheetBiddingUpdateReqVO bean); + + QuotationSheetBiddingRespVO convert(QuotationSheetBiddingDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/convert/quotationsheetdetail/QuotationSheetDetailConvert.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/convert/quotationsheetdetail/QuotationSheetDetailConvert.java new file mode 100644 index 00000000..6fe1fa72 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/convert/quotationsheetdetail/QuotationSheetDetailConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.bs.convert.quotationsheetdetail; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.bs.controller.admin.quotationsheetdetail.vo.*; +import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheetdetail.QuotationSheetDetailDO; + +/** + * 报价单物料明细 Convert + * + * @author 芋道源码 + */ +@Mapper +public interface QuotationSheetDetailConvert { + + QuotationSheetDetailConvert INSTANCE = Mappers.getMapper(QuotationSheetDetailConvert.class); + + QuotationSheetDetailDO convert(QuotationSheetDetailCreateReqVO bean); + + QuotationSheetDetailDO convert(QuotationSheetDetailUpdateReqVO bean); + + QuotationSheetDetailRespVO convert(QuotationSheetDetailDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/materiel/MaterielDO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/materiel/MaterielDO.java new file mode 100644 index 00000000..1bce4c2c --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/materiel/MaterielDO.java @@ -0,0 +1,71 @@ +package cn.iocoder.yudao.module.bs.dal.dataobject.materiel; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 物料 DO + * + * @author 芋道源码 + */ +@TableName(value = "bs_materiel", autoResultMap = true) +@KeySequence("bs_materiel_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class MaterielDO extends BaseDO { + + /** + * 主键 + */ + @TableId + private Long id; + /** + * 状态 + */ + private Integer status; + /** + * 备注 + */ + private String remark; + /** + * 物料编码 + */ + private String materielCode; + /** + * 物料名称 + */ + private String materielName; + /** + * 物料类型 + */ + private Integer materielType; + /** + * 单台用量 + */ + private Integer dosage; + /** + * 描述 + */ + private String description; + /** + * 单位 + */ + private Integer unit; + /** + * 材质 + */ + private String quality; + /** + * 扩展 + */ + private String extend; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/quotationsheet/QuotationSheetDO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/quotationsheet/QuotationSheetDO.java index 9c647a5b..ebbe56a1 100644 --- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/quotationsheet/QuotationSheetDO.java +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/quotationsheet/QuotationSheetDO.java @@ -1,6 +1,9 @@ package cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheet; +import cn.iocoder.yudao.framework.common.pojo.ImageVo; import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; +import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.util.*; import java.time.LocalDateTime; @@ -17,7 +20,7 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; * * @author 芋道源码 */ -@TableName("bs_quotation_sheet") +@TableName(value = "bs_quotation_sheet", autoResultMap = true) @KeySequence("bs_quotation_sheet_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 @Data @EqualsAndHashCode(callSuper = true) @@ -39,7 +42,8 @@ public class QuotationSheetDO extends TenantBaseDO { /** * 附件 */ - private String files; + @TableField(typeHandler = JacksonTypeHandler.class) + private List files; /** * 报价编号 */ diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/quotationsheetbidding/QuotationSheetBiddingDO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/quotationsheetbidding/QuotationSheetBiddingDO.java new file mode 100644 index 00000000..edc5144e --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/quotationsheetbidding/QuotationSheetBiddingDO.java @@ -0,0 +1,94 @@ +package cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheetbidding; + +import cn.iocoder.yudao.framework.common.pojo.ImageVo; +import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.math.BigDecimal; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 报价单物料中标 DO + * + * @author 芋道源码 + */ +@TableName(value = "bs_quotation_sheet_bidding", autoResultMap = true) +@KeySequence("bs_quotation_sheet_bidding_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class QuotationSheetBiddingDO extends BaseDO { + + /** + * 主键 + */ + @TableId + private Long id; + /** + * 状态 + */ + private Integer status; + /** + * 备注 + */ + private String remark; + /** + * 物料明细 + */ + private Long quotationDetailId; + /** + * 物料编码 + */ + private String materialCode; + /** + * 物料id + */ + private Long materialId; + /** + * 物料名称 + */ + private String materialName; + /** + * 供应商id + */ + private Long companyId; + /** + * 供应商名称 + */ + private String companyName; + /** + * 产品单价 + */ + private BigDecimal productPrice; + /** + * 产品模具费 + */ + private BigDecimal moldCost; + /** + * 报价时间 + */ + private LocalDateTime quotationTime; + /** + * 是否中标 + */ + private Integer isWin; + /** + * 附件 + */ + @TableField(typeHandler = JacksonTypeHandler.class) + private List files; + /** + * 流程实例的编号 + */ + private Long processInstanceId; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/quotationsheetdetail/QuotationSheetDetailDO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/quotationsheetdetail/QuotationSheetDetailDO.java new file mode 100644 index 00000000..127e5c40 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/quotationsheetdetail/QuotationSheetDetailDO.java @@ -0,0 +1,67 @@ +package cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheetdetail; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 报价单物料明细 DO + * + * @author 芋道源码 + */ +@TableName("bs_quotation_sheet_detail") +@KeySequence("bs_quotation_sheet_detail_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class QuotationSheetDetailDO extends BaseDO { + + /** + * 主键 + */ + @TableId + private Long id; + /** + * 状态 + */ + private Integer status; + /** + * 备注 + */ + private String remark; + /** + * 物料编码 + */ + private String materialCode; + /** + * 物料ID + */ + private Long materialId; + /** + * 报价单Id + */ + private Long companyId; + /** + * 规格 + */ + private String desc; + /** + * 用量 + */ + private Integer dosage; + /** + * 单位 + */ + private Integer unti; + /** + * 材质 + */ + private String quality; + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/suppliercompany/SupplierCompanyDO.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/suppliercompany/SupplierCompanyDO.java index e12b8dea..3676bd58 100644 --- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/suppliercompany/SupplierCompanyDO.java +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/dataobject/suppliercompany/SupplierCompanyDO.java @@ -106,6 +106,11 @@ public class SupplierCompanyDO extends TenantBaseDO { */ private Long tenantId; + /** + * 部门id + */ + private Long deptId; + /** * 附件 */ diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/materiel/MaterielMapper.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/materiel/MaterielMapper.java new file mode 100644 index 00000000..33ac2b00 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/materiel/MaterielMapper.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.bs.dal.mysql.materiel; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.bs.dal.dataobject.materiel.MaterielDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.bs.controller.admin.materiel.vo.*; + +/** + * 物料 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface MaterielMapper extends BaseMapperX { + + default PageResult selectPage(MaterielPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(MaterielDO::getStatus, reqVO.getStatus()) + .eqIfPresent(MaterielDO::getRemark, reqVO.getRemark()) + .betweenIfPresent(MaterielDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(MaterielDO::getMaterielCode, reqVO.getMaterielCode()) + .likeIfPresent(MaterielDO::getMaterielName, reqVO.getMaterielName()) + .eqIfPresent(MaterielDO::getMaterielType, reqVO.getMaterielType()) + .eqIfPresent(MaterielDO::getDosage, reqVO.getDosage()) + .eqIfPresent(MaterielDO::getDescription, reqVO.getDescription()) + .eqIfPresent(MaterielDO::getUnit, reqVO.getUnit()) + .eqIfPresent(MaterielDO::getQuality, reqVO.getQuality()) + .eqIfPresent(MaterielDO::getExtend, reqVO.getExtend()) + .orderByDesc(MaterielDO::getId)); + } + + default List selectList(MaterielExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(MaterielDO::getStatus, reqVO.getStatus()) + .eqIfPresent(MaterielDO::getRemark, reqVO.getRemark()) + .betweenIfPresent(MaterielDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(MaterielDO::getMaterielCode, reqVO.getMaterielCode()) + .likeIfPresent(MaterielDO::getMaterielName, reqVO.getMaterielName()) + .eqIfPresent(MaterielDO::getMaterielType, reqVO.getMaterielType()) + .eqIfPresent(MaterielDO::getDosage, reqVO.getDosage()) + .eqIfPresent(MaterielDO::getDescription, reqVO.getDescription()) + .eqIfPresent(MaterielDO::getUnit, reqVO.getUnit()) + .eqIfPresent(MaterielDO::getQuality, reqVO.getQuality()) + .eqIfPresent(MaterielDO::getExtend, reqVO.getExtend()) + .orderByDesc(MaterielDO::getId)); + } + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/quotationsheet/QuotationSheetMapper.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/quotationsheet/QuotationSheetMapper.java index 6adcfa6f..1fd4d478 100644 --- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/quotationsheet/QuotationSheetMapper.java +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/quotationsheet/QuotationSheetMapper.java @@ -20,7 +20,7 @@ public interface QuotationSheetMapper extends BaseMapperX { default PageResult selectPage(QuotationSheetPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .eqIfPresent(QuotationSheetDO::getRemark, reqVO.getRemark()) - .eqIfPresent(QuotationSheetDO::getFiles, reqVO.getFiles()) +// .eqIfPresent(QuotationSheetDO::getFiles, reqVO.getFiles()) .betweenIfPresent(QuotationSheetDO::getCreateTime, reqVO.getCreateTime()) .eqIfPresent(QuotationSheetDO::getNumber, reqVO.getNumber()) .eqIfPresent(QuotationSheetDO::getType, reqVO.getType()) @@ -53,7 +53,7 @@ public interface QuotationSheetMapper extends BaseMapperX { default List selectList(QuotationSheetExportReqVO reqVO) { return selectList(new LambdaQueryWrapperX() .eqIfPresent(QuotationSheetDO::getRemark, reqVO.getRemark()) - .eqIfPresent(QuotationSheetDO::getFiles, reqVO.getFiles()) +// .eqIfPresent(QuotationSheetDO::getFiles, reqVO.getFiles()) .betweenIfPresent(QuotationSheetDO::getCreateTime, reqVO.getCreateTime()) .eqIfPresent(QuotationSheetDO::getNumber, reqVO.getNumber()) .eqIfPresent(QuotationSheetDO::getType, reqVO.getType()) diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/quotationsheetbidding/QuotationSheetBiddingMapper.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/quotationsheetbidding/QuotationSheetBiddingMapper.java new file mode 100644 index 00000000..835b4e60 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/quotationsheetbidding/QuotationSheetBiddingMapper.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.module.bs.dal.mysql.quotationsheetbidding; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheetbidding.QuotationSheetBiddingDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.bs.controller.admin.quotationsheetbidding.vo.*; + +/** + * 报价单物料中标 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface QuotationSheetBiddingMapper extends BaseMapperX { + + default PageResult selectPage(QuotationSheetBiddingPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(QuotationSheetBiddingDO::getStatus, reqVO.getStatus()) + .eqIfPresent(QuotationSheetBiddingDO::getRemark, reqVO.getRemark()) + .betweenIfPresent(QuotationSheetBiddingDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(QuotationSheetBiddingDO::getQuotationDetailId, reqVO.getQuotationDetailId()) + .eqIfPresent(QuotationSheetBiddingDO::getMaterialCode, reqVO.getMaterialCode()) + .eqIfPresent(QuotationSheetBiddingDO::getMaterialId, reqVO.getMaterialId()) + .likeIfPresent(QuotationSheetBiddingDO::getMaterialName, reqVO.getMaterialName()) + .eqIfPresent(QuotationSheetBiddingDO::getCompanyId, reqVO.getCompanyId()) + .likeIfPresent(QuotationSheetBiddingDO::getCompanyName, reqVO.getCompanyName()) + .eqIfPresent(QuotationSheetBiddingDO::getProductPrice, reqVO.getProductPrice()) + .eqIfPresent(QuotationSheetBiddingDO::getMoldCost, reqVO.getMoldCost()) + .betweenIfPresent(QuotationSheetBiddingDO::getQuotationTime, reqVO.getQuotationTime()) + .eqIfPresent(QuotationSheetBiddingDO::getIsWin, reqVO.getIsWin()) + .eqIfPresent(QuotationSheetBiddingDO::getFiles, reqVO.getFiles()) + .eqIfPresent(QuotationSheetBiddingDO::getProcessInstanceId, reqVO.getProcessInstanceId()) + .orderByDesc(QuotationSheetBiddingDO::getId)); + } + + default List selectList(QuotationSheetBiddingExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(QuotationSheetBiddingDO::getStatus, reqVO.getStatus()) + .eqIfPresent(QuotationSheetBiddingDO::getRemark, reqVO.getRemark()) + .betweenIfPresent(QuotationSheetBiddingDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(QuotationSheetBiddingDO::getQuotationDetailId, reqVO.getQuotationDetailId()) + .eqIfPresent(QuotationSheetBiddingDO::getMaterialCode, reqVO.getMaterialCode()) + .eqIfPresent(QuotationSheetBiddingDO::getMaterialId, reqVO.getMaterialId()) + .likeIfPresent(QuotationSheetBiddingDO::getMaterialName, reqVO.getMaterialName()) + .eqIfPresent(QuotationSheetBiddingDO::getCompanyId, reqVO.getCompanyId()) + .likeIfPresent(QuotationSheetBiddingDO::getCompanyName, reqVO.getCompanyName()) + .eqIfPresent(QuotationSheetBiddingDO::getProductPrice, reqVO.getProductPrice()) + .eqIfPresent(QuotationSheetBiddingDO::getMoldCost, reqVO.getMoldCost()) + .betweenIfPresent(QuotationSheetBiddingDO::getQuotationTime, reqVO.getQuotationTime()) + .eqIfPresent(QuotationSheetBiddingDO::getIsWin, reqVO.getIsWin()) + .eqIfPresent(QuotationSheetBiddingDO::getFiles, reqVO.getFiles()) + .eqIfPresent(QuotationSheetBiddingDO::getProcessInstanceId, reqVO.getProcessInstanceId()) + .orderByDesc(QuotationSheetBiddingDO::getId)); + } + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/quotationsheetdetail/QuotationSheetDetailMapper.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/quotationsheetdetail/QuotationSheetDetailMapper.java new file mode 100644 index 00000000..3dd2949a --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/quotationsheetdetail/QuotationSheetDetailMapper.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.bs.dal.mysql.quotationsheetdetail; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheetdetail.QuotationSheetDetailDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.bs.controller.admin.quotationsheetdetail.vo.*; + +/** + * 报价单物料明细 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface QuotationSheetDetailMapper extends BaseMapperX { + + default PageResult selectPage(QuotationSheetDetailPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(QuotationSheetDetailDO::getStatus, reqVO.getStatus()) + .eqIfPresent(QuotationSheetDetailDO::getRemark, reqVO.getRemark()) + .betweenIfPresent(QuotationSheetDetailDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(QuotationSheetDetailDO::getMaterialCode, reqVO.getMaterialCode()) + .eqIfPresent(QuotationSheetDetailDO::getMaterialId, reqVO.getMaterialId()) + .eqIfPresent(QuotationSheetDetailDO::getCompanyId, reqVO.getCompanyId()) + .eqIfPresent(QuotationSheetDetailDO::getDesc, reqVO.getDesc()) + .eqIfPresent(QuotationSheetDetailDO::getDosage, reqVO.getDosage()) + .eqIfPresent(QuotationSheetDetailDO::getUnti, reqVO.getUnti()) + .eqIfPresent(QuotationSheetDetailDO::getQuality, reqVO.getQuality()) + .orderByDesc(QuotationSheetDetailDO::getId)); + } + + default List selectList(QuotationSheetDetailExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(QuotationSheetDetailDO::getStatus, reqVO.getStatus()) + .eqIfPresent(QuotationSheetDetailDO::getRemark, reqVO.getRemark()) + .betweenIfPresent(QuotationSheetDetailDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(QuotationSheetDetailDO::getMaterialCode, reqVO.getMaterialCode()) + .eqIfPresent(QuotationSheetDetailDO::getMaterialId, reqVO.getMaterialId()) + .eqIfPresent(QuotationSheetDetailDO::getCompanyId, reqVO.getCompanyId()) + .eqIfPresent(QuotationSheetDetailDO::getDesc, reqVO.getDesc()) + .eqIfPresent(QuotationSheetDetailDO::getDosage, reqVO.getDosage()) + .eqIfPresent(QuotationSheetDetailDO::getUnti, reqVO.getUnti()) + .eqIfPresent(QuotationSheetDetailDO::getQuality, reqVO.getQuality()) + .orderByDesc(QuotationSheetDetailDO::getId)); + } + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/suppliercompany/SupplierCompanyMapper.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/suppliercompany/SupplierCompanyMapper.java index 084ff074..fce4131c 100644 --- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/suppliercompany/SupplierCompanyMapper.java +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/dal/mysql/suppliercompany/SupplierCompanyMapper.java @@ -35,6 +35,7 @@ public interface SupplierCompanyMapper extends BaseMapperX { .eqIfPresent(SupplierCompanyDO::getIsRegister, reqVO.getIsRegister()) .eqIfPresent(SupplierCompanyDO::getStatus, reqVO.getStatus()) .eqIfPresent(SupplierCompanyDO::getRemark, reqVO.getRemark()) + .eqIfPresent(SupplierCompanyDO::getTenantId, reqVO.getTenantId()) .eqIfPresent(SupplierCompanyDO::getFiles, reqVO.getFiles()) .betweenIfPresent(SupplierCompanyDO::getCreateTime, reqVO.getCreateTime()) .orderByDesc(SupplierCompanyDO::getId)); @@ -59,6 +60,7 @@ public interface SupplierCompanyMapper extends BaseMapperX { .eqIfPresent(SupplierCompanyDO::getStatus, reqVO.getStatus()) .eqIfPresent(SupplierCompanyDO::getRemark, reqVO.getRemark()) .eqIfPresent(SupplierCompanyDO::getFiles, reqVO.getFiles()) + .eqIfPresent(SupplierCompanyDO::getTenantId, reqVO.getTenantId()) .betweenIfPresent(SupplierCompanyDO::getCreateTime, reqVO.getCreateTime()) .orderByDesc(SupplierCompanyDO::getId)); } diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/materiel/MaterielService.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/materiel/MaterielService.java new file mode 100644 index 00000000..f518d577 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/materiel/MaterielService.java @@ -0,0 +1,71 @@ +package cn.iocoder.yudao.module.bs.service.materiel; + +import java.util.*; +import javax.validation.*; +import cn.iocoder.yudao.module.bs.controller.admin.materiel.vo.*; +import cn.iocoder.yudao.module.bs.dal.dataobject.materiel.MaterielDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import com.github.yulichang.base.MPJBaseService; + +/** + * 物料 Service 接口 + * + * @author 芋道源码 + */ +public interface MaterielService extends MPJBaseService { + + /** + * 创建物料 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createMateriel(@Valid MaterielCreateReqVO createReqVO); + + /** + * 更新物料 + * + * @param updateReqVO 更新信息 + */ + void updateMateriel(@Valid MaterielUpdateReqVO updateReqVO); + + /** + * 删除物料 + * + * @param id 编号 + */ + void deleteMateriel(Long id); + + /** + * 获得物料 + * + * @param id 编号 + * @return 物料 + */ + MaterielDO getMateriel(Long id); + + /** + * 获得物料列表 + * + * @param ids 编号 + * @return 物料列表 + */ + List getMaterielList(Collection ids); + + /** + * 获得物料分页 + * + * @param pageReqVO 分页查询 + * @return 物料分页 + */ + PageResult getMaterielPage(MaterielPageReqVO pageReqVO); + + /** + * 获得物料列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 物料列表 + */ + List getMaterielList(MaterielExportReqVO exportReqVO); + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/materiel/MaterielServiceImpl.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/materiel/MaterielServiceImpl.java new file mode 100644 index 00000000..85d3a5ee --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/materiel/MaterielServiceImpl.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.bs.service.materiel; + +import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheet.QuotationSheetDO; +import cn.iocoder.yudao.module.bs.dal.mysql.quotationsheet.QuotationSheetMapper; +import com.github.yulichang.base.MPJBaseServiceImpl; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.bs.controller.admin.materiel.vo.*; +import cn.iocoder.yudao.module.bs.dal.dataobject.materiel.MaterielDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.bs.convert.materiel.MaterielConvert; +import cn.iocoder.yudao.module.bs.dal.mysql.materiel.MaterielMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.bs.enums.ErrorCodeConstants.*; + +/** + * 物料 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class MaterielServiceImpl extends MPJBaseServiceImpl implements MaterielService { + + @Resource + private MaterielMapper materielMapper; + + @Override + public Long createMateriel(MaterielCreateReqVO createReqVO) { + // 插入 + MaterielDO materiel = MaterielConvert.INSTANCE.convert(createReqVO); + materielMapper.insert(materiel); + // 返回 + return materiel.getId(); + } + + @Override + public void updateMateriel(MaterielUpdateReqVO updateReqVO) { + // 校验存在 + validateMaterielExists(updateReqVO.getId()); + // 更新 + MaterielDO updateObj = MaterielConvert.INSTANCE.convert(updateReqVO); + materielMapper.updateById(updateObj); + } + + @Override + public void deleteMateriel(Long id) { + // 校验存在 + validateMaterielExists(id); + // 删除 + materielMapper.deleteById(id); + } + + private void validateMaterielExists(Long id) { + if (materielMapper.selectById(id) == null) { + throw exception(MATERIEL_NOT_EXISTS); + } + } + + @Override + public MaterielDO getMateriel(Long id) { + return materielMapper.selectById(id); + } + + @Override + public List getMaterielList(Collection ids) { + return materielMapper.selectBatchIds(ids); + } + + @Override + public PageResult getMaterielPage(MaterielPageReqVO pageReqVO) { + return materielMapper.selectPage(pageReqVO); + } + + @Override + public List getMaterielList(MaterielExportReqVO exportReqVO) { + return materielMapper.selectList(exportReqVO); + } + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheetbidding/QuotationSheetBiddingService.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheetbidding/QuotationSheetBiddingService.java new file mode 100644 index 00000000..ff1e879f --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheetbidding/QuotationSheetBiddingService.java @@ -0,0 +1,72 @@ +package cn.iocoder.yudao.module.bs.service.quotationsheetbidding; + +import java.util.*; +import javax.validation.*; +import cn.iocoder.yudao.module.bs.controller.admin.quotationsheetbidding.vo.*; +import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheetbidding.QuotationSheetBiddingDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.bs.dal.dataobject.suppliercompany.SupplierCompanyDO; +import com.github.yulichang.base.MPJBaseService; + +/** + * 报价单物料中标 Service 接口 + * + * @author 芋道源码 + */ +public interface QuotationSheetBiddingService extends MPJBaseService{ + + /** + * 创建报价单物料中标 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createQuotationSheetBidding(@Valid QuotationSheetBiddingCreateReqVO createReqVO); + + /** + * 更新报价单物料中标 + * + * @param updateReqVO 更新信息 + */ + void updateQuotationSheetBidding(@Valid QuotationSheetBiddingUpdateReqVO updateReqVO); + + /** + * 删除报价单物料中标 + * + * @param id 编号 + */ + void deleteQuotationSheetBidding(Long id); + + /** + * 获得报价单物料中标 + * + * @param id 编号 + * @return 报价单物料中标 + */ + QuotationSheetBiddingDO getQuotationSheetBidding(Long id); + + /** + * 获得报价单物料中标列表 + * + * @param ids 编号 + * @return 报价单物料中标列表 + */ + List getQuotationSheetBiddingList(Collection ids); + + /** + * 获得报价单物料中标分页 + * + * @param pageReqVO 分页查询 + * @return 报价单物料中标分页 + */ + PageResult getQuotationSheetBiddingPage(QuotationSheetBiddingPageReqVO pageReqVO); + + /** + * 获得报价单物料中标列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 报价单物料中标列表 + */ + List getQuotationSheetBiddingList(QuotationSheetBiddingExportReqVO exportReqVO); + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheetbidding/QuotationSheetBiddingServiceImpl.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheetbidding/QuotationSheetBiddingServiceImpl.java new file mode 100644 index 00000000..1926d987 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheetbidding/QuotationSheetBiddingServiceImpl.java @@ -0,0 +1,85 @@ +package cn.iocoder.yudao.module.bs.service.quotationsheetbidding; + +import cn.iocoder.yudao.module.bs.dal.dataobject.suppliercompany.SupplierCompanyDO; +import cn.iocoder.yudao.module.bs.dal.mysql.suppliercompany.SupplierCompanyMapper; +import com.github.yulichang.base.MPJBaseServiceImpl; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.bs.controller.admin.quotationsheetbidding.vo.*; +import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheetbidding.QuotationSheetBiddingDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.bs.convert.quotationsheetbidding.QuotationSheetBiddingConvert; +import cn.iocoder.yudao.module.bs.dal.mysql.quotationsheetbidding.QuotationSheetBiddingMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.bs.enums.ErrorCodeConstants.*; + +/** + * 报价单物料中标 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class QuotationSheetBiddingServiceImpl extends MPJBaseServiceImpl implements QuotationSheetBiddingService { + + @Resource + private QuotationSheetBiddingMapper quotationSheetBiddingMapper; + + @Override + public Long createQuotationSheetBidding(QuotationSheetBiddingCreateReqVO createReqVO) { + // 插入 + QuotationSheetBiddingDO quotationSheetBidding = QuotationSheetBiddingConvert.INSTANCE.convert(createReqVO); + quotationSheetBiddingMapper.insert(quotationSheetBidding); + // 返回 + return quotationSheetBidding.getId(); + } + + @Override + public void updateQuotationSheetBidding(QuotationSheetBiddingUpdateReqVO updateReqVO) { + // 校验存在 + validateQuotationSheetBiddingExists(updateReqVO.getId()); + // 更新 + QuotationSheetBiddingDO updateObj = QuotationSheetBiddingConvert.INSTANCE.convert(updateReqVO); + quotationSheetBiddingMapper.updateById(updateObj); + } + + @Override + public void deleteQuotationSheetBidding(Long id) { + // 校验存在 + validateQuotationSheetBiddingExists(id); + // 删除 + quotationSheetBiddingMapper.deleteById(id); + } + + private void validateQuotationSheetBiddingExists(Long id) { + if (quotationSheetBiddingMapper.selectById(id) == null) { + throw exception(QUOTATION_SHEET_BIDDING_NOT_EXISTS); + } + } + + @Override + public QuotationSheetBiddingDO getQuotationSheetBidding(Long id) { + return quotationSheetBiddingMapper.selectById(id); + } + + @Override + public List getQuotationSheetBiddingList(Collection ids) { + return quotationSheetBiddingMapper.selectBatchIds(ids); + } + + @Override + public PageResult getQuotationSheetBiddingPage(QuotationSheetBiddingPageReqVO pageReqVO) { + return quotationSheetBiddingMapper.selectPage(pageReqVO); + } + + @Override + public List getQuotationSheetBiddingList(QuotationSheetBiddingExportReqVO exportReqVO) { + return quotationSheetBiddingMapper.selectList(exportReqVO); + } + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheetdetail/QuotationSheetDetailService.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheetdetail/QuotationSheetDetailService.java new file mode 100644 index 00000000..6a03eb31 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheetdetail/QuotationSheetDetailService.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.bs.service.quotationsheetdetail; + +import java.util.*; +import javax.validation.*; +import cn.iocoder.yudao.module.bs.controller.admin.quotationsheetdetail.vo.*; +import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheetdetail.QuotationSheetDetailDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * 报价单物料明细 Service 接口 + * + * @author 芋道源码 + */ +public interface QuotationSheetDetailService { + + /** + * 创建报价单物料明细 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createQuotationSheetDetail(@Valid QuotationSheetDetailCreateReqVO createReqVO); + + /** + * 更新报价单物料明细 + * + * @param updateReqVO 更新信息 + */ + void updateQuotationSheetDetail(@Valid QuotationSheetDetailUpdateReqVO updateReqVO); + + /** + * 删除报价单物料明细 + * + * @param id 编号 + */ + void deleteQuotationSheetDetail(Long id); + + /** + * 获得报价单物料明细 + * + * @param id 编号 + * @return 报价单物料明细 + */ + QuotationSheetDetailDO getQuotationSheetDetail(Long id); + + /** + * 获得报价单物料明细列表 + * + * @param ids 编号 + * @return 报价单物料明细列表 + */ + List getQuotationSheetDetailList(Collection ids); + + /** + * 获得报价单物料明细分页 + * + * @param pageReqVO 分页查询 + * @return 报价单物料明细分页 + */ + PageResult getQuotationSheetDetailPage(QuotationSheetDetailPageReqVO pageReqVO); + + /** + * 获得报价单物料明细列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 报价单物料明细列表 + */ + List getQuotationSheetDetailList(QuotationSheetDetailExportReqVO exportReqVO); + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheetdetail/QuotationSheetDetailServiceImpl.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheetdetail/QuotationSheetDetailServiceImpl.java new file mode 100644 index 00000000..89cf2431 --- /dev/null +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/quotationsheetdetail/QuotationSheetDetailServiceImpl.java @@ -0,0 +1,82 @@ +package cn.iocoder.yudao.module.bs.service.quotationsheetdetail; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.bs.controller.admin.quotationsheetdetail.vo.*; +import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheetdetail.QuotationSheetDetailDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.bs.convert.quotationsheetdetail.QuotationSheetDetailConvert; +import cn.iocoder.yudao.module.bs.dal.mysql.quotationsheetdetail.QuotationSheetDetailMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.bs.enums.ErrorCodeConstants.*; + +/** + * 报价单物料明细 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class QuotationSheetDetailServiceImpl implements QuotationSheetDetailService { + + @Resource + private QuotationSheetDetailMapper quotationSheetDetailMapper; + + @Override + public Long createQuotationSheetDetail(QuotationSheetDetailCreateReqVO createReqVO) { + // 插入 + QuotationSheetDetailDO quotationSheetDetail = QuotationSheetDetailConvert.INSTANCE.convert(createReqVO); + quotationSheetDetailMapper.insert(quotationSheetDetail); + // 返回 + return quotationSheetDetail.getId(); + } + + @Override + public void updateQuotationSheetDetail(QuotationSheetDetailUpdateReqVO updateReqVO) { + // 校验存在 + validateQuotationSheetDetailExists(updateReqVO.getId()); + // 更新 + QuotationSheetDetailDO updateObj = QuotationSheetDetailConvert.INSTANCE.convert(updateReqVO); + quotationSheetDetailMapper.updateById(updateObj); + } + + @Override + public void deleteQuotationSheetDetail(Long id) { + // 校验存在 + validateQuotationSheetDetailExists(id); + // 删除 + quotationSheetDetailMapper.deleteById(id); + } + + private void validateQuotationSheetDetailExists(Long id) { + if (quotationSheetDetailMapper.selectById(id) == null) { + throw exception(QUOTATION_SHEET_DETAIL_NOT_EXISTS); + } + } + + @Override + public QuotationSheetDetailDO getQuotationSheetDetail(Long id) { + return quotationSheetDetailMapper.selectById(id); + } + + @Override + public List getQuotationSheetDetailList(Collection ids) { + return quotationSheetDetailMapper.selectBatchIds(ids); + } + + @Override + public PageResult getQuotationSheetDetailPage(QuotationSheetDetailPageReqVO pageReqVO) { + return quotationSheetDetailMapper.selectPage(pageReqVO); + } + + @Override + public List getQuotationSheetDetailList(QuotationSheetDetailExportReqVO exportReqVO) { + return quotationSheetDetailMapper.selectList(exportReqVO); + } + +} diff --git a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/suppliercompany/SupplierCompanyServiceImpl.java b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/suppliercompany/SupplierCompanyServiceImpl.java index 871334f0..347198f8 100644 --- a/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/suppliercompany/SupplierCompanyServiceImpl.java +++ b/yudao-module-bs/yudao-module-bs-biz/src/main/java/cn/iocoder/yudao/module/bs/service/suppliercompany/SupplierCompanyServiceImpl.java @@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.bs.service.suppliercompany; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.UserCreateReqDTO; -import cn.iocoder.yudao.module.bs.dal.dataobject.quotationsheet.QuotationSheetDO; -import cn.iocoder.yudao.module.bs.dal.mysql.quotationsheet.QuotationSheetMapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.yulichang.base.MPJBaseServiceImpl; import org.springframework.stereotype.Service; @@ -23,6 +21,7 @@ import cn.iocoder.yudao.module.bs.convert.suppliercompany.SupplierCompanyConvert import cn.iocoder.yudao.module.bs.dal.mysql.suppliercompany.SupplierCompanyMapper; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUser; import static cn.iocoder.yudao.module.bs.enums.ErrorCodeConstants.*; /** @@ -55,7 +54,10 @@ public class SupplierCompanyServiceImpl extends MPJBaseServiceImpl