修改
客户/供应商 子表分开,id改回自增
This commit is contained in:
+8
-297
@@ -2,6 +2,8 @@ package com.ruoyi.customer.customerinfo.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
@@ -13,12 +15,13 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
* @author ruoyi
|
||||
* @date 2026-09-08
|
||||
*/
|
||||
@Data
|
||||
public class BmsCustomer extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 客户ID(UUID) */
|
||||
private String customerId;
|
||||
/** 客户ID */
|
||||
private Long customerId;
|
||||
|
||||
/** 客户编码 */
|
||||
@Excel(name = "客户编码")
|
||||
@@ -114,302 +117,10 @@ public class BmsCustomer extends BaseEntity
|
||||
/** 公司主体列表(子表 bms_customer_company) */
|
||||
private List<BmsCustomerCompany> companyList;
|
||||
|
||||
/** 联系人列表(子表 bms_customer_contact) */
|
||||
private List<BmsCustomerContact> contactList;
|
||||
|
||||
/** 删除标记(0正常 2删除) */
|
||||
private String delFlag;
|
||||
|
||||
public void setCustomerId(String customerId)
|
||||
{
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public String getCustomerId()
|
||||
{
|
||||
return customerId;
|
||||
}
|
||||
|
||||
public void setCustomerCode(String customerCode)
|
||||
{
|
||||
this.customerCode = customerCode;
|
||||
}
|
||||
|
||||
public String getCustomerCode()
|
||||
{
|
||||
return customerCode;
|
||||
}
|
||||
|
||||
public void setCustomerName(String customerName)
|
||||
{
|
||||
this.customerName = customerName;
|
||||
}
|
||||
|
||||
public String getCustomerName()
|
||||
{
|
||||
return customerName;
|
||||
}
|
||||
|
||||
public void setCustomerCodeDw(String customerCodeDw)
|
||||
{
|
||||
this.customerCodeDw = customerCodeDw;
|
||||
}
|
||||
|
||||
public String getCustomerCodeDw()
|
||||
{
|
||||
return customerCodeDw;
|
||||
}
|
||||
|
||||
public void setCreditCode(String creditCode)
|
||||
{
|
||||
this.creditCode = creditCode;
|
||||
}
|
||||
|
||||
public String getCreditCode()
|
||||
{
|
||||
return creditCode;
|
||||
}
|
||||
|
||||
public void setCustomerType(String customerType)
|
||||
{
|
||||
this.customerType = customerType;
|
||||
}
|
||||
|
||||
public String getCustomerType()
|
||||
{
|
||||
return customerType;
|
||||
}
|
||||
|
||||
public void setIsEnable(String isEnable)
|
||||
{
|
||||
this.isEnable = isEnable;
|
||||
}
|
||||
|
||||
public String getIsEnable()
|
||||
{
|
||||
return isEnable;
|
||||
}
|
||||
|
||||
public void setSalesUserId(String salesUserId)
|
||||
{
|
||||
this.salesUserId = salesUserId;
|
||||
}
|
||||
|
||||
public String getSalesUserId()
|
||||
{
|
||||
return salesUserId;
|
||||
}
|
||||
|
||||
public void setSalesUser(String salesUser)
|
||||
{
|
||||
this.salesUser = salesUser;
|
||||
}
|
||||
|
||||
public String getSalesUser()
|
||||
{
|
||||
return salesUser;
|
||||
}
|
||||
|
||||
public void setEd(BigDecimal ed)
|
||||
{
|
||||
this.ed = ed;
|
||||
}
|
||||
|
||||
public BigDecimal getEd()
|
||||
{
|
||||
return ed;
|
||||
}
|
||||
|
||||
public void setZq(Long zq)
|
||||
{
|
||||
this.zq = zq;
|
||||
}
|
||||
|
||||
public Long getZq()
|
||||
{
|
||||
return zq;
|
||||
}
|
||||
|
||||
public void setSettlementUserId(String settlementUserId)
|
||||
{
|
||||
this.settlementUserId = settlementUserId;
|
||||
}
|
||||
|
||||
public String getSettlementUserId()
|
||||
{
|
||||
return settlementUserId;
|
||||
}
|
||||
|
||||
public void setSettlementUser(String settlementUser)
|
||||
{
|
||||
this.settlementUser = settlementUser;
|
||||
}
|
||||
|
||||
public String getSettlementUser()
|
||||
{
|
||||
return settlementUser;
|
||||
}
|
||||
|
||||
public void setServiceUserId(String serviceUserId)
|
||||
{
|
||||
this.serviceUserId = serviceUserId;
|
||||
}
|
||||
|
||||
public String getServiceUserId()
|
||||
{
|
||||
return serviceUserId;
|
||||
}
|
||||
|
||||
public void setServiceUser(String serviceUser)
|
||||
{
|
||||
this.serviceUser = serviceUser;
|
||||
}
|
||||
|
||||
public String getServiceUser()
|
||||
{
|
||||
return serviceUser;
|
||||
}
|
||||
|
||||
public void setSettlementType(String settlementType)
|
||||
{
|
||||
this.settlementType = settlementType;
|
||||
}
|
||||
|
||||
public String getSettlementType()
|
||||
{
|
||||
return settlementType;
|
||||
}
|
||||
|
||||
public void setTempEd(BigDecimal tempEd)
|
||||
{
|
||||
this.tempEd = tempEd;
|
||||
}
|
||||
|
||||
public BigDecimal getTempEd()
|
||||
{
|
||||
return tempEd;
|
||||
}
|
||||
|
||||
public void setAccountBalance(BigDecimal accountBalance)
|
||||
{
|
||||
this.accountBalance = accountBalance;
|
||||
}
|
||||
|
||||
public BigDecimal getAccountBalance()
|
||||
{
|
||||
return accountBalance;
|
||||
}
|
||||
|
||||
public void setForeignCurrencyBalance(BigDecimal foreignCurrencyBalance)
|
||||
{
|
||||
this.foreignCurrencyBalance = foreignCurrencyBalance;
|
||||
}
|
||||
|
||||
public BigDecimal getForeignCurrencyBalance()
|
||||
{
|
||||
return foreignCurrencyBalance;
|
||||
}
|
||||
|
||||
public void setWeightThreshold(BigDecimal weightThreshold)
|
||||
{
|
||||
this.weightThreshold = weightThreshold;
|
||||
}
|
||||
|
||||
public BigDecimal getWeightThreshold()
|
||||
{
|
||||
return weightThreshold;
|
||||
}
|
||||
|
||||
public void setThrowRatio(BigDecimal throwRatio)
|
||||
{
|
||||
this.throwRatio = throwRatio;
|
||||
}
|
||||
|
||||
public BigDecimal getThrowRatio()
|
||||
{
|
||||
return throwRatio;
|
||||
}
|
||||
|
||||
public void setCreditEd(BigDecimal creditEd)
|
||||
{
|
||||
this.creditEd = creditEd;
|
||||
}
|
||||
|
||||
public BigDecimal getCreditEd()
|
||||
{
|
||||
return creditEd;
|
||||
}
|
||||
|
||||
public void setProductIds(String productIds)
|
||||
{
|
||||
this.productIds = productIds;
|
||||
}
|
||||
|
||||
public String getProductIds()
|
||||
{
|
||||
return productIds;
|
||||
}
|
||||
|
||||
public void setAttachmentList(List<BmsCustomerAttachment> attachmentList)
|
||||
{
|
||||
this.attachmentList = attachmentList;
|
||||
}
|
||||
|
||||
public List<BmsCustomerAttachment> getAttachmentList()
|
||||
{
|
||||
return attachmentList;
|
||||
}
|
||||
|
||||
public void setCompanyList(List<BmsCustomerCompany> companyList)
|
||||
{
|
||||
this.companyList = companyList;
|
||||
}
|
||||
|
||||
public List<BmsCustomerCompany> getCompanyList()
|
||||
{
|
||||
return companyList;
|
||||
}
|
||||
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("customerId", getCustomerId())
|
||||
.append("customerCode", getCustomerCode())
|
||||
.append("customerName", getCustomerName())
|
||||
.append("customerCodeDw", getCustomerCodeDw())
|
||||
.append("creditCode", getCreditCode())
|
||||
.append("customerType", getCustomerType())
|
||||
.append("isEnable", getIsEnable())
|
||||
.append("salesUserId", getSalesUserId())
|
||||
.append("salesUser", getSalesUser())
|
||||
.append("ed", getEd())
|
||||
.append("zq", getZq())
|
||||
.append("settlementUserId", getSettlementUserId())
|
||||
.append("settlementUser", getSettlementUser())
|
||||
.append("serviceUserId", getServiceUserId())
|
||||
.append("serviceUser", getServiceUser())
|
||||
.append("settlementType", getSettlementType())
|
||||
.append("tempEd", getTempEd())
|
||||
.append("accountBalance", getAccountBalance())
|
||||
.append("foreignCurrencyBalance", getForeignCurrencyBalance())
|
||||
.append("weightThreshold", getWeightThreshold())
|
||||
.append("throwRatio", getThrowRatio())
|
||||
.append("creditEd", getCreditEd())
|
||||
.append("productIds", getProductIds())
|
||||
.append("attachmentList", getAttachmentList())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
+4
-130
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.customer.customerinfo.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
@@ -13,8 +14,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
* @author ruoyi
|
||||
* @date 2026-09-08
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Data
|
||||
public class BmsCustomerAttachment extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -22,8 +22,8 @@ public class BmsCustomerAttachment extends BaseEntity
|
||||
/** 附件ID */
|
||||
private Long attachmentId;
|
||||
|
||||
/** 所属客户ID或供应商ID(UUID) */
|
||||
private String customerId;
|
||||
/** 所属客户ID */
|
||||
private Long customerId;
|
||||
|
||||
/** 文件原始名称 */
|
||||
@Excel(name = "文件名称")
|
||||
@@ -60,131 +60,5 @@ public class BmsCustomerAttachment extends BaseEntity
|
||||
/** 删除标记(0正常 2删除) */
|
||||
private String delFlag;
|
||||
|
||||
public void setAttachmentId(Long attachmentId)
|
||||
{
|
||||
this.attachmentId = attachmentId;
|
||||
}
|
||||
|
||||
public Long getAttachmentId()
|
||||
{
|
||||
return attachmentId;
|
||||
}
|
||||
|
||||
public void setCustomerId(String customerId)
|
||||
{
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public String getCustomerId()
|
||||
{
|
||||
return customerId;
|
||||
}
|
||||
|
||||
public void setFileName(String fileName)
|
||||
{
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public String getFileName()
|
||||
{
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void setFilePath(String filePath)
|
||||
{
|
||||
this.filePath = filePath;
|
||||
}
|
||||
|
||||
public String getFilePath()
|
||||
{
|
||||
return filePath;
|
||||
}
|
||||
|
||||
public void setFileSize(Long fileSize)
|
||||
{
|
||||
this.fileSize = fileSize;
|
||||
}
|
||||
|
||||
public Long getFileSize()
|
||||
{
|
||||
return fileSize;
|
||||
}
|
||||
|
||||
public void setFileType(String fileType)
|
||||
{
|
||||
this.fileType = fileType;
|
||||
}
|
||||
|
||||
public String getFileType()
|
||||
{
|
||||
return fileType;
|
||||
}
|
||||
|
||||
public void setFileExtension(String fileExtension)
|
||||
{
|
||||
this.fileExtension = fileExtension;
|
||||
}
|
||||
|
||||
public String getFileExtension()
|
||||
{
|
||||
return fileExtension;
|
||||
}
|
||||
|
||||
public void setAttachmentType(String attachmentType)
|
||||
{
|
||||
this.attachmentType = attachmentType;
|
||||
}
|
||||
|
||||
public String getAttachmentType()
|
||||
{
|
||||
return attachmentType;
|
||||
}
|
||||
|
||||
public void setIsLogo(String isLogo)
|
||||
{
|
||||
this.isLogo = isLogo;
|
||||
}
|
||||
|
||||
public String getIsLogo()
|
||||
{
|
||||
return isLogo;
|
||||
}
|
||||
|
||||
public void setSortOrder(Integer sortOrder)
|
||||
{
|
||||
this.sortOrder = sortOrder;
|
||||
}
|
||||
|
||||
public Integer getSortOrder()
|
||||
{
|
||||
return sortOrder;
|
||||
}
|
||||
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("attachmentId", getAttachmentId())
|
||||
.append("customerId", getCustomerId())
|
||||
.append("fileName", getFileName())
|
||||
.append("filePath", getFilePath())
|
||||
.append("fileSize", getFileSize())
|
||||
.append("fileType", getFileType())
|
||||
.append("fileExtension", getFileExtension())
|
||||
.append("attachmentType", getAttachmentType())
|
||||
.append("isLogo", getIsLogo())
|
||||
.append("sortOrder", getSortOrder())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
+4
-85
@@ -4,6 +4,7 @@ import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
@@ -15,6 +16,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
* @author ruoyi
|
||||
* @date 2026-09-09
|
||||
*/
|
||||
@Data
|
||||
public class BmsCustomerCompany extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -22,8 +24,8 @@ public class BmsCustomerCompany extends BaseEntity
|
||||
/** 公司主体ID */
|
||||
private Long companyId;
|
||||
|
||||
/** 所属客户ID或供应商ID(UUID) */
|
||||
private String customerId;
|
||||
/** 所属客户ID */
|
||||
private Long customerId;
|
||||
|
||||
/** 公司全称 */
|
||||
@Excel(name = "公司全称")
|
||||
@@ -125,88 +127,5 @@ public class BmsCustomerCompany extends BaseEntity
|
||||
/** 删除标记 */
|
||||
private String delFlag;
|
||||
|
||||
public void setCompanyId(Long companyId) { this.companyId = companyId; }
|
||||
public Long getCompanyId() { return companyId; }
|
||||
public void setCustomerId(String customerId) { this.customerId = customerId; }
|
||||
public String getCustomerId() { return customerId; }
|
||||
public void setCompanyNameFull(String companyNameFull) { this.companyNameFull = companyNameFull; }
|
||||
public String getCompanyNameFull() { return companyNameFull; }
|
||||
public void setEnglishName(String englishName) { this.englishName = englishName; }
|
||||
public String getEnglishName() { return englishName; }
|
||||
public void setCreditCode(String creditCode) { this.creditCode = creditCode; }
|
||||
public String getCreditCode() { return creditCode; }
|
||||
public void setLegalPerson(String legalPerson) { this.legalPerson = legalPerson; }
|
||||
public String getLegalPerson() { return legalPerson; }
|
||||
public void setLegalPersonPhone(String legalPersonPhone) { this.legalPersonPhone = legalPersonPhone; }
|
||||
public String getLegalPersonPhone() { return legalPersonPhone; }
|
||||
public void setLegalPersonIdCard(String legalPersonIdCard) { this.legalPersonIdCard = legalPersonIdCard; }
|
||||
public String getLegalPersonIdCard() { return legalPersonIdCard; }
|
||||
public void setRegisteredCapital(BigDecimal registeredCapital) { this.registeredCapital = registeredCapital; }
|
||||
public BigDecimal getRegisteredCapital() { return registeredCapital; }
|
||||
public void setCapitalCurrency(String capitalCurrency) { this.capitalCurrency = capitalCurrency; }
|
||||
public String getCapitalCurrency() { return capitalCurrency; }
|
||||
public void setPaidInCapital(BigDecimal paidInCapital) { this.paidInCapital = paidInCapital; }
|
||||
public BigDecimal getPaidInCapital() { return paidInCapital; }
|
||||
public void setEstablishDate(Date establishDate) { this.establishDate = establishDate; }
|
||||
public Date getEstablishDate() { return establishDate; }
|
||||
public void setBusinessTermStart(Date businessTermStart) { this.businessTermStart = businessTermStart; }
|
||||
public Date getBusinessTermStart() { return businessTermStart; }
|
||||
public void setBusinessTermEnd(Date businessTermEnd) { this.businessTermEnd = businessTermEnd; }
|
||||
public Date getBusinessTermEnd() { return businessTermEnd; }
|
||||
public void setBusinessTermPermanent(String businessTermPermanent) { this.businessTermPermanent = businessTermPermanent; }
|
||||
public String getBusinessTermPermanent() { return businessTermPermanent; }
|
||||
public void setRegistrationAuthority(String registrationAuthority) { this.registrationAuthority = registrationAuthority; }
|
||||
public String getRegistrationAuthority() { return registrationAuthority; }
|
||||
public void setRegistrationNumber(String registrationNumber) { this.registrationNumber = registrationNumber; }
|
||||
public String getRegistrationNumber() { return registrationNumber; }
|
||||
public void setOperatingStatus(String operatingStatus) { this.operatingStatus = operatingStatus; }
|
||||
public String getOperatingStatus() { return operatingStatus; }
|
||||
public void setBusinessScope(String businessScope) { this.businessScope = businessScope; }
|
||||
public String getBusinessScope() { return businessScope; }
|
||||
public void setShareholders(String shareholders) { this.shareholders = shareholders; }
|
||||
public String getShareholders() { return shareholders; }
|
||||
public void setEmployeeCount(Integer employeeCount) { this.employeeCount = employeeCount; }
|
||||
public Integer getEmployeeCount() { return employeeCount; }
|
||||
public void setCompanyPhone(String companyPhone) { this.companyPhone = companyPhone; }
|
||||
public String getCompanyPhone() { return companyPhone; }
|
||||
public void setCompanyFax(String companyFax) { this.companyFax = companyFax; }
|
||||
public String getCompanyFax() { return companyFax; }
|
||||
public void setCompanyWebsite(String companyWebsite) { this.companyWebsite = companyWebsite; }
|
||||
public String getCompanyWebsite() { return companyWebsite; }
|
||||
public void setCompanyEmail(String companyEmail) { this.companyEmail = companyEmail; }
|
||||
public String getCompanyEmail() { return companyEmail; }
|
||||
public void setRegisteredProvince(String registeredProvince) { this.registeredProvince = registeredProvince; }
|
||||
public String getRegisteredProvince() { return registeredProvince; }
|
||||
public void setRegisteredCity(String registeredCity) { this.registeredCity = registeredCity; }
|
||||
public String getRegisteredCity() { return registeredCity; }
|
||||
public void setRegisteredDistrict(String registeredDistrict) { this.registeredDistrict = registeredDistrict; }
|
||||
public String getRegisteredDistrict() { return registeredDistrict; }
|
||||
public void setRegisteredAddressDetail(String registeredAddressDetail) { this.registeredAddressDetail = registeredAddressDetail; }
|
||||
public String getRegisteredAddressDetail() { return registeredAddressDetail; }
|
||||
public void setBusinessLicenseOssId(Long businessLicenseOssId) { this.businessLicenseOssId = businessLicenseOssId; }
|
||||
public Long getBusinessLicenseOssId() { return businessLicenseOssId; }
|
||||
public void setAttachmentIds(String attachmentIds) { this.attachmentIds = attachmentIds; }
|
||||
public String getAttachmentIds() { return attachmentIds; }
|
||||
public void setRemark(String remark) { this.remark = remark; }
|
||||
public String getRemark() { return remark; }
|
||||
public void setDelFlag(String delFlag) { this.delFlag = delFlag; }
|
||||
public String getDelFlag() { return delFlag; }
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("companyId", getCompanyId())
|
||||
.append("customerId", getCustomerId())
|
||||
.append("companyNameFull", getCompanyNameFull())
|
||||
.append("englishName", getEnglishName())
|
||||
.append("creditCode", getCreditCode())
|
||||
.append("legalPerson", getLegalPerson())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
package com.ruoyi.customer.customerinfo.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 客户联系人对象 bms_customer_contact
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-09-09
|
||||
*/
|
||||
@Data
|
||||
public class BmsCustomerContact extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 联系人ID */
|
||||
private Long contactId;
|
||||
|
||||
/** 所属客户ID */
|
||||
private Long customerId;
|
||||
|
||||
/** 联系人姓名 */
|
||||
@Excel(name = "联系人姓名")
|
||||
private String contactName;
|
||||
|
||||
/** 职位 */
|
||||
@Excel(name = "职位")
|
||||
private String position;
|
||||
|
||||
/** 所属部门 */
|
||||
@Excel(name = "所属部门")
|
||||
private String department;
|
||||
|
||||
/** 手机号 */
|
||||
@Excel(name = "手机号")
|
||||
private String phone;
|
||||
|
||||
/** 座机 */
|
||||
@Excel(name = "座机")
|
||||
private String landline;
|
||||
|
||||
/** 电子邮箱 */
|
||||
@Excel(name = "电子邮箱")
|
||||
private String email;
|
||||
|
||||
/** 微信号 */
|
||||
@Excel(name = "微信号")
|
||||
private String wechat;
|
||||
|
||||
/** QQ号 */
|
||||
@Excel(name = "QQ号")
|
||||
private String qq;
|
||||
|
||||
/** 国家/地区 */
|
||||
@Excel(name = "国家/地区")
|
||||
private String country;
|
||||
|
||||
/** 省份 */
|
||||
@Excel(name = "省份")
|
||||
private String province;
|
||||
|
||||
/** 城市 */
|
||||
@Excel(name = "城市")
|
||||
private String city;
|
||||
|
||||
/** 区/县 */
|
||||
@Excel(name = "区/县")
|
||||
private String district;
|
||||
|
||||
/** 联系详细地址 */
|
||||
@Excel(name = "联系详细地址")
|
||||
private String contactAddress;
|
||||
|
||||
/** 邮政编码 */
|
||||
@Excel(name = "邮政编码")
|
||||
private String postalCode;
|
||||
|
||||
/** 是否默认联系人(0否 1是) */
|
||||
@Excel(name = "是否默认联系人", readConverterExp = "0=否,1=是")
|
||||
private String isDefault;
|
||||
|
||||
/** 联系人类型(0业务联系人 1财务联系人 2紧急联系人 3其他) */
|
||||
@Excel(name = "联系人类型", readConverterExp = "0=业务联系人,1=财务联系人,2=紧急联系人,3=其他")
|
||||
private String contactType;
|
||||
|
||||
/** 排序 */
|
||||
@Excel(name = "排序")
|
||||
private Integer sortOrder;
|
||||
|
||||
/** 删除标记 */
|
||||
private String delFlag;
|
||||
|
||||
|
||||
}
|
||||
+38
-6
@@ -4,6 +4,8 @@ import java.util.List;
|
||||
import com.ruoyi.customer.customerinfo.domain.BmsCustomer;
|
||||
import com.ruoyi.customer.customerinfo.domain.BmsCustomerAttachment;
|
||||
import com.ruoyi.customer.customerinfo.domain.BmsCustomerCompany;
|
||||
import com.ruoyi.customer.customerinfo.domain.BmsCustomerContact;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
|
||||
/**
|
||||
* 客户主Mapper接口
|
||||
@@ -19,7 +21,7 @@ public interface BmsCustomerMapper
|
||||
* @param customerId 客户主主键
|
||||
* @return 客户主
|
||||
*/
|
||||
public BmsCustomer selectBmsCustomerByCustomerId(String customerId);
|
||||
public BmsCustomer selectBmsCustomerByCustomerId(Long customerId);
|
||||
|
||||
/**
|
||||
* 查询客户主列表
|
||||
@@ -51,7 +53,7 @@ public interface BmsCustomerMapper
|
||||
* @param customerId 客户主主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBmsCustomerByCustomerId(String customerId);
|
||||
public int deleteBmsCustomerByCustomerId(Long customerId);
|
||||
|
||||
/**
|
||||
* 批量删除客户主
|
||||
@@ -59,7 +61,7 @@ public interface BmsCustomerMapper
|
||||
* @param customerIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBmsCustomerByCustomerIds(String[] customerIds);
|
||||
public int deleteBmsCustomerByCustomerIds(@Param("customerIds") Long[] customerIds);
|
||||
|
||||
/**
|
||||
* 查询客户附件列表
|
||||
@@ -91,7 +93,7 @@ public interface BmsCustomerMapper
|
||||
* @param customerId 客户主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBmsCustomerAttachmentByCustomerId(String customerId);
|
||||
public int deleteBmsCustomerAttachmentByCustomerId(Long customerId);
|
||||
|
||||
/**
|
||||
* 批量删除客户附件
|
||||
@@ -99,7 +101,7 @@ public interface BmsCustomerMapper
|
||||
* @param attachmentIds 附件ID集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBmsCustomerAttachmentByAttachmentIds(Long[] attachmentIds);
|
||||
public int deleteBmsCustomerAttachmentByAttachmentIds(@Param("attachmentIds") Long[] attachmentIds);
|
||||
|
||||
/**
|
||||
* 查询客户公司主体列表
|
||||
@@ -124,10 +126,40 @@ public interface BmsCustomerMapper
|
||||
/**
|
||||
* 按客户ID删除公司主体(逻辑删除)
|
||||
*/
|
||||
public int deleteBmsCustomerCompanyByCustomerId(String customerId);
|
||||
public int deleteBmsCustomerCompanyByCustomerId(Long customerId);
|
||||
|
||||
/**
|
||||
* 按公司ID删除(逻辑删除)
|
||||
*/
|
||||
public int deleteBmsCustomerCompanyByCompanyId(Long companyId);
|
||||
|
||||
/**
|
||||
* 查询客户联系人列表
|
||||
*/
|
||||
public List<BmsCustomerContact> selectBmsCustomerContactList(BmsCustomerContact bmsCustomerContact);
|
||||
|
||||
/**
|
||||
* 按ID查询客户联系人
|
||||
*/
|
||||
public BmsCustomerContact selectBmsCustomerContactByContactId(Long contactId);
|
||||
|
||||
/**
|
||||
* 新增客户联系人
|
||||
*/
|
||||
public int insertBmsCustomerContact(BmsCustomerContact bmsCustomerContact);
|
||||
|
||||
/**
|
||||
* 修改客户联系人
|
||||
*/
|
||||
public int updateBmsCustomerContact(BmsCustomerContact bmsCustomerContact);
|
||||
|
||||
/**
|
||||
* 按客户ID删除联系人(逻辑删除)
|
||||
*/
|
||||
public int deleteBmsCustomerContactByCustomerId(Long customerId);
|
||||
|
||||
/**
|
||||
* 按联系人ID删除(逻辑删除)
|
||||
*/
|
||||
public int deleteBmsCustomerContactByContactId(Long contactId);
|
||||
}
|
||||
|
||||
+37
-6
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
import com.ruoyi.customer.customerinfo.domain.BmsCustomer;
|
||||
import com.ruoyi.customer.customerinfo.domain.BmsCustomerAttachment;
|
||||
import com.ruoyi.customer.customerinfo.domain.BmsCustomerCompany;
|
||||
import com.ruoyi.customer.customerinfo.domain.BmsCustomerContact;
|
||||
|
||||
/**
|
||||
* 客户主Service接口
|
||||
@@ -19,7 +20,7 @@ public interface IBmsCustomerService
|
||||
* @param customerId 客户主主键
|
||||
* @return 客户主
|
||||
*/
|
||||
public BmsCustomer selectBmsCustomerByCustomerId(String customerId);
|
||||
public BmsCustomer selectBmsCustomerByCustomerId(Long customerId);
|
||||
|
||||
/**
|
||||
* 查询客户主列表
|
||||
@@ -43,7 +44,7 @@ public interface IBmsCustomerService
|
||||
* @param customerId 客户ID
|
||||
* @param attachmentList 附件集合
|
||||
*/
|
||||
public void saveBmsCustomerAttachments(String customerId, List<BmsCustomerAttachment> attachmentList);
|
||||
public void saveBmsCustomerAttachments(Long customerId, List<BmsCustomerAttachment> attachmentList);
|
||||
|
||||
/**
|
||||
* 按客户ID删除附件
|
||||
@@ -51,7 +52,7 @@ public interface IBmsCustomerService
|
||||
* @param customerId 客户ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBmsCustomerAttachmentByCustomerId(String customerId);
|
||||
public int deleteBmsCustomerAttachmentByCustomerId(Long customerId);
|
||||
|
||||
/**
|
||||
* 查询客户公司主体列表
|
||||
@@ -81,7 +82,37 @@ public interface IBmsCustomerService
|
||||
/**
|
||||
* 批量保存客户公司主体(随主表提交时调用)
|
||||
*/
|
||||
public void saveBmsCustomerCompanies(String customerId, List<BmsCustomerCompany> companyList);
|
||||
public void saveBmsCustomerCompanies(Long customerId, List<BmsCustomerCompany> companyList);
|
||||
|
||||
/**
|
||||
* 查询客户联系人列表
|
||||
*/
|
||||
public List<BmsCustomerContact> selectBmsCustomerContactList(BmsCustomerContact bmsCustomerContact);
|
||||
|
||||
/**
|
||||
* 按ID查询客户联系人
|
||||
*/
|
||||
public BmsCustomerContact selectBmsCustomerContactByContactId(Long contactId);
|
||||
|
||||
/**
|
||||
* 新增客户联系人(独立接口,用于子表新增按钮)
|
||||
*/
|
||||
public int insertBmsCustomerContact(BmsCustomerContact bmsCustomerContact);
|
||||
|
||||
/**
|
||||
* 修改客户联系人
|
||||
*/
|
||||
public int updateBmsCustomerContact(BmsCustomerContact bmsCustomerContact);
|
||||
|
||||
/**
|
||||
* 删除客户联系人
|
||||
*/
|
||||
public int deleteBmsCustomerContactByContactIds(Long[] contactIds);
|
||||
|
||||
/**
|
||||
* 批量保存客户联系人(随主表提交时调用)
|
||||
*/
|
||||
public void saveBmsCustomerContacts(Long customerId, List<BmsCustomerContact> contactList);
|
||||
|
||||
/**
|
||||
* 新增客户主
|
||||
@@ -105,7 +136,7 @@ public interface IBmsCustomerService
|
||||
* @param customerIds 需要删除的客户主主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBmsCustomerByCustomerIds(String[] customerIds);
|
||||
public int deleteBmsCustomerByCustomerIds(Long[] customerIds);
|
||||
|
||||
/**
|
||||
* 删除客户主信息
|
||||
@@ -113,5 +144,5 @@ public interface IBmsCustomerService
|
||||
* @param customerId 客户主主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBmsCustomerByCustomerId(String customerId);
|
||||
public int deleteBmsCustomerByCustomerId(Long customerId);
|
||||
}
|
||||
|
||||
+109
-10
@@ -5,9 +5,9 @@ import java.util.List;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.uuid.IdUtils;
|
||||
import com.ruoyi.customer.customerinfo.domain.BmsCustomerAttachment;
|
||||
import com.ruoyi.customer.customerinfo.domain.BmsCustomerCompany;
|
||||
import com.ruoyi.customer.customerinfo.domain.BmsCustomerContact;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -34,7 +34,7 @@ public class BmsCustomerServiceImpl implements IBmsCustomerService
|
||||
* @return 客户主
|
||||
*/
|
||||
@Override
|
||||
public BmsCustomer selectBmsCustomerByCustomerId(String customerId)
|
||||
public BmsCustomer selectBmsCustomerByCustomerId(Long customerId)
|
||||
{
|
||||
BmsCustomer bmsCustomer = bmsCustomerMapper.selectBmsCustomerByCustomerId(customerId);
|
||||
if (bmsCustomer != null)
|
||||
@@ -45,6 +45,9 @@ public class BmsCustomerServiceImpl implements IBmsCustomerService
|
||||
BmsCustomerCompany companyQuery = new BmsCustomerCompany();
|
||||
companyQuery.setCustomerId(customerId);
|
||||
bmsCustomer.setCompanyList(bmsCustomerMapper.selectBmsCustomerCompanyList(companyQuery));
|
||||
BmsCustomerContact contactQuery = new BmsCustomerContact();
|
||||
contactQuery.setCustomerId(customerId);
|
||||
bmsCustomer.setContactList(bmsCustomerMapper.selectBmsCustomerContactList(contactQuery));
|
||||
}
|
||||
return bmsCustomer;
|
||||
}
|
||||
@@ -71,7 +74,7 @@ public class BmsCustomerServiceImpl implements IBmsCustomerService
|
||||
* 批量保存客户附件(新增/修改)
|
||||
*/
|
||||
@Override
|
||||
public void saveBmsCustomerAttachments(String customerId, List<BmsCustomerAttachment> attachmentList)
|
||||
public void saveBmsCustomerAttachments(Long customerId, List<BmsCustomerAttachment> attachmentList)
|
||||
{
|
||||
if (attachmentList == null || attachmentList.isEmpty())
|
||||
{
|
||||
@@ -104,7 +107,7 @@ public class BmsCustomerServiceImpl implements IBmsCustomerService
|
||||
* 按客户ID删除附件(逻辑删除)
|
||||
*/
|
||||
@Override
|
||||
public int deleteBmsCustomerAttachmentByCustomerId(String customerId)
|
||||
public int deleteBmsCustomerAttachmentByCustomerId(Long customerId)
|
||||
{
|
||||
return bmsCustomerMapper.deleteBmsCustomerAttachmentByCustomerId(customerId);
|
||||
}
|
||||
@@ -173,7 +176,7 @@ public class BmsCustomerServiceImpl implements IBmsCustomerService
|
||||
* 批量保存客户公司主体(随主表提交)
|
||||
*/
|
||||
@Override
|
||||
public void saveBmsCustomerCompanies(String customerId, List<BmsCustomerCompany> companyList)
|
||||
public void saveBmsCustomerCompanies(Long customerId, List<BmsCustomerCompany> companyList)
|
||||
{
|
||||
if (companyList == null || companyList.isEmpty())
|
||||
{
|
||||
@@ -213,8 +216,6 @@ public class BmsCustomerServiceImpl implements IBmsCustomerService
|
||||
public int insertBmsCustomer(BmsCustomer bmsCustomer)
|
||||
{
|
||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
// 应用层生成 UUID,避免与供应商主键在子表中冲突
|
||||
bmsCustomer.setCustomerId(IdUtils.simpleUUID());
|
||||
bmsCustomer.setCreateTime(DateUtils.getNowDate());
|
||||
bmsCustomer.setCreateBy(user.getUserName());
|
||||
int rows = bmsCustomerMapper.insertBmsCustomer(bmsCustomer);
|
||||
@@ -222,6 +223,7 @@ public class BmsCustomerServiceImpl implements IBmsCustomerService
|
||||
{
|
||||
saveBmsCustomerAttachments(bmsCustomer.getCustomerId(), bmsCustomer.getAttachmentList());
|
||||
saveBmsCustomerCompanies(bmsCustomer.getCustomerId(), bmsCustomer.getCompanyList());
|
||||
saveBmsCustomerContacts(bmsCustomer.getCustomerId(), bmsCustomer.getContactList());
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
@@ -251,6 +253,8 @@ public class BmsCustomerServiceImpl implements IBmsCustomerService
|
||||
}
|
||||
// 公司主体表采用增量 upsert,不做全量重置(保留 companyId 稳定)
|
||||
saveBmsCustomerCompanies(bmsCustomer.getCustomerId(), bmsCustomer.getCompanyList());
|
||||
// 联系人采用增量 upsert
|
||||
saveBmsCustomerContacts(bmsCustomer.getCustomerId(), bmsCustomer.getContactList());
|
||||
return bmsCustomerMapper.updateBmsCustomer(bmsCustomer);
|
||||
}
|
||||
|
||||
@@ -262,12 +266,13 @@ public class BmsCustomerServiceImpl implements IBmsCustomerService
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public int deleteBmsCustomerByCustomerIds(String[] customerIds)
|
||||
public int deleteBmsCustomerByCustomerIds(Long[] customerIds)
|
||||
{
|
||||
for (String customerId : customerIds)
|
||||
for (Long customerId : customerIds)
|
||||
{
|
||||
bmsCustomerMapper.deleteBmsCustomerAttachmentByCustomerId(customerId);
|
||||
bmsCustomerMapper.deleteBmsCustomerCompanyByCustomerId(customerId);
|
||||
bmsCustomerMapper.deleteBmsCustomerContactByCustomerId(customerId);
|
||||
}
|
||||
return bmsCustomerMapper.deleteBmsCustomerByCustomerIds(customerIds);
|
||||
}
|
||||
@@ -280,10 +285,104 @@ public class BmsCustomerServiceImpl implements IBmsCustomerService
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public int deleteBmsCustomerByCustomerId(String customerId)
|
||||
public int deleteBmsCustomerByCustomerId(Long customerId)
|
||||
{
|
||||
bmsCustomerMapper.deleteBmsCustomerAttachmentByCustomerId(customerId);
|
||||
bmsCustomerMapper.deleteBmsCustomerCompanyByCustomerId(customerId);
|
||||
bmsCustomerMapper.deleteBmsCustomerContactByCustomerId(customerId);
|
||||
return bmsCustomerMapper.deleteBmsCustomerByCustomerId(customerId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询客户联系人列表
|
||||
*/
|
||||
@Override
|
||||
public List<BmsCustomerContact> selectBmsCustomerContactList(BmsCustomerContact bmsCustomerContact)
|
||||
{
|
||||
return bmsCustomerMapper.selectBmsCustomerContactList(bmsCustomerContact);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按ID查询客户联系人
|
||||
*/
|
||||
@Override
|
||||
public BmsCustomerContact selectBmsCustomerContactByContactId(Long contactId)
|
||||
{
|
||||
return bmsCustomerMapper.selectBmsCustomerContactByContactId(contactId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增客户联系人
|
||||
*/
|
||||
@Override
|
||||
public int insertBmsCustomerContact(BmsCustomerContact bmsCustomerContact)
|
||||
{
|
||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
bmsCustomerContact.setCreateBy(user.getUserName());
|
||||
bmsCustomerContact.setCreateTime(DateUtils.getNowDate());
|
||||
if (bmsCustomerContact.getDelFlag() == null)
|
||||
{
|
||||
bmsCustomerContact.setDelFlag("0");
|
||||
}
|
||||
return bmsCustomerMapper.insertBmsCustomerContact(bmsCustomerContact);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客户联系人
|
||||
*/
|
||||
@Override
|
||||
public int updateBmsCustomerContact(BmsCustomerContact bmsCustomerContact)
|
||||
{
|
||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
bmsCustomerContact.setUpdateBy(user.getUserName());
|
||||
bmsCustomerContact.setUpdateTime(DateUtils.getNowDate());
|
||||
return bmsCustomerMapper.updateBmsCustomerContact(bmsCustomerContact);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客户联系人(逻辑删除)
|
||||
*/
|
||||
@Override
|
||||
public int deleteBmsCustomerContactByContactIds(Long[] contactIds)
|
||||
{
|
||||
int rows = 0;
|
||||
for (Long contactId : contactIds)
|
||||
{
|
||||
rows += bmsCustomerMapper.deleteBmsCustomerContactByContactId(contactId);
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量保存客户联系人(随主表提交)
|
||||
*/
|
||||
@Override
|
||||
public void saveBmsCustomerContacts(Long customerId, List<BmsCustomerContact> contactList)
|
||||
{
|
||||
if (contactList == null || contactList.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
for (BmsCustomerContact item : contactList)
|
||||
{
|
||||
item.setCustomerId(customerId);
|
||||
if (item.getDelFlag() == null)
|
||||
{
|
||||
item.setDelFlag("0");
|
||||
}
|
||||
if (item.getContactId() != null)
|
||||
{
|
||||
item.setUpdateBy(user.getUserName());
|
||||
item.setUpdateTime(DateUtils.getNowDate());
|
||||
bmsCustomerMapper.updateBmsCustomerContact(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
item.setCreateBy(user.getUserName());
|
||||
item.setCreateTime(DateUtils.getNowDate());
|
||||
bmsCustomerMapper.insertBmsCustomerContact(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user