采购单 报价单 物料

new
Agoni 1 year ago
parent c52767dfa0
commit 282288bd82

@ -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, "报价单物料中标不存在");
}

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

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

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

@ -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<ImageVo> files;
@Schema(description = "报价编号")
private String number;

@ -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<ImageVo> files;
@ExcelProperty("创建时间")
private LocalDateTime createTime;

@ -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<ImageVo> files;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)

@ -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<ImageVo> files;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)

@ -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,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<ImageVo> files;
@Schema(description = "流程实例的编号", example = "1130")
private Long processInstanceId;
}

@ -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,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<ImageVo> files;
@Schema(description = "流程实例的编号", example = "1130")
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,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;
}

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

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

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

@ -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<ImageVo> files;
/**
*
*/
private Long tenantId;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)

@ -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<ImageVo> files;
/**
*
*/
private Long tenantId;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)

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

@ -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<ImageVo> files;
/**
*
*/

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

@ -106,6 +106,11 @@ public class SupplierCompanyDO extends TenantBaseDO {
*/
private Long tenantId;
/**
* id
*/
private Long deptId;
/**
*
*/

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

@ -20,7 +20,7 @@ public interface QuotationSheetMapper extends BaseMapperX<QuotationSheetDO> {
default PageResult<QuotationSheetDO> selectPage(QuotationSheetPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<QuotationSheetDO>()
.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<QuotationSheetDO> {
default List<QuotationSheetDO> selectList(QuotationSheetExportReqVO reqVO) {
return selectList(new LambdaQueryWrapperX<QuotationSheetDO>()
.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())

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

@ -35,6 +35,7 @@ public interface SupplierCompanyMapper extends BaseMapperX<SupplierCompanyDO> {
.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<SupplierCompanyDO> {
.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));
}

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

@ -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<SupplierCompa
userCreateReqDTO.setNickname(supplierCompany.getBankName());
userCreateReqDTO.setMobile(supplierCompany.getPhone());
// userCreateReqDTO.setTenantId(supplierCompany.getCompanyNumber());
adminUserApi.addUser(userCreateReqDTO);
Long userId = adminUserApi.addUser(userCreateReqDTO);
supplierCompany.setCorrelationUserId(userId);
supplierCompany.setDeptId(adminUserApi.getUser(getLoginUser().getId()).getDeptId());
supplierCompanyMapper.insert(supplierCompany);
// 返回
return supplierCompany.getId();
}

@ -70,7 +70,8 @@ public interface AdminUserApi {
/**
*
* @param createReqVO
* @return
*/
void addUser(UserCreateReqDTO createReqVO);
Long addUser(UserCreateReqDTO createReqVO);
}

@ -54,10 +54,10 @@ public class AdminUserApiImpl implements AdminUserApi {
}
@Override
public void addUser(UserCreateReqDTO createReqVO) {
public Long addUser(UserCreateReqDTO createReqVO) {
UserCreateReqVO reqVO = new UserCreateReqVO();
BeanUtils.copyProperties(createReqVO, reqVO);
userService.createUser(reqVO);
return userService.createUser(reqVO);
}
}

Loading…
Cancel
Save