采购单 报价单 物料
parent
c52767dfa0
commit
282288bd82
@ -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<Long> createMateriel(@Valid @RequestBody MaterielCreateReqVO createReqVO) {
|
||||
return success(materielService.createMateriel(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新物料")
|
||||
@PreAuthorize("@ss.hasPermission('bs:materiel:update')")
|
||||
public CommonResult<Boolean> 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<Boolean> 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<MaterielRespVO> 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<List<MaterielRespVO>> getMaterielList(@RequestParam("ids") Collection<Long> ids) {
|
||||
List<MaterielDO> list = materielService.getMaterielList(ids);
|
||||
return success(MaterielConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得物料分页")
|
||||
@PreAuthorize("@ss.hasPermission('bs:materiel:query')")
|
||||
public CommonResult<PageResult<MaterielRespVO>> getMaterielPage(@Valid MaterielPageReqVO pageVO) {
|
||||
PageResult<MaterielDO> 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<MaterielDO> list = materielService.getMaterielList(exportReqVO);
|
||||
// 导出 Excel
|
||||
List<MaterielExcelVO> datas = MaterielConvert.INSTANCE.convertList02(list);
|
||||
ExcelUtils.write(response, "物料.xls", "数据", MaterielExcelVO.class, datas);
|
||||
}
|
||||
|
||||
}
|
@ -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 {
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
@ -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<Long> createQuotationSheetBidding(@Valid @RequestBody QuotationSheetBiddingCreateReqVO createReqVO) {
|
||||
return success(quotationSheetBiddingService.createQuotationSheetBidding(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新报价单物料中标")
|
||||
@PreAuthorize("@ss.hasPermission('bs:quotation-sheet-bidding:update')")
|
||||
public CommonResult<Boolean> 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<Boolean> 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<QuotationSheetBiddingRespVO> 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<List<QuotationSheetBiddingRespVO>> getQuotationSheetBiddingList(@RequestParam("ids") Collection<Long> ids) {
|
||||
List<QuotationSheetBiddingDO> list = quotationSheetBiddingService.getQuotationSheetBiddingList(ids);
|
||||
return success(QuotationSheetBiddingConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得报价单物料中标分页")
|
||||
@PreAuthorize("@ss.hasPermission('bs:quotation-sheet-bidding:query')")
|
||||
public CommonResult<PageResult<QuotationSheetBiddingRespVO>> getQuotationSheetBiddingPage(@Valid QuotationSheetBiddingPageReqVO pageVO) {
|
||||
PageResult<QuotationSheetBiddingDO> 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<QuotationSheetBiddingDO> list = quotationSheetBiddingService.getQuotationSheetBiddingList(exportReqVO);
|
||||
// 导出 Excel
|
||||
List<QuotationSheetBiddingExcelVO> datas = QuotationSheetBiddingConvert.INSTANCE.convertList02(list);
|
||||
ExcelUtils.write(response, "报价单物料中标.xls", "数据", QuotationSheetBiddingExcelVO.class, datas);
|
||||
}
|
||||
|
||||
}
|
@ -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 {
|
||||
|
||||
}
|
@ -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<ImageVo> files;
|
||||
|
||||
@ExcelProperty("流程实例的编号")
|
||||
private Long processInstanceId;
|
||||
|
||||
}
|
@ -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<ImageVo> files;
|
||||
|
||||
@Schema(description = "流程实例的编号", example = "1130")
|
||||
private Long processInstanceId;
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
@ -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<Long> createQuotationSheetDetail(@Valid @RequestBody QuotationSheetDetailCreateReqVO createReqVO) {
|
||||
return success(quotationSheetDetailService.createQuotationSheetDetail(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新报价单物料明细")
|
||||
@PreAuthorize("@ss.hasPermission('bs:quotation-sheet-detail:update')")
|
||||
public CommonResult<Boolean> 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<Boolean> 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<QuotationSheetDetailRespVO> 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<List<QuotationSheetDetailRespVO>> getQuotationSheetDetailList(@RequestParam("ids") Collection<Long> ids) {
|
||||
List<QuotationSheetDetailDO> list = quotationSheetDetailService.getQuotationSheetDetailList(ids);
|
||||
return success(QuotationSheetDetailConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得报价单物料明细分页")
|
||||
@PreAuthorize("@ss.hasPermission('bs:quotation-sheet-detail:query')")
|
||||
public CommonResult<PageResult<QuotationSheetDetailRespVO>> getQuotationSheetDetailPage(@Valid QuotationSheetDetailPageReqVO pageVO) {
|
||||
PageResult<QuotationSheetDetailDO> 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<QuotationSheetDetailDO> list = quotationSheetDetailService.getQuotationSheetDetailList(exportReqVO);
|
||||
// 导出 Excel
|
||||
List<QuotationSheetDetailExcelVO> datas = QuotationSheetDetailConvert.INSTANCE.convertList02(list);
|
||||
ExcelUtils.write(response, "报价单物料明细.xls", "数据", QuotationSheetDetailExcelVO.class, datas);
|
||||
}
|
||||
|
||||
}
|
@ -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 {
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
@ -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<MaterielRespVO> convertList(List<MaterielDO> list);
|
||||
|
||||
PageResult<MaterielRespVO> convertPage(PageResult<MaterielDO> page);
|
||||
|
||||
List<MaterielExcelVO> convertList02(List<MaterielDO> list);
|
||||
|
||||
}
|
@ -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<QuotationSheetBiddingRespVO> convertList(List<QuotationSheetBiddingDO> list);
|
||||
|
||||
PageResult<QuotationSheetBiddingRespVO> convertPage(PageResult<QuotationSheetBiddingDO> page);
|
||||
|
||||
List<QuotationSheetBiddingExcelVO> convertList02(List<QuotationSheetBiddingDO> list);
|
||||
|
||||
}
|
@ -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<QuotationSheetDetailRespVO> convertList(List<QuotationSheetDetailDO> list);
|
||||
|
||||
PageResult<QuotationSheetDetailRespVO> convertPage(PageResult<QuotationSheetDetailDO> page);
|
||||
|
||||
List<QuotationSheetDetailExcelVO> convertList02(List<QuotationSheetDetailDO> list);
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
@ -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<ImageVo> files;
|
||||
/**
|
||||
* 流程实例的编号
|
||||
*/
|
||||
private Long processInstanceId;
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
@ -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<MaterielDO> {
|
||||
|
||||
default PageResult<MaterielDO> selectPage(MaterielPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<MaterielDO>()
|
||||
.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<MaterielDO> selectList(MaterielExportReqVO reqVO) {
|
||||
return selectList(new LambdaQueryWrapperX<MaterielDO>()
|
||||
.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));
|
||||
}
|
||||
|
||||
}
|
@ -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<QuotationSheetBiddingDO> {
|
||||
|
||||
default PageResult<QuotationSheetBiddingDO> selectPage(QuotationSheetBiddingPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<QuotationSheetBiddingDO>()
|
||||
.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<QuotationSheetBiddingDO> selectList(QuotationSheetBiddingExportReqVO reqVO) {
|
||||
return selectList(new LambdaQueryWrapperX<QuotationSheetBiddingDO>()
|
||||
.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));
|
||||
}
|
||||
|
||||
}
|
@ -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<QuotationSheetDetailDO> {
|
||||
|
||||
default PageResult<QuotationSheetDetailDO> selectPage(QuotationSheetDetailPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<QuotationSheetDetailDO>()
|
||||
.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<QuotationSheetDetailDO> selectList(QuotationSheetDetailExportReqVO reqVO) {
|
||||
return selectList(new LambdaQueryWrapperX<QuotationSheetDetailDO>()
|
||||
.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));
|
||||
}
|
||||
|
||||
}
|
@ -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<MaterielDO> {
|
||||
|
||||
/**
|
||||
* 创建物料
|
||||
*
|
||||
* @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<MaterielDO> getMaterielList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得物料分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 物料分页
|
||||
*/
|
||||
PageResult<MaterielDO> getMaterielPage(MaterielPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得物料列表, 用于 Excel 导出
|
||||
*
|
||||
* @param exportReqVO 查询条件
|
||||
* @return 物料列表
|
||||
*/
|
||||
List<MaterielDO> getMaterielList(MaterielExportReqVO exportReqVO);
|
||||
|
||||
}
|
@ -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<MaterielMapper, MaterielDO> 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<MaterielDO> getMaterielList(Collection<Long> ids) {
|
||||
return materielMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<MaterielDO> getMaterielPage(MaterielPageReqVO pageReqVO) {
|
||||
return materielMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MaterielDO> getMaterielList(MaterielExportReqVO exportReqVO) {
|
||||
return materielMapper.selectList(exportReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -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<QuotationSheetBiddingDO>{
|
||||
|
||||
/**
|
||||
* 创建报价单物料中标
|
||||
*
|
||||
* @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<QuotationSheetBiddingDO> getQuotationSheetBiddingList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得报价单物料中标分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 报价单物料中标分页
|
||||
*/
|
||||
PageResult<QuotationSheetBiddingDO> getQuotationSheetBiddingPage(QuotationSheetBiddingPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得报价单物料中标列表, 用于 Excel 导出
|
||||
*
|
||||
* @param exportReqVO 查询条件
|
||||
* @return 报价单物料中标列表
|
||||
*/
|
||||
List<QuotationSheetBiddingDO> getQuotationSheetBiddingList(QuotationSheetBiddingExportReqVO exportReqVO);
|
||||
|
||||
}
|
@ -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<QuotationSheetBiddingMapper, QuotationSheetBiddingDO> 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<QuotationSheetBiddingDO> getQuotationSheetBiddingList(Collection<Long> ids) {
|
||||
return quotationSheetBiddingMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<QuotationSheetBiddingDO> getQuotationSheetBiddingPage(QuotationSheetBiddingPageReqVO pageReqVO) {
|
||||
return quotationSheetBiddingMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QuotationSheetBiddingDO> getQuotationSheetBiddingList(QuotationSheetBiddingExportReqVO exportReqVO) {
|
||||
return quotationSheetBiddingMapper.selectList(exportReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -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<QuotationSheetDetailDO> getQuotationSheetDetailList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得报价单物料明细分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 报价单物料明细分页
|
||||
*/
|
||||
PageResult<QuotationSheetDetailDO> getQuotationSheetDetailPage(QuotationSheetDetailPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获得报价单物料明细列表, 用于 Excel 导出
|
||||
*
|
||||
* @param exportReqVO 查询条件
|
||||
* @return 报价单物料明细列表
|
||||
*/
|
||||
List<QuotationSheetDetailDO> getQuotationSheetDetailList(QuotationSheetDetailExportReqVO exportReqVO);
|
||||
|
||||
}
|
@ -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<QuotationSheetDetailDO> getQuotationSheetDetailList(Collection<Long> ids) {
|
||||
return quotationSheetDetailMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<QuotationSheetDetailDO> getQuotationSheetDetailPage(QuotationSheetDetailPageReqVO pageReqVO) {
|
||||
return quotationSheetDetailMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<QuotationSheetDetailDO> getQuotationSheetDetailList(QuotationSheetDetailExportReqVO exportReqVO) {
|
||||
return quotationSheetDetailMapper.selectList(exportReqVO);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue