From f818062d23127de6db51115288b85c1a8754a692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=AB=E7=8C=ABguowen?= <9290821+guowen-the-cat@user.noreply.gitee.com> Date: Tue, 20 May 2025 16:26:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BasCustomerController.java | 109 ++++ .../bas/BasCustomer/domain/BasCustomer.java | 323 ++++++++++++ .../BasCustomer/mapper/BasCustomerMapper.java | 61 +++ .../service/IBasCustomerService.java | 61 +++ .../service/impl/BasCustomerServiceImpl.java | 93 ++++ .../controller/BasProductController.java | 107 ++++ .../bas/BasProduct/domain/BasProduct.java | 233 ++++++++ .../BasProduct/mapper/BasProductMapper.java | 61 +++ .../service/IBasProductService.java | 61 +++ .../service/impl/BasProductServiceImpl.java | 93 ++++ .../controller/BasSupplierController.java | 106 ++++ .../bas/BasSupplier/domain/BasSupplier.java | 293 ++++++++++ .../BasSupplier/mapper/BasSupplierMapper.java | 61 +++ .../service/IBasSupplierService.java | 61 +++ .../service/impl/BasSupplierServiceImpl.java | 93 ++++ .../mapper/bas/BasCustomerMapper.xml | 152 ++++++ .../resources/mapper/bas/BasProductMapper.xml | 123 +++++ .../mapper/bas/BasSupplierMapper.xml | 142 +++++ ruoyi-ui/src/api/bas/BasCustomer.js | 44 ++ ruoyi-ui/src/api/bas/BasProduct.js | 44 ++ ruoyi-ui/src/api/bas/BasSupplier.js | 44 ++ ruoyi-ui/src/views/bas/BasCustomer/index.vue | 499 ++++++++++++++++++ ruoyi-ui/src/views/bas/BasProduct/index.vue | 436 +++++++++++++++ ruoyi-ui/src/views/bas/BasSupplier/index.vue | 482 +++++++++++++++++ 24 files changed, 3782 insertions(+) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/controller/BasCustomerController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/domain/BasCustomer.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/mapper/BasCustomerMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/service/IBasCustomerService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/service/impl/BasCustomerServiceImpl.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/controller/BasProductController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/domain/BasProduct.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/mapper/BasProductMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/service/IBasProductService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/service/impl/BasProductServiceImpl.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/controller/BasSupplierController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/domain/BasSupplier.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/mapper/BasSupplierMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/service/IBasSupplierService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/service/impl/BasSupplierServiceImpl.java create mode 100644 ruoyi-admin/src/main/resources/mapper/bas/BasCustomerMapper.xml create mode 100644 ruoyi-admin/src/main/resources/mapper/bas/BasProductMapper.xml create mode 100644 ruoyi-admin/src/main/resources/mapper/bas/BasSupplierMapper.xml create mode 100644 ruoyi-ui/src/api/bas/BasCustomer.js create mode 100644 ruoyi-ui/src/api/bas/BasProduct.js create mode 100644 ruoyi-ui/src/api/bas/BasSupplier.js create mode 100644 ruoyi-ui/src/views/bas/BasCustomer/index.vue create mode 100644 ruoyi-ui/src/views/bas/BasProduct/index.vue create mode 100644 ruoyi-ui/src/views/bas/BasSupplier/index.vue diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/controller/BasCustomerController.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/controller/BasCustomerController.java new file mode 100644 index 0000000..cc6eae3 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/controller/BasCustomerController.java @@ -0,0 +1,109 @@ +package com.ruoyi.bas.BasCustomer.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.IdGenerator; +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.bas.BasCustomer.domain.BasCustomer; +import com.ruoyi.bas.BasCustomer.service.IBasCustomerService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.IdUtil; + +/** + * 客户管理Controller + * + * @author gw + * @date 2025-05-20 + */ +@RestController +@RequestMapping("/bas/BasCustomer") +public class BasCustomerController extends BaseController +{ + @Autowired + private IBasCustomerService basCustomerService; + + /** + * 查询客户管理列表 + */ + @PreAuthorize("@ss.hasPermi('bas:BasCustomer:list')") + @GetMapping("/list") + public TableDataInfo list(BasCustomer basCustomer) + { + startPage(); + List list = basCustomerService.selectBasCustomerList(basCustomer); + return getDataTable(list); + } + + /** + * 导出客户管理列表 + */ + @PreAuthorize("@ss.hasPermi('bas:BasCustomer:export')") + @Log(title = "客户管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BasCustomer basCustomer) + { + List list = basCustomerService.selectBasCustomerList(basCustomer); + ExcelUtil util = new ExcelUtil(BasCustomer.class); + util.exportExcel(response, list, "客户管理数据"); + } + + /** + * 获取客户管理详细信息 + */ + @PreAuthorize("@ss.hasPermi('bas:BasCustomer:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(basCustomerService.selectBasCustomerById(id)); + } + + /** + * 新增客户管理 + */ + @PreAuthorize("@ss.hasPermi('bas:BasCustomer:add')") + @Log(title = "客户管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BasCustomer basCustomer) + { + // 使用雪花算法生成ID并转为字符串 + basCustomer.setId(String.valueOf(IdUtil.getSnowflake().nextId())); + return toAjax(basCustomerService.insertBasCustomer(basCustomer)); + } + + /** + * 修改客户管理 + */ + @PreAuthorize("@ss.hasPermi('bas:BasCustomer:edit')") + @Log(title = "客户管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BasCustomer basCustomer) + { + return toAjax(basCustomerService.updateBasCustomer(basCustomer)); + } + + /** + * 删除客户管理 + */ + @PreAuthorize("@ss.hasPermi('bas:BasCustomer:remove')") + @Log(title = "客户管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(basCustomerService.deleteBasCustomerByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/domain/BasCustomer.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/domain/BasCustomer.java new file mode 100644 index 0000000..8206c15 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/domain/BasCustomer.java @@ -0,0 +1,323 @@ +package com.ruoyi.bas.BasCustomer.domain; + +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; + +/** + * 客户管理对象 bas_customer + * + * @author gw + * @date 2025-05-20 + */ +public class BasCustomer extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** ID */ + private String id; + + /** 客户编号 */ + @Excel(name = "客户编号") + private String customerNo; + + /** 客户基本分类 */ + @Excel(name = "客户基本分类") + private String customerGroupNo; + + /** 客户名称 */ + @Excel(name = "客户名称") + private String customerName; + + /** 客户简称 */ + @Excel(name = "客户简称") + private String simpleName; + + /** 是否可用 */ + @Excel(name = "是否可用") + private String useable; + + /** 业务部门 */ + @Excel(name = "业务部门") + private String businessDepartment; + + /** 业务员 */ + @Excel(name = "业务员") + private String salesman; + + /** 助忆码 */ + @Excel(name = "助忆码") + private String mnemonicCode; + + /** 客户类型 */ + @Excel(name = "客户类型") + private String type; + + /** 纳税人登记号 */ + @Excel(name = "纳税人登记号") + private String taxpayerRegistrationNumber; + + /** 对应财务组织 */ + @Excel(name = "对应财务组织") + private String organization; + + /** 上级客户 */ + @Excel(name = "上级客户") + private String supCustomer; + + /** 散户 */ + @Excel(name = "散户") + private String retailInvestor; + + /** 国家/地区 */ + @Excel(name = "国家/地区") + private String country; + + /** 时区 */ + @Excel(name = "时区") + private String timeZone; + + /** 数据格式 */ + @Excel(name = "数据格式") + private String dataFormat; + + /** 联系人姓名 */ + @Excel(name = "联系人姓名") + private String contactName; + + /** 发货国家 */ + @Excel(name = "发货国家") + private String shipment; + + /** 税类 */ + @Excel(name = "税类") + private String taxCategory; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + public void setCustomerNo(String customerNo) + { + this.customerNo = customerNo; + } + + public String getCustomerNo() + { + return customerNo; + } + + public void setCustomerGroupNo(String customerGroupNo) + { + this.customerGroupNo = customerGroupNo; + } + + public String getCustomerGroupNo() + { + return customerGroupNo; + } + + public void setCustomerName(String customerName) + { + this.customerName = customerName; + } + + public String getCustomerName() + { + return customerName; + } + + public void setSimpleName(String simpleName) + { + this.simpleName = simpleName; + } + + public String getSimpleName() + { + return simpleName; + } + + public void setUseable(String useable) + { + this.useable = useable; + } + + public String getUseable() + { + return useable; + } + + public void setBusinessDepartment(String businessDepartment) + { + this.businessDepartment = businessDepartment; + } + + public String getBusinessDepartment() + { + return businessDepartment; + } + + public void setSalesman(String salesman) + { + this.salesman = salesman; + } + + public String getSalesman() + { + return salesman; + } + + public void setMnemonicCode(String mnemonicCode) + { + this.mnemonicCode = mnemonicCode; + } + + public String getMnemonicCode() + { + return mnemonicCode; + } + + public void setType(String type) + { + this.type = type; + } + + public String getType() + { + return type; + } + + public void setTaxpayerRegistrationNumber(String taxpayerRegistrationNumber) + { + this.taxpayerRegistrationNumber = taxpayerRegistrationNumber; + } + + public String getTaxpayerRegistrationNumber() + { + return taxpayerRegistrationNumber; + } + + public void setOrganization(String organization) + { + this.organization = organization; + } + + public String getOrganization() + { + return organization; + } + + public void setSupCustomer(String supCustomer) + { + this.supCustomer = supCustomer; + } + + public String getSupCustomer() + { + return supCustomer; + } + + public void setRetailInvestor(String retailInvestor) + { + this.retailInvestor = retailInvestor; + } + + public String getRetailInvestor() + { + return retailInvestor; + } + + public void setCountry(String country) + { + this.country = country; + } + + public String getCountry() + { + return country; + } + + public void setTimeZone(String timeZone) + { + this.timeZone = timeZone; + } + + public String getTimeZone() + { + return timeZone; + } + + public void setDataFormat(String dataFormat) + { + this.dataFormat = dataFormat; + } + + public String getDataFormat() + { + return dataFormat; + } + + public void setContactName(String contactName) + { + this.contactName = contactName; + } + + public String getContactName() + { + return contactName; + } + + public void setShipment(String shipment) + { + this.shipment = shipment; + } + + public String getShipment() + { + return shipment; + } + + public void setTaxCategory(String taxCategory) + { + this.taxCategory = taxCategory; + } + + public String getTaxCategory() + { + return taxCategory; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("customerNo", getCustomerNo()) + .append("customerGroupNo", getCustomerGroupNo()) + .append("customerName", getCustomerName()) + .append("simpleName", getSimpleName()) + .append("useable", getUseable()) + .append("remark", getRemark()) + .append("businessDepartment", getBusinessDepartment()) + .append("salesman", getSalesman()) + .append("mnemonicCode", getMnemonicCode()) + .append("type", getType()) + .append("taxpayerRegistrationNumber", getTaxpayerRegistrationNumber()) + .append("organization", getOrganization()) + .append("supCustomer", getSupCustomer()) + .append("retailInvestor", getRetailInvestor()) + .append("country", getCountry()) + .append("timeZone", getTimeZone()) + .append("dataFormat", getDataFormat()) + .append("contactName", getContactName()) + .append("shipment", getShipment()) + .append("taxCategory", getTaxCategory()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/mapper/BasCustomerMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/mapper/BasCustomerMapper.java new file mode 100644 index 0000000..6dcc9ce --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/mapper/BasCustomerMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.bas.BasCustomer.mapper; + +import java.util.List; +import com.ruoyi.bas.BasCustomer.domain.BasCustomer; + +/** + * 客户管理Mapper接口 + * + * @author gw + * @date 2025-05-20 + */ +public interface BasCustomerMapper +{ + /** + * 查询客户管理 + * + * @param id 客户管理主键 + * @return 客户管理 + */ + public BasCustomer selectBasCustomerById(String id); + + /** + * 查询客户管理列表 + * + * @param basCustomer 客户管理 + * @return 客户管理集合 + */ + public List selectBasCustomerList(BasCustomer basCustomer); + + /** + * 新增客户管理 + * + * @param basCustomer 客户管理 + * @return 结果 + */ + public int insertBasCustomer(BasCustomer basCustomer); + + /** + * 修改客户管理 + * + * @param basCustomer 客户管理 + * @return 结果 + */ + public int updateBasCustomer(BasCustomer basCustomer); + + /** + * 删除客户管理 + * + * @param id 客户管理主键 + * @return 结果 + */ + public int deleteBasCustomerById(String id); + + /** + * 批量删除客户管理 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBasCustomerByIds(String[] ids); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/service/IBasCustomerService.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/service/IBasCustomerService.java new file mode 100644 index 0000000..4b64b46 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/service/IBasCustomerService.java @@ -0,0 +1,61 @@ +package com.ruoyi.bas.BasCustomer.service; + +import java.util.List; +import com.ruoyi.bas.BasCustomer.domain.BasCustomer; + +/** + * 客户管理Service接口 + * + * @author gw + * @date 2025-05-20 + */ +public interface IBasCustomerService +{ + /** + * 查询客户管理 + * + * @param id 客户管理主键 + * @return 客户管理 + */ + public BasCustomer selectBasCustomerById(String id); + + /** + * 查询客户管理列表 + * + * @param basCustomer 客户管理 + * @return 客户管理集合 + */ + public List selectBasCustomerList(BasCustomer basCustomer); + + /** + * 新增客户管理 + * + * @param basCustomer 客户管理 + * @return 结果 + */ + public int insertBasCustomer(BasCustomer basCustomer); + + /** + * 修改客户管理 + * + * @param basCustomer 客户管理 + * @return 结果 + */ + public int updateBasCustomer(BasCustomer basCustomer); + + /** + * 批量删除客户管理 + * + * @param ids 需要删除的客户管理主键集合 + * @return 结果 + */ + public int deleteBasCustomerByIds(String[] ids); + + /** + * 删除客户管理信息 + * + * @param id 客户管理主键 + * @return 结果 + */ + public int deleteBasCustomerById(String id); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/service/impl/BasCustomerServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/service/impl/BasCustomerServiceImpl.java new file mode 100644 index 0000000..bb652ae --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasCustomer/service/impl/BasCustomerServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.bas.BasCustomer.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.bas.BasCustomer.mapper.BasCustomerMapper; +import com.ruoyi.bas.BasCustomer.domain.BasCustomer; +import com.ruoyi.bas.BasCustomer.service.IBasCustomerService; + +/** + * 客户管理Service业务层处理 + * + * @author gw + * @date 2025-05-20 + */ +@Service +public class BasCustomerServiceImpl implements IBasCustomerService +{ + @Autowired + private BasCustomerMapper basCustomerMapper; + + /** + * 查询客户管理 + * + * @param id 客户管理主键 + * @return 客户管理 + */ + @Override + public BasCustomer selectBasCustomerById(String id) + { + return basCustomerMapper.selectBasCustomerById(id); + } + + /** + * 查询客户管理列表 + * + * @param basCustomer 客户管理 + * @return 客户管理 + */ + @Override + public List selectBasCustomerList(BasCustomer basCustomer) + { + return basCustomerMapper.selectBasCustomerList(basCustomer); + } + + /** + * 新增客户管理 + * + * @param basCustomer 客户管理 + * @return 结果 + */ + @Override + public int insertBasCustomer(BasCustomer basCustomer) + { + return basCustomerMapper.insertBasCustomer(basCustomer); + } + + /** + * 修改客户管理 + * + * @param basCustomer 客户管理 + * @return 结果 + */ + @Override + public int updateBasCustomer(BasCustomer basCustomer) + { + return basCustomerMapper.updateBasCustomer(basCustomer); + } + + /** + * 批量删除客户管理 + * + * @param ids 需要删除的客户管理主键 + * @return 结果 + */ + @Override + public int deleteBasCustomerByIds(String[] ids) + { + return basCustomerMapper.deleteBasCustomerByIds(ids); + } + + /** + * 删除客户管理信息 + * + * @param id 客户管理主键 + * @return 结果 + */ + @Override + public int deleteBasCustomerById(String id) + { + return basCustomerMapper.deleteBasCustomerById(id); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/controller/BasProductController.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/controller/BasProductController.java new file mode 100644 index 0000000..262ecf4 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/controller/BasProductController.java @@ -0,0 +1,107 @@ +package com.ruoyi.bas.BasProduct.controller; + +import java.util.List; +import javax.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.bas.BasProduct.domain.BasProduct; +import com.ruoyi.bas.BasProduct.service.IBasProductService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.IdUtil; +/** + * 物料管理Controller + * + * @author ruoyi + * @date 2025-05-20 + */ +@RestController +@RequestMapping("/bas/BasProduct") +public class BasProductController extends BaseController +{ + @Autowired + private IBasProductService basProductService; + + /** + * 查询物料管理列表 + */ + @PreAuthorize("@ss.hasPermi('bas:BasProduct:list')") + @GetMapping("/list") + public TableDataInfo list(BasProduct basProduct) + { + startPage(); + List list = basProductService.selectBasProductList(basProduct); + return getDataTable(list); + } + + /** + * 导出物料管理列表 + */ + @PreAuthorize("@ss.hasPermi('bas:BasProduct:export')") + @Log(title = "物料管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BasProduct basProduct) + { + List list = basProductService.selectBasProductList(basProduct); + ExcelUtil util = new ExcelUtil(BasProduct.class); + util.exportExcel(response, list, "物料管理数据"); + } + + /** + * 获取物料管理详细信息 + */ + @PreAuthorize("@ss.hasPermi('bas:BasProduct:query')") + @GetMapping(value = "/{productGuid}") + public AjaxResult getInfo(@PathVariable("productGuid") String productGuid) + { + return success(basProductService.selectBasProductByProductGuid(productGuid)); + } + + /** + * 新增物料管理 + */ + @PreAuthorize("@ss.hasPermi('bas:BasProduct:add')") + @Log(title = "物料管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BasProduct basProduct) + { + // 使用雪花算法生成ID并转为字符串 + basProduct.setProductGuid(String.valueOf(IdUtil.getSnowflake().nextId())); + return toAjax(basProductService.insertBasProduct(basProduct)); + } + + /** + * 修改物料管理 + */ + @PreAuthorize("@ss.hasPermi('bas:BasProduct:edit')") + @Log(title = "物料管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BasProduct basProduct) + { + return toAjax(basProductService.updateBasProduct(basProduct)); + } + + /** + * 删除物料管理 + */ + @PreAuthorize("@ss.hasPermi('bas:BasProduct:remove')") + @Log(title = "物料管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{productGuids}") + public AjaxResult remove(@PathVariable String[] productGuids) + { + return toAjax(basProductService.deleteBasProductByProductGuids(productGuids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/domain/BasProduct.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/domain/BasProduct.java new file mode 100644 index 0000000..523c9d4 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/domain/BasProduct.java @@ -0,0 +1,233 @@ +package com.ruoyi.bas.BasProduct.domain; + +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; + +/** + * 物料管理对象 bas_product + * + * @author ruoyi + * @date 2025-05-20 + */ +public class BasProduct extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private String productGuid; + + /** 物料编码 */ + @Excel(name = "物料编码") + private String productId; + + /** 父节点id */ + @Excel(name = "父节点id") + private String parentId; + + /** 价格 */ + @Excel(name = "价格") + private String price; + + /** 品牌 */ + @Excel(name = "品牌") + private String cargoNo; + + /** 单位 */ + @Excel(name = "单位") + private String unit; + + /** 规格 */ + @Excel(name = "规格") + private String spec; + + /** 备用字段1 */ + @Excel(name = "备用字段1") + private String spare1; + + /** 备用字段2 */ + @Excel(name = "备用字段2") + private String spare2; + + /** 备用字段3 */ + @Excel(name = "备用字段3") + private String spare3; + + /** 备用字段4 */ + @Excel(name = "备用字段4") + private String spare4; + + /** 备用字段5 */ + @Excel(name = "备用字段5") + private String spare5; + + /** 备用字段6 */ + @Excel(name = "备用字段6") + private String spare6; + + /** 物料名称 */ + @Excel(name = "物料名称") + private String productName; + + public void setProductGuid(String productGuid) + { + this.productGuid = productGuid; + } + + public String getProductGuid() + { + return productGuid; + } + + public void setProductId(String productId) + { + this.productId = productId; + } + + public String getProductId() + { + return productId; + } + + public void setParentId(String parentId) + { + this.parentId = parentId; + } + + public String getParentId() + { + return parentId; + } + + public void setPrice(String price) + { + this.price = price; + } + + public String getPrice() + { + return price; + } + + public void setCargoNo(String cargoNo) + { + this.cargoNo = cargoNo; + } + + public String getCargoNo() + { + return cargoNo; + } + + public void setUnit(String unit) + { + this.unit = unit; + } + + public String getUnit() + { + return unit; + } + + public void setSpec(String spec) + { + this.spec = spec; + } + + public String getSpec() + { + return spec; + } + + public void setSpare1(String spare1) + { + this.spare1 = spare1; + } + + public String getSpare1() + { + return spare1; + } + + public void setSpare2(String spare2) + { + this.spare2 = spare2; + } + + public String getSpare2() + { + return spare2; + } + + public void setSpare3(String spare3) + { + this.spare3 = spare3; + } + + public String getSpare3() + { + return spare3; + } + + public void setSpare4(String spare4) + { + this.spare4 = spare4; + } + + public String getSpare4() + { + return spare4; + } + + public void setSpare5(String spare5) + { + this.spare5 = spare5; + } + + public String getSpare5() + { + return spare5; + } + + public void setSpare6(String spare6) + { + this.spare6 = spare6; + } + + public String getSpare6() + { + return spare6; + } + + public void setProductName(String productName) + { + this.productName = productName; + } + + public String getProductName() + { + return productName; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("productGuid", getProductGuid()) + .append("productId", getProductId()) + .append("parentId", getParentId()) + .append("price", getPrice()) + .append("cargoNo", getCargoNo()) + .append("unit", getUnit()) + .append("spec", getSpec()) + .append("remark", getRemark()) + .append("spare1", getSpare1()) + .append("spare2", getSpare2()) + .append("spare3", getSpare3()) + .append("spare4", getSpare4()) + .append("spare5", getSpare5()) + .append("spare6", getSpare6()) + .append("productName", getProductName()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/mapper/BasProductMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/mapper/BasProductMapper.java new file mode 100644 index 0000000..95a9e29 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/mapper/BasProductMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.bas.BasProduct.mapper; + +import java.util.List; +import com.ruoyi.bas.BasProduct.domain.BasProduct; + +/** + * 物料管理Mapper接口 + * + * @author ruoyi + * @date 2025-05-20 + */ +public interface BasProductMapper +{ + /** + * 查询物料管理 + * + * @param productGuid 物料管理主键 + * @return 物料管理 + */ + public BasProduct selectBasProductByProductGuid(String productGuid); + + /** + * 查询物料管理列表 + * + * @param basProduct 物料管理 + * @return 物料管理集合 + */ + public List selectBasProductList(BasProduct basProduct); + + /** + * 新增物料管理 + * + * @param basProduct 物料管理 + * @return 结果 + */ + public int insertBasProduct(BasProduct basProduct); + + /** + * 修改物料管理 + * + * @param basProduct 物料管理 + * @return 结果 + */ + public int updateBasProduct(BasProduct basProduct); + + /** + * 删除物料管理 + * + * @param productGuid 物料管理主键 + * @return 结果 + */ + public int deleteBasProductByProductGuid(String productGuid); + + /** + * 批量删除物料管理 + * + * @param productGuids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBasProductByProductGuids(String[] productGuids); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/service/IBasProductService.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/service/IBasProductService.java new file mode 100644 index 0000000..d5bf6c9 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/service/IBasProductService.java @@ -0,0 +1,61 @@ +package com.ruoyi.bas.BasProduct.service; + +import java.util.List; +import com.ruoyi.bas.BasProduct.domain.BasProduct; + +/** + * 物料管理Service接口 + * + * @author ruoyi + * @date 2025-05-20 + */ +public interface IBasProductService +{ + /** + * 查询物料管理 + * + * @param productGuid 物料管理主键 + * @return 物料管理 + */ + public BasProduct selectBasProductByProductGuid(String productGuid); + + /** + * 查询物料管理列表 + * + * @param basProduct 物料管理 + * @return 物料管理集合 + */ + public List selectBasProductList(BasProduct basProduct); + + /** + * 新增物料管理 + * + * @param basProduct 物料管理 + * @return 结果 + */ + public int insertBasProduct(BasProduct basProduct); + + /** + * 修改物料管理 + * + * @param basProduct 物料管理 + * @return 结果 + */ + public int updateBasProduct(BasProduct basProduct); + + /** + * 批量删除物料管理 + * + * @param productGuids 需要删除的物料管理主键集合 + * @return 结果 + */ + public int deleteBasProductByProductGuids(String[] productGuids); + + /** + * 删除物料管理信息 + * + * @param productGuid 物料管理主键 + * @return 结果 + */ + public int deleteBasProductByProductGuid(String productGuid); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/service/impl/BasProductServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/service/impl/BasProductServiceImpl.java new file mode 100644 index 0000000..f36acae --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasProduct/service/impl/BasProductServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.bas.BasProduct.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.bas.BasProduct.mapper.BasProductMapper; +import com.ruoyi.bas.BasProduct.domain.BasProduct; +import com.ruoyi.bas.BasProduct.service.IBasProductService; + +/** + * 物料管理Service业务层处理 + * + * @author ruoyi + * @date 2025-05-20 + */ +@Service +public class BasProductServiceImpl implements IBasProductService +{ + @Autowired + private BasProductMapper basProductMapper; + + /** + * 查询物料管理 + * + * @param productGuid 物料管理主键 + * @return 物料管理 + */ + @Override + public BasProduct selectBasProductByProductGuid(String productGuid) + { + return basProductMapper.selectBasProductByProductGuid(productGuid); + } + + /** + * 查询物料管理列表 + * + * @param basProduct 物料管理 + * @return 物料管理 + */ + @Override + public List selectBasProductList(BasProduct basProduct) + { + return basProductMapper.selectBasProductList(basProduct); + } + + /** + * 新增物料管理 + * + * @param basProduct 物料管理 + * @return 结果 + */ + @Override + public int insertBasProduct(BasProduct basProduct) + { + return basProductMapper.insertBasProduct(basProduct); + } + + /** + * 修改物料管理 + * + * @param basProduct 物料管理 + * @return 结果 + */ + @Override + public int updateBasProduct(BasProduct basProduct) + { + return basProductMapper.updateBasProduct(basProduct); + } + + /** + * 批量删除物料管理 + * + * @param productGuids 需要删除的物料管理主键 + * @return 结果 + */ + @Override + public int deleteBasProductByProductGuids(String[] productGuids) + { + return basProductMapper.deleteBasProductByProductGuids(productGuids); + } + + /** + * 删除物料管理信息 + * + * @param productGuid 物料管理主键 + * @return 结果 + */ + @Override + public int deleteBasProductByProductGuid(String productGuid) + { + return basProductMapper.deleteBasProductByProductGuid(productGuid); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/controller/BasSupplierController.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/controller/BasSupplierController.java new file mode 100644 index 0000000..adf9408 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/controller/BasSupplierController.java @@ -0,0 +1,106 @@ +package com.ruoyi.bas.BasSupplier.controller; + +import java.util.List; +import javax.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.bas.BasSupplier.domain.BasSupplier; +import com.ruoyi.bas.BasSupplier.service.IBasSupplierService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; +import cn.hutool.core.util.IdUtil; +/** + * 供应商管理Controller + * + * @author gw + * @date 2025-05-20 + */ +@RestController +@RequestMapping("/bas/BasSupplier") +public class BasSupplierController extends BaseController +{ + @Autowired + private IBasSupplierService basSupplierService; + + /** + * 查询供应商管理列表 + */ + @PreAuthorize("@ss.hasPermi('bas:BasSupplier:list')") + @GetMapping("/list") + public TableDataInfo list(BasSupplier basSupplier) + { + startPage(); + List list = basSupplierService.selectBasSupplierList(basSupplier); + return getDataTable(list); + } + + /** + * 导出供应商管理列表 + */ + @PreAuthorize("@ss.hasPermi('bas:BasSupplier:export')") + @Log(title = "供应商管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BasSupplier basSupplier) + { + List list = basSupplierService.selectBasSupplierList(basSupplier); + ExcelUtil util = new ExcelUtil(BasSupplier.class); + util.exportExcel(response, list, "供应商管理数据"); + } + + /** + * 获取供应商管理详细信息 + */ + @PreAuthorize("@ss.hasPermi('bas:BasSupplier:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(basSupplierService.selectBasSupplierById(id)); + } + + /** + * 新增供应商管理 + */ + @PreAuthorize("@ss.hasPermi('bas:BasSupplier:add')") + @Log(title = "供应商管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BasSupplier basSupplier) + { + // 使用雪花算法生成ID并转为字符串 + basSupplier.setId(String.valueOf(IdUtil.getSnowflake().nextId())); + return toAjax(basSupplierService.insertBasSupplier(basSupplier)); + } + + /** + * 修改供应商管理 + */ + @PreAuthorize("@ss.hasPermi('bas:BasSupplier:edit')") + @Log(title = "供应商管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BasSupplier basSupplier) + { + return toAjax(basSupplierService.updateBasSupplier(basSupplier)); + } + + /** + * 删除供应商管理 + */ + @PreAuthorize("@ss.hasPermi('bas:BasSupplier:remove')") + @Log(title = "供应商管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(basSupplierService.deleteBasSupplierByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/domain/BasSupplier.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/domain/BasSupplier.java new file mode 100644 index 0000000..8f1427d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/domain/BasSupplier.java @@ -0,0 +1,293 @@ +package com.ruoyi.bas.BasSupplier.domain; + +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; + +/** + * 供应商管理对象 bas_supplier + * + * @author gw + * @date 2025-05-20 + */ +public class BasSupplier extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** fid()主键 */ + private String id; + + /** 供应商编号 */ + @Excel(name = " 供应商编号") + private String supplierNo; + + /** 供应商名称 */ + @Excel(name = "供应商名称") + private String supplierGroupNo; + + /** 供应商名称 */ + @Excel(name = "供应商名称") + private String supplierName; + + /** 简称 */ + @Excel(name = "简称") + private String simpleName; + + /** 是否可用 */ + @Excel(name = "是否可用") + private String useable; + + /** 地区分类 */ + @Excel(name = "地区分类") + private String supplierArae; + + /** 纳税人登记号 */ + @Excel(name = "纳税人登记号") + private String taxpayerRegistrationNumber; + + /** 国家 */ + @Excel(name = "国家") + private String country; + + /** 时区 */ + @Excel(name = "时区") + private String timeZone; + + /** 数据格式 */ + @Excel(name = "数据格式") + private String dataFormat; + + /** 收货国家 */ + @Excel(name = "收货国家") + private String receivingCountry; + + /** 税类 */ + @Excel(name = "税类") + private String taxCategory; + + /** 法人 */ + @Excel(name = "法人") + private String legalPerson; + + /** 注册资金 */ + @Excel(name = "注册资金") + private String registeredCapital; + + /** 企业地址 */ + @Excel(name = "企业地址") + private String address; + + /** 联系人姓名 */ + @Excel(name = "联系人姓名") + private String contactName; + + /** 联系电话 */ + @Excel(name = "联系电话") + private String contactNumber; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + public void setSupplierNo(String supplierNo) + { + this.supplierNo = supplierNo; + } + + public String getSupplierNo() + { + return supplierNo; + } + + public void setSupplierGroupNo(String supplierGroupNo) + { + this.supplierGroupNo = supplierGroupNo; + } + + public String getSupplierGroupNo() + { + return supplierGroupNo; + } + + public void setSupplierName(String supplierName) + { + this.supplierName = supplierName; + } + + public String getSupplierName() + { + return supplierName; + } + + public void setSimpleName(String simpleName) + { + this.simpleName = simpleName; + } + + public String getSimpleName() + { + return simpleName; + } + + public void setUseable(String useable) + { + this.useable = useable; + } + + public String getUseable() + { + return useable; + } + + public void setSupplierArae(String supplierArae) + { + this.supplierArae = supplierArae; + } + + public String getSupplierArae() + { + return supplierArae; + } + + public void setTaxpayerRegistrationNumber(String taxpayerRegistrationNumber) + { + this.taxpayerRegistrationNumber = taxpayerRegistrationNumber; + } + + public String getTaxpayerRegistrationNumber() + { + return taxpayerRegistrationNumber; + } + + public void setCountry(String country) + { + this.country = country; + } + + public String getCountry() + { + return country; + } + + public void setTimeZone(String timeZone) + { + this.timeZone = timeZone; + } + + public String getTimeZone() + { + return timeZone; + } + + public void setDataFormat(String dataFormat) + { + this.dataFormat = dataFormat; + } + + public String getDataFormat() + { + return dataFormat; + } + + public void setReceivingCountry(String receivingCountry) + { + this.receivingCountry = receivingCountry; + } + + public String getReceivingCountry() + { + return receivingCountry; + } + + public void setTaxCategory(String taxCategory) + { + this.taxCategory = taxCategory; + } + + public String getTaxCategory() + { + return taxCategory; + } + + public void setLegalPerson(String legalPerson) + { + this.legalPerson = legalPerson; + } + + public String getLegalPerson() + { + return legalPerson; + } + + public void setRegisteredCapital(String registeredCapital) + { + this.registeredCapital = registeredCapital; + } + + public String getRegisteredCapital() + { + return registeredCapital; + } + + public void setAddress(String address) + { + this.address = address; + } + + public String getAddress() + { + return address; + } + + public void setContactName(String contactName) + { + this.contactName = contactName; + } + + public String getContactName() + { + return contactName; + } + + public void setContactNumber(String contactNumber) + { + this.contactNumber = contactNumber; + } + + public String getContactNumber() + { + return contactNumber; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("supplierNo", getSupplierNo()) + .append("supplierGroupNo", getSupplierGroupNo()) + .append("supplierName", getSupplierName()) + .append("simpleName", getSimpleName()) + .append("useable", getUseable()) + .append("remark", getRemark()) + .append("supplierArae", getSupplierArae()) + .append("taxpayerRegistrationNumber", getTaxpayerRegistrationNumber()) + .append("country", getCountry()) + .append("timeZone", getTimeZone()) + .append("dataFormat", getDataFormat()) + .append("receivingCountry", getReceivingCountry()) + .append("taxCategory", getTaxCategory()) + .append("legalPerson", getLegalPerson()) + .append("registeredCapital", getRegisteredCapital()) + .append("address", getAddress()) + .append("contactName", getContactName()) + .append("contactNumber", getContactNumber()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/mapper/BasSupplierMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/mapper/BasSupplierMapper.java new file mode 100644 index 0000000..e2bf743 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/mapper/BasSupplierMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.bas.BasSupplier.mapper; + +import java.util.List; +import com.ruoyi.bas.BasSupplier.domain.BasSupplier; + +/** + * 供应商管理Mapper接口 + * + * @author gw + * @date 2025-05-20 + */ +public interface BasSupplierMapper +{ + /** + * 查询供应商管理 + * + * @param id 供应商管理主键 + * @return 供应商管理 + */ + public BasSupplier selectBasSupplierById(String id); + + /** + * 查询供应商管理列表 + * + * @param basSupplier 供应商管理 + * @return 供应商管理集合 + */ + public List selectBasSupplierList(BasSupplier basSupplier); + + /** + * 新增供应商管理 + * + * @param basSupplier 供应商管理 + * @return 结果 + */ + public int insertBasSupplier(BasSupplier basSupplier); + + /** + * 修改供应商管理 + * + * @param basSupplier 供应商管理 + * @return 结果 + */ + public int updateBasSupplier(BasSupplier basSupplier); + + /** + * 删除供应商管理 + * + * @param id 供应商管理主键 + * @return 结果 + */ + public int deleteBasSupplierById(String id); + + /** + * 批量删除供应商管理 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBasSupplierByIds(String[] ids); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/service/IBasSupplierService.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/service/IBasSupplierService.java new file mode 100644 index 0000000..2c0a81e --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/service/IBasSupplierService.java @@ -0,0 +1,61 @@ +package com.ruoyi.bas.BasSupplier.service; + +import java.util.List; +import com.ruoyi.bas.BasSupplier.domain.BasSupplier; + +/** + * 供应商管理Service接口 + * + * @author gw + * @date 2025-05-20 + */ +public interface IBasSupplierService +{ + /** + * 查询供应商管理 + * + * @param id 供应商管理主键 + * @return 供应商管理 + */ + public BasSupplier selectBasSupplierById(String id); + + /** + * 查询供应商管理列表 + * + * @param basSupplier 供应商管理 + * @return 供应商管理集合 + */ + public List selectBasSupplierList(BasSupplier basSupplier); + + /** + * 新增供应商管理 + * + * @param basSupplier 供应商管理 + * @return 结果 + */ + public int insertBasSupplier(BasSupplier basSupplier); + + /** + * 修改供应商管理 + * + * @param basSupplier 供应商管理 + * @return 结果 + */ + public int updateBasSupplier(BasSupplier basSupplier); + + /** + * 批量删除供应商管理 + * + * @param ids 需要删除的供应商管理主键集合 + * @return 结果 + */ + public int deleteBasSupplierByIds(String[] ids); + + /** + * 删除供应商管理信息 + * + * @param id 供应商管理主键 + * @return 结果 + */ + public int deleteBasSupplierById(String id); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/service/impl/BasSupplierServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/service/impl/BasSupplierServiceImpl.java new file mode 100644 index 0000000..88a9d9b --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/bas/BasSupplier/service/impl/BasSupplierServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.bas.BasSupplier.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.bas.BasSupplier.mapper.BasSupplierMapper; +import com.ruoyi.bas.BasSupplier.domain.BasSupplier; +import com.ruoyi.bas.BasSupplier.service.IBasSupplierService; + +/** + * 供应商管理Service业务层处理 + * + * @author gw + * @date 2025-05-20 + */ +@Service +public class BasSupplierServiceImpl implements IBasSupplierService +{ + @Autowired + private BasSupplierMapper basSupplierMapper; + + /** + * 查询供应商管理 + * + * @param id 供应商管理主键 + * @return 供应商管理 + */ + @Override + public BasSupplier selectBasSupplierById(String id) + { + return basSupplierMapper.selectBasSupplierById(id); + } + + /** + * 查询供应商管理列表 + * + * @param basSupplier 供应商管理 + * @return 供应商管理 + */ + @Override + public List selectBasSupplierList(BasSupplier basSupplier) + { + return basSupplierMapper.selectBasSupplierList(basSupplier); + } + + /** + * 新增供应商管理 + * + * @param basSupplier 供应商管理 + * @return 结果 + */ + @Override + public int insertBasSupplier(BasSupplier basSupplier) + { + return basSupplierMapper.insertBasSupplier(basSupplier); + } + + /** + * 修改供应商管理 + * + * @param basSupplier 供应商管理 + * @return 结果 + */ + @Override + public int updateBasSupplier(BasSupplier basSupplier) + { + return basSupplierMapper.updateBasSupplier(basSupplier); + } + + /** + * 批量删除供应商管理 + * + * @param ids 需要删除的供应商管理主键 + * @return 结果 + */ + @Override + public int deleteBasSupplierByIds(String[] ids) + { + return basSupplierMapper.deleteBasSupplierByIds(ids); + } + + /** + * 删除供应商管理信息 + * + * @param id 供应商管理主键 + * @return 结果 + */ + @Override + public int deleteBasSupplierById(String id) + { + return basSupplierMapper.deleteBasSupplierById(id); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/bas/BasCustomerMapper.xml b/ruoyi-admin/src/main/resources/mapper/bas/BasCustomerMapper.xml new file mode 100644 index 0000000..d762e50 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/bas/BasCustomerMapper.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, customer_no, customer_group_no, customer_name, simple_name, useable, remark, business_department, salesman, mnemonic_code, type, taxpayer_registration_number, organization, sup_customer, retail_investor, country, time_zone, data_format, contact_name, shipment, tax_category from bas_customer + + + + + + + + insert into bas_customer + + id, + customer_no, + customer_group_no, + customer_name, + simple_name, + useable, + remark, + business_department, + salesman, + mnemonic_code, + type, + taxpayer_registration_number, + organization, + sup_customer, + retail_investor, + country, + time_zone, + data_format, + contact_name, + shipment, + tax_category, + + + #{id}, + #{customerNo}, + #{customerGroupNo}, + #{customerName}, + #{simpleName}, + #{useable}, + #{remark}, + #{businessDepartment}, + #{salesman}, + #{mnemonicCode}, + #{type}, + #{taxpayerRegistrationNumber}, + #{organization}, + #{supCustomer}, + #{retailInvestor}, + #{country}, + #{timeZone}, + #{dataFormat}, + #{contactName}, + #{shipment}, + #{taxCategory}, + + + + + update bas_customer + + customer_no = #{customerNo}, + customer_group_no = #{customerGroupNo}, + customer_name = #{customerName}, + simple_name = #{simpleName}, + useable = #{useable}, + remark = #{remark}, + business_department = #{businessDepartment}, + salesman = #{salesman}, + mnemonic_code = #{mnemonicCode}, + type = #{type}, + taxpayer_registration_number = #{taxpayerRegistrationNumber}, + organization = #{organization}, + sup_customer = #{supCustomer}, + retail_investor = #{retailInvestor}, + country = #{country}, + time_zone = #{timeZone}, + data_format = #{dataFormat}, + contact_name = #{contactName}, + shipment = #{shipment}, + tax_category = #{taxCategory}, + + where id = #{id} + + + + delete from bas_customer where id = #{id} + + + + delete from bas_customer where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/bas/BasProductMapper.xml b/ruoyi-admin/src/main/resources/mapper/bas/BasProductMapper.xml new file mode 100644 index 0000000..173d4c7 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/bas/BasProductMapper.xml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + select product_guid, product_id, parent_id, price, cargo_no, unit, spec, remark, spare1, spare2, spare3, spare4, spare5, spare6, product_name from bas_product + + + + + + + + insert into bas_product + + product_guid, + product_id, + parent_id, + price, + cargo_no, + unit, + spec, + remark, + spare1, + spare2, + spare3, + spare4, + spare5, + spare6, + product_name, + + + #{productGuid}, + #{productId}, + #{parentId}, + #{price}, + #{cargoNo}, + #{unit}, + #{spec}, + #{remark}, + #{spare1}, + #{spare2}, + #{spare3}, + #{spare4}, + #{spare5}, + #{spare6}, + #{productName}, + + + + + update bas_product + + product_id = #{productId}, + parent_id = #{parentId}, + price = #{price}, + cargo_no = #{cargoNo}, + unit = #{unit}, + spec = #{spec}, + remark = #{remark}, + spare1 = #{spare1}, + spare2 = #{spare2}, + spare3 = #{spare3}, + spare4 = #{spare4}, + spare5 = #{spare5}, + spare6 = #{spare6}, + product_name = #{productName}, + + where product_guid = #{productGuid} + + + + delete from bas_product where product_guid = #{productGuid} + + + + delete from bas_product where product_guid in + + #{productGuid} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/bas/BasSupplierMapper.xml b/ruoyi-admin/src/main/resources/mapper/bas/BasSupplierMapper.xml new file mode 100644 index 0000000..b3bbc6b --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/bas/BasSupplierMapper.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, supplier_no, supplier_group_no, supplier_name, simple_name, useable, remark, supplier_arae, taxpayer_registration_number, country, time_zone, data_format, receiving_country, tax_category, legal_person, registered_capital, address, contact_name, contact_number from bas_supplier + + + + + + + + insert into bas_supplier + + id, + supplier_no, + supplier_group_no, + supplier_name, + simple_name, + useable, + remark, + supplier_arae, + taxpayer_registration_number, + country, + time_zone, + data_format, + receiving_country, + tax_category, + legal_person, + registered_capital, + address, + contact_name, + contact_number, + + + #{id}, + #{supplierNo}, + #{supplierGroupNo}, + #{supplierName}, + #{simpleName}, + #{useable}, + #{remark}, + #{supplierArae}, + #{taxpayerRegistrationNumber}, + #{country}, + #{timeZone}, + #{dataFormat}, + #{receivingCountry}, + #{taxCategory}, + #{legalPerson}, + #{registeredCapital}, + #{address}, + #{contactName}, + #{contactNumber}, + + + + + update bas_supplier + + supplier_no = #{supplierNo}, + supplier_group_no = #{supplierGroupNo}, + supplier_name = #{supplierName}, + simple_name = #{simpleName}, + useable = #{useable}, + remark = #{remark}, + supplier_arae = #{supplierArae}, + taxpayer_registration_number = #{taxpayerRegistrationNumber}, + country = #{country}, + time_zone = #{timeZone}, + data_format = #{dataFormat}, + receiving_country = #{receivingCountry}, + tax_category = #{taxCategory}, + legal_person = #{legalPerson}, + registered_capital = #{registeredCapital}, + address = #{address}, + contact_name = #{contactName}, + contact_number = #{contactNumber}, + + where id = #{id} + + + + delete from bas_supplier where id = #{id} + + + + delete from bas_supplier where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-ui/src/api/bas/BasCustomer.js b/ruoyi-ui/src/api/bas/BasCustomer.js new file mode 100644 index 0000000..97cebb0 --- /dev/null +++ b/ruoyi-ui/src/api/bas/BasCustomer.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询客户管理列表 +export function listBasCustomer(query) { + return request({ + url: '/bas/BasCustomer/list', + method: 'get', + params: query + }) +} + +// 查询客户管理详细 +export function getBasCustomer(id) { + return request({ + url: '/bas/BasCustomer/' + id, + method: 'get' + }) +} + +// 新增客户管理 +export function addBasCustomer(data) { + return request({ + url: '/bas/BasCustomer', + method: 'post', + data: data + }) +} + +// 修改客户管理 +export function updateBasCustomer(data) { + return request({ + url: '/bas/BasCustomer', + method: 'put', + data: data + }) +} + +// 删除客户管理 +export function delBasCustomer(id) { + return request({ + url: '/bas/BasCustomer/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/bas/BasProduct.js b/ruoyi-ui/src/api/bas/BasProduct.js new file mode 100644 index 0000000..3c9a8ef --- /dev/null +++ b/ruoyi-ui/src/api/bas/BasProduct.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询物料管理列表 +export function listBasProduct(query) { + return request({ + url: '/bas/BasProduct/list', + method: 'get', + params: query + }) +} + +// 查询物料管理详细 +export function getBasProduct(productGuid) { + return request({ + url: '/bas/BasProduct/' + productGuid, + method: 'get' + }) +} + +// 新增物料管理 +export function addBasProduct(data) { + return request({ + url: '/bas/BasProduct', + method: 'post', + data: data + }) +} + +// 修改物料管理 +export function updateBasProduct(data) { + return request({ + url: '/bas/BasProduct', + method: 'put', + data: data + }) +} + +// 删除物料管理 +export function delBasProduct(productGuid) { + return request({ + url: '/bas/BasProduct/' + productGuid, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/bas/BasSupplier.js b/ruoyi-ui/src/api/bas/BasSupplier.js new file mode 100644 index 0000000..afefc42 --- /dev/null +++ b/ruoyi-ui/src/api/bas/BasSupplier.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询供应商管理列表 +export function listBasSupplier(query) { + return request({ + url: '/bas/BasSupplier/list', + method: 'get', + params: query + }) +} + +// 查询供应商管理详细 +export function getBasSupplier(id) { + return request({ + url: '/bas/BasSupplier/' + id, + method: 'get' + }) +} + +// 新增供应商管理 +export function addBasSupplier(data) { + return request({ + url: '/bas/BasSupplier', + method: 'post', + data: data + }) +} + +// 修改供应商管理 +export function updateBasSupplier(data) { + return request({ + url: '/bas/BasSupplier', + method: 'put', + data: data + }) +} + +// 删除供应商管理 +export function delBasSupplier(id) { + return request({ + url: '/bas/BasSupplier/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/views/bas/BasCustomer/index.vue b/ruoyi-ui/src/views/bas/BasCustomer/index.vue new file mode 100644 index 0000000..e80de6c --- /dev/null +++ b/ruoyi-ui/src/views/bas/BasCustomer/index.vue @@ -0,0 +1,499 @@ + + + diff --git a/ruoyi-ui/src/views/bas/BasProduct/index.vue b/ruoyi-ui/src/views/bas/BasProduct/index.vue new file mode 100644 index 0000000..4e67314 --- /dev/null +++ b/ruoyi-ui/src/views/bas/BasProduct/index.vue @@ -0,0 +1,436 @@ + + + diff --git a/ruoyi-ui/src/views/bas/BasSupplier/index.vue b/ruoyi-ui/src/views/bas/BasSupplier/index.vue new file mode 100644 index 0000000..dccabc0 --- /dev/null +++ b/ruoyi-ui/src/views/bas/BasSupplier/index.vue @@ -0,0 +1,482 @@ + + +