From 1fda723e3bbbcc22238826cfbb389beb50c53ec7 Mon Sep 17 00:00:00 2001 From: luojiaquan <1583622118@qq.com> Date: Wed, 9 Sep 2026 17:37:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E6=AD=A5=20=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E5=AE=A2=E6=88=B7/=E4=BE=9B=E5=BA=94=E5=95=86=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customerinfo/BmsCustomerController.java | 170 +++ .../supplierinfo/BmsSupplierController.java | 113 ++ .../customerinfo/domain/BmsCustomer.java | 415 +++++++ .../domain/BmsCustomerAttachment.java | 190 +++ .../domain/BmsCustomerCompany.java | 207 ++++ .../mapper/BmsCustomerMapper.java | 133 +++ .../service/IBmsCustomerService.java | 117 ++ .../service/impl/BmsCustomerServiceImpl.java | 289 +++++ .../supplierinfo/domain/BmsSupplier.java | 225 ++++ .../mapper/BmsSupplierMapper.java | 31 + .../service/IBmsSupplierService.java | 39 + .../service/impl/BmsSupplierServiceImpl.java | 194 ++++ .../mapper/customer/BmsCustomerMapper.xml | 473 ++++++++ .../mapper/customer/BmsSupplierMapper.xml | 181 +++ bms-back/sql/customer+supplier/customer.sql | 55 + bms-back/sql/customer+supplier/supplier.sql | 74 ++ .../customerinfo/customer.js | 44 + .../supplierinfo/supplier.js | 44 + .../customerinfo/index.vue | 1005 ++++++++++++++++ .../supplierinfo/index.vue | 1015 +++++++++++++++++ 20 files changed, 5014 insertions(+) create mode 100644 bms-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/customerinfo/BmsCustomerController.java create mode 100644 bms-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/supplierinfo/BmsSupplierController.java create mode 100644 bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/domain/BmsCustomer.java create mode 100644 bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/domain/BmsCustomerAttachment.java create mode 100644 bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/domain/BmsCustomerCompany.java create mode 100644 bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/mapper/BmsCustomerMapper.java create mode 100644 bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/service/IBmsCustomerService.java create mode 100644 bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/service/impl/BmsCustomerServiceImpl.java create mode 100644 bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/supplierinfo/domain/BmsSupplier.java create mode 100644 bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/supplierinfo/mapper/BmsSupplierMapper.java create mode 100644 bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/supplierinfo/service/IBmsSupplierService.java create mode 100644 bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/supplierinfo/service/impl/BmsSupplierServiceImpl.java create mode 100644 bms-back/ruoyi-system/src/main/resources/mapper/customer/BmsCustomerMapper.xml create mode 100644 bms-back/ruoyi-system/src/main/resources/mapper/customer/BmsSupplierMapper.xml create mode 100644 bms-back/sql/customer+supplier/customer.sql create mode 100644 bms-back/sql/customer+supplier/supplier.sql create mode 100644 bms-front/src/api/customersuppliermanagement/customerinfo/customer.js create mode 100644 bms-front/src/api/customersuppliermanagement/supplierinfo/supplier.js create mode 100644 bms-front/src/views/customersuppliermanagement/customerinfo/index.vue create mode 100644 bms-front/src/views/customersuppliermanagement/supplierinfo/index.vue diff --git a/bms-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/customerinfo/BmsCustomerController.java b/bms-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/customerinfo/BmsCustomerController.java new file mode 100644 index 00000000..4c3f6351 --- /dev/null +++ b/bms-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/customerinfo/BmsCustomerController.java @@ -0,0 +1,170 @@ +package com.ruoyi.web.controller.customer.customerinfo; + +import java.util.List; + +import com.ruoyi.customer.customerinfo.domain.BmsCustomerAttachment; +import com.ruoyi.customer.customerinfo.domain.BmsCustomerCompany; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.customer.customerinfo.domain.BmsCustomer; +import com.ruoyi.customer.customerinfo.service.IBmsCustomerService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 客户管理Controller + * + * @author ruoyi + * @date 2026-09-08 + */ +@RestController +@RequestMapping("/customersupplier/customerinfo") +public class BmsCustomerController extends BaseController +{ + @Autowired + private IBmsCustomerService bmsCustomerService; + + /** + * 查询客户信息列表 + */ + @PreAuthorize("@ss.hasPermi('customersupplier:customerinfo:list')") + @GetMapping("/list") + public TableDataInfo list(BmsCustomer bmsCustomer) + { + startPage(); + List list = bmsCustomerService.selectBmsCustomerList(bmsCustomer); + return getDataTable(list); + } + + /** + * 导出客户信息列表 + */ + @PreAuthorize("@ss.hasPermi('customersupplier:customerinfo:export')") + @Log(title = "客户信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BmsCustomer bmsCustomer) + { + List list = bmsCustomerService.selectBmsCustomerList(bmsCustomer); + ExcelUtil util = new ExcelUtil(BmsCustomer.class); + util.exportExcel(response, list, "客户主数据"); + } + + /** + * 获取客户信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('customersupplier:customerinfo:query')") + @GetMapping(value = "/{customerId}") + public AjaxResult getInfo(@PathVariable("customerId") String customerId) + { + return success(bmsCustomerService.selectBmsCustomerByCustomerId(customerId)); + } + + /** + * 新增客户信息 + */ + @PreAuthorize("@ss.hasPermi('customersupplier:customerinfo:add')") + @Log(title = "客户信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BmsCustomer bmsCustomer) + { + return toAjax(bmsCustomerService.insertBmsCustomer(bmsCustomer)); + } + + /** + * 修改客户信息 + */ + @PreAuthorize("@ss.hasPermi('customersupplier:customerinfo:edit')") + @Log(title = "客户信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BmsCustomer bmsCustomer) + { + return toAjax(bmsCustomerService.updateBmsCustomer(bmsCustomer)); + } + + /** + * 删除客户信息 + */ + @PreAuthorize("@ss.hasPermi('customersupplier:customerinfo:remove')") + @Log(title = "客户信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{customerIds}") + public AjaxResult remove(@PathVariable String[] customerIds) + { + return toAjax(bmsCustomerService.deleteBmsCustomerByCustomerIds(customerIds)); + } + + /** + * 查看附件列表数据 + */ +// @PreAuthorize("") + + @GetMapping("/attachment/list") + public TableDataInfo showattachmentlist(BmsCustomerAttachment bmsCustomerAttachment) + { + startPage(); + List list = bmsCustomerService.selectBmsCustomerAttachmentList(bmsCustomerAttachment); + return getDataTable(list); + } + + /** + * 查询客户公司主体列表 + */ + @GetMapping("/company/list") + public TableDataInfo companyList(BmsCustomerCompany bmsCustomerCompany) + { + startPage(); + List list = bmsCustomerService.selectBmsCustomerCompanyList(bmsCustomerCompany); + return getDataTable(list); + } + + /** + * 获取客户公司主体详细信息 + */ + @GetMapping("/company/{companyId}") + public AjaxResult getCompanyInfo(@PathVariable("companyId") Long companyId) + { + return success(bmsCustomerService.selectBmsCustomerCompanyByCompanyId(companyId)); + } + + /** + * 新增客户公司主体(可关联客户主表,可不关联) + */ + @Log(title = "客户公司主体", businessType = BusinessType.INSERT) + @PostMapping("/company") + public AjaxResult addCompany(@RequestBody BmsCustomerCompany bmsCustomerCompany) + { + return toAjax(bmsCustomerService.insertBmsCustomerCompany(bmsCustomerCompany)); + } + + /** + * 修改客户公司主体 + */ + @Log(title = "客户公司主体", businessType = BusinessType.UPDATE) + @PutMapping("/company") + public AjaxResult editCompany(@RequestBody BmsCustomerCompany bmsCustomerCompany) + { + return toAjax(bmsCustomerService.updateBmsCustomerCompany(bmsCustomerCompany)); + } + + /** + * 删除客户公司主体 + */ + @Log(title = "客户公司主体", businessType = BusinessType.DELETE) + @DeleteMapping("/company/{companyIds}") + public AjaxResult removeCompany(@PathVariable Long[] companyIds) + { + return toAjax(bmsCustomerService.deleteBmsCustomerCompanyByCompanyIds(companyIds)); + } +} diff --git a/bms-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/supplierinfo/BmsSupplierController.java b/bms-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/supplierinfo/BmsSupplierController.java new file mode 100644 index 00000000..5c08a679 --- /dev/null +++ b/bms-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/supplierinfo/BmsSupplierController.java @@ -0,0 +1,113 @@ +package com.ruoyi.web.controller.customer.supplierinfo; + +import java.util.List; + +import com.ruoyi.customer.customerinfo.domain.BmsCustomerAttachment; +import com.ruoyi.customer.customerinfo.domain.BmsCustomerCompany; +import com.ruoyi.customer.supplierinfo.domain.BmsSupplier; +import com.ruoyi.customer.supplierinfo.service.IBmsSupplierService; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.utils.poi.ExcelUtil; + +/** + * 供应商管理Controller + * + * @author ruoyi + * @date 2026-09-09 + */ +@RestController +@RequestMapping("/customersupplier/supplierinfo") +public class BmsSupplierController extends BaseController +{ + @Autowired + private IBmsSupplierService bmsSupplierService; + + /** 查询供应商列表 */ + @PreAuthorize("@ss.hasPermi('customersupplier:supplierinfo:list')") + @GetMapping("/list") + public TableDataInfo list(BmsSupplier bmsSupplier) + { + startPage(); + List list = bmsSupplierService.selectBmsSupplierList(bmsSupplier); + return getDataTable(list); + } + + /** 导出供应商列表 */ + @PreAuthorize("@ss.hasPermi('customersupplier:supplierinfo:export')") + @Log(title = "供应商信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BmsSupplier bmsSupplier) + { + List list = bmsSupplierService.selectBmsSupplierList(bmsSupplier); + ExcelUtil util = new ExcelUtil(BmsSupplier.class); + util.exportExcel(response, list, "供应商数据"); + } + + /** 获取供应商详细信息 */ + @PreAuthorize("@ss.hasPermi('customersupplier:supplierinfo:query')") + @GetMapping(value = "/{supplierId}") + public AjaxResult getInfo(@PathVariable("supplierId") String supplierId) + { + return success(bmsSupplierService.selectBmsSupplierBySupplierId(supplierId)); + } + + /** 新增供应商 */ + @PreAuthorize("@ss.hasPermi('customersupplier:supplierinfo:add')") + @Log(title = "供应商信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BmsSupplier bmsSupplier) + { + return toAjax(bmsSupplierService.insertBmsSupplier(bmsSupplier)); + } + + /** 修改供应商 */ + @PreAuthorize("@ss.hasPermi('customersupplier:supplierinfo:edit')") + @Log(title = "供应商信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BmsSupplier bmsSupplier) + { + return toAjax(bmsSupplierService.updateBmsSupplier(bmsSupplier)); + } + + /** 删除供应商 */ + @PreAuthorize("@ss.hasPermi('customersupplier:supplierinfo:remove')") + @Log(title = "供应商信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{supplierIds}") + public AjaxResult remove(@PathVariable String[] supplierIds) + { + return toAjax(bmsSupplierService.deleteBmsSupplierBySupplierIds(supplierIds)); + } + + /** 查看供应商附件列表(子表共用) */ + @GetMapping("/attachment/list") + public TableDataInfo attachmentList(BmsCustomerAttachment bmsCustomerAttachment) + { + startPage(); + List list = bmsSupplierService.selectBmsSupplierAttachmentList(bmsCustomerAttachment); + return getDataTable(list); + } + + /** 查看供应商公司主体列表(子表共用) */ + @GetMapping("/company/list") + public TableDataInfo companyList(BmsCustomerCompany bmsCustomerCompany) + { + startPage(); + List list = bmsSupplierService.selectBmsSupplierCompanyList(bmsCustomerCompany); + return getDataTable(list); + } +} diff --git a/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/domain/BmsCustomer.java b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/domain/BmsCustomer.java new file mode 100644 index 00000000..cf2da68b --- /dev/null +++ b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/domain/BmsCustomer.java @@ -0,0 +1,415 @@ +package com.ruoyi.customer.customerinfo.domain; + +import java.math.BigDecimal; +import java.util.List; +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 + * + * @author ruoyi + * @date 2026-09-08 + */ +public class BmsCustomer extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 客户ID(UUID) */ + private String customerId; + + /** 客户编码 */ + @Excel(name = "客户编码") + private String customerCode; + + /** 客户名称 */ + @Excel(name = "客户名称") + private String customerName; + + /** 对外代码 */ + @Excel(name = "对外代码") + private String customerCodeDw; + + /** 统一社会信用代码 */ + @Excel(name = "统一社会信用代码") + private String creditCode; + + /** 业务类型(0直客 1同行 2集运) */ + @Excel(name = "业务类型", readConverterExp = "0=直客,1=同行,2=集运") + private String customerType; + + /** 启用状态(0正常 1停用) */ + @Excel(name = "启用状态", readConverterExp = "0=正常,1=停用") + private String isEnable; + + /** 业务员用户ID */ + @Excel(name = "业务员用户ID") + private String salesUserId; + + /** 业务员姓名 */ + @Excel(name = "业务员姓名") + private String salesUser; + + /** 资金额度(元) */ + @Excel(name = "资金额度", readConverterExp = "元=") + private BigDecimal ed; + + /** 回款账期(天) */ + @Excel(name = "回款账期", readConverterExp = "天=") + private Long zq; + + /** 结算员用户ID */ + @Excel(name = "结算员用户ID") + private String settlementUserId; + + /** 结算员姓名 */ + @Excel(name = "结算员姓名") + private String settlementUser; + + /** 客服用户ID */ + @Excel(name = "客服用户ID") + private String serviceUserId; + + /** 客服姓名 */ + @Excel(name = "客服姓名") + private String serviceUser; + + /** 结算方式(0月结 1周结 2日结) */ + @Excel(name = "结算方式", readConverterExp = "0=月结,1=周结,2=日结") + private String settlementType; + + /** 临时额度(元) */ + @Excel(name = "临时额度", readConverterExp = "元=") + private BigDecimal tempEd; + + /** 账户余额(元) */ + @Excel(name = "账户余额", readConverterExp = "元=") + private BigDecimal accountBalance; + + /** 外币余额(元) */ + @Excel(name = "外币余额", readConverterExp = "元=") + private BigDecimal foreignCurrencyBalance; + + /** 重量阈值(kg) */ + @Excel(name = "重量阈值", readConverterExp = "k=g") + private BigDecimal weightThreshold; + + /** 抛比(%) */ + @Excel(name = "抛比", readConverterExp = "%=") + private BigDecimal throwRatio; + + /** 信用额度(元) */ + @Excel(name = "信用额度", readConverterExp = "元=") + private BigDecimal creditEd; + + /** 绑定产品ID(多个产品ID用逗号分隔,支持批量操作) */ + @Excel(name = "绑定产品ID", readConverterExp = "多=个产品ID用逗号分隔,支持批量操作") + private String productIds; + + /** 附件列表(子表 bms_customer_attachment) */ + private List attachmentList; + + /** 公司主体列表(子表 bms_customer_company) */ + private List companyList; + + /** 删除标记(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 attachmentList) + { + this.attachmentList = attachmentList; + } + + public List getAttachmentList() + { + return attachmentList; + } + + public void setCompanyList(List companyList) + { + this.companyList = companyList; + } + + public List 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(); + } +} diff --git a/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/domain/BmsCustomerAttachment.java b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/domain/BmsCustomerAttachment.java new file mode 100644 index 00000000..82e20fac --- /dev/null +++ b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/domain/BmsCustomerAttachment.java @@ -0,0 +1,190 @@ +package com.ruoyi.customer.customerinfo.domain; + +import lombok.Getter; +import lombok.Setter; +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_attachment + * + * @author ruoyi + * @date 2026-09-08 + */ +@Getter +@Setter +public class BmsCustomerAttachment extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 附件ID */ + private Long attachmentId; + + /** 所属客户ID或供应商ID(UUID) */ + private String customerId; + + /** 文件原始名称 */ + @Excel(name = "文件名称") + private String fileName; + + /** 文件存储路径 */ + private String filePath; + + /** 文件大小(字节) */ + @Excel(name = "文件大小") + private Long fileSize; + + /** 文件类型 */ + private String fileType; + + /** 文件扩展名 */ + @Excel(name = "文件扩展名") + private String fileExtension; + + /** 附件类型(0附件资料 1客户Logo 2合同文件 3其他) */ + @Excel(name = "附件类型", readConverterExp = "0=附件资料,1=客户Logo,2=合同文件,3=其他") + private String attachmentType; + + /** 是否Logo(0否 1是) */ + private String isLogo; + + /** 排序 */ + @Excel(name = "排序") + private Integer sortOrder; + + /** 备注 */ + private String remark; + + /** 删除标记(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(); + } +} diff --git a/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/domain/BmsCustomerCompany.java b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/domain/BmsCustomerCompany.java new file mode 100644 index 00000000..a798573b --- /dev/null +++ b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/domain/BmsCustomerCompany.java @@ -0,0 +1,207 @@ +package com.ruoyi.customer.customerinfo.domain; + +import java.math.BigDecimal; +import java.util.Date; +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_company + * + * @author ruoyi + * @date 2026-09-09 + */ +public class BmsCustomerCompany extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 公司主体ID */ + private Long companyId; + + /** 所属客户ID或供应商ID(UUID) */ + private String customerId; + + /** 公司全称 */ + @Excel(name = "公司全称") + private String companyNameFull; + + /** 公司英文名称 */ + private String englishName; + + /** 统一社会信用代码 */ + @Excel(name = "统一社会信用代码") + private String creditCode; + + /** 法定代表人 */ + @Excel(name = "法定代表人") + private String legalPerson; + + /** 法定代表人电话 */ + private String legalPersonPhone; + + /** 法定代表人身份证号(加密存储) */ + private String legalPersonIdCard; + + /** 注册资本(万元) */ + @Excel(name = "注册资本") + private BigDecimal registeredCapital; + + /** 注册资本币种 */ + private String capitalCurrency; + + /** 实收资本(万元) */ + private BigDecimal paidInCapital; + + /** 成立日期 */ + private Date establishDate; + + /** 营业期限起始日 */ + private Date businessTermStart; + + /** 营业期限终止日 */ + private Date businessTermEnd; + + /** 是否长期有效(0否 1是) */ + private String businessTermPermanent; + + /** 登记机关 */ + private String registrationAuthority; + + /** 注册号 */ + private String registrationNumber; + + /** 经营状态 */ + private String operatingStatus; + + /** 经营范围 */ + private String businessScope; + + /** 主要股东信息 */ + private String shareholders; + + /** 员工人数 */ + private Integer employeeCount; + + /** 公司电话 */ + private String companyPhone; + + /** 公司传真 */ + private String companyFax; + + /** 公司网址 */ + private String companyWebsite; + + /** 公司邮箱 */ + private String companyEmail; + + /** 注册省份 */ + private String registeredProvince; + + /** 注册城市 */ + private String registeredCity; + + /** 注册区县 */ + private String registeredDistrict; + + /** 注册详细地址 */ + private String registeredAddressDetail; + + /** 营业执照 oss_id */ + private Long businessLicenseOssId; + + /** 其他附件 oss_id 逗号分隔 */ + private String attachmentIds; + + /** 备注 */ + private String remark; + + /** 删除标记 */ + 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(); + } +} diff --git a/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/mapper/BmsCustomerMapper.java b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/mapper/BmsCustomerMapper.java new file mode 100644 index 00000000..60caed0a --- /dev/null +++ b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/mapper/BmsCustomerMapper.java @@ -0,0 +1,133 @@ +package com.ruoyi.customer.customerinfo.mapper; + +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; + +/** + * 客户主Mapper接口 + * + * @author ruoyi + * @date 2026-09-08 + */ +public interface BmsCustomerMapper +{ + /** + * 查询客户主 + * + * @param customerId 客户主主键 + * @return 客户主 + */ + public BmsCustomer selectBmsCustomerByCustomerId(String customerId); + + /** + * 查询客户主列表 + * + * @param bmsCustomer 客户主 + * @return 客户主集合 + */ + public List selectBmsCustomerList(BmsCustomer bmsCustomer); + + /** + * 新增客户主 + * + * @param bmsCustomer 客户主 + * @return 结果 + */ + public int insertBmsCustomer(BmsCustomer bmsCustomer); + + /** + * 修改客户主 + * + * @param bmsCustomer 客户主 + * @return 结果 + */ + public int updateBmsCustomer(BmsCustomer bmsCustomer); + + /** + * 删除客户主 + * + * @param customerId 客户主主键 + * @return 结果 + */ + public int deleteBmsCustomerByCustomerId(String customerId); + + /** + * 批量删除客户主 + * + * @param customerIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBmsCustomerByCustomerIds(String[] customerIds); + + /** + * 查询客户附件列表 + * + * @param bmsCustomerAttachment 客户附件 + * @return 客户附件集合 + */ + public List selectBmsCustomerAttachmentList(BmsCustomerAttachment bmsCustomerAttachment); + + /** + * 新增客户附件 + * + * @param bmsCustomerAttachment 客户附件 + * @return 结果 + */ + public int insertBmsCustomerAttachment(BmsCustomerAttachment bmsCustomerAttachment); + + /** + * 修改客户附件 + * + * @param bmsCustomerAttachment 客户附件 + * @return 结果 + */ + public int updateBmsCustomerAttachment(BmsCustomerAttachment bmsCustomerAttachment); + + /** + * 按客户ID删除附件 + * + * @param customerId 客户主键 + * @return 结果 + */ + public int deleteBmsCustomerAttachmentByCustomerId(String customerId); + + /** + * 批量删除客户附件 + * + * @param attachmentIds 附件ID集合 + * @return 结果 + */ + public int deleteBmsCustomerAttachmentByAttachmentIds(Long[] attachmentIds); + + /** + * 查询客户公司主体列表 + */ + public List selectBmsCustomerCompanyList(BmsCustomerCompany bmsCustomerCompany); + + /** + * 按ID查询客户公司主体 + */ + public BmsCustomerCompany selectBmsCustomerCompanyByCompanyId(Long companyId); + + /** + * 新增客户公司主体 + */ + public int insertBmsCustomerCompany(BmsCustomerCompany bmsCustomerCompany); + + /** + * 修改客户公司主体 + */ + public int updateBmsCustomerCompany(BmsCustomerCompany bmsCustomerCompany); + + /** + * 按客户ID删除公司主体(逻辑删除) + */ + public int deleteBmsCustomerCompanyByCustomerId(String customerId); + + /** + * 按公司ID删除(逻辑删除) + */ + public int deleteBmsCustomerCompanyByCompanyId(Long companyId); +} diff --git a/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/service/IBmsCustomerService.java b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/service/IBmsCustomerService.java new file mode 100644 index 00000000..aa68399d --- /dev/null +++ b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/service/IBmsCustomerService.java @@ -0,0 +1,117 @@ +package com.ruoyi.customer.customerinfo.service; + +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; + +/** + * 客户主Service接口 + * + * @author ruoyi + * @date 2026-09-08 + */ +public interface IBmsCustomerService +{ + /** + * 查询客户主 + * + * @param customerId 客户主主键 + * @return 客户主 + */ + public BmsCustomer selectBmsCustomerByCustomerId(String customerId); + + /** + * 查询客户主列表 + * + * @param bmsCustomer 客户主 + * @return 客户主集合 + */ + public List selectBmsCustomerList(BmsCustomer bmsCustomer); + + /** + * 查询客户附件列表 + * + * @param bmsCustomerAttachment 客户附件 + * @return 客户附件集合 + */ + public List selectBmsCustomerAttachmentList(BmsCustomerAttachment bmsCustomerAttachment); + + /** + * 批量保存客户附件(新增/修改) + * + * @param customerId 客户ID + * @param attachmentList 附件集合 + */ + public void saveBmsCustomerAttachments(String customerId, List attachmentList); + + /** + * 按客户ID删除附件 + * + * @param customerId 客户ID + * @return 结果 + */ + public int deleteBmsCustomerAttachmentByCustomerId(String customerId); + + /** + * 查询客户公司主体列表 + */ + public List selectBmsCustomerCompanyList(BmsCustomerCompany bmsCustomerCompany); + + /** + * 按ID查询客户公司主体 + */ + public BmsCustomerCompany selectBmsCustomerCompanyByCompanyId(Long companyId); + + /** + * 新增客户公司主体(独立接口,用于子表新增按钮) + */ + public int insertBmsCustomerCompany(BmsCustomerCompany bmsCustomerCompany); + + /** + * 修改客户公司主体 + */ + public int updateBmsCustomerCompany(BmsCustomerCompany bmsCustomerCompany); + + /** + * 删除客户公司主体 + */ + public int deleteBmsCustomerCompanyByCompanyIds(Long[] companyIds); + + /** + * 批量保存客户公司主体(随主表提交时调用) + */ + public void saveBmsCustomerCompanies(String customerId, List companyList); + + /** + * 新增客户主 + * + * @param bmsCustomer 客户主 + * @return 结果 + */ + public int insertBmsCustomer(BmsCustomer bmsCustomer); + + /** + * 修改客户主 + * + * @param bmsCustomer 客户主 + * @return 结果 + */ + public int updateBmsCustomer(BmsCustomer bmsCustomer); + + /** + * 批量删除客户主 + * + * @param customerIds 需要删除的客户主主键集合 + * @return 结果 + */ + public int deleteBmsCustomerByCustomerIds(String[] customerIds); + + /** + * 删除客户主信息 + * + * @param customerId 客户主主键 + * @return 结果 + */ + public int deleteBmsCustomerByCustomerId(String customerId); +} diff --git a/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/service/impl/BmsCustomerServiceImpl.java b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/service/impl/BmsCustomerServiceImpl.java new file mode 100644 index 00000000..deb7f8aa --- /dev/null +++ b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/customerinfo/service/impl/BmsCustomerServiceImpl.java @@ -0,0 +1,289 @@ +package com.ruoyi.customer.customerinfo.service.impl; + +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 org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import com.ruoyi.customer.customerinfo.mapper.BmsCustomerMapper; +import com.ruoyi.customer.customerinfo.domain.BmsCustomer; +import com.ruoyi.customer.customerinfo.service.IBmsCustomerService; + +/** + * 客户主Service业务层处理 + * + * @author ruoyi + * @date 2026-09-08 + */ +@Service +public class BmsCustomerServiceImpl implements IBmsCustomerService +{ + @Autowired + private BmsCustomerMapper bmsCustomerMapper; + + /** + * 查询客户主 + * + * @param customerId 客户主主键 + * @return 客户主 + */ + @Override + public BmsCustomer selectBmsCustomerByCustomerId(String customerId) + { + BmsCustomer bmsCustomer = bmsCustomerMapper.selectBmsCustomerByCustomerId(customerId); + if (bmsCustomer != null) + { + BmsCustomerAttachment query = new BmsCustomerAttachment(); + query.setCustomerId(customerId); + bmsCustomer.setAttachmentList(bmsCustomerMapper.selectBmsCustomerAttachmentList(query)); + BmsCustomerCompany companyQuery = new BmsCustomerCompany(); + companyQuery.setCustomerId(customerId); + bmsCustomer.setCompanyList(bmsCustomerMapper.selectBmsCustomerCompanyList(companyQuery)); + } + return bmsCustomer; + } + + /** + * 查询客户主列表 + * + * @param bmsCustomer 客户主 + * @return 客户主 + */ + @Override + public List selectBmsCustomerList(BmsCustomer bmsCustomer) + { + return bmsCustomerMapper.selectBmsCustomerList(bmsCustomer); + } + + //查询附件子表数据 + @Override + public List selectBmsCustomerAttachmentList(BmsCustomerAttachment bmsCustomerAttachment) { + return bmsCustomerMapper.selectBmsCustomerAttachmentList(bmsCustomerAttachment); + } + + /** + * 批量保存客户附件(新增/修改) + */ + @Override + public void saveBmsCustomerAttachments(String customerId, List attachmentList) + { + if (attachmentList == null || attachmentList.isEmpty()) + { + return; + } + SysUser user = SecurityUtils.getLoginUser().getUser(); + for (BmsCustomerAttachment item : attachmentList) + { + item.setCustomerId(customerId); + if (item.getDelFlag() == null) + { + item.setDelFlag("0"); + } + if (item.getAttachmentId() != null) + { + item.setUpdateBy(user.getUserName()); + item.setUpdateTime(DateUtils.getNowDate()); + bmsCustomerMapper.updateBmsCustomerAttachment(item); + } + else + { + item.setCreateBy(user.getUserName()); + item.setCreateTime(DateUtils.getNowDate()); + bmsCustomerMapper.insertBmsCustomerAttachment(item); + } + } + } + + /** + * 按客户ID删除附件(逻辑删除) + */ + @Override + public int deleteBmsCustomerAttachmentByCustomerId(String customerId) + { + return bmsCustomerMapper.deleteBmsCustomerAttachmentByCustomerId(customerId); + } + + /** + * 查询客户公司主体列表 + */ + @Override + public List selectBmsCustomerCompanyList(BmsCustomerCompany bmsCustomerCompany) + { + return bmsCustomerMapper.selectBmsCustomerCompanyList(bmsCustomerCompany); + } + + /** + * 按ID查询客户公司主体 + */ + @Override + public BmsCustomerCompany selectBmsCustomerCompanyByCompanyId(Long companyId) + { + return bmsCustomerMapper.selectBmsCustomerCompanyByCompanyId(companyId); + } + + /** + * 新增客户公司主体 + */ + @Override + public int insertBmsCustomerCompany(BmsCustomerCompany bmsCustomerCompany) + { + SysUser user = SecurityUtils.getLoginUser().getUser(); + bmsCustomerCompany.setCreateBy(user.getUserName()); + bmsCustomerCompany.setCreateTime(DateUtils.getNowDate()); + if (bmsCustomerCompany.getDelFlag() == null) + { + bmsCustomerCompany.setDelFlag("0"); + } + return bmsCustomerMapper.insertBmsCustomerCompany(bmsCustomerCompany); + } + + /** + * 修改客户公司主体 + */ + @Override + public int updateBmsCustomerCompany(BmsCustomerCompany bmsCustomerCompany) + { + SysUser user = SecurityUtils.getLoginUser().getUser(); + bmsCustomerCompany.setUpdateBy(user.getUserName()); + bmsCustomerCompany.setUpdateTime(DateUtils.getNowDate()); + return bmsCustomerMapper.updateBmsCustomerCompany(bmsCustomerCompany); + } + + /** + * 删除客户公司主体(逻辑删除) + */ + @Override + public int deleteBmsCustomerCompanyByCompanyIds(Long[] companyIds) + { + int rows = 0; + for (Long companyId : companyIds) + { + rows += bmsCustomerMapper.deleteBmsCustomerCompanyByCompanyId(companyId); + } + return rows; + } + + /** + * 批量保存客户公司主体(随主表提交) + */ + @Override + public void saveBmsCustomerCompanies(String customerId, List companyList) + { + if (companyList == null || companyList.isEmpty()) + { + return; + } + SysUser user = SecurityUtils.getLoginUser().getUser(); + for (BmsCustomerCompany item : companyList) + { + item.setCustomerId(customerId); + if (item.getDelFlag() == null) + { + item.setDelFlag("0"); + } + if (item.getCompanyId() != null) + { + item.setUpdateBy(user.getUserName()); + item.setUpdateTime(DateUtils.getNowDate()); + bmsCustomerMapper.updateBmsCustomerCompany(item); + } + else + { + item.setCreateBy(user.getUserName()); + item.setCreateTime(DateUtils.getNowDate()); + bmsCustomerMapper.insertBmsCustomerCompany(item); + } + } + } + + /** + * 新增客户主 + * + * @param bmsCustomer 客户主 + * @return 结果 + */ + @Transactional(rollbackFor = Exception.class) + @Override + 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); + if (rows > 0) + { + saveBmsCustomerAttachments(bmsCustomer.getCustomerId(), bmsCustomer.getAttachmentList()); + saveBmsCustomerCompanies(bmsCustomer.getCustomerId(), bmsCustomer.getCompanyList()); + } + return rows; + } + + /** + * 修改客户主 + * + * @param bmsCustomer 客户主 + * @return 结果 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public int updateBmsCustomer(BmsCustomer bmsCustomer) + { + SysUser user = SecurityUtils.getLoginUser().getUser(); + bmsCustomer.setUpdateTime(DateUtils.getNowDate()); + bmsCustomer.setUpdateBy(user.getUserName()); + // 先逻辑删除原有附件,再按新列表重建(简化全量替换) + bmsCustomerMapper.deleteBmsCustomerAttachmentByCustomerId(bmsCustomer.getCustomerId()); + if (bmsCustomer.getAttachmentList() != null) + { + for (BmsCustomerAttachment item : bmsCustomer.getAttachmentList()) + { + item.setAttachmentId(null); + } + saveBmsCustomerAttachments(bmsCustomer.getCustomerId(), bmsCustomer.getAttachmentList()); + } + // 公司主体表采用增量 upsert,不做全量重置(保留 companyId 稳定) + saveBmsCustomerCompanies(bmsCustomer.getCustomerId(), bmsCustomer.getCompanyList()); + return bmsCustomerMapper.updateBmsCustomer(bmsCustomer); + } + + /** + * 批量删除客户主 + * + * @param customerIds 需要删除的客户主主键 + * @return 结果 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public int deleteBmsCustomerByCustomerIds(String[] customerIds) + { + for (String customerId : customerIds) + { + bmsCustomerMapper.deleteBmsCustomerAttachmentByCustomerId(customerId); + bmsCustomerMapper.deleteBmsCustomerCompanyByCustomerId(customerId); + } + return bmsCustomerMapper.deleteBmsCustomerByCustomerIds(customerIds); + } + + /** + * 删除客户主信息 + * + * @param customerId 客户主主键 + * @return 结果 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public int deleteBmsCustomerByCustomerId(String customerId) + { + bmsCustomerMapper.deleteBmsCustomerAttachmentByCustomerId(customerId); + bmsCustomerMapper.deleteBmsCustomerCompanyByCustomerId(customerId); + return bmsCustomerMapper.deleteBmsCustomerByCustomerId(customerId); + } +} diff --git a/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/supplierinfo/domain/BmsSupplier.java b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/supplierinfo/domain/BmsSupplier.java new file mode 100644 index 00000000..ad8bb1ae --- /dev/null +++ b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/supplierinfo/domain/BmsSupplier.java @@ -0,0 +1,225 @@ +package com.ruoyi.customer.supplierinfo.domain; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +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; +import com.ruoyi.customer.customerinfo.domain.BmsCustomerAttachment; +import com.ruoyi.customer.customerinfo.domain.BmsCustomerCompany; + +/** + * 供应商主对象 bms_supplier + * + * @author ruoyi + * @date 2026-09-09 + */ +public class BmsSupplier extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 供应商ID(UUID) */ + private String supplierId; + + /** 供应商编码 */ + @Excel(name = "供应商编码") + private String supplierCode; + + /** 供应商名称 */ + @Excel(name = "供应商名称") + private String supplierName; + + /** 对外代码 */ + @Excel(name = "对外代码") + private String supplierCodeDw; + + /** 统一社会信用代码 */ + @Excel(name = "统一社会信用代码") + private String creditCode; + + /** 供应商类型(0生产商 1代理商 2个人 3物流商 4其他) */ + @Excel(name = "供应商类型", readConverterExp = "0=生产商,1=代理商,2=个人,3=物流商,4=其他") + private String supplierType; + + /** 启用状态(0正常 1停用) */ + @Excel(name = "启用状态", readConverterExp = "0=正常,1=停用") + private String isEnable; + + /** 采购员用户ID */ + @Excel(name = "采购员用户ID") + private String purchaserUserId; + + /** 采购员姓名 */ + @Excel(name = "采购员姓名") + private String purchaserUser; + + /** 结算员用户ID */ + @Excel(name = "结算员用户ID") + private String settlementUserId; + + /** 结算员姓名 */ + @Excel(name = "结算员姓名") + private String settlementUser; + + /** 跟单员用户ID */ + @Excel(name = "跟单员用户ID") + private String serviceUserId; + + /** 跟单员姓名 */ + @Excel(name = "跟单员姓名") + private String serviceUser; + + /** 应付额度(元) */ + @Excel(name = "应付额度") + private BigDecimal ed; + + /** 应付账期(天) */ + @Excel(name = "应付账期") + private Long zq; + + /** 结算方式(0月结 1周结 2日结 3票结) */ + @Excel(name = "结算方式", readConverterExp = "0=月结,1=周结,2=日结,3=票结") + private String settlementType; + + /** 临时额度(元) */ + @Excel(name = "临时额度") + private BigDecimal tempEd; + + /** 应付余额(元) */ + @Excel(name = "应付余额") + private BigDecimal accountBalance; + + /** 外币应付余额(元) */ + @Excel(name = "外币应付余额") + private BigDecimal foreignCurrencyBalance; + + /** 信用额度(元) */ + @Excel(name = "信用额度") + private BigDecimal creditEd; + + /** 重量阈值(kg) */ + @Excel(name = "重量阈值") + private BigDecimal weightThreshold; + + /** 抛比(%) */ + @Excel(name = "抛比") + private BigDecimal throwRatio; + + /** 合作开始日期 */ + @Excel(name = "合作开始日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date cooperationStartDate; + + /** 合作状态(0正常 1暂停 2终止) */ + @Excel(name = "合作状态", readConverterExp = "0=正常,1=暂停,2=终止") + private String cooperationStatus; + + /** 绑定的渠道/服务ID */ + private String channelIds; + + /** 附件列表(子表 bms_customer_attachment 共用) */ + private List attachmentList; + + /** 公司主体列表(子表 bms_customer_company 共用) */ + private List companyList; + + /** 删除标记(0正常 2删除) */ + private String delFlag; + + public void setSupplierId(String supplierId) { this.supplierId = supplierId; } + public String getSupplierId() { return supplierId; } + public void setSupplierCode(String supplierCode) { this.supplierCode = supplierCode; } + public String getSupplierCode() { return supplierCode; } + public void setSupplierName(String supplierName) { this.supplierName = supplierName; } + public String getSupplierName() { return supplierName; } + public void setSupplierCodeDw(String supplierCodeDw) { this.supplierCodeDw = supplierCodeDw; } + public String getSupplierCodeDw() { return supplierCodeDw; } + public void setCreditCode(String creditCode) { this.creditCode = creditCode; } + public String getCreditCode() { return creditCode; } + public void setSupplierType(String supplierType) { this.supplierType = supplierType; } + public String getSupplierType() { return supplierType; } + public void setIsEnable(String isEnable) { this.isEnable = isEnable; } + public String getIsEnable() { return isEnable; } + public void setPurchaserUserId(String purchaserUserId) { this.purchaserUserId = purchaserUserId; } + public String getPurchaserUserId() { return purchaserUserId; } + public void setPurchaserUser(String purchaserUser) { this.purchaserUser = purchaserUser; } + public String getPurchaserUser() { return purchaserUser; } + 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 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 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 setCreditEd(BigDecimal creditEd) { this.creditEd = creditEd; } + public BigDecimal getCreditEd() { return creditEd; } + 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 setCooperationStartDate(Date cooperationStartDate) { this.cooperationStartDate = cooperationStartDate; } + public Date getCooperationStartDate() { return cooperationStartDate; } + public void setCooperationStatus(String cooperationStatus) { this.cooperationStatus = cooperationStatus; } + public String getCooperationStatus() { return cooperationStatus; } + public void setChannelIds(String channelIds) { this.channelIds = channelIds; } + public String getChannelIds() { return channelIds; } + public void setAttachmentList(List attachmentList) { this.attachmentList = attachmentList; } + public List getAttachmentList() { return attachmentList; } + public void setCompanyList(List companyList) { this.companyList = companyList; } + public List 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("supplierId", getSupplierId()) + .append("supplierCode", getSupplierCode()) + .append("supplierName", getSupplierName()) + .append("supplierCodeDw", getSupplierCodeDw()) + .append("creditCode", getCreditCode()) + .append("supplierType", getSupplierType()) + .append("isEnable", getIsEnable()) + .append("purchaserUserId", getPurchaserUserId()) + .append("purchaserUser", getPurchaserUser()) + .append("settlementUserId", getSettlementUserId()) + .append("settlementUser", getSettlementUser()) + .append("serviceUserId", getServiceUserId()) + .append("serviceUser", getServiceUser()) + .append("ed", getEd()) + .append("zq", getZq()) + .append("settlementType", getSettlementType()) + .append("tempEd", getTempEd()) + .append("accountBalance", getAccountBalance()) + .append("foreignCurrencyBalance", getForeignCurrencyBalance()) + .append("creditEd", getCreditEd()) + .append("weightThreshold", getWeightThreshold()) + .append("throwRatio", getThrowRatio()) + .append("cooperationStartDate", getCooperationStartDate()) + .append("cooperationStatus", getCooperationStatus()) + .append("channelIds", getChannelIds()) + .append("attachmentList", getAttachmentList()) + .append("companyList", getCompanyList()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("delFlag", getDelFlag()) + .toString(); + } +} diff --git a/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/supplierinfo/mapper/BmsSupplierMapper.java b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/supplierinfo/mapper/BmsSupplierMapper.java new file mode 100644 index 00000000..697ebbbf --- /dev/null +++ b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/supplierinfo/mapper/BmsSupplierMapper.java @@ -0,0 +1,31 @@ +package com.ruoyi.customer.supplierinfo.mapper; + +import java.util.List; +import com.ruoyi.customer.supplierinfo.domain.BmsSupplier; + +/** + * 供应商主Mapper接口 + * + * @author ruoyi + * @date 2026-09-09 + */ +public interface BmsSupplierMapper +{ + /** 查询供应商 */ + public BmsSupplier selectBmsSupplierBySupplierId(String supplierId); + + /** 查询供应商列表 */ + public List selectBmsSupplierList(BmsSupplier bmsSupplier); + + /** 新增供应商 */ + public int insertBmsSupplier(BmsSupplier bmsSupplier); + + /** 修改供应商 */ + public int updateBmsSupplier(BmsSupplier bmsSupplier); + + /** 删除供应商 */ + public int deleteBmsSupplierBySupplierId(String supplierId); + + /** 批量删除供应商 */ + public int deleteBmsSupplierBySupplierIds(String[] supplierIds); +} diff --git a/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/supplierinfo/service/IBmsSupplierService.java b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/supplierinfo/service/IBmsSupplierService.java new file mode 100644 index 00000000..dca0e7b4 --- /dev/null +++ b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/supplierinfo/service/IBmsSupplierService.java @@ -0,0 +1,39 @@ +package com.ruoyi.customer.supplierinfo.service; + +import java.util.List; +import com.ruoyi.customer.customerinfo.domain.BmsCustomerAttachment; +import com.ruoyi.customer.customerinfo.domain.BmsCustomerCompany; +import com.ruoyi.customer.supplierinfo.domain.BmsSupplier; + +/** + * 供应商主Service接口 + * + * @author ruoyi + * @date 2026-09-09 + */ +public interface IBmsSupplierService +{ + /** 查询供应商 */ + public BmsSupplier selectBmsSupplierBySupplierId(String supplierId); + + /** 查询供应商列表 */ + public List selectBmsSupplierList(BmsSupplier bmsSupplier); + + /** 新增供应商 */ + public int insertBmsSupplier(BmsSupplier bmsSupplier); + + /** 修改供应商 */ + public int updateBmsSupplier(BmsSupplier bmsSupplier); + + /** 批量删除供应商 */ + public int deleteBmsSupplierBySupplierIds(String[] supplierIds); + + /** 删除供应商 */ + public int deleteBmsSupplierBySupplierId(String supplierId); + + /** 查询供应商附件列表(子表共用) */ + public List selectBmsSupplierAttachmentList(BmsCustomerAttachment attachment); + + /** 查询供应商公司主体列表(子表共用) */ + public List selectBmsSupplierCompanyList(BmsCustomerCompany company); +} diff --git a/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/supplierinfo/service/impl/BmsSupplierServiceImpl.java b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/supplierinfo/service/impl/BmsSupplierServiceImpl.java new file mode 100644 index 00000000..52962a58 --- /dev/null +++ b/bms-back/ruoyi-system/src/main/java/com/ruoyi/customer/supplierinfo/service/impl/BmsSupplierServiceImpl.java @@ -0,0 +1,194 @@ +package com.ruoyi.customer.supplierinfo.service.impl; + +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.mapper.BmsCustomerMapper; +import com.ruoyi.customer.supplierinfo.domain.BmsSupplier; +import com.ruoyi.customer.supplierinfo.mapper.BmsSupplierMapper; +import com.ruoyi.customer.supplierinfo.service.IBmsSupplierService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +/** + * 供应商主Service业务层处理 + * + * @author ruoyi + * @date 2026-09-09 + */ +@Service +public class BmsSupplierServiceImpl implements IBmsSupplierService +{ + @Autowired + private BmsSupplierMapper bmsSupplierMapper; + + /** 子表 Mapper 复用客户模块(bms_customer_attachment / bms_customer_company 物理表共用,customer_id 列实际存 supplier_id) */ + @Autowired + private BmsCustomerMapper bmsCustomerMapper; + + @Override + public BmsSupplier selectBmsSupplierBySupplierId(String supplierId) + { + BmsSupplier bmsSupplier = bmsSupplierMapper.selectBmsSupplierBySupplierId(supplierId); + if (bmsSupplier != null) + { + // 复用子表查询,customer_id 实际传入 supplier_id + BmsCustomerAttachment attachQuery = new BmsCustomerAttachment(); + attachQuery.setCustomerId(supplierId); + bmsSupplier.setAttachmentList(bmsCustomerMapper.selectBmsCustomerAttachmentList(attachQuery)); + BmsCustomerCompany companyQuery = new BmsCustomerCompany(); + companyQuery.setCustomerId(supplierId); + bmsSupplier.setCompanyList(bmsCustomerMapper.selectBmsCustomerCompanyList(companyQuery)); + } + return bmsSupplier; + } + + @Override + public List selectBmsSupplierList(BmsSupplier bmsSupplier) + { + return bmsSupplierMapper.selectBmsSupplierList(bmsSupplier); + } + + @Override + public List selectBmsSupplierAttachmentList(BmsCustomerAttachment attachment) + { + return bmsCustomerMapper.selectBmsCustomerAttachmentList(attachment); + } + + @Override + public List selectBmsSupplierCompanyList(BmsCustomerCompany company) + { + return bmsCustomerMapper.selectBmsCustomerCompanyList(company); + } + + /** + * 批量保存供应商附件(复用子表,把 supplierId 设置到 customerId 字段) + */ + private void saveBmsSupplierAttachments(String supplierId, List attachmentList) + { + if (attachmentList == null || attachmentList.isEmpty()) + { + return; + } + SysUser user = SecurityUtils.getLoginUser().getUser(); + for (BmsCustomerAttachment item : attachmentList) + { + item.setCustomerId(supplierId); + if (item.getDelFlag() == null) + { + item.setDelFlag("0"); + } + if (item.getAttachmentId() != null) + { + item.setUpdateBy(user.getUserName()); + item.setUpdateTime(DateUtils.getNowDate()); + bmsCustomerMapper.updateBmsCustomerAttachment(item); + } + else + { + item.setCreateBy(user.getUserName()); + item.setCreateTime(DateUtils.getNowDate()); + bmsCustomerMapper.insertBmsCustomerAttachment(item); + } + } + } + + /** + * 批量保存供应商公司主体(复用子表,把 supplierId 设置到 customerId 字段) + */ + private void saveBmsSupplierCompanies(String supplierId, List companyList) + { + if (companyList == null || companyList.isEmpty()) + { + return; + } + SysUser user = SecurityUtils.getLoginUser().getUser(); + for (BmsCustomerCompany item : companyList) + { + item.setCustomerId(supplierId); + if (item.getDelFlag() == null) + { + item.setDelFlag("0"); + } + if (item.getCompanyId() != null) + { + item.setUpdateBy(user.getUserName()); + item.setUpdateTime(DateUtils.getNowDate()); + bmsCustomerMapper.updateBmsCustomerCompany(item); + } + else + { + item.setCreateBy(user.getUserName()); + item.setCreateTime(DateUtils.getNowDate()); + bmsCustomerMapper.insertBmsCustomerCompany(item); + } + } + } + + @Transactional(rollbackFor = Exception.class) + @Override + public int insertBmsSupplier(BmsSupplier bmsSupplier) + { + SysUser user = SecurityUtils.getLoginUser().getUser(); + // 应用层生成 UUID,与客户 UUID 互不冲突,子表 customer_id 列可同时容纳两者 + bmsSupplier.setSupplierId(IdUtils.simpleUUID()); + bmsSupplier.setCreateTime(DateUtils.getNowDate()); + bmsSupplier.setCreateBy(user.getUserName()); + int rows = bmsSupplierMapper.insertBmsSupplier(bmsSupplier); + if (rows > 0) + { + saveBmsSupplierAttachments(bmsSupplier.getSupplierId(), bmsSupplier.getAttachmentList()); + saveBmsSupplierCompanies(bmsSupplier.getSupplierId(), bmsSupplier.getCompanyList()); + } + return rows; + } + + @Transactional(rollbackFor = Exception.class) + @Override + public int updateBmsSupplier(BmsSupplier bmsSupplier) + { + SysUser user = SecurityUtils.getLoginUser().getUser(); + bmsSupplier.setUpdateTime(DateUtils.getNowDate()); + bmsSupplier.setUpdateBy(user.getUserName()); + // 附件先逻辑删除再重建(与客户模块保持一致) + bmsCustomerMapper.deleteBmsCustomerAttachmentByCustomerId(bmsSupplier.getSupplierId()); + if (bmsSupplier.getAttachmentList() != null) + { + for (BmsCustomerAttachment item : bmsSupplier.getAttachmentList()) + { + item.setAttachmentId(null); + } + saveBmsSupplierAttachments(bmsSupplier.getSupplierId(), bmsSupplier.getAttachmentList()); + } + // 公司主体采用增量 upsert + saveBmsSupplierCompanies(bmsSupplier.getSupplierId(), bmsSupplier.getCompanyList()); + return bmsSupplierMapper.updateBmsSupplier(bmsSupplier); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public int deleteBmsSupplierBySupplierIds(String[] supplierIds) + { + for (String supplierId : supplierIds) + { + bmsCustomerMapper.deleteBmsCustomerAttachmentByCustomerId(supplierId); + bmsCustomerMapper.deleteBmsCustomerCompanyByCustomerId(supplierId); + } + return bmsSupplierMapper.deleteBmsSupplierBySupplierIds(supplierIds); + } + + @Transactional(rollbackFor = Exception.class) + @Override + public int deleteBmsSupplierBySupplierId(String supplierId) + { + bmsCustomerMapper.deleteBmsCustomerAttachmentByCustomerId(supplierId); + bmsCustomerMapper.deleteBmsCustomerCompanyByCustomerId(supplierId); + return bmsSupplierMapper.deleteBmsSupplierBySupplierId(supplierId); + } +} diff --git a/bms-back/ruoyi-system/src/main/resources/mapper/customer/BmsCustomerMapper.xml b/bms-back/ruoyi-system/src/main/resources/mapper/customer/BmsCustomerMapper.xml new file mode 100644 index 00000000..c723f634 --- /dev/null +++ b/bms-back/ruoyi-system/src/main/resources/mapper/customer/BmsCustomerMapper.xml @@ -0,0 +1,473 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select customer_id, customer_code, customer_name, customer_code_dw, credit_code, customer_type, is_enable, sales_user_id, sales_user, ed, zq, settlement_user_id, settlement_user, service_user_id, service_user, settlement_type, temp_ed, account_balance, foreign_currency_balance, weight_threshold, throw_ratio, credit_ed, product_ids, remark, create_by, create_time, update_by, update_time, del_flag from bms_customer + + + + + + + + + + + + + + + + + + + + + + + + + + + select attachment_id, customer_id, file_name, file_path, file_size, file_type, file_extension, attachment_type, is_logo, sort_order, remark, create_by, create_time, update_by, update_time, del_flag from bms_customer_attachment + + + + + + insert into bms_customer_attachment + + customer_id, + file_name, + file_path, + file_size, + file_type, + file_extension, + attachment_type, + is_logo, + sort_order, + remark, + create_by, + create_time, + del_flag, + + + #{customerId}, + #{fileName}, + #{filePath}, + #{fileSize}, + #{fileType}, + #{fileExtension}, + #{attachmentType}, + #{isLogo}, + #{sortOrder}, + #{remark}, + #{createBy}, + #{createTime}, + #{delFlag}, + + + + + update bms_customer_attachment + + customer_id = #{customerId}, + file_name = #{fileName}, + file_path = #{filePath}, + file_size = #{fileSize}, + file_type = #{fileType}, + file_extension = #{fileExtension}, + attachment_type = #{attachmentType}, + is_logo = #{isLogo}, + sort_order = #{sortOrder}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where attachment_id = #{attachmentId} + + + + update bms_customer_attachment set del_flag = '2' where customer_id = #{customerId} + + + + update bms_customer_attachment set del_flag = '2' where attachment_id in + + #{attachmentId} + + + + + insert into bms_customer + + customer_id, + customer_code, + customer_name, + customer_code_dw, + credit_code, + customer_type, + is_enable, + sales_user_id, + sales_user, + ed, + zq, + settlement_user_id, + settlement_user, + service_user_id, + service_user, + settlement_type, + temp_ed, + account_balance, + foreign_currency_balance, + weight_threshold, + throw_ratio, + credit_ed, + product_ids, + remark, + create_by, + create_time, + update_by, + update_time, + del_flag, + + + #{customerId}, + #{customerCode}, + #{customerName}, + #{customerCodeDw}, + #{creditCode}, + #{customerType}, + #{isEnable}, + #{salesUserId}, + #{salesUser}, + #{ed}, + #{zq}, + #{settlementUserId}, + #{settlementUser}, + #{serviceUserId}, + #{serviceUser}, + #{settlementType}, + #{tempEd}, + #{accountBalance}, + #{foreignCurrencyBalance}, + #{weightThreshold}, + #{throwRatio}, + #{creditEd}, + #{productIds}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{delFlag}, + + + + + update bms_customer + + customer_code = #{customerCode}, + customer_name = #{customerName}, + customer_code_dw = #{customerCodeDw}, + credit_code = #{creditCode}, + customer_type = #{customerType}, + is_enable = #{isEnable}, + sales_user_id = #{salesUserId}, + sales_user = #{salesUser}, + ed = #{ed}, + zq = #{zq}, + settlement_user_id = #{settlementUserId}, + settlement_user = #{settlementUser}, + service_user_id = #{serviceUserId}, + service_user = #{serviceUser}, + settlement_type = #{settlementType}, + temp_ed = #{tempEd}, + account_balance = #{accountBalance}, + foreign_currency_balance = #{foreignCurrencyBalance}, + weight_threshold = #{weightThreshold}, + throw_ratio = #{throwRatio}, + credit_ed = #{creditEd}, + product_ids = #{productIds}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + del_flag = #{delFlag}, + + where customer_id = #{customerId} + + + + delete from bms_customer where customer_id = #{customerId} + + + + delete from bms_customer where customer_id in + + #{customerId} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select company_id, customer_id, company_name_full, english_name, credit_code, legal_person, legal_person_phone, legal_person_id_card, registered_capital, capital_currency, paid_in_capital, establish_date, business_term_start, business_term_end, business_term_permanent, registration_authority, registration_number, operating_status, business_scope, shareholders, employee_count, company_phone, company_fax, company_website, company_email, registered_province, registered_city, registered_district, registered_address_detail, business_license_oss_id, attachment_ids, remark, create_by, create_time, update_by, update_time, del_flag from bms_customer_company + + + + + + + + insert into bms_customer_company + + customer_id, + company_name_full, + english_name, + credit_code, + legal_person, + legal_person_phone, + legal_person_id_card, + registered_capital, + capital_currency, + paid_in_capital, + establish_date, + business_term_start, + business_term_end, + business_term_permanent, + registration_authority, + registration_number, + operating_status, + business_scope, + shareholders, + employee_count, + company_phone, + company_fax, + company_website, + company_email, + registered_province, + registered_city, + registered_district, + registered_address_detail, + business_license_oss_id, + attachment_ids, + remark, + create_by, + create_time, + del_flag, + + + #{customerId}, + #{companyNameFull}, + #{englishName}, + #{creditCode}, + #{legalPerson}, + #{legalPersonPhone}, + #{legalPersonIdCard}, + #{registeredCapital}, + #{capitalCurrency}, + #{paidInCapital}, + #{establishDate}, + #{businessTermStart}, + #{businessTermEnd}, + #{businessTermPermanent}, + #{registrationAuthority}, + #{registrationNumber}, + #{operatingStatus}, + #{businessScope}, + #{shareholders}, + #{employeeCount}, + #{companyPhone}, + #{companyFax}, + #{companyWebsite}, + #{companyEmail}, + #{registeredProvince}, + #{registeredCity}, + #{registeredDistrict}, + #{registeredAddressDetail}, + #{businessLicenseOssId}, + #{attachmentIds}, + #{remark}, + #{createBy}, + #{createTime}, + #{delFlag}, + + + + + update bms_customer_company + + customer_id = #{customerId}, + company_name_full = #{companyNameFull}, + english_name = #{englishName}, + credit_code = #{creditCode}, + legal_person = #{legalPerson}, + legal_person_phone = #{legalPersonPhone}, + legal_person_id_card = #{legalPersonIdCard}, + registered_capital = #{registeredCapital}, + capital_currency = #{capitalCurrency}, + paid_in_capital = #{paidInCapital}, + establish_date = #{establishDate}, + business_term_start = #{businessTermStart}, + business_term_end = #{businessTermEnd}, + business_term_permanent = #{businessTermPermanent}, + registration_authority = #{registrationAuthority}, + registration_number = #{registrationNumber}, + operating_status = #{operatingStatus}, + business_scope = #{businessScope}, + shareholders = #{shareholders}, + employee_count = #{employeeCount}, + company_phone = #{companyPhone}, + company_fax = #{companyFax}, + company_website = #{companyWebsite}, + company_email = #{companyEmail}, + registered_province = #{registeredProvince}, + registered_city = #{registeredCity}, + registered_district = #{registeredDistrict}, + registered_address_detail = #{registeredAddressDetail}, + business_license_oss_id = #{businessLicenseOssId}, + attachment_ids = #{attachmentIds}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where company_id = #{companyId} + + + + update bms_customer_company set del_flag = '2' where customer_id = #{customerId} + + + + update bms_customer_company set del_flag = '2' where company_id = #{companyId} + + \ No newline at end of file diff --git a/bms-back/ruoyi-system/src/main/resources/mapper/customer/BmsSupplierMapper.xml b/bms-back/ruoyi-system/src/main/resources/mapper/customer/BmsSupplierMapper.xml new file mode 100644 index 00000000..fca4b333 --- /dev/null +++ b/bms-back/ruoyi-system/src/main/resources/mapper/customer/BmsSupplierMapper.xml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select supplier_id, supplier_code, supplier_name, supplier_code_dw, credit_code, supplier_type, is_enable, purchaser_user_id, purchaser_user, settlement_user_id, settlement_user, service_user_id, service_user, ed, zq, settlement_type, temp_ed, account_balance, foreign_currency_balance, credit_ed, weight_threshold, throw_ratio, cooperation_start_date, cooperation_status, channel_ids, remark, create_by, create_time, update_by, update_time, del_flag from bms_supplier + + + + + + + + insert into bms_supplier + + supplier_id, + supplier_code, + supplier_name, + supplier_code_dw, + credit_code, + supplier_type, + is_enable, + purchaser_user_id, + purchaser_user, + settlement_user_id, + settlement_user, + service_user_id, + service_user, + ed, + zq, + settlement_type, + temp_ed, + account_balance, + foreign_currency_balance, + credit_ed, + weight_threshold, + throw_ratio, + cooperation_start_date, + cooperation_status, + channel_ids, + remark, + create_by, + create_time, + del_flag, + + + #{supplierId}, + #{supplierCode}, + #{supplierName}, + #{supplierCodeDw}, + #{creditCode}, + #{supplierType}, + #{isEnable}, + #{purchaserUserId}, + #{purchaserUser}, + #{settlementUserId}, + #{settlementUser}, + #{serviceUserId}, + #{serviceUser}, + #{ed}, + #{zq}, + #{settlementType}, + #{tempEd}, + #{accountBalance}, + #{foreignCurrencyBalance}, + #{creditEd}, + #{weightThreshold}, + #{throwRatio}, + #{cooperationStartDate}, + #{cooperationStatus}, + #{channelIds}, + #{remark}, + #{createBy}, + #{createTime}, + #{delFlag}, + + + + + update bms_supplier + + supplier_code = #{supplierCode}, + supplier_name = #{supplierName}, + supplier_code_dw = #{supplierCodeDw}, + credit_code = #{creditCode}, + supplier_type = #{supplierType}, + is_enable = #{isEnable}, + purchaser_user_id = #{purchaserUserId}, + purchaser_user = #{purchaserUser}, + settlement_user_id = #{settlementUserId}, + settlement_user = #{settlementUser}, + service_user_id = #{serviceUserId}, + service_user = #{serviceUser}, + ed = #{ed}, + zq = #{zq}, + settlement_type = #{settlementType}, + temp_ed = #{tempEd}, + account_balance = #{accountBalance}, + foreign_currency_balance = #{foreignCurrencyBalance}, + credit_ed = #{creditEd}, + weight_threshold = #{weightThreshold}, + throw_ratio = #{throwRatio}, + cooperation_start_date = #{cooperationStartDate}, + cooperation_status = #{cooperationStatus}, + channel_ids = #{channelIds}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = #{updateTime}, + del_flag = #{delFlag}, + + where supplier_id = #{supplierId} + + + + delete from bms_supplier where supplier_id = #{supplierId} + + + + delete from bms_supplier where supplier_id in + + #{supplierId} + + + + diff --git a/bms-back/sql/customer+supplier/customer.sql b/bms-back/sql/customer+supplier/customer.sql new file mode 100644 index 00000000..07bc1819 --- /dev/null +++ b/bms-back/sql/customer+supplier/customer.sql @@ -0,0 +1,55 @@ +DROP TABLE IF EXISTS `bms_customer`; + +CREATE TABLE `bms_customer` ( + `customer_id` VARCHAR(32) NOT NULL AUTO_INCREMENT COMMENT '客户ID', + `customer_code` varchar(50) NOT NULL COMMENT '客户编码', + `customer_name` varchar(100) NOT NULL COMMENT '客户名称', + `customer_code_dw` varchar(50) DEFAULT '' COMMENT '对外代码', + `credit_code` varchar(18) DEFAULT '' COMMENT '统一社会信用代码', + + -- 业务类型(字典:直客、同行、集运) + `customer_type` char(1) DEFAULT '0' COMMENT '业务类型(0直客 1同行 2集运)', + `is_enable` char(1) DEFAULT '0' COMMENT '启用状态(0正常 1停用)', + + -- 销售归属 + `sales_user_id` varchar(64) DEFAULT '' COMMENT '业务员用户ID', + `sales_user` varchar(50) DEFAULT '' COMMENT '业务员姓名', + + -- 财务等信息 + `ed` decimal(15,2) DEFAULT 0.00 COMMENT '资金额度(元)', + `zq` int(11) DEFAULT 0 COMMENT '回款账期(天)', + `settlement_user_id` varchar(64) DEFAULT '' COMMENT '结算员用户ID', + `settlement_user` varchar(50) DEFAULT '' COMMENT '结算员姓名', + `service_user_id` varchar(64) DEFAULT '' COMMENT '客服用户ID', + `service_user` varchar(50) DEFAULT '' COMMENT '客服姓名', + `settlement_type` char(1) DEFAULT '0' COMMENT '结算方式(0月结 1周结 2日结)', + `temp_ed` decimal(15,2) DEFAULT 0.00 COMMENT '临时额度(元)', + `account_balance` decimal(15,2) DEFAULT 0.00 COMMENT '账户余额(元)', + `foreign_currency_balance` decimal(15,2) DEFAULT 0.00 COMMENT '外币余额(元)', + `weight_threshold` decimal(15,2) DEFAULT 0.00 COMMENT '重量阈值(kg)', + `throw_ratio` decimal(15,2) DEFAULT 0.00 COMMENT '抛比(%)', + `credit_ed` decimal(15,2) DEFAULT 0.00 COMMENT '信用额度(元)', + `product_ids` varchar(1000) DEFAULT NULL COMMENT '绑定产品ID(多个产品ID用逗号分隔,支持批量操作)', + + -- ========== 附件字段(新增) ========== + `logo_oss_id` bigint(20) DEFAULT NULL COMMENT '客户Logo(图片,关联sys_oss.oss_id)', + `attachment_ids` varchar(1000) DEFAULT NULL COMMENT '附件资料(多个oss_id用逗号分隔,支持PDF/图片/压缩包等)', + + -- 备注 + `remark` varchar(500) DEFAULT NULL COMMENT '备注说明', + + -- 若依标准审计字段 + `create_by` varchar(64) DEFAULT '' COMMENT '创建者', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` varchar(64) DEFAULT '' COMMENT '更新者', + `update_time` datetime DEFAULT NULL COMMENT '更新时间', + `del_flag` char(1) DEFAULT '0' COMMENT '删除标记(0正常 2删除)', + + PRIMARY KEY (`customer_id`) + + -- UNIQUE KEY `uk_customer_code` (`customer_code`), + -- UNIQUE KEY `uk_credit_code` (`credit_code`), + -- KEY `idx_sales_user_id` (`sales_user_id`), + -- KEY `idx_customer_type` (`customer_type`), + -- KEY `idx_is_enable` (`is_enable`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='客户主表'; \ No newline at end of file diff --git a/bms-back/sql/customer+supplier/supplier.sql b/bms-back/sql/customer+supplier/supplier.sql new file mode 100644 index 00000000..1c25185c --- /dev/null +++ b/bms-back/sql/customer+supplier/supplier.sql @@ -0,0 +1,74 @@ +-- 假设开发库表里无重要数据,直接 ALTER;如有数据需先备份迁移 +-- 1) 客户主表 +ALTER TABLE bms_customer MODIFY COLUMN customer_id varchar(32) NOT NULL COMMENT '客户ID(UUID)'; +-- 2) 供应商主表 +ALTER TABLE bms_supplier MODIFY COLUMN supplier_id varchar(32) NOT NULL COMMENT '供应商ID(UUID)'; + + +select * from sys_menu + + +DROP TABLE IF EXISTS `bms_supplier`; + + +CREATE TABLE `bms_supplier` ( + -- ========== 主键 ========== + `supplier_id` VARCHAR(32) NOT NULL AUTO_INCREMENT COMMENT '供应商ID', + + -- ========== 供应商基本信息 ========== + `supplier_code` varchar(50) NOT NULL COMMENT '供应商编码', + `supplier_name` varchar(100) NOT NULL COMMENT '供应商名称', + `supplier_code_dw` varchar(50) DEFAULT '' COMMENT '对外代码', + `credit_code` varchar(18) DEFAULT '' COMMENT '统一社会信用代码', + + -- ========== 业务类型(字典:生产商、代理商、个人、物流商等) ========== + `supplier_type` char(1) DEFAULT '0' COMMENT '供应商类型(0生产商 1代理商 2个人 3物流商 4其他)', + `is_enable` char(1) DEFAULT '0' COMMENT '启用状态(0正常 1停用)', + + -- ========== 采购归属 ========== + `purchaser_user_id` varchar(64) DEFAULT '' COMMENT '采购员用户ID', + `purchaser_user` varchar(50) DEFAULT '' COMMENT '采购员姓名', + + -- ========== 财务人员(采购侧) ========== + `settlement_user_id` varchar(64) DEFAULT '' COMMENT '结算员用户ID', + `settlement_user` varchar(50) DEFAULT '' COMMENT '结算员姓名', + `service_user_id` varchar(64) DEFAULT '' COMMENT '跟单员用户ID', + `service_user` varchar(50) DEFAULT '' COMMENT '跟单员姓名', + + -- ========== 财务信息(应付侧) ========== + `ed` decimal(15,2) DEFAULT 0.00 COMMENT '应付额度(元)', -- 供应商侧:可欠款上限 + `zq` int(11) DEFAULT 0 COMMENT '应付账期(天)', -- 供应商侧:付款账期 + `settlement_type` char(1) DEFAULT '0' COMMENT '结算方式(0月结 1周结 2日结 3票结)', + `temp_ed` decimal(15,2) DEFAULT 0.00 COMMENT '临时额度(元)', + `account_balance` decimal(15,2) DEFAULT 0.00 COMMENT '应付余额(元)', -- 累计欠款余额(正数表示欠供应商的钱) + `foreign_currency_balance` decimal(15,2) DEFAULT 0.00 COMMENT '外币应付余额(元)', -- 外币欠款余额 + `credit_ed` decimal(15,2) DEFAULT 0.00 COMMENT '信用额度(元)', + + -- ========== 供应商特有字段 ========== + `weight_threshold` decimal(15,2) DEFAULT 0.00 COMMENT '重量阈值(kg)', + `throw_ratio` decimal(15,2) DEFAULT 0.00 COMMENT '抛比(%)', + `cooperation_start_date` date DEFAULT NULL COMMENT '合作开始日期', + `cooperation_status` char(1) DEFAULT '0' COMMENT '合作状态(0正常 1暂停 2终止)', + + -- ========== 绑定的产品/服务 ========== + `channel_ids` varchar(1000) DEFAULT NULL COMMENT '绑定的渠道/服务ID(多个用逗号分隔)', + + -- ========== 备注 ========== + `remark` varchar(500) DEFAULT NULL COMMENT '备注说明', + + -- ========== 若依标准审计字段 ========== + `create_by` varchar(64) DEFAULT '' COMMENT '创建者', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` varchar(64) DEFAULT '' COMMENT '更新者', + `update_time` datetime DEFAULT NULL COMMENT '更新时间', + `del_flag` char(1) DEFAULT '0' COMMENT '删除标记(0正常 2删除)', + + -- ========== 主键 & 索引 ========== + PRIMARY KEY (`supplier_id`) +-- UNIQUE KEY `uk_supplier_code` (`supplier_code`), +-- UNIQUE KEY `uk_credit_code` (`credit_code`), +-- KEY `idx_purchaser_user_id` (`purchaser_user_id`), +-- KEY `idx_supplier_type` (`supplier_type`), +-- KEY `idx_is_enable` (`is_enable`) + +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='供应商主表'; \ No newline at end of file diff --git a/bms-front/src/api/customersuppliermanagement/customerinfo/customer.js b/bms-front/src/api/customersuppliermanagement/customerinfo/customer.js new file mode 100644 index 00000000..e6ad2e91 --- /dev/null +++ b/bms-front/src/api/customersuppliermanagement/customerinfo/customer.js @@ -0,0 +1,44 @@ +import request from '@/utils/request.js' + +// 查询客户主列表 +export function listCustomer(query) { + return request({ + url: '/customersupplier/customerinfo/list', + method: 'get', + params: query + }) +} + +// 查询客户主详细 +export function getCustomer(customerId) { + return request({ + url: '/customersupplier/customerinfo/' + customerId, + method: 'get' + }) +} + +// 新增客户主 +export function addCustomer(data) { + return request({ + url: '/customersupplier/customerinfo', + method: 'post', + data: data + }) +} + +// 修改客户主 +export function updateCustomer(data) { + return request({ + url: '/customersupplier/customerinfo', + method: 'put', + data: data + }) +} + +// 删除客户主 +export function delCustomer(customerId) { + return request({ + url: '/customersupplier/customerinfo/' + customerId, + method: 'delete' + }) +} diff --git a/bms-front/src/api/customersuppliermanagement/supplierinfo/supplier.js b/bms-front/src/api/customersuppliermanagement/supplierinfo/supplier.js new file mode 100644 index 00000000..1f7aefb1 --- /dev/null +++ b/bms-front/src/api/customersuppliermanagement/supplierinfo/supplier.js @@ -0,0 +1,44 @@ +import request from '@/utils/request.js' + +// 查询供应商列表 +export function listSupplier(query) { + return request({ + url: '/customersupplier/supplierinfo/list', + method: 'get', + params: query + }) +} + +// 查询供应商详细 +export function getSupplier(supplierId) { + return request({ + url: '/customersupplier/supplierinfo/' + supplierId, + method: 'get' + }) +} + +// 新增供应商 +export function addSupplier(data) { + return request({ + url: '/customersupplier/supplierinfo', + method: 'post', + data: data + }) +} + +// 修改供应商 +export function updateSupplier(data) { + return request({ + url: '/customersupplier/supplierinfo', + method: 'put', + data: data + }) +} + +// 删除供应商 +export function delSupplier(supplierId) { + return request({ + url: '/customersupplier/supplierinfo/' + supplierId, + method: 'delete' + }) +} diff --git a/bms-front/src/views/customersuppliermanagement/customerinfo/index.vue b/bms-front/src/views/customersuppliermanagement/customerinfo/index.vue new file mode 100644 index 00000000..161aae1c --- /dev/null +++ b/bms-front/src/views/customersuppliermanagement/customerinfo/index.vue @@ -0,0 +1,1005 @@ + + + diff --git a/bms-front/src/views/customersuppliermanagement/supplierinfo/index.vue b/bms-front/src/views/customersuppliermanagement/supplierinfo/index.vue new file mode 100644 index 00000000..336e7470 --- /dev/null +++ b/bms-front/src/views/customersuppliermanagement/supplierinfo/index.vue @@ -0,0 +1,1015 @@ + + + \ No newline at end of file