feat: 福安德智慧报价平台 - 完整业务模块
基于RuoYi-Vue2构建的智慧采购报价平台,包含: 后端(Spring Boot + MyBatis): - 物料管理 (BizMaterial) - 供应商管理 (BizSupplier) - 报价请求RFQ (BizRfq) - 供应商报价单 (BizQuotation) - 智慧比价分析 (BizComparison) - 采购单 (BizPurchaseOrder) - 供应商评价 (BizSupplierEvaluation) - 订单异议 (BizOrderObjection) - 交易记录 (BizTransaction) - 租户管理-SaaS数据隔离 (BizTenant) 前端(Vue2 + Element UI): - 10个业务模块完整页面 - ERPNext风格主题(蓝色系) - 福安德品牌logo 部署: - Docker Compose一键部署 - MySQL 8.0 + Redis 7 + Nginx - 前端端口 10031
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
package com.ruoyi.system.domain.bid;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
public class BizComparisonVO {
|
||||
private Long rfqItemId;
|
||||
private String materialName;
|
||||
private String spec;
|
||||
private String unit;
|
||||
private BigDecimal quantity;
|
||||
private List<BizComparisonVO.SupplierPrice> prices;
|
||||
|
||||
public static class SupplierPrice {
|
||||
private Long supplierId;
|
||||
private String supplierName;
|
||||
private Long quotationId;
|
||||
private String quoteNo;
|
||||
private BigDecimal unitPrice;
|
||||
private BigDecimal totalPrice;
|
||||
private Integer deliveryDays;
|
||||
private boolean lowestPrice;
|
||||
|
||||
public Long getSupplierId() { return supplierId; }
|
||||
public void setSupplierId(Long supplierId) { this.supplierId = supplierId; }
|
||||
public String getSupplierName() { return supplierName; }
|
||||
public void setSupplierName(String supplierName) { this.supplierName = supplierName; }
|
||||
public Long getQuotationId() { return quotationId; }
|
||||
public void setQuotationId(Long quotationId) { this.quotationId = quotationId; }
|
||||
public String getQuoteNo() { return quoteNo; }
|
||||
public void setQuoteNo(String quoteNo) { this.quoteNo = quoteNo; }
|
||||
public BigDecimal getUnitPrice() { return unitPrice; }
|
||||
public void setUnitPrice(BigDecimal unitPrice) { this.unitPrice = unitPrice; }
|
||||
public BigDecimal getTotalPrice() { return totalPrice; }
|
||||
public void setTotalPrice(BigDecimal totalPrice) { this.totalPrice = totalPrice; }
|
||||
public Integer getDeliveryDays() { return deliveryDays; }
|
||||
public void setDeliveryDays(Integer deliveryDays) { this.deliveryDays = deliveryDays; }
|
||||
public boolean isLowestPrice() { return lowestPrice; }
|
||||
public void setLowestPrice(boolean lowestPrice) { this.lowestPrice = lowestPrice; }
|
||||
}
|
||||
|
||||
public Long getRfqItemId() { return rfqItemId; }
|
||||
public void setRfqItemId(Long rfqItemId) { this.rfqItemId = rfqItemId; }
|
||||
public String getMaterialName() { return materialName; }
|
||||
public void setMaterialName(String materialName) { this.materialName = materialName; }
|
||||
public String getSpec() { return spec; }
|
||||
public void setSpec(String spec) { this.spec = spec; }
|
||||
public String getUnit() { return unit; }
|
||||
public void setUnit(String unit) { this.unit = unit; }
|
||||
public BigDecimal getQuantity() { return quantity; }
|
||||
public void setQuantity(BigDecimal quantity) { this.quantity = quantity; }
|
||||
public List<SupplierPrice> getPrices() { return prices; }
|
||||
public void setPrices(List<SupplierPrice> prices) { this.prices = prices; }
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.ruoyi.system.domain.bid;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
public class BizMaterial extends BaseEntity {
|
||||
private Long materialId;
|
||||
private Long tenantId;
|
||||
private Long categoryId;
|
||||
private String materialCode;
|
||||
private String materialName;
|
||||
private String spec;
|
||||
private String unit;
|
||||
private String brand;
|
||||
private String description;
|
||||
private String status;
|
||||
// search helper
|
||||
private String categoryName;
|
||||
|
||||
public Long getMaterialId() { return materialId; }
|
||||
public void setMaterialId(Long materialId) { this.materialId = materialId; }
|
||||
public Long getTenantId() { return tenantId; }
|
||||
public void setTenantId(Long tenantId) { this.tenantId = tenantId; }
|
||||
public Long getCategoryId() { return categoryId; }
|
||||
public void setCategoryId(Long categoryId) { this.categoryId = categoryId; }
|
||||
public String getMaterialCode() { return materialCode; }
|
||||
public void setMaterialCode(String materialCode) { this.materialCode = materialCode; }
|
||||
public String getMaterialName() { return materialName; }
|
||||
public void setMaterialName(String materialName) { this.materialName = materialName; }
|
||||
public String getSpec() { return spec; }
|
||||
public void setSpec(String spec) { this.spec = spec; }
|
||||
public String getUnit() { return unit; }
|
||||
public void setUnit(String unit) { this.unit = unit; }
|
||||
public String getBrand() { return brand; }
|
||||
public void setBrand(String brand) { this.brand = brand; }
|
||||
public String getDescription() { return description; }
|
||||
public void setDescription(String description) { this.description = description; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
public String getCategoryName() { return categoryName; }
|
||||
public void setCategoryName(String categoryName) { this.categoryName = categoryName; }
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.system.domain.bid;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class BizOrderObjection {
|
||||
private Long objectionId;
|
||||
private Long tenantId;
|
||||
private Long poId;
|
||||
private Long supplierId;
|
||||
private String reason;
|
||||
private String attachment;
|
||||
private String status;
|
||||
private String resolution;
|
||||
private String createBy;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date resolveTime;
|
||||
private String supplierName;
|
||||
private String poNo;
|
||||
|
||||
public Long getObjectionId() { return objectionId; }
|
||||
public void setObjectionId(Long objectionId) { this.objectionId = objectionId; }
|
||||
public Long getTenantId() { return tenantId; }
|
||||
public void setTenantId(Long tenantId) { this.tenantId = tenantId; }
|
||||
public Long getPoId() { return poId; }
|
||||
public void setPoId(Long poId) { this.poId = poId; }
|
||||
public Long getSupplierId() { return supplierId; }
|
||||
public void setSupplierId(Long supplierId) { this.supplierId = supplierId; }
|
||||
public String getReason() { return reason; }
|
||||
public void setReason(String reason) { this.reason = reason; }
|
||||
public String getAttachment() { return attachment; }
|
||||
public void setAttachment(String attachment) { this.attachment = attachment; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
public String getResolution() { return resolution; }
|
||||
public void setResolution(String resolution) { this.resolution = resolution; }
|
||||
public String getCreateBy() { return createBy; }
|
||||
public void setCreateBy(String createBy) { this.createBy = createBy; }
|
||||
public Date getCreateTime() { return createTime; }
|
||||
public void setCreateTime(Date createTime) { this.createTime = createTime; }
|
||||
public Date getResolveTime() { return resolveTime; }
|
||||
public void setResolveTime(Date resolveTime) { this.resolveTime = resolveTime; }
|
||||
public String getSupplierName() { return supplierName; }
|
||||
public void setSupplierName(String supplierName) { this.supplierName = supplierName; }
|
||||
public String getPoNo() { return poNo; }
|
||||
public void setPoNo(String poNo) { this.poNo = poNo; }
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.ruoyi.system.domain.bid;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class BizPurchaseOrder extends BaseEntity {
|
||||
private Long poId;
|
||||
private Long tenantId;
|
||||
private String poNo;
|
||||
private Long rfqId;
|
||||
private Long supplierId;
|
||||
private BigDecimal totalAmount;
|
||||
private String currency;
|
||||
private String deliveryAddr;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date deliveryDate;
|
||||
private String status;
|
||||
private List<BizPurchaseOrderItem> items;
|
||||
private String supplierName;
|
||||
private String rfqTitle;
|
||||
|
||||
public Long getPoId() { return poId; }
|
||||
public void setPoId(Long poId) { this.poId = poId; }
|
||||
public Long getTenantId() { return tenantId; }
|
||||
public void setTenantId(Long tenantId) { this.tenantId = tenantId; }
|
||||
public String getPoNo() { return poNo; }
|
||||
public void setPoNo(String poNo) { this.poNo = poNo; }
|
||||
public Long getRfqId() { return rfqId; }
|
||||
public void setRfqId(Long rfqId) { this.rfqId = rfqId; }
|
||||
public Long getSupplierId() { return supplierId; }
|
||||
public void setSupplierId(Long supplierId) { this.supplierId = supplierId; }
|
||||
public BigDecimal getTotalAmount() { return totalAmount; }
|
||||
public void setTotalAmount(BigDecimal totalAmount) { this.totalAmount = totalAmount; }
|
||||
public String getCurrency() { return currency; }
|
||||
public void setCurrency(String currency) { this.currency = currency; }
|
||||
public String getDeliveryAddr() { return deliveryAddr; }
|
||||
public void setDeliveryAddr(String deliveryAddr) { this.deliveryAddr = deliveryAddr; }
|
||||
public Date getDeliveryDate() { return deliveryDate; }
|
||||
public void setDeliveryDate(Date deliveryDate) { this.deliveryDate = deliveryDate; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
public List<BizPurchaseOrderItem> getItems() { return items; }
|
||||
public void setItems(List<BizPurchaseOrderItem> items) { this.items = items; }
|
||||
public String getSupplierName() { return supplierName; }
|
||||
public void setSupplierName(String supplierName) { this.supplierName = supplierName; }
|
||||
public String getRfqTitle() { return rfqTitle; }
|
||||
public void setRfqTitle(String rfqTitle) { this.rfqTitle = rfqTitle; }
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.ruoyi.system.domain.bid;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class BizPurchaseOrderItem {
|
||||
private Long itemId;
|
||||
private Long poId;
|
||||
private Long materialId;
|
||||
private String materialName;
|
||||
private String spec;
|
||||
private String unit;
|
||||
private BigDecimal quantity;
|
||||
private BigDecimal unitPrice;
|
||||
private BigDecimal totalPrice;
|
||||
private String remark;
|
||||
|
||||
public Long getItemId() { return itemId; }
|
||||
public void setItemId(Long itemId) { this.itemId = itemId; }
|
||||
public Long getPoId() { return poId; }
|
||||
public void setPoId(Long poId) { this.poId = poId; }
|
||||
public Long getMaterialId() { return materialId; }
|
||||
public void setMaterialId(Long materialId) { this.materialId = materialId; }
|
||||
public String getMaterialName() { return materialName; }
|
||||
public void setMaterialName(String materialName) { this.materialName = materialName; }
|
||||
public String getSpec() { return spec; }
|
||||
public void setSpec(String spec) { this.spec = spec; }
|
||||
public String getUnit() { return unit; }
|
||||
public void setUnit(String unit) { this.unit = unit; }
|
||||
public BigDecimal getQuantity() { return quantity; }
|
||||
public void setQuantity(BigDecimal quantity) { this.quantity = quantity; }
|
||||
public BigDecimal getUnitPrice() { return unitPrice; }
|
||||
public void setUnitPrice(BigDecimal unitPrice) { this.unitPrice = unitPrice; }
|
||||
public BigDecimal getTotalPrice() { return totalPrice; }
|
||||
public void setTotalPrice(BigDecimal totalPrice) { this.totalPrice = totalPrice; }
|
||||
public String getRemark() { return remark; }
|
||||
public void setRemark(String remark) { this.remark = remark; }
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.system.domain.bid;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class BizQuotation extends BaseEntity {
|
||||
private Long quotationId;
|
||||
private Long tenantId;
|
||||
private Long rfqId;
|
||||
private Long supplierId;
|
||||
private String quoteNo;
|
||||
private Integer validDays;
|
||||
private Integer deliveryDays;
|
||||
private BigDecimal totalAmount;
|
||||
private String currency;
|
||||
private String status;
|
||||
private String note;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date submitTime;
|
||||
private List<BizQuotationItem> items;
|
||||
// joins
|
||||
private String supplierName;
|
||||
private String rfqTitle;
|
||||
private String rfqNo;
|
||||
|
||||
public Long getQuotationId() { return quotationId; }
|
||||
public void setQuotationId(Long quotationId) { this.quotationId = quotationId; }
|
||||
public Long getTenantId() { return tenantId; }
|
||||
public void setTenantId(Long tenantId) { this.tenantId = tenantId; }
|
||||
public Long getRfqId() { return rfqId; }
|
||||
public void setRfqId(Long rfqId) { this.rfqId = rfqId; }
|
||||
public Long getSupplierId() { return supplierId; }
|
||||
public void setSupplierId(Long supplierId) { this.supplierId = supplierId; }
|
||||
public String getQuoteNo() { return quoteNo; }
|
||||
public void setQuoteNo(String quoteNo) { this.quoteNo = quoteNo; }
|
||||
public Integer getValidDays() { return validDays; }
|
||||
public void setValidDays(Integer validDays) { this.validDays = validDays; }
|
||||
public Integer getDeliveryDays() { return deliveryDays; }
|
||||
public void setDeliveryDays(Integer deliveryDays) { this.deliveryDays = deliveryDays; }
|
||||
public BigDecimal getTotalAmount() { return totalAmount; }
|
||||
public void setTotalAmount(BigDecimal totalAmount) { this.totalAmount = totalAmount; }
|
||||
public String getCurrency() { return currency; }
|
||||
public void setCurrency(String currency) { this.currency = currency; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
public String getNote() { return note; }
|
||||
public void setNote(String note) { this.note = note; }
|
||||
public Date getSubmitTime() { return submitTime; }
|
||||
public void setSubmitTime(Date submitTime) { this.submitTime = submitTime; }
|
||||
public List<BizQuotationItem> getItems() { return items; }
|
||||
public void setItems(List<BizQuotationItem> items) { this.items = items; }
|
||||
public String getSupplierName() { return supplierName; }
|
||||
public void setSupplierName(String supplierName) { this.supplierName = supplierName; }
|
||||
public String getRfqTitle() { return rfqTitle; }
|
||||
public void setRfqTitle(String rfqTitle) { this.rfqTitle = rfqTitle; }
|
||||
public String getRfqNo() { return rfqNo; }
|
||||
public void setRfqNo(String rfqNo) { this.rfqNo = rfqNo; }
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.ruoyi.system.domain.bid;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class BizQuotationItem {
|
||||
private Long itemId;
|
||||
private Long quotationId;
|
||||
private Long rfqItemId;
|
||||
private String materialName;
|
||||
private String spec;
|
||||
private String unit;
|
||||
private BigDecimal quantity;
|
||||
private BigDecimal unitPrice;
|
||||
private BigDecimal totalPrice;
|
||||
private Integer deliveryDays;
|
||||
private String remark;
|
||||
|
||||
public Long getItemId() { return itemId; }
|
||||
public void setItemId(Long itemId) { this.itemId = itemId; }
|
||||
public Long getQuotationId() { return quotationId; }
|
||||
public void setQuotationId(Long quotationId) { this.quotationId = quotationId; }
|
||||
public Long getRfqItemId() { return rfqItemId; }
|
||||
public void setRfqItemId(Long rfqItemId) { this.rfqItemId = rfqItemId; }
|
||||
public String getMaterialName() { return materialName; }
|
||||
public void setMaterialName(String materialName) { this.materialName = materialName; }
|
||||
public String getSpec() { return spec; }
|
||||
public void setSpec(String spec) { this.spec = spec; }
|
||||
public String getUnit() { return unit; }
|
||||
public void setUnit(String unit) { this.unit = unit; }
|
||||
public BigDecimal getQuantity() { return quantity; }
|
||||
public void setQuantity(BigDecimal quantity) { this.quantity = quantity; }
|
||||
public BigDecimal getUnitPrice() { return unitPrice; }
|
||||
public void setUnitPrice(BigDecimal unitPrice) { this.unitPrice = unitPrice; }
|
||||
public BigDecimal getTotalPrice() { return totalPrice; }
|
||||
public void setTotalPrice(BigDecimal totalPrice) { this.totalPrice = totalPrice; }
|
||||
public Integer getDeliveryDays() { return deliveryDays; }
|
||||
public void setDeliveryDays(Integer deliveryDays) { this.deliveryDays = deliveryDays; }
|
||||
public String getRemark() { return remark; }
|
||||
public void setRemark(String remark) { this.remark = remark; }
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.ruoyi.system.domain.bid;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class BizRfq extends BaseEntity {
|
||||
private Long rfqId;
|
||||
private Long tenantId;
|
||||
private String rfqNo;
|
||||
private String rfqTitle;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date deadline;
|
||||
private String deliveryAddr;
|
||||
private String status;
|
||||
private List<BizRfqItem> items;
|
||||
private List<Long> supplierIds;
|
||||
|
||||
public Long getRfqId() { return rfqId; }
|
||||
public void setRfqId(Long rfqId) { this.rfqId = rfqId; }
|
||||
public Long getTenantId() { return tenantId; }
|
||||
public void setTenantId(Long tenantId) { this.tenantId = tenantId; }
|
||||
public String getRfqNo() { return rfqNo; }
|
||||
public void setRfqNo(String rfqNo) { this.rfqNo = rfqNo; }
|
||||
public String getRfqTitle() { return rfqTitle; }
|
||||
public void setRfqTitle(String rfqTitle) { this.rfqTitle = rfqTitle; }
|
||||
public Date getDeadline() { return deadline; }
|
||||
public void setDeadline(Date deadline) { this.deadline = deadline; }
|
||||
public String getDeliveryAddr() { return deliveryAddr; }
|
||||
public void setDeliveryAddr(String deliveryAddr) { this.deliveryAddr = deliveryAddr; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
public List<BizRfqItem> getItems() { return items; }
|
||||
public void setItems(List<BizRfqItem> items) { this.items = items; }
|
||||
public List<Long> getSupplierIds() { return supplierIds; }
|
||||
public void setSupplierIds(List<Long> supplierIds) { this.supplierIds = supplierIds; }
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ruoyi.system.domain.bid;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class BizRfqItem {
|
||||
private Long itemId;
|
||||
private Long rfqId;
|
||||
private Long materialId;
|
||||
private String materialName;
|
||||
private String spec;
|
||||
private String unit;
|
||||
private BigDecimal quantity;
|
||||
private BigDecimal expectedPrice;
|
||||
private String remark;
|
||||
|
||||
public Long getItemId() { return itemId; }
|
||||
public void setItemId(Long itemId) { this.itemId = itemId; }
|
||||
public Long getRfqId() { return rfqId; }
|
||||
public void setRfqId(Long rfqId) { this.rfqId = rfqId; }
|
||||
public Long getMaterialId() { return materialId; }
|
||||
public void setMaterialId(Long materialId) { this.materialId = materialId; }
|
||||
public String getMaterialName() { return materialName; }
|
||||
public void setMaterialName(String materialName) { this.materialName = materialName; }
|
||||
public String getSpec() { return spec; }
|
||||
public void setSpec(String spec) { this.spec = spec; }
|
||||
public String getUnit() { return unit; }
|
||||
public void setUnit(String unit) { this.unit = unit; }
|
||||
public BigDecimal getQuantity() { return quantity; }
|
||||
public void setQuantity(BigDecimal quantity) { this.quantity = quantity; }
|
||||
public BigDecimal getExpectedPrice() { return expectedPrice; }
|
||||
public void setExpectedPrice(BigDecimal expectedPrice) { this.expectedPrice = expectedPrice; }
|
||||
public String getRemark() { return remark; }
|
||||
public void setRemark(String remark) { this.remark = remark; }
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ruoyi.system.domain.bid;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
public class BizSupplier extends BaseEntity {
|
||||
private Long supplierId;
|
||||
private Long tenantId;
|
||||
private String supplierName;
|
||||
private String contact;
|
||||
private String phone;
|
||||
private String email;
|
||||
private String address;
|
||||
private Long userId;
|
||||
private String status;
|
||||
|
||||
public Long getSupplierId() { return supplierId; }
|
||||
public void setSupplierId(Long supplierId) { this.supplierId = supplierId; }
|
||||
public Long getTenantId() { return tenantId; }
|
||||
public void setTenantId(Long tenantId) { this.tenantId = tenantId; }
|
||||
public String getSupplierName() { return supplierName; }
|
||||
public void setSupplierName(String supplierName) { this.supplierName = supplierName; }
|
||||
public String getContact() { return contact; }
|
||||
public void setContact(String contact) { this.contact = contact; }
|
||||
public String getPhone() { return phone; }
|
||||
public void setPhone(String phone) { this.phone = phone; }
|
||||
public String getEmail() { return email; }
|
||||
public void setEmail(String email) { this.email = email; }
|
||||
public String getAddress() { return address; }
|
||||
public void setAddress(String address) { this.address = address; }
|
||||
public Long getUserId() { return userId; }
|
||||
public void setUserId(Long userId) { this.userId = userId; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.ruoyi.system.domain.bid;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class BizSupplierEvaluation {
|
||||
private Long evalId;
|
||||
private Long tenantId;
|
||||
private Long poId;
|
||||
private Long supplierId;
|
||||
private Integer qualityScore;
|
||||
private Integer deliveryScore;
|
||||
private Integer serviceScore;
|
||||
private Integer priceScore;
|
||||
private BigDecimal totalScore;
|
||||
private String comment;
|
||||
private String evaluator;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date evalTime;
|
||||
private String supplierName;
|
||||
private String poNo;
|
||||
|
||||
public Long getEvalId() { return evalId; }
|
||||
public void setEvalId(Long evalId) { this.evalId = evalId; }
|
||||
public Long getTenantId() { return tenantId; }
|
||||
public void setTenantId(Long tenantId) { this.tenantId = tenantId; }
|
||||
public Long getPoId() { return poId; }
|
||||
public void setPoId(Long poId) { this.poId = poId; }
|
||||
public Long getSupplierId() { return supplierId; }
|
||||
public void setSupplierId(Long supplierId) { this.supplierId = supplierId; }
|
||||
public Integer getQualityScore() { return qualityScore; }
|
||||
public void setQualityScore(Integer qualityScore) { this.qualityScore = qualityScore; }
|
||||
public Integer getDeliveryScore() { return deliveryScore; }
|
||||
public void setDeliveryScore(Integer deliveryScore) { this.deliveryScore = deliveryScore; }
|
||||
public Integer getServiceScore() { return serviceScore; }
|
||||
public void setServiceScore(Integer serviceScore) { this.serviceScore = serviceScore; }
|
||||
public Integer getPriceScore() { return priceScore; }
|
||||
public void setPriceScore(Integer priceScore) { this.priceScore = priceScore; }
|
||||
public BigDecimal getTotalScore() { return totalScore; }
|
||||
public void setTotalScore(BigDecimal totalScore) { this.totalScore = totalScore; }
|
||||
public String getComment() { return comment; }
|
||||
public void setComment(String comment) { this.comment = comment; }
|
||||
public String getEvaluator() { return evaluator; }
|
||||
public void setEvaluator(String evaluator) { this.evaluator = evaluator; }
|
||||
public Date getEvalTime() { return evalTime; }
|
||||
public void setEvalTime(Date evalTime) { this.evalTime = evalTime; }
|
||||
public String getSupplierName() { return supplierName; }
|
||||
public void setSupplierName(String supplierName) { this.supplierName = supplierName; }
|
||||
public String getPoNo() { return poNo; }
|
||||
public void setPoNo(String poNo) { this.poNo = poNo; }
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.ruoyi.system.domain.bid;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
public class BizTenant extends BaseEntity {
|
||||
private Long tenantId;
|
||||
private String tenantName;
|
||||
private String contact;
|
||||
private String phone;
|
||||
private String email;
|
||||
private String status;
|
||||
|
||||
public Long getTenantId() { return tenantId; }
|
||||
public void setTenantId(Long tenantId) { this.tenantId = tenantId; }
|
||||
public String getTenantName() { return tenantName; }
|
||||
public void setTenantName(String tenantName) { this.tenantName = tenantName; }
|
||||
public String getContact() { return contact; }
|
||||
public void setContact(String contact) { this.contact = contact; }
|
||||
public String getPhone() { return phone; }
|
||||
public void setPhone(String phone) { this.phone = phone; }
|
||||
public String getEmail() { return email; }
|
||||
public void setEmail(String email) { this.email = email; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("tenantId", getTenantId())
|
||||
.append("tenantName", getTenantName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.ruoyi.system.domain.bid;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class BizTransaction {
|
||||
private Long txId;
|
||||
private Long tenantId;
|
||||
private Long poId;
|
||||
private Long supplierId;
|
||||
private String txType;
|
||||
private String txNo;
|
||||
private BigDecimal amount;
|
||||
private String currency;
|
||||
private String description;
|
||||
private String operator;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date txTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
private String supplierName;
|
||||
private String poNo;
|
||||
// search params
|
||||
private String beginTime;
|
||||
private String endTime;
|
||||
|
||||
public Long getTxId() { return txId; }
|
||||
public void setTxId(Long txId) { this.txId = txId; }
|
||||
public Long getTenantId() { return tenantId; }
|
||||
public void setTenantId(Long tenantId) { this.tenantId = tenantId; }
|
||||
public Long getPoId() { return poId; }
|
||||
public void setPoId(Long poId) { this.poId = poId; }
|
||||
public Long getSupplierId() { return supplierId; }
|
||||
public void setSupplierId(Long supplierId) { this.supplierId = supplierId; }
|
||||
public String getTxType() { return txType; }
|
||||
public void setTxType(String txType) { this.txType = txType; }
|
||||
public String getTxNo() { return txNo; }
|
||||
public void setTxNo(String txNo) { this.txNo = txNo; }
|
||||
public BigDecimal getAmount() { return amount; }
|
||||
public void setAmount(BigDecimal amount) { this.amount = amount; }
|
||||
public String getCurrency() { return currency; }
|
||||
public void setCurrency(String currency) { this.currency = currency; }
|
||||
public String getDescription() { return description; }
|
||||
public void setDescription(String description) { this.description = description; }
|
||||
public String getOperator() { return operator; }
|
||||
public void setOperator(String operator) { this.operator = operator; }
|
||||
public Date getTxTime() { return txTime; }
|
||||
public void setTxTime(Date txTime) { this.txTime = txTime; }
|
||||
public Date getCreateTime() { return createTime; }
|
||||
public void setCreateTime(Date createTime) { this.createTime = createTime; }
|
||||
public String getSupplierName() { return supplierName; }
|
||||
public void setSupplierName(String supplierName) { this.supplierName = supplierName; }
|
||||
public String getPoNo() { return poNo; }
|
||||
public void setPoNo(String poNo) { this.poNo = poNo; }
|
||||
public String getBeginTime() { return beginTime; }
|
||||
public void setBeginTime(String beginTime) { this.beginTime = beginTime; }
|
||||
public String getEndTime() { return endTime; }
|
||||
public void setEndTime(String endTime) { this.endTime = endTime; }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.ruoyi.system.mapper.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizComparisonVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface BizComparisonMapper {
|
||||
List<Map<String, Object>> selectComparisonData(@Param("rfqId") Long rfqId, @Param("tenantId") Long tenantId);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.system.mapper.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizMaterial;
|
||||
import java.util.List;
|
||||
|
||||
public interface BizMaterialMapper {
|
||||
List<BizMaterial> selectBizMaterialList(BizMaterial query);
|
||||
BizMaterial selectBizMaterialById(Long id);
|
||||
int insertBizMaterial(BizMaterial record);
|
||||
int updateBizMaterial(BizMaterial record);
|
||||
int deleteBizMaterialById(Long id);
|
||||
int deleteBizMaterialByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.system.mapper.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizOrderObjection;
|
||||
import java.util.List;
|
||||
|
||||
public interface BizOrderObjectionMapper {
|
||||
List<BizOrderObjection> selectBizOrderObjectionList(BizOrderObjection query);
|
||||
BizOrderObjection selectBizOrderObjectionById(Long id);
|
||||
int insertBizOrderObjection(BizOrderObjection record);
|
||||
int updateBizOrderObjection(BizOrderObjection record);
|
||||
int deleteBizOrderObjectionById(Long id);
|
||||
int deleteBizOrderObjectionByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.ruoyi.system.mapper.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizPurchaseOrderItem;
|
||||
import java.util.List;
|
||||
|
||||
public interface BizPurchaseOrderItemMapper {
|
||||
List<BizPurchaseOrderItem> selectItemsByPoId(Long poId);
|
||||
int insertBizPurchaseOrderItem(BizPurchaseOrderItem item);
|
||||
int deleteByPoId(Long poId);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.system.mapper.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizPurchaseOrder;
|
||||
import java.util.List;
|
||||
|
||||
public interface BizPurchaseOrderMapper {
|
||||
List<BizPurchaseOrder> selectBizPurchaseOrderList(BizPurchaseOrder query);
|
||||
BizPurchaseOrder selectBizPurchaseOrderById(Long id);
|
||||
int insertBizPurchaseOrder(BizPurchaseOrder record);
|
||||
int updateBizPurchaseOrder(BizPurchaseOrder record);
|
||||
int deleteBizPurchaseOrderById(Long id);
|
||||
int deleteBizPurchaseOrderByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.ruoyi.system.mapper.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizQuotationItem;
|
||||
import java.util.List;
|
||||
|
||||
public interface BizQuotationItemMapper {
|
||||
List<BizQuotationItem> selectItemsByQuotationId(Long quotationId);
|
||||
int insertBizQuotationItem(BizQuotationItem item);
|
||||
int deleteByQuotationId(Long quotationId);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.system.mapper.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizQuotation;
|
||||
import java.util.List;
|
||||
|
||||
public interface BizQuotationMapper {
|
||||
List<BizQuotation> selectBizQuotationList(BizQuotation query);
|
||||
BizQuotation selectBizQuotationById(Long id);
|
||||
int insertBizQuotation(BizQuotation record);
|
||||
int updateBizQuotation(BizQuotation record);
|
||||
int deleteBizQuotationById(Long id);
|
||||
int deleteBizQuotationByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.ruoyi.system.mapper.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizRfqItem;
|
||||
import java.util.List;
|
||||
|
||||
public interface BizRfqItemMapper {
|
||||
List<BizRfqItem> selectItemsByRfqId(Long rfqId);
|
||||
int insertBizRfqItem(BizRfqItem item);
|
||||
int deleteByRfqId(Long rfqId);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.system.mapper.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizRfq;
|
||||
import java.util.List;
|
||||
|
||||
public interface BizRfqMapper {
|
||||
List<BizRfq> selectBizRfqList(BizRfq query);
|
||||
BizRfq selectBizRfqById(Long id);
|
||||
int insertBizRfq(BizRfq record);
|
||||
int updateBizRfq(BizRfq record);
|
||||
int deleteBizRfqById(Long id);
|
||||
int deleteBizRfqByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.system.mapper.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizSupplierEvaluation;
|
||||
import java.util.List;
|
||||
|
||||
public interface BizSupplierEvaluationMapper {
|
||||
List<BizSupplierEvaluation> selectBizSupplierEvaluationList(BizSupplierEvaluation query);
|
||||
BizSupplierEvaluation selectBizSupplierEvaluationById(Long id);
|
||||
int insertBizSupplierEvaluation(BizSupplierEvaluation record);
|
||||
int updateBizSupplierEvaluation(BizSupplierEvaluation record);
|
||||
int deleteBizSupplierEvaluationById(Long id);
|
||||
int deleteBizSupplierEvaluationByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.system.mapper.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizSupplier;
|
||||
import java.util.List;
|
||||
|
||||
public interface BizSupplierMapper {
|
||||
List<BizSupplier> selectBizSupplierList(BizSupplier query);
|
||||
BizSupplier selectBizSupplierById(Long id);
|
||||
int insertBizSupplier(BizSupplier record);
|
||||
int updateBizSupplier(BizSupplier record);
|
||||
int deleteBizSupplierById(Long id);
|
||||
int deleteBizSupplierByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.system.mapper.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizTenant;
|
||||
import java.util.List;
|
||||
|
||||
public interface BizTenantMapper {
|
||||
List<BizTenant> selectBizTenantList(BizTenant query);
|
||||
BizTenant selectBizTenantById(Long id);
|
||||
int insertBizTenant(BizTenant record);
|
||||
int updateBizTenant(BizTenant record);
|
||||
int deleteBizTenantById(Long id);
|
||||
int deleteBizTenantByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.system.mapper.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizTransaction;
|
||||
import java.util.List;
|
||||
|
||||
public interface BizTransactionMapper {
|
||||
List<BizTransaction> selectBizTransactionList(BizTransaction query);
|
||||
BizTransaction selectBizTransactionById(Long id);
|
||||
int insertBizTransaction(BizTransaction record);
|
||||
int updateBizTransaction(BizTransaction record);
|
||||
int deleteBizTransactionById(Long id);
|
||||
int deleteBizTransactionByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.system.service.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizComparisonVO;
|
||||
import java.util.List;
|
||||
|
||||
public interface IBizComparisonService {
|
||||
List<BizComparisonVO> compareRfq(Long rfqId, Long tenantId);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.system.service.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizMaterial;
|
||||
import java.util.List;
|
||||
|
||||
public interface IBizMaterialService {
|
||||
List<BizMaterial> selectBizMaterialList(BizMaterial query);
|
||||
BizMaterial selectBizMaterialById(Long id);
|
||||
int insertBizMaterial(BizMaterial record);
|
||||
int updateBizMaterial(BizMaterial record);
|
||||
int deleteBizMaterialById(Long id);
|
||||
int deleteBizMaterialByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.system.service.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizOrderObjection;
|
||||
import java.util.List;
|
||||
|
||||
public interface IBizOrderObjectionService {
|
||||
List<BizOrderObjection> selectBizOrderObjectionList(BizOrderObjection query);
|
||||
BizOrderObjection selectBizOrderObjectionById(Long id);
|
||||
int insertBizOrderObjection(BizOrderObjection record);
|
||||
int updateBizOrderObjection(BizOrderObjection record);
|
||||
int deleteBizOrderObjectionById(Long id);
|
||||
int deleteBizOrderObjectionByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.system.service.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizPurchaseOrder;
|
||||
import java.util.List;
|
||||
|
||||
public interface IBizPurchaseOrderService {
|
||||
List<BizPurchaseOrder> selectBizPurchaseOrderList(BizPurchaseOrder query);
|
||||
BizPurchaseOrder selectBizPurchaseOrderById(Long id);
|
||||
int insertBizPurchaseOrder(BizPurchaseOrder po);
|
||||
int updateBizPurchaseOrder(BizPurchaseOrder po);
|
||||
int confirmOrder(Long poId);
|
||||
int deleteBizPurchaseOrderById(Long id);
|
||||
int deleteBizPurchaseOrderByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.system.service.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizQuotation;
|
||||
import com.ruoyi.system.domain.bid.BizQuotationItem;
|
||||
import java.util.List;
|
||||
|
||||
public interface IBizQuotationService {
|
||||
List<BizQuotation> selectBizQuotationList(BizQuotation query);
|
||||
BizQuotation selectBizQuotationById(Long id);
|
||||
int insertBizQuotation(BizQuotation q);
|
||||
int updateBizQuotation(BizQuotation q);
|
||||
int submitQuotation(Long quotationId);
|
||||
int acceptQuotation(Long quotationId);
|
||||
int rejectQuotation(Long quotationId);
|
||||
int deleteBizQuotationById(Long id);
|
||||
int deleteBizQuotationByIds(Long[] ids);
|
||||
List<BizQuotationItem> selectItemsByQuotationId(Long quotationId);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.ruoyi.system.service.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizRfq;
|
||||
import com.ruoyi.system.domain.bid.BizRfqItem;
|
||||
import java.util.List;
|
||||
|
||||
public interface IBizRfqService {
|
||||
List<BizRfq> selectBizRfqList(BizRfq query);
|
||||
BizRfq selectBizRfqById(Long id);
|
||||
int insertBizRfq(BizRfq rfq);
|
||||
int updateBizRfq(BizRfq rfq);
|
||||
int deleteBizRfqById(Long id);
|
||||
int deleteBizRfqByIds(Long[] ids);
|
||||
int publishRfq(Long rfqId, Long[] supplierIds);
|
||||
List<BizRfqItem> selectItemsByRfqId(Long rfqId);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.system.service.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizSupplierEvaluation;
|
||||
import java.util.List;
|
||||
|
||||
public interface IBizSupplierEvaluationService {
|
||||
List<BizSupplierEvaluation> selectBizSupplierEvaluationList(BizSupplierEvaluation query);
|
||||
BizSupplierEvaluation selectBizSupplierEvaluationById(Long id);
|
||||
int insertBizSupplierEvaluation(BizSupplierEvaluation record);
|
||||
int updateBizSupplierEvaluation(BizSupplierEvaluation record);
|
||||
int deleteBizSupplierEvaluationById(Long id);
|
||||
int deleteBizSupplierEvaluationByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.system.service.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizSupplier;
|
||||
import java.util.List;
|
||||
|
||||
public interface IBizSupplierService {
|
||||
List<BizSupplier> selectBizSupplierList(BizSupplier query);
|
||||
BizSupplier selectBizSupplierById(Long id);
|
||||
int insertBizSupplier(BizSupplier record);
|
||||
int updateBizSupplier(BizSupplier record);
|
||||
int deleteBizSupplierById(Long id);
|
||||
int deleteBizSupplierByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.system.service.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizTenant;
|
||||
import java.util.List;
|
||||
|
||||
public interface IBizTenantService {
|
||||
List<BizTenant> selectBizTenantList(BizTenant query);
|
||||
BizTenant selectBizTenantById(Long id);
|
||||
int insertBizTenant(BizTenant record);
|
||||
int updateBizTenant(BizTenant record);
|
||||
int deleteBizTenantById(Long id);
|
||||
int deleteBizTenantByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.system.service.bid;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizTransaction;
|
||||
import java.util.List;
|
||||
|
||||
public interface IBizTransactionService {
|
||||
List<BizTransaction> selectBizTransactionList(BizTransaction query);
|
||||
BizTransaction selectBizTransactionById(Long id);
|
||||
int insertBizTransaction(BizTransaction record);
|
||||
int updateBizTransaction(BizTransaction record);
|
||||
int deleteBizTransactionById(Long id);
|
||||
int deleteBizTransactionByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.system.service.bid.impl;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizComparisonVO;
|
||||
import com.ruoyi.system.mapper.bid.BizComparisonMapper;
|
||||
import com.ruoyi.system.service.bid.IBizComparisonService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
||||
@Service
|
||||
public class BizComparisonServiceImpl implements IBizComparisonService {
|
||||
@Autowired private BizComparisonMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<BizComparisonVO> compareRfq(Long rfqId, Long tenantId) {
|
||||
List<Map<String, Object>> rows = mapper.selectComparisonData(rfqId, tenantId);
|
||||
Map<Long, BizComparisonVO> itemMap = new LinkedHashMap<>();
|
||||
|
||||
for (Map<String, Object> row : rows) {
|
||||
Long rfqItemId = toLong(row.get("rfqItemId"));
|
||||
BizComparisonVO vo = itemMap.computeIfAbsent(rfqItemId, k -> {
|
||||
BizComparisonVO v = new BizComparisonVO();
|
||||
v.setRfqItemId(rfqItemId);
|
||||
v.setMaterialName(str(row.get("materialName")));
|
||||
v.setSpec(str(row.get("spec")));
|
||||
v.setUnit(str(row.get("unit")));
|
||||
v.setQuantity(toBD(row.get("quantity")));
|
||||
v.setPrices(new ArrayList<>());
|
||||
return v;
|
||||
});
|
||||
|
||||
if (row.get("quotationId") != null) {
|
||||
BizComparisonVO.SupplierPrice sp = new BizComparisonVO.SupplierPrice();
|
||||
sp.setSupplierId(toLong(row.get("supplierId")));
|
||||
sp.setSupplierName(str(row.get("supplierName")));
|
||||
sp.setQuotationId(toLong(row.get("quotationId")));
|
||||
sp.setQuoteNo(str(row.get("quoteNo")));
|
||||
sp.setUnitPrice(toBD(row.get("unitPrice")));
|
||||
sp.setTotalPrice(toBD(row.get("totalPrice")));
|
||||
sp.setDeliveryDays(row.get("deliveryDays") == null ? 0 : ((Number) row.get("deliveryDays")).intValue());
|
||||
vo.getPrices().add(sp);
|
||||
}
|
||||
}
|
||||
|
||||
// mark lowest price per item
|
||||
for (BizComparisonVO vo : itemMap.values()) {
|
||||
BigDecimal min = vo.getPrices().stream()
|
||||
.filter(p -> p.getUnitPrice() != null)
|
||||
.map(BizComparisonVO.SupplierPrice::getUnitPrice)
|
||||
.min(BigDecimal::compareTo).orElse(null);
|
||||
if (min != null) {
|
||||
for (BizComparisonVO.SupplierPrice p : vo.getPrices()) {
|
||||
p.setLowestPrice(min.compareTo(p.getUnitPrice()) == 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
return new ArrayList<>(itemMap.values());
|
||||
}
|
||||
|
||||
private Long toLong(Object v) { return v == null ? null : ((Number)v).longValue(); }
|
||||
private BigDecimal toBD(Object v) { return v == null ? null : new BigDecimal(v.toString()); }
|
||||
private String str(Object v) { return v == null ? "" : v.toString(); }
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.system.service.bid.impl;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizMaterial;
|
||||
import com.ruoyi.system.mapper.bid.BizMaterialMapper;
|
||||
import com.ruoyi.system.service.bid.IBizMaterialService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BizMaterialServiceImpl implements IBizMaterialService {
|
||||
@Autowired
|
||||
private BizMaterialMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<BizMaterial> selectBizMaterialList(BizMaterial query) {
|
||||
return mapper.selectBizMaterialList(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizMaterial selectBizMaterialById(Long id) {
|
||||
return mapper.selectBizMaterialById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertBizMaterial(BizMaterial record) {
|
||||
return mapper.insertBizMaterial(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBizMaterial(BizMaterial record) {
|
||||
return mapper.updateBizMaterial(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBizMaterialById(Long id) {
|
||||
return mapper.deleteBizMaterialById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBizMaterialByIds(Long[] ids) {
|
||||
return mapper.deleteBizMaterialByIds(ids);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.system.service.bid.impl;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizOrderObjection;
|
||||
import com.ruoyi.system.mapper.bid.BizOrderObjectionMapper;
|
||||
import com.ruoyi.system.service.bid.IBizOrderObjectionService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BizOrderObjectionServiceImpl implements IBizOrderObjectionService {
|
||||
@Autowired
|
||||
private BizOrderObjectionMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<BizOrderObjection> selectBizOrderObjectionList(BizOrderObjection query) {
|
||||
return mapper.selectBizOrderObjectionList(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizOrderObjection selectBizOrderObjectionById(Long id) {
|
||||
return mapper.selectBizOrderObjectionById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertBizOrderObjection(BizOrderObjection record) {
|
||||
return mapper.insertBizOrderObjection(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBizOrderObjection(BizOrderObjection record) {
|
||||
return mapper.updateBizOrderObjection(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBizOrderObjectionById(Long id) {
|
||||
return mapper.deleteBizOrderObjectionById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBizOrderObjectionByIds(Long[] ids) {
|
||||
return mapper.deleteBizOrderObjectionByIds(ids);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.ruoyi.system.service.bid.impl;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizPurchaseOrder;
|
||||
import com.ruoyi.system.domain.bid.BizPurchaseOrderItem;
|
||||
import com.ruoyi.system.domain.bid.BizTransaction;
|
||||
import com.ruoyi.system.mapper.bid.BizPurchaseOrderItemMapper;
|
||||
import com.ruoyi.system.mapper.bid.BizPurchaseOrderMapper;
|
||||
import com.ruoyi.system.mapper.bid.BizTransactionMapper;
|
||||
import com.ruoyi.system.service.bid.IBizPurchaseOrderService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BizPurchaseOrderServiceImpl implements IBizPurchaseOrderService {
|
||||
@Autowired private BizPurchaseOrderMapper poMapper;
|
||||
@Autowired private BizPurchaseOrderItemMapper itemMapper;
|
||||
@Autowired private BizTransactionMapper txMapper;
|
||||
|
||||
@Override
|
||||
public List<BizPurchaseOrder> selectBizPurchaseOrderList(BizPurchaseOrder q) { return poMapper.selectBizPurchaseOrderList(q); }
|
||||
|
||||
@Override
|
||||
public BizPurchaseOrder selectBizPurchaseOrderById(Long id) {
|
||||
BizPurchaseOrder po = poMapper.selectBizPurchaseOrderById(id);
|
||||
if (po != null) po.setItems(itemMapper.selectItemsByPoId(id));
|
||||
return po;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertBizPurchaseOrder(BizPurchaseOrder po) {
|
||||
if (po.getPoNo() == null || po.getPoNo().isEmpty()) {
|
||||
po.setPoNo("PO" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()));
|
||||
}
|
||||
int rows = poMapper.insertBizPurchaseOrder(po);
|
||||
if (po.getItems() != null) {
|
||||
BigDecimal total = BigDecimal.ZERO;
|
||||
for (BizPurchaseOrderItem item : po.getItems()) {
|
||||
item.setPoId(po.getPoId());
|
||||
if (item.getUnitPrice() != null && item.getQuantity() != null) {
|
||||
item.setTotalPrice(item.getUnitPrice().multiply(item.getQuantity()));
|
||||
total = total.add(item.getTotalPrice());
|
||||
}
|
||||
itemMapper.insertBizPurchaseOrderItem(item);
|
||||
}
|
||||
po.setTotalAmount(total);
|
||||
poMapper.updateBizPurchaseOrder(po);
|
||||
}
|
||||
// record transaction
|
||||
BizTransaction tx = new BizTransaction();
|
||||
tx.setTenantId(po.getTenantId());
|
||||
tx.setPoId(po.getPoId());
|
||||
tx.setSupplierId(po.getSupplierId());
|
||||
tx.setTxType("PO");
|
||||
tx.setTxNo(po.getPoNo());
|
||||
tx.setAmount(po.getTotalAmount());
|
||||
tx.setCurrency(po.getCurrency());
|
||||
tx.setDescription("创建采购单 " + po.getPoNo());
|
||||
tx.setOperator(po.getCreateBy());
|
||||
txMapper.insertBizTransaction(tx);
|
||||
return rows;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateBizPurchaseOrder(BizPurchaseOrder po) {
|
||||
itemMapper.deleteByPoId(po.getPoId());
|
||||
if (po.getItems() != null) {
|
||||
BigDecimal total = BigDecimal.ZERO;
|
||||
for (BizPurchaseOrderItem item : po.getItems()) {
|
||||
item.setPoId(po.getPoId());
|
||||
if (item.getUnitPrice() != null && item.getQuantity() != null) {
|
||||
item.setTotalPrice(item.getUnitPrice().multiply(item.getQuantity()));
|
||||
total = total.add(item.getTotalPrice());
|
||||
}
|
||||
itemMapper.insertBizPurchaseOrderItem(item);
|
||||
}
|
||||
po.setTotalAmount(total);
|
||||
}
|
||||
return poMapper.updateBizPurchaseOrder(po);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int confirmOrder(Long poId) {
|
||||
BizPurchaseOrder po = new BizPurchaseOrder();
|
||||
po.setPoId(poId);
|
||||
po.setStatus("confirmed");
|
||||
return poMapper.updateBizPurchaseOrder(po);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBizPurchaseOrderById(Long id) { return poMapper.deleteBizPurchaseOrderById(id); }
|
||||
|
||||
@Override
|
||||
public int deleteBizPurchaseOrderByIds(Long[] ids) { return poMapper.deleteBizPurchaseOrderByIds(ids); }
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.ruoyi.system.service.bid.impl;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizQuotation;
|
||||
import com.ruoyi.system.domain.bid.BizQuotationItem;
|
||||
import com.ruoyi.system.mapper.bid.BizQuotationItemMapper;
|
||||
import com.ruoyi.system.mapper.bid.BizQuotationMapper;
|
||||
import com.ruoyi.system.service.bid.IBizQuotationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BizQuotationServiceImpl implements IBizQuotationService {
|
||||
@Autowired private BizQuotationMapper mapper;
|
||||
@Autowired private BizQuotationItemMapper itemMapper;
|
||||
|
||||
@Override
|
||||
public List<BizQuotation> selectBizQuotationList(BizQuotation query) { return mapper.selectBizQuotationList(query); }
|
||||
|
||||
@Override
|
||||
public BizQuotation selectBizQuotationById(Long id) {
|
||||
BizQuotation q = mapper.selectBizQuotationById(id);
|
||||
if (q != null) q.setItems(itemMapper.selectItemsByQuotationId(id));
|
||||
return q;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertBizQuotation(BizQuotation q) {
|
||||
int rows = mapper.insertBizQuotation(q);
|
||||
saveItems(q);
|
||||
return rows;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateBizQuotation(BizQuotation q) {
|
||||
itemMapper.deleteByQuotationId(q.getQuotationId());
|
||||
saveItems(q);
|
||||
return mapper.updateBizQuotation(q);
|
||||
}
|
||||
|
||||
private void saveItems(BizQuotation q) {
|
||||
if (q.getItems() == null) return;
|
||||
BigDecimal total = BigDecimal.ZERO;
|
||||
for (BizQuotationItem item : q.getItems()) {
|
||||
item.setQuotationId(q.getQuotationId());
|
||||
if (item.getUnitPrice() != null && item.getQuantity() != null) {
|
||||
item.setTotalPrice(item.getUnitPrice().multiply(item.getQuantity()));
|
||||
total = total.add(item.getTotalPrice());
|
||||
}
|
||||
itemMapper.insertBizQuotationItem(item);
|
||||
}
|
||||
BizQuotation upd = new BizQuotation();
|
||||
upd.setQuotationId(q.getQuotationId());
|
||||
upd.setTotalAmount(total);
|
||||
mapper.updateBizQuotation(upd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int submitQuotation(Long id) {
|
||||
BizQuotation q = new BizQuotation();
|
||||
q.setQuotationId(id);
|
||||
q.setStatus("submitted");
|
||||
q.setSubmitTime(new Date());
|
||||
return mapper.updateBizQuotation(q);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int acceptQuotation(Long id) {
|
||||
BizQuotation q = new BizQuotation();
|
||||
q.setQuotationId(id);
|
||||
q.setStatus("accepted");
|
||||
return mapper.updateBizQuotation(q);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int rejectQuotation(Long id) {
|
||||
BizQuotation q = new BizQuotation();
|
||||
q.setQuotationId(id);
|
||||
q.setStatus("rejected");
|
||||
return mapper.updateBizQuotation(q);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBizQuotationById(Long id) { return mapper.deleteBizQuotationById(id); }
|
||||
|
||||
@Override
|
||||
public int deleteBizQuotationByIds(Long[] ids) { return mapper.deleteBizQuotationByIds(ids); }
|
||||
|
||||
@Override
|
||||
public List<BizQuotationItem> selectItemsByQuotationId(Long quotationId) {
|
||||
return itemMapper.selectItemsByQuotationId(quotationId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.ruoyi.system.service.bid.impl;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizRfq;
|
||||
import com.ruoyi.system.domain.bid.BizRfqItem;
|
||||
import com.ruoyi.system.mapper.bid.BizRfqItemMapper;
|
||||
import com.ruoyi.system.mapper.bid.BizRfqMapper;
|
||||
import com.ruoyi.system.service.bid.IBizRfqService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BizRfqServiceImpl implements IBizRfqService {
|
||||
@Autowired private BizRfqMapper rfqMapper;
|
||||
@Autowired private BizRfqItemMapper itemMapper;
|
||||
|
||||
@Override
|
||||
public List<BizRfq> selectBizRfqList(BizRfq query) { return rfqMapper.selectBizRfqList(query); }
|
||||
|
||||
@Override
|
||||
public BizRfq selectBizRfqById(Long id) {
|
||||
BizRfq rfq = rfqMapper.selectBizRfqById(id);
|
||||
if (rfq != null) rfq.setItems(itemMapper.selectItemsByRfqId(id));
|
||||
return rfq;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertBizRfq(BizRfq rfq) {
|
||||
rfq.setStatus("draft");
|
||||
int rows = rfqMapper.insertBizRfq(rfq);
|
||||
if (rfq.getItems() != null) {
|
||||
for (BizRfqItem item : rfq.getItems()) {
|
||||
item.setRfqId(rfq.getRfqId());
|
||||
itemMapper.insertBizRfqItem(item);
|
||||
}
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateBizRfq(BizRfq rfq) {
|
||||
itemMapper.deleteByRfqId(rfq.getRfqId());
|
||||
if (rfq.getItems() != null) {
|
||||
for (BizRfqItem item : rfq.getItems()) {
|
||||
item.setRfqId(rfq.getRfqId());
|
||||
itemMapper.insertBizRfqItem(item);
|
||||
}
|
||||
}
|
||||
return rfqMapper.updateBizRfq(rfq);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBizRfqById(Long id) { return rfqMapper.deleteBizRfqById(id); }
|
||||
|
||||
@Override
|
||||
public int deleteBizRfqByIds(Long[] ids) { return rfqMapper.deleteBizRfqByIds(ids); }
|
||||
|
||||
@Override
|
||||
public int publishRfq(Long rfqId, Long[] supplierIds) {
|
||||
BizRfq rfq = new BizRfq();
|
||||
rfq.setRfqId(rfqId);
|
||||
rfq.setStatus("published");
|
||||
return rfqMapper.updateBizRfq(rfq);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BizRfqItem> selectItemsByRfqId(Long rfqId) {
|
||||
return itemMapper.selectItemsByRfqId(rfqId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.system.service.bid.impl;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizSupplierEvaluation;
|
||||
import com.ruoyi.system.mapper.bid.BizSupplierEvaluationMapper;
|
||||
import com.ruoyi.system.service.bid.IBizSupplierEvaluationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BizSupplierEvaluationServiceImpl implements IBizSupplierEvaluationService {
|
||||
@Autowired
|
||||
private BizSupplierEvaluationMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<BizSupplierEvaluation> selectBizSupplierEvaluationList(BizSupplierEvaluation query) {
|
||||
return mapper.selectBizSupplierEvaluationList(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizSupplierEvaluation selectBizSupplierEvaluationById(Long id) {
|
||||
return mapper.selectBizSupplierEvaluationById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertBizSupplierEvaluation(BizSupplierEvaluation record) {
|
||||
return mapper.insertBizSupplierEvaluation(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBizSupplierEvaluation(BizSupplierEvaluation record) {
|
||||
return mapper.updateBizSupplierEvaluation(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBizSupplierEvaluationById(Long id) {
|
||||
return mapper.deleteBizSupplierEvaluationById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBizSupplierEvaluationByIds(Long[] ids) {
|
||||
return mapper.deleteBizSupplierEvaluationByIds(ids);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.system.service.bid.impl;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizSupplier;
|
||||
import com.ruoyi.system.mapper.bid.BizSupplierMapper;
|
||||
import com.ruoyi.system.service.bid.IBizSupplierService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BizSupplierServiceImpl implements IBizSupplierService {
|
||||
@Autowired
|
||||
private BizSupplierMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<BizSupplier> selectBizSupplierList(BizSupplier query) {
|
||||
return mapper.selectBizSupplierList(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizSupplier selectBizSupplierById(Long id) {
|
||||
return mapper.selectBizSupplierById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertBizSupplier(BizSupplier record) {
|
||||
return mapper.insertBizSupplier(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBizSupplier(BizSupplier record) {
|
||||
return mapper.updateBizSupplier(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBizSupplierById(Long id) {
|
||||
return mapper.deleteBizSupplierById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBizSupplierByIds(Long[] ids) {
|
||||
return mapper.deleteBizSupplierByIds(ids);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.system.service.bid.impl;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizTenant;
|
||||
import com.ruoyi.system.mapper.bid.BizTenantMapper;
|
||||
import com.ruoyi.system.service.bid.IBizTenantService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BizTenantServiceImpl implements IBizTenantService {
|
||||
@Autowired
|
||||
private BizTenantMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<BizTenant> selectBizTenantList(BizTenant query) {
|
||||
return mapper.selectBizTenantList(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizTenant selectBizTenantById(Long id) {
|
||||
return mapper.selectBizTenantById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertBizTenant(BizTenant record) {
|
||||
return mapper.insertBizTenant(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBizTenant(BizTenant record) {
|
||||
return mapper.updateBizTenant(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBizTenantById(Long id) {
|
||||
return mapper.deleteBizTenantById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBizTenantByIds(Long[] ids) {
|
||||
return mapper.deleteBizTenantByIds(ids);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.system.service.bid.impl;
|
||||
|
||||
import com.ruoyi.system.domain.bid.BizTransaction;
|
||||
import com.ruoyi.system.mapper.bid.BizTransactionMapper;
|
||||
import com.ruoyi.system.service.bid.IBizTransactionService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BizTransactionServiceImpl implements IBizTransactionService {
|
||||
@Autowired
|
||||
private BizTransactionMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<BizTransaction> selectBizTransactionList(BizTransaction query) {
|
||||
return mapper.selectBizTransactionList(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizTransaction selectBizTransactionById(Long id) {
|
||||
return mapper.selectBizTransactionById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertBizTransaction(BizTransaction record) {
|
||||
return mapper.insertBizTransaction(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBizTransaction(BizTransaction record) {
|
||||
return mapper.updateBizTransaction(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBizTransactionById(Long id) {
|
||||
return mapper.deleteBizTransactionById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBizTransactionByIds(Long[] ids) {
|
||||
return mapper.deleteBizTransactionByIds(ids);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.bid.BizComparisonMapper">
|
||||
<select id="selectComparisonData" resultType="java.util.HashMap">
|
||||
SELECT
|
||||
ri.item_id AS rfqItemId,
|
||||
ri.material_name AS materialName,
|
||||
ri.spec AS spec,
|
||||
ri.unit AS unit,
|
||||
ri.quantity AS quantity,
|
||||
qi.unit_price AS unitPrice,
|
||||
qi.total_price AS totalPrice,
|
||||
qi.delivery_days AS deliveryDays,
|
||||
q.quotation_id AS quotationId,
|
||||
q.quote_no AS quoteNo,
|
||||
q.supplier_id AS supplierId,
|
||||
s.supplier_name AS supplierName
|
||||
FROM biz_rfq_item ri
|
||||
LEFT JOIN biz_quotation_item qi ON qi.rfq_item_id = ri.item_id
|
||||
LEFT JOIN biz_quotation q ON q.quotation_id = qi.quotation_id AND q.status = 'submitted'
|
||||
LEFT JOIN biz_supplier s ON s.supplier_id = q.supplier_id
|
||||
WHERE ri.rfq_id = #{rfqId}
|
||||
ORDER BY ri.item_id, qi.unit_price
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.bid.BizMaterialMapper">
|
||||
|
||||
<resultMap id="BaseRM" type="com.ruoyi.system.domain.bid.BizMaterial">
|
||||
<id property="materialId" column="material_id"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="categoryId" column="category_id"/>
|
||||
<result property="materialCode" column="material_code"/>
|
||||
<result property="materialName" column="material_name"/>
|
||||
<result property="spec" column="spec"/>
|
||||
<result property="unit" column="unit"/>
|
||||
<result property="brand" column="brand"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectBizMaterialList" resultMap="BaseRM">
|
||||
SELECT m.* FROM biz_material m
|
||||
<where>
|
||||
<if test="tenantId != null"> AND m.tenant_id = #{tenantId}</if>
|
||||
<if test="materialCode != null and materialCode != ''"> AND m.material_code LIKE CONCAT('%',#{materialCode},'%')</if>
|
||||
<if test="materialName != null and materialName != ''"> AND m.material_name LIKE CONCAT('%',#{materialName},'%')</if>
|
||||
<if test="status != null and status != ''"> AND m.status = #{status}</if>
|
||||
</where>
|
||||
ORDER BY m.material_id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectBizMaterialById" resultMap="BaseRM">
|
||||
SELECT * FROM biz_material WHERE material_id=#{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBizMaterial" useGeneratedKeys="true" keyProperty="materialId">
|
||||
INSERT INTO biz_material(tenant_id,category_id,material_code,material_name,spec,unit,brand,description,status,create_by,create_time)
|
||||
VALUES(#{tenantId},#{categoryId},#{materialCode},#{materialName},#{spec},#{unit},#{brand},#{description},#{status},#{createBy},NOW())
|
||||
</insert>
|
||||
|
||||
<update id="updateBizMaterial">
|
||||
UPDATE biz_material
|
||||
<set>
|
||||
<if test="materialName != null">material_name=#{materialName},</if>
|
||||
<if test="materialCode != null">material_code=#{materialCode},</if>
|
||||
<if test="spec != null">spec=#{spec},</if>
|
||||
<if test="unit != null">unit=#{unit},</if>
|
||||
<if test="brand != null">brand=#{brand},</if>
|
||||
<if test="description != null">description=#{description},</if>
|
||||
<if test="categoryId != null">category_id=#{categoryId},</if>
|
||||
<if test="status != null">status=#{status},</if>
|
||||
update_by=#{updateBy}, update_time=NOW()
|
||||
</set>
|
||||
WHERE material_id=#{materialId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBizMaterialById">DELETE FROM biz_material WHERE material_id=#{id}</delete>
|
||||
<delete id="deleteBizMaterialByIds">
|
||||
DELETE FROM biz_material WHERE material_id IN
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">#{id}</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.bid.BizOrderObjectionMapper">
|
||||
<resultMap id="BaseRM" type="com.ruoyi.system.domain.bid.BizOrderObjection">
|
||||
<id property="objectionId" column="objection_id"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="poId" column="po_id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="reason" column="reason"/>
|
||||
<result property="attachment" column="attachment"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="resolution" column="resolution"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="resolveTime" column="resolve_time"/>
|
||||
<result property="supplierName" column="supplier_name"/>
|
||||
<result property="poNo" column="po_no"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectBizOrderObjectionList" resultMap="BaseRM">
|
||||
SELECT o.*, s.supplier_name, p.po_no
|
||||
FROM biz_order_objection o
|
||||
LEFT JOIN biz_supplier s ON o.supplier_id=s.supplier_id
|
||||
LEFT JOIN biz_purchase_order p ON o.po_id=p.po_id
|
||||
<where>
|
||||
<if test="tenantId != null"> AND o.tenant_id=#{tenantId}</if>
|
||||
<if test="status != null and status != ''"> AND o.status=#{status}</if>
|
||||
</where>
|
||||
ORDER BY o.objection_id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectBizOrderObjectionById" resultMap="BaseRM">
|
||||
SELECT o.*, s.supplier_name, p.po_no FROM biz_order_objection o
|
||||
LEFT JOIN biz_supplier s ON o.supplier_id=s.supplier_id
|
||||
LEFT JOIN biz_purchase_order p ON o.po_id=p.po_id
|
||||
WHERE o.objection_id=#{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBizOrderObjection" useGeneratedKeys="true" keyProperty="objectionId">
|
||||
INSERT INTO biz_order_objection(tenant_id,po_id,supplier_id,reason,attachment,status,create_by,create_time)
|
||||
VALUES(#{tenantId},#{poId},#{supplierId},#{reason},#{attachment},'pending',#{createBy},NOW())
|
||||
</insert>
|
||||
|
||||
<update id="updateBizOrderObjection">
|
||||
UPDATE biz_order_objection
|
||||
<set>
|
||||
<if test="status != null">status=#{status},</if>
|
||||
<if test="resolution != null">resolution=#{resolution},</if>
|
||||
<if test="resolveTime != null">resolve_time=#{resolveTime},</if>
|
||||
</set>
|
||||
WHERE objection_id=#{objectionId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBizOrderObjectionById">DELETE FROM biz_order_objection WHERE objection_id=#{id}</delete>
|
||||
<delete id="deleteBizOrderObjectionByIds">
|
||||
DELETE FROM biz_order_objection WHERE objection_id IN
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">#{id}</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.bid.BizPurchaseOrderItemMapper">
|
||||
<resultMap id="BaseRM" type="com.ruoyi.system.domain.bid.BizPurchaseOrderItem">
|
||||
<id property="itemId" column="item_id"/>
|
||||
<result property="poId" column="po_id"/>
|
||||
<result property="materialId" column="material_id"/>
|
||||
<result property="materialName" column="material_name"/>
|
||||
<result property="spec" column="spec"/>
|
||||
<result property="unit" column="unit"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<result property="unitPrice" column="unit_price"/>
|
||||
<result property="totalPrice" column="total_price"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectItemsByPoId" resultMap="BaseRM">
|
||||
SELECT * FROM biz_purchase_order_item WHERE po_id=#{poId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBizPurchaseOrderItem" useGeneratedKeys="true" keyProperty="itemId">
|
||||
INSERT INTO biz_purchase_order_item(po_id,material_id,material_name,spec,unit,quantity,unit_price,total_price,remark)
|
||||
VALUES(#{poId},#{materialId},#{materialName},#{spec},#{unit},#{quantity},#{unitPrice},#{totalPrice},#{remark})
|
||||
</insert>
|
||||
|
||||
<delete id="deleteByPoId">DELETE FROM biz_purchase_order_item WHERE po_id=#{poId}</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.bid.BizPurchaseOrderMapper">
|
||||
|
||||
<resultMap id="BaseRM" type="com.ruoyi.system.domain.bid.BizPurchaseOrder">
|
||||
<id property="poId" column="po_id"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="poNo" column="po_no"/>
|
||||
<result property="rfqId" column="rfq_id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="totalAmount" column="total_amount"/>
|
||||
<result property="currency" column="currency"/>
|
||||
<result property="deliveryAddr" column="delivery_addr"/>
|
||||
<result property="deliveryDate" column="delivery_date"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="supplierName" column="supplier_name"/>
|
||||
<result property="rfqTitle" column="rfq_title"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectBizPurchaseOrderList" resultMap="BaseRM">
|
||||
SELECT p.*, s.supplier_name, r.rfq_title
|
||||
FROM biz_purchase_order p
|
||||
LEFT JOIN biz_supplier s ON p.supplier_id=s.supplier_id
|
||||
LEFT JOIN biz_rfq r ON p.rfq_id=r.rfq_id
|
||||
<where>
|
||||
<if test="tenantId != null"> AND p.tenant_id=#{tenantId}</if>
|
||||
<if test="poNo != null and poNo != ''"> AND p.po_no LIKE CONCAT('%',#{poNo},'%')</if>
|
||||
<if test="supplierId != null"> AND p.supplier_id=#{supplierId}</if>
|
||||
<if test="status != null and status != ''"> AND p.status=#{status}</if>
|
||||
</where>
|
||||
ORDER BY p.po_id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectBizPurchaseOrderById" resultMap="BaseRM">
|
||||
SELECT p.*, s.supplier_name, r.rfq_title
|
||||
FROM biz_purchase_order p
|
||||
LEFT JOIN biz_supplier s ON p.supplier_id=s.supplier_id
|
||||
LEFT JOIN biz_rfq r ON p.rfq_id=r.rfq_id
|
||||
WHERE p.po_id=#{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBizPurchaseOrder" useGeneratedKeys="true" keyProperty="poId">
|
||||
INSERT INTO biz_purchase_order(tenant_id,po_no,rfq_id,supplier_id,total_amount,currency,delivery_addr,delivery_date,status,remark,create_by,create_time)
|
||||
VALUES(#{tenantId},#{poNo},#{rfqId},#{supplierId},#{totalAmount},#{currency},#{deliveryAddr},#{deliveryDate},#{status},#{remark},#{createBy},NOW())
|
||||
</insert>
|
||||
|
||||
<update id="updateBizPurchaseOrder">
|
||||
UPDATE biz_purchase_order
|
||||
<set>
|
||||
<if test="totalAmount != null">total_amount=#{totalAmount},</if>
|
||||
<if test="deliveryAddr != null">delivery_addr=#{deliveryAddr},</if>
|
||||
<if test="deliveryDate != null">delivery_date=#{deliveryDate},</if>
|
||||
<if test="status != null">status=#{status},</if>
|
||||
<if test="remark != null">remark=#{remark},</if>
|
||||
update_by=#{updateBy}, update_time=NOW()
|
||||
</set>
|
||||
WHERE po_id=#{poId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBizPurchaseOrderById">DELETE FROM biz_purchase_order WHERE po_id=#{id}</delete>
|
||||
<delete id="deleteBizPurchaseOrderByIds">
|
||||
DELETE FROM biz_purchase_order WHERE po_id IN
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">#{id}</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.bid.BizQuotationItemMapper">
|
||||
<resultMap id="BaseRM" type="com.ruoyi.system.domain.bid.BizQuotationItem">
|
||||
<id property="itemId" column="item_id"/>
|
||||
<result property="quotationId" column="quotation_id"/>
|
||||
<result property="rfqItemId" column="rfq_item_id"/>
|
||||
<result property="materialName" column="material_name"/>
|
||||
<result property="spec" column="spec"/>
|
||||
<result property="unit" column="unit"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<result property="unitPrice" column="unit_price"/>
|
||||
<result property="totalPrice" column="total_price"/>
|
||||
<result property="deliveryDays" column="delivery_days"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectItemsByQuotationId" resultMap="BaseRM">
|
||||
SELECT * FROM biz_quotation_item WHERE quotation_id=#{quotationId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBizQuotationItem" useGeneratedKeys="true" keyProperty="itemId">
|
||||
INSERT INTO biz_quotation_item(quotation_id,rfq_item_id,material_name,spec,unit,quantity,unit_price,total_price,delivery_days,remark)
|
||||
VALUES(#{quotationId},#{rfqItemId},#{materialName},#{spec},#{unit},#{quantity},#{unitPrice},#{totalPrice},#{deliveryDays},#{remark})
|
||||
</insert>
|
||||
|
||||
<delete id="deleteByQuotationId">DELETE FROM biz_quotation_item WHERE quotation_id=#{quotationId}</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.bid.BizQuotationMapper">
|
||||
|
||||
<resultMap id="BaseRM" type="com.ruoyi.system.domain.bid.BizQuotation">
|
||||
<id property="quotationId" column="quotation_id"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="rfqId" column="rfq_id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="quoteNo" column="quote_no"/>
|
||||
<result property="validDays" column="valid_days"/>
|
||||
<result property="deliveryDays" column="delivery_days"/>
|
||||
<result property="totalAmount" column="total_amount"/>
|
||||
<result property="currency" column="currency"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="note" column="note"/>
|
||||
<result property="submitTime" column="submit_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="supplierName" column="supplier_name"/>
|
||||
<result property="rfqTitle" column="rfq_title"/>
|
||||
<result property="rfqNo" column="rfq_no"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectBizQuotationList" resultMap="BaseRM">
|
||||
SELECT q.*, s.supplier_name, r.rfq_title, r.rfq_no
|
||||
FROM biz_quotation q
|
||||
LEFT JOIN biz_supplier s ON q.supplier_id=s.supplier_id
|
||||
LEFT JOIN biz_rfq r ON q.rfq_id=r.rfq_id
|
||||
<where>
|
||||
<if test="tenantId != null"> AND q.tenant_id=#{tenantId}</if>
|
||||
<if test="rfqId != null"> AND q.rfq_id=#{rfqId}</if>
|
||||
<if test="supplierId != null"> AND q.supplier_id=#{supplierId}</if>
|
||||
<if test="status != null and status != ''"> AND q.status=#{status}</if>
|
||||
</where>
|
||||
ORDER BY q.quotation_id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectBizQuotationById" resultMap="BaseRM">
|
||||
SELECT q.*, s.supplier_name, r.rfq_title, r.rfq_no
|
||||
FROM biz_quotation q
|
||||
LEFT JOIN biz_supplier s ON q.supplier_id=s.supplier_id
|
||||
LEFT JOIN biz_rfq r ON q.rfq_id=r.rfq_id
|
||||
WHERE q.quotation_id=#{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBizQuotation" useGeneratedKeys="true" keyProperty="quotationId">
|
||||
INSERT INTO biz_quotation(tenant_id,rfq_id,supplier_id,quote_no,valid_days,delivery_days,total_amount,currency,status,note,create_by,create_time)
|
||||
VALUES(#{tenantId},#{rfqId},#{supplierId},#{quoteNo},#{validDays},#{deliveryDays},#{totalAmount},#{currency},#{status},#{note},#{createBy},NOW())
|
||||
</insert>
|
||||
|
||||
<update id="updateBizQuotation">
|
||||
UPDATE biz_quotation
|
||||
<set>
|
||||
<if test="validDays != null">valid_days=#{validDays},</if>
|
||||
<if test="deliveryDays != null">delivery_days=#{deliveryDays},</if>
|
||||
<if test="totalAmount != null">total_amount=#{totalAmount},</if>
|
||||
<if test="status != null">status=#{status},</if>
|
||||
<if test="note != null">note=#{note},</if>
|
||||
<if test="submitTime != null">submit_time=#{submitTime},</if>
|
||||
update_time=NOW()
|
||||
</set>
|
||||
WHERE quotation_id=#{quotationId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBizQuotationById">DELETE FROM biz_quotation WHERE quotation_id=#{id}</delete>
|
||||
<delete id="deleteBizQuotationByIds">
|
||||
DELETE FROM biz_quotation WHERE quotation_id IN
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">#{id}</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.bid.BizRfqItemMapper">
|
||||
<resultMap id="BaseRM" type="com.ruoyi.system.domain.bid.BizRfqItem">
|
||||
<id property="itemId" column="item_id"/>
|
||||
<result property="rfqId" column="rfq_id"/>
|
||||
<result property="materialId" column="material_id"/>
|
||||
<result property="materialName" column="material_name"/>
|
||||
<result property="spec" column="spec"/>
|
||||
<result property="unit" column="unit"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<result property="expectedPrice" column="expected_price"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectItemsByRfqId" resultMap="BaseRM">
|
||||
SELECT * FROM biz_rfq_item WHERE rfq_id=#{rfqId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBizRfqItem" useGeneratedKeys="true" keyProperty="itemId">
|
||||
INSERT INTO biz_rfq_item(rfq_id,material_id,material_name,spec,unit,quantity,expected_price,remark)
|
||||
VALUES(#{rfqId},#{materialId},#{materialName},#{spec},#{unit},#{quantity},#{expectedPrice},#{remark})
|
||||
</insert>
|
||||
|
||||
<delete id="deleteByRfqId">DELETE FROM biz_rfq_item WHERE rfq_id=#{rfqId}</delete>
|
||||
</mapper>
|
||||
56
ruoyi-system/src/main/resources/mapper/bid/BizRfqMapper.xml
Normal file
56
ruoyi-system/src/main/resources/mapper/bid/BizRfqMapper.xml
Normal file
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.bid.BizRfqMapper">
|
||||
|
||||
<resultMap id="BaseRM" type="com.ruoyi.system.domain.bid.BizRfq">
|
||||
<id property="rfqId" column="rfq_id"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="rfqNo" column="rfq_no"/>
|
||||
<result property="rfqTitle" column="rfq_title"/>
|
||||
<result property="deadline" column="deadline"/>
|
||||
<result property="deliveryAddr" column="delivery_addr"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectBizRfqList" resultMap="BaseRM">
|
||||
SELECT * FROM biz_rfq
|
||||
<where>
|
||||
<if test="tenantId != null"> AND tenant_id=#{tenantId}</if>
|
||||
<if test="rfqNo != null and rfqNo != ''"> AND rfq_no LIKE CONCAT('%',#{rfqNo},'%')</if>
|
||||
<if test="rfqTitle != null and rfqTitle != ''"> AND rfq_title LIKE CONCAT('%',#{rfqTitle},'%')</if>
|
||||
<if test="status != null and status != ''"> AND status=#{status}</if>
|
||||
</where>
|
||||
ORDER BY rfq_id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectBizRfqById" resultMap="BaseRM">SELECT * FROM biz_rfq WHERE rfq_id=#{id}</select>
|
||||
|
||||
<insert id="insertBizRfq" useGeneratedKeys="true" keyProperty="rfqId">
|
||||
INSERT INTO biz_rfq(tenant_id,rfq_no,rfq_title,deadline,delivery_addr,status,remark,create_by,create_time)
|
||||
VALUES(#{tenantId},#{rfqNo},#{rfqTitle},#{deadline},#{deliveryAddr},#{status},#{remark},#{createBy},NOW())
|
||||
</insert>
|
||||
|
||||
<update id="updateBizRfq">
|
||||
UPDATE biz_rfq
|
||||
<set>
|
||||
<if test="rfqTitle != null">rfq_title=#{rfqTitle},</if>
|
||||
<if test="deadline != null">deadline=#{deadline},</if>
|
||||
<if test="deliveryAddr != null">delivery_addr=#{deliveryAddr},</if>
|
||||
<if test="status != null">status=#{status},</if>
|
||||
<if test="remark != null">remark=#{remark},</if>
|
||||
update_by=#{updateBy}, update_time=NOW()
|
||||
</set>
|
||||
WHERE rfq_id=#{rfqId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBizRfqById">DELETE FROM biz_rfq WHERE rfq_id=#{id}</delete>
|
||||
<delete id="deleteBizRfqByIds">
|
||||
DELETE FROM biz_rfq WHERE rfq_id IN
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">#{id}</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.bid.BizSupplierEvaluationMapper">
|
||||
<resultMap id="BaseRM" type="com.ruoyi.system.domain.bid.BizSupplierEvaluation">
|
||||
<id property="evalId" column="eval_id"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="poId" column="po_id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="qualityScore" column="quality_score"/>
|
||||
<result property="deliveryScore" column="delivery_score"/>
|
||||
<result property="serviceScore" column="service_score"/>
|
||||
<result property="priceScore" column="price_score"/>
|
||||
<result property="totalScore" column="total_score"/>
|
||||
<result property="comment" column="comment"/>
|
||||
<result property="evaluator" column="evaluator"/>
|
||||
<result property="evalTime" column="eval_time"/>
|
||||
<result property="supplierName" column="supplier_name"/>
|
||||
<result property="poNo" column="po_no"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectBizSupplierEvaluationList" resultMap="BaseRM">
|
||||
SELECT e.*, s.supplier_name, p.po_no
|
||||
FROM biz_supplier_evaluation e
|
||||
LEFT JOIN biz_supplier s ON e.supplier_id=s.supplier_id
|
||||
LEFT JOIN biz_purchase_order p ON e.po_id=p.po_id
|
||||
<where>
|
||||
<if test="tenantId != null"> AND e.tenant_id=#{tenantId}</if>
|
||||
<if test="supplierId != null"> AND e.supplier_id=#{supplierId}</if>
|
||||
</where>
|
||||
ORDER BY e.eval_id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectBizSupplierEvaluationById" resultMap="BaseRM">
|
||||
SELECT e.*, s.supplier_name, p.po_no FROM biz_supplier_evaluation e
|
||||
LEFT JOIN biz_supplier s ON e.supplier_id=s.supplier_id
|
||||
LEFT JOIN biz_purchase_order p ON e.po_id=p.po_id
|
||||
WHERE e.eval_id=#{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBizSupplierEvaluation" useGeneratedKeys="true" keyProperty="evalId">
|
||||
INSERT INTO biz_supplier_evaluation(tenant_id,po_id,supplier_id,quality_score,delivery_score,service_score,price_score,total_score,comment,evaluator,eval_time)
|
||||
VALUES(#{tenantId},#{poId},#{supplierId},#{qualityScore},#{deliveryScore},#{serviceScore},#{priceScore},#{totalScore},#{comment},#{evaluator},NOW())
|
||||
</insert>
|
||||
|
||||
<update id="updateBizSupplierEvaluation">
|
||||
UPDATE biz_supplier_evaluation
|
||||
<set>
|
||||
<if test="qualityScore != null">quality_score=#{qualityScore},</if>
|
||||
<if test="deliveryScore != null">delivery_score=#{deliveryScore},</if>
|
||||
<if test="serviceScore != null">service_score=#{serviceScore},</if>
|
||||
<if test="priceScore != null">price_score=#{priceScore},</if>
|
||||
<if test="totalScore != null">total_score=#{totalScore},</if>
|
||||
<if test="comment != null">comment=#{comment},</if>
|
||||
</set>
|
||||
WHERE eval_id=#{evalId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBizSupplierEvaluationById">DELETE FROM biz_supplier_evaluation WHERE eval_id=#{id}</delete>
|
||||
<delete id="deleteBizSupplierEvaluationByIds">
|
||||
DELETE FROM biz_supplier_evaluation WHERE eval_id IN
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">#{id}</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.bid.BizSupplierMapper">
|
||||
|
||||
<resultMap id="BaseRM" type="com.ruoyi.system.domain.bid.BizSupplier">
|
||||
<id property="supplierId" column="supplier_id"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="supplierName" column="supplier_name"/>
|
||||
<result property="contact" column="contact"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="email" column="email"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectBizSupplierList" resultMap="BaseRM">
|
||||
SELECT * FROM biz_supplier
|
||||
<where>
|
||||
<if test="tenantId != null"> AND tenant_id=#{tenantId}</if>
|
||||
<if test="supplierName != null and supplierName != ''"> AND supplier_name LIKE CONCAT('%',#{supplierName},'%')</if>
|
||||
<if test="status != null and status != ''"> AND status=#{status}</if>
|
||||
</where>
|
||||
ORDER BY supplier_id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectBizSupplierById" resultMap="BaseRM">SELECT * FROM biz_supplier WHERE supplier_id=#{id}</select>
|
||||
|
||||
<insert id="insertBizSupplier" useGeneratedKeys="true" keyProperty="supplierId">
|
||||
INSERT INTO biz_supplier(tenant_id,supplier_name,contact,phone,email,address,user_id,status,create_by,create_time)
|
||||
VALUES(#{tenantId},#{supplierName},#{contact},#{phone},#{email},#{address},#{userId},#{status},#{createBy},NOW())
|
||||
</insert>
|
||||
|
||||
<update id="updateBizSupplier">
|
||||
UPDATE biz_supplier
|
||||
<set>
|
||||
<if test="supplierName != null">supplier_name=#{supplierName},</if>
|
||||
<if test="contact != null">contact=#{contact},</if>
|
||||
<if test="phone != null">phone=#{phone},</if>
|
||||
<if test="email != null">email=#{email},</if>
|
||||
<if test="address != null">address=#{address},</if>
|
||||
<if test="status != null">status=#{status},</if>
|
||||
update_by=#{updateBy}, update_time=NOW()
|
||||
</set>
|
||||
WHERE supplier_id=#{supplierId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBizSupplierById">DELETE FROM biz_supplier WHERE supplier_id=#{id}</delete>
|
||||
<delete id="deleteBizSupplierByIds">
|
||||
DELETE FROM biz_supplier WHERE supplier_id IN
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">#{id}</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.bid.BizTenantMapper">
|
||||
|
||||
<resultMap id="BaseRM" type="com.ruoyi.system.domain.bid.BizTenant">
|
||||
<id property="tenantId" column="tenant_id"/>
|
||||
<result property="tenantName" column="tenant_name"/>
|
||||
<result property="contact" column="contact"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="email" column="email"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="cols">tenant_id,tenant_name,contact,phone,email,status,create_by,create_time,update_by,update_time,remark</sql>
|
||||
|
||||
<select id="selectBizTenantList" resultMap="BaseRM">
|
||||
SELECT <include refid="cols"/> FROM biz_tenant
|
||||
<where>
|
||||
<if test="tenantName != null and tenantName != ''"> AND tenant_name LIKE CONCAT('%',#{tenantName},'%')</if>
|
||||
<if test="status != null and status != ''"> AND status = #{status}</if>
|
||||
</where>
|
||||
ORDER BY tenant_id
|
||||
</select>
|
||||
|
||||
<select id="selectBizTenantById" resultMap="BaseRM">
|
||||
SELECT <include refid="cols"/> FROM biz_tenant WHERE tenant_id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBizTenant" useGeneratedKeys="true" keyProperty="tenantId">
|
||||
INSERT INTO biz_tenant(tenant_name,contact,phone,email,status,create_by,create_time,remark)
|
||||
VALUES(#{tenantName},#{contact},#{phone},#{email},#{status},#{createBy},NOW(),#{remark})
|
||||
</insert>
|
||||
|
||||
<update id="updateBizTenant">
|
||||
UPDATE biz_tenant
|
||||
<set>
|
||||
<if test="tenantName != null">tenant_name=#{tenantName},</if>
|
||||
<if test="contact != null">contact=#{contact},</if>
|
||||
<if test="phone != null">phone=#{phone},</if>
|
||||
<if test="email != null">email=#{email},</if>
|
||||
<if test="status != null">status=#{status},</if>
|
||||
<if test="remark != null">remark=#{remark},</if>
|
||||
update_by=#{updateBy}, update_time=NOW()
|
||||
</set>
|
||||
WHERE tenant_id=#{tenantId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBizTenantById">DELETE FROM biz_tenant WHERE tenant_id=#{id}</delete>
|
||||
<delete id="deleteBizTenantByIds">
|
||||
DELETE FROM biz_tenant WHERE tenant_id IN
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">#{id}</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.bid.BizTransactionMapper">
|
||||
<resultMap id="BaseRM" type="com.ruoyi.system.domain.bid.BizTransaction">
|
||||
<id property="txId" column="tx_id"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="poId" column="po_id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="txType" column="tx_type"/>
|
||||
<result property="txNo" column="tx_no"/>
|
||||
<result property="amount" column="amount"/>
|
||||
<result property="currency" column="currency"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="operator" column="operator"/>
|
||||
<result property="txTime" column="tx_time"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="supplierName" column="supplier_name"/>
|
||||
<result property="poNo" column="po_no"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectBizTransactionList" resultMap="BaseRM">
|
||||
SELECT t.*, s.supplier_name, p.po_no
|
||||
FROM biz_transaction t
|
||||
LEFT JOIN biz_supplier s ON t.supplier_id=s.supplier_id
|
||||
LEFT JOIN biz_purchase_order p ON t.po_id=p.po_id
|
||||
<where>
|
||||
<if test="tenantId != null"> AND t.tenant_id=#{tenantId}</if>
|
||||
<if test="txType != null and txType != ''"> AND t.tx_type=#{txType}</if>
|
||||
<if test="supplierId != null"> AND t.supplier_id=#{supplierId}</if>
|
||||
<if test="beginTime != null and beginTime != ''"> AND t.tx_time >= #{beginTime}</if>
|
||||
<if test="endTime != null and endTime != ''"> AND t.tx_time <= #{endTime}</if>
|
||||
</where>
|
||||
ORDER BY t.tx_id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectBizTransactionById" resultMap="BaseRM">
|
||||
SELECT t.*, s.supplier_name, p.po_no FROM biz_transaction t
|
||||
LEFT JOIN biz_supplier s ON t.supplier_id=s.supplier_id
|
||||
LEFT JOIN biz_purchase_order p ON t.po_id=p.po_id
|
||||
WHERE t.tx_id=#{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBizTransaction" useGeneratedKeys="true" keyProperty="txId">
|
||||
INSERT INTO biz_transaction(tenant_id,po_id,supplier_id,tx_type,tx_no,amount,currency,description,operator,tx_time,create_time)
|
||||
VALUES(#{tenantId},#{poId},#{supplierId},#{txType},#{txNo},#{amount},#{currency},#{description},#{operator},NOW(),NOW())
|
||||
</insert>
|
||||
|
||||
<update id="updateBizTransaction">UPDATE biz_transaction SET description=#{description} WHERE tx_id=#{txId}</update>
|
||||
<delete id="deleteBizTransactionById">DELETE FROM biz_transaction WHERE tx_id=#{id}</delete>
|
||||
<delete id="deleteBizTransactionByIds">
|
||||
DELETE FROM biz_transaction WHERE tx_id IN
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">#{id}</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user