diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/cotroller/XzdCorrespondentList.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/controller/XzdCorrespondentList.java similarity index 98% rename from xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/cotroller/XzdCorrespondentList.java rename to xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/controller/XzdCorrespondentList.java index 37c341b5..256da475 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/cotroller/XzdCorrespondentList.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/controller/XzdCorrespondentList.java @@ -1,4 +1,4 @@ -package org.dromara.xzd.cotroller; +package org.dromara.xzd.controller; import cn.dev33.satoken.annotation.SaCheckPermission; diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/controller/XzdSupplierInfoController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/controller/XzdSupplierInfoController.java new file mode 100644 index 00000000..3662b7d3 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/controller/XzdSupplierInfoController.java @@ -0,0 +1,116 @@ +package org.dromara.xzd.controller; + +import java.util.List; + +import lombok.RequiredArgsConstructor; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.*; +import cn.dev33.satoken.annotation.SaCheckPermission; +import org.dromara.xzd.domain.vo.XzdCustomertypeInfoVo; +import org.dromara.xzd.domain.vo.XzdCustomertypeVo; +import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.dromara.common.idempotent.annotation.RepeatSubmit; +import org.dromara.common.log.annotation.Log; +import org.dromara.common.web.core.BaseController; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import org.dromara.common.log.enums.BusinessType; +import org.dromara.common.excel.utils.ExcelUtil; +import org.dromara.xzd.domain.vo.XzdSupplierInfoVo; +import org.dromara.xzd.domain.bo.XzdSupplierInfoBo; +import org.dromara.xzd.service.IXzdSupplierInfoService; +import org.dromara.common.mybatis.core.page.TableDataInfo; + +/** + * 供应商信息 + * + * @author Lion Li + * @date 2025-09-30 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/xzd/supplierInfo") +public class XzdSupplierInfoController extends BaseController { + + private final IXzdSupplierInfoService xzdSupplierInfoService; + + /** + * 查询供应商信息列表 + */ + @SaCheckPermission("xzd:supplierInfo:list") + @GetMapping("/list") + public TableDataInfo list(XzdSupplierInfoBo bo, PageQuery pageQuery) { + return xzdSupplierInfoService.queryPageList(bo, pageQuery); + } + + /** + * 导出供应商信息列表 + */ + @SaCheckPermission("xzd:supplierInfo:export") + @Log(title = "供应商信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(XzdSupplierInfoBo bo, HttpServletResponse response) { + List list = xzdSupplierInfoService.queryList(bo); + ExcelUtil.exportExcel(list, "供应商信息", XzdSupplierInfoVo.class, response); + } + + /** + * 获取供应商信息详细信息 + * + * @param id 主键 + */ + @SaCheckPermission("xzd:supplierInfo:query") + @GetMapping("/{id}") + public R getInfo(@NotNull(message = "主键不能为空") + @PathVariable Long id) { + return R.ok(xzdSupplierInfoService.queryById(id)); + } + + /** + * 新增供应商信息 + */ + @SaCheckPermission("xzd:supplierInfo:add") + @Log(title = "供应商信息", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R add(@Validated(AddGroup.class) @RequestBody XzdSupplierInfoBo bo) { + return toAjax(xzdSupplierInfoService.insertByBo(bo)); + } + + /** + * 修改供应商信息 + */ + @SaCheckPermission("xzd:supplierInfo:edit") + @Log(title = "供应商信息", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R edit(@Validated(EditGroup.class) @RequestBody XzdSupplierInfoBo bo) { + return toAjax(xzdSupplierInfoService.updateByBo(bo)); + } + + /** + * 删除供应商信息 + * + * @param ids 主键串 + */ + @SaCheckPermission("xzd:supplierInfo:remove") + @Log(title = "供应商信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R remove(@NotEmpty(message = "主键不能为空") + @PathVariable Long[] ids) { + return toAjax(xzdSupplierInfoService.deleteWithValidByIds(List.of(ids), true)); + } + + /** + * 获取类型列表 + */ + @SaCheckPermission("xzd:supplierInfo:typeList") + @GetMapping("/typeList") + public R> typeList() { + return xzdSupplierInfoService.typeList(); + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdCustomertype.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdCustomertype.java index 33504b35..df8e84c4 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdCustomertype.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdCustomertype.java @@ -4,8 +4,11 @@ import org.dromara.common.mybatis.core.domain.BaseEntity; import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import lombok.EqualsAndHashCode; +import org.dromara.xzd.domain.vo.XzdCustomertypeInfoVo; +import org.dromara.xzd.domain.vo.XzdCustomertypeVo; import java.io.Serial; +import java.util.List; /** * 客户|供应商类型(公共)对象 xzd_customertype diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSupplierEvaluation.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSupplierEvaluation.java new file mode 100644 index 00000000..bb55fd7b --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSupplierEvaluation.java @@ -0,0 +1,63 @@ +package org.dromara.xzd.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.io.Serial; + +/** + * 供应商评价对象 xzd_supplier_evaluation + * + * @author Lion Li + * @date 2025-09-30 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("xzd_supplier_evaluation") +public class XzdSupplierEvaluation extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId(value = "id") + private Long id; + + /** + * 供应商ID + */ + private Long supplierId; + + /** + * 评价类型 + */ + private String evaluationType; + + /** + * 评价内容 + */ + private String evaluationContent; + + /** + * 评价结果 + */ + private String evaluationResult; + + /** + * 评价人 + */ + private String evaluator; + + /** + * 评价时间 + */ + private Date evaluationTime; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSupplierInfo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSupplierInfo.java new file mode 100644 index 00000000..279562a8 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSupplierInfo.java @@ -0,0 +1,233 @@ +package org.dromara.xzd.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.io.Serial; + +/** + * 供应商信息对象 xzd_supplier_info + * + * @author Lion Li + * @date 2025-09-30 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("xzd_supplier_info") +public class XzdSupplierInfo extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId(value = "id") + private Long id; + + /** + * 单位编号 + */ + private String unitCode; + + /** + * 单位名称 + */ + private String unitName; + + /** + * 单位属性(字典) + */ + private String unitProperty; + + /** + * 简称 + */ + private String abbreviation; + + /** + * 英文简称 + */ + private String englishAbbreviation; + + /** + * 助记码 + */ + private String mnemonicCode; + + /** + * 统一社会信用代码 + */ + private String unifiedSocialCreditCode; + + /** + * 税务登记号 + */ + private String taxRegistrationNumber; + + /** + * 证件类型 + */ + private String certificateType; + + /** + * 证件编号 + */ + private String certificateNumber; + + /** + * 国家 + */ + private String country; + + /** + * 省 + */ + private String province; + + /** + * 市 + */ + private String city; + + /** + * 区县 + */ + private String districtCounty; + + /** + * 行业类型 + */ + private String industryType; + + /** + * 上级单位 + */ + private String superiorUnit; + + /** + * 集团供应商(0=否,1=是) + */ + private Long isGroupSupplier; + + /** + * 工商变更时间 + */ + private Date industrialCommercialChangeTime; + + /** + * 备注 + */ + private String remarks; + + /** + * 内部(0=否,1=是) + */ + private Long isInternal; + + /** + * 黑名单(0=否,1=是) + */ + private Long isBlacklist; + + /** + * 自动生成客户(0=否,1=是) + */ + private Long isAutoGenerateCustomer; + + /** + * 单位成立日期 + */ + private Date establishmentDate; + + /** + * 纳税身份类型(字典) + */ + private String taxIdentityType; + + /** + * 纳税人名称 + */ + private String taxpayerName; + + /** + * 税务银行行号 + */ + private String taxBankCode; + + /** + * 税务银行名称 + */ + private String taxBankName; + + /** + * 税务登记账号 + */ + private String taxRegistrationAccount; + + /** + * 税务登记地址 + */ + private String taxRegistrationAddress; + + /** + * 税务登记电话 + */ + private String taxRegistrationPhone; + + /** + * 注册资金 + */ + private Long registeredCapital; + + /** + * 注册时间 + */ + private Date registrationTime; + + /** + * 法人代表 + */ + private String legalRepresentative; + + /** + * 营业范围 + */ + private String businessScope; + + /** + * 币种(字典) + */ + private String currency; + + /** + * 行业地位(字典) + */ + private String industryPosition; + + /** + * 企业性质(字典) + */ + private String enterpriseNature; + + /** + * 规模(字典) + */ + private String scale; + + /** + * 网址 + */ + private String website; + + /** + * 邮箱 + */ + private String email; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSupplierQualification.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSupplierQualification.java new file mode 100644 index 00000000..411c7059 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSupplierQualification.java @@ -0,0 +1,68 @@ +package org.dromara.xzd.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.io.Serial; + +/** + * 供应商资质信息对象 xzd_supplier_qualification + * + * @author Lion Li + * @date 2025-09-30 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("xzd_supplier_qualification") +public class XzdSupplierQualification extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId(value = "id") + private Long id; + + /** + * 供应商ID + */ + private Long supplierId; + + /** + * 资质名称 + */ + private String name; + + /** + * 资质起始日期 + */ + private Date beginTime; + + /** + * 资质到期日期 + */ + private Date endTime; + + /** + * 文件路径 + */ + private String fileUrl; + + /** + * 文件ID + */ + private Long fileId; + + /** + * 备注 + */ + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSupplierSupplement.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSupplierSupplement.java new file mode 100644 index 00000000..cea2548d --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSupplierSupplement.java @@ -0,0 +1,133 @@ +package org.dromara.xzd.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.io.Serial; + +/** + * 供应商信息补充对象 xzd_supplier_supplement + * + * @author Lion Li + * @date 2025-09-30 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("xzd_supplier_supplement") +public class XzdSupplierSupplement extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId(value = "id") + private Long id; + + /** + * 供应商ID + */ + private Long supplierId; + + /** + * 供应商状态 + */ + private String supplierStatus; + + /** + * 供应商等级 + */ + private String supplierLevel; + + /** + * 分管部门 + */ + private String responsibleDepartment; + + /** + * 分管业务员 + */ + private String responsibleSalesman; + + /** + * 归属组织 + */ + private String belongingOrganization; + + /** + * 创建者 + */ + private String creator; + + /** + * 创建日期 + */ + private Date createDate; + + /** + * 审核标志(0:未审核,1:已审核) + */ + private Long auditFlag; + + /** + * 冻结标志(0:未冻结,1:已冻结) + */ + private Long freezeFlag; + + /** + * 冻结开始时间 + */ + private Date freezeStartTime; + + /** + * 冻结结束时间 + */ + private Date freezeEndTime; + + /** + * 供应商主类型 + */ + private String supplierMainType; + + /** + * 默认财务组织 + */ + private String defaultFinanceOrganization; + + /** + * 投标状态 + */ + private String biddingStatus; + + /** + * 服务区域 + */ + private String serviceArea; + + /** + * 合格有效期 + */ + private Date qualificationValidity; + + /** + * 考核小组组长 + */ + private String assessmentTeamLeader; + + /** + * 考核小组成员 + */ + private String assessmentTeamMembers; + + /** + * 备案组织 + */ + private String recordOrganization; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSupplyMaterials.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSupplyMaterials.java new file mode 100644 index 00000000..43e414a0 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/XzdSupplyMaterials.java @@ -0,0 +1,111 @@ +package org.dromara.xzd.domain; + +import org.dromara.common.mybatis.core.domain.BaseEntity; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serial; + +/** + * 供应物料对象 _xzd_supply_materials + * + * @author Lion Li + * @date 2025-09-30 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("xzd_supply_materials") +public class XzdSupplyMaterials extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId(value = "id") + private Long id; + + /** + * 供应商ID + */ + private Long supplierId; + + /** + * 资源分类 + */ + private String resourceCategory; + + /** + * SKU编码 + */ + private String skuCode; + + /** + * SKU名称 + */ + private String skuName; + + /** + * 规格 + */ + private String specification; + + /** + * 计量单位 + */ + private String unitOfMeasure; + + /** + * 供应商方物料编码 + */ + private String supplierMaterialCode; + + /** + * 供应商方物料名称 + */ + private String supplierMaterialName; + + /** + * 供应商方物料条形码 + */ + private String supplierMaterialBarcode; + + /** + * 含税单价 + */ + private Long taxInclusiveUnitPrice; + + /** + * 配额(%) + */ + private Long quota; + + /** + * 换货率(%) + */ + private Long exchangeRate; + + /** + * 换货周期(天) + */ + private Long exchangeCycle; + + /** + * 交货周期(天) + */ + private Long deliveryCycle; + + /** + * 付款条件 + */ + private String paymentTerms; + + /** + * 备注 + */ + private String remarks; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSupplierEvaluationBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSupplierEvaluationBo.java new file mode 100644 index 00000000..7f4b3a63 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSupplierEvaluationBo.java @@ -0,0 +1,67 @@ +package org.dromara.xzd.domain.bo; + +import org.dromara.xzd.domain.XzdSupplierEvaluation; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 供应商评价业务对象 xzd_supplier_evaluation + * + * @author Lion Li + * @date 2025-09-30 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = XzdSupplierEvaluation.class, reverseConvertGenerate = false) +public class XzdSupplierEvaluationBo extends BaseEntity { + + /** + * + */ + @NotNull(message = "不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 供应商ID + */ + private Long supplierId; + + /** + * 评价类型 + */ + @NotBlank(message = "评价类型不能为空", groups = { AddGroup.class, EditGroup.class }) + private String evaluationType; + + /** + * 评价内容 + */ + @NotBlank(message = "评价内容不能为空", groups = { AddGroup.class, EditGroup.class }) + private String evaluationContent; + + /** + * 评价结果 + */ + @NotBlank(message = "评价结果不能为空", groups = { AddGroup.class, EditGroup.class }) + private String evaluationResult; + + /** + * 评价人 + */ + @NotBlank(message = "评价人不能为空", groups = { AddGroup.class, EditGroup.class }) + private String evaluator; + + /** + * 评价时间 + */ + @NotNull(message = "评价时间不能为空", groups = { AddGroup.class, EditGroup.class }) + private Date evaluationTime; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSupplierInfoBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSupplierInfoBo.java new file mode 100644 index 00000000..e7b9c3cc --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSupplierInfoBo.java @@ -0,0 +1,352 @@ +package org.dromara.xzd.domain.bo; + +import org.dromara.xzd.domain.*; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; +import java.util.Date; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * 供应商信息业务对象 xzd_supplier_info + * + * @author Lion Li + * @date 2025-09-30 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = XzdSupplierInfo.class, reverseConvertGenerate = false) +public class XzdSupplierInfoBo extends BaseEntity { + + /** + * + */ + private Long id; + + /** + * 单位编号 + */ + @NotBlank(message = "单位编号不能为空", groups = { AddGroup.class, EditGroup.class }) + private String unitCode; + + /** + * 单位名称 + */ + @NotBlank(message = "单位名称不能为空", groups = { AddGroup.class, EditGroup.class }) + private String unitName; + + /** + * 单位属性(字典) + */ + @NotBlank(message = "单位属性(字典)不能为空", groups = { AddGroup.class, EditGroup.class }) + private String unitProperty; + + /** + * 简称 + */ + private String abbreviation; + + /** + * 英文简称 + */ + private String englishAbbreviation; + + /** + * 助记码 + */ + private String mnemonicCode; + + /** + * 统一社会信用代码 + */ + @NotBlank(message = "统一社会信用代码不能为空", groups = { AddGroup.class, EditGroup.class }) + private String unifiedSocialCreditCode; + + /** + * 税务登记号 + */ + private String taxRegistrationNumber; + + /** + * 证件类型 + */ + private String certificateType; + + /** + * 证件编号 + */ + private String certificateNumber; + + /** + * 国家 + */ + private String country; + + /** + * 省 + */ + private String province; + + /** + * 市 + */ + private String city; + + /** + * 区县 + */ + private String districtCounty; + + /** + * 行业类型 + */ + private String industryType; + + /** + * 上级单位 + */ + private String superiorUnit; + + /** + * 集团供应商(0=否,1=是) + */ + @NotNull(message = "集团供应商(0=否,1=是)不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long isGroupSupplier; + + /** + * 工商变更时间 + */ + private Date industrialCommercialChangeTime; + + /** + * 备注 + */ + private String remarks; + + /** + * 内部(0=否,1=是) + */ + private Long isInternal; + + /** + * 黑名单(0=否,1=是) + */ + private Long isBlacklist; + + /** + * 自动生成客户(0=否,1=是) + */ + private Long isAutoGenerateCustomer; + + /** + * 单位成立日期 + */ + private Date establishmentDate; + + /** + * 纳税身份类型(字典) + */ + private String taxIdentityType; + + /** + * 纳税人名称 + */ + private String taxpayerName; + + /** + * 税务银行行号 + */ + private String taxBankCode; + + /** + * 税务银行名称 + */ + private String taxBankName; + + /** + * 税务登记账号 + */ + private String taxRegistrationAccount; + + /** + * 税务登记地址 + */ + private String taxRegistrationAddress; + + /** + * 税务登记电话 + */ + private String taxRegistrationPhone; + + /** + * 注册资金 + */ + private Long registeredCapital; + + /** + * 注册时间 + */ + private Date registrationTime; + + /** + * 法人代表 + */ + private String legalRepresentative; + + /** + * 营业范围 + */ + private String businessScope; + + /** + * 币种(字典) + */ + private String currency; + + /** + * 行业地位(字典) + */ + private String industryPosition; + + /** + * 企业性质(字典) + */ + private String enterpriseNature; + + /** + * 规模(字典) + */ + private String scale; + + /** + * 网址 + */ + private String website; + + /** + * 邮箱 + */ + private String email; + + /** + * 资质信息 + */ + private List qualifications; + + /** + * 供应商补充信息 + */ + private XzdSupplierSupplement supplement; + + /** + * 地址信息 + */ + private List addresses; + + /** + * 联系人信息 + */ + private List contacts; + + /** + * 证照信息 + */ + private List certificates; + + /** + * 结算信息 + */ + private XzdSettlementInfo settlement; + + /** + * 业务信息 + */ + private XzdBusinessInfo business; + + /** + * 供应商类型 + */ + private List customerTypes; + + /** + * 供应物料 + */ + private List materials; + + /** + * 供应商评价 + */ + private List evaluations; + + /** + * 项目信息 + */ + private List projects; + + /** + * 合同信息 + */ + private List contracts; + + /** + * 分管部门 + */ + private String fgbm; + + /** + * 分管业务员 + */ + private String fgywy; + + /** + * 合格有效期开始时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date startTime; + + /** + * 合格有效期结束时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date endTime; + + /** + * 审核状态(0:未审核,1:已审核) + */ + private String shzt; + + /** + * 冻结标志(0:未冻结,1:已冻结) + */ + private String djzt; + + /** + * 投标状态 + */ + private String tbzt; + + /** + * 分页大小 + */ + private Integer pageSize; + + /** + * 当前页数 + */ + private Integer pageNum; + + /** + * 排序列 + */ + private String orderByColumn; + + private Integer offset; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSupplierQualificationBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSupplierQualificationBo.java new file mode 100644 index 00000000..400eeb85 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSupplierQualificationBo.java @@ -0,0 +1,74 @@ +package org.dromara.xzd.domain.bo; + +import org.dromara.xzd.domain.XzdSupplierQualification; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 供应商资质信息业务对象 xzd_supplier_qualification + * + * @author Lion Li + * @date 2025-09-30 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = XzdSupplierQualification.class, reverseConvertGenerate = false) +public class XzdSupplierQualificationBo extends BaseEntity { + + /** + * + */ + @NotNull(message = "不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 供应商ID + */ + @NotNull(message = "供应商ID不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long supplierId; + + /** + * 资质名称 + */ + @NotBlank(message = "资质名称不能为空", groups = { AddGroup.class, EditGroup.class }) + private String name; + + /** + * 资质起始日期 + */ + @NotNull(message = "资质起始日期不能为空", groups = { AddGroup.class, EditGroup.class }) + private Date beginTime; + + /** + * 资质到期日期 + */ + @NotNull(message = "资质到期日期不能为空", groups = { AddGroup.class, EditGroup.class }) + private Date endTime; + + /** + * 文件路径 + */ + @NotBlank(message = "文件路径不能为空", groups = { AddGroup.class, EditGroup.class }) + private String fileUrl; + + /** + * 文件ID + */ + @NotNull(message = "文件ID不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long fileId; + + /** + * 备注 + */ + @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class }) + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSupplierSupplementBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSupplierSupplementBo.java new file mode 100644 index 00000000..cc3f13f9 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSupplierSupplementBo.java @@ -0,0 +1,150 @@ +package org.dromara.xzd.domain.bo; + +import org.dromara.xzd.domain.XzdSupplierSupplement; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * 供应商信息补充业务对象 xzd_supplier_supplement + * + * @author Lion Li + * @date 2025-09-30 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = XzdSupplierSupplement.class, reverseConvertGenerate = false) +public class XzdSupplierSupplementBo extends BaseEntity { + + /** + * + */ + private Long id; + + /** + * 供应商ID + */ + private Long supplierId; + + /** + * 供应商状态 + */ + @NotBlank(message = "供应商状态不能为空", groups = { AddGroup.class, EditGroup.class }) + private String supplierStatus; + + /** + * 供应商等级 + */ + @NotBlank(message = "供应商等级不能为空", groups = { AddGroup.class, EditGroup.class }) + private String supplierLevel; + + /** + * 分管部门 + */ + @NotBlank(message = "分管部门不能为空", groups = { AddGroup.class, EditGroup.class }) + private String responsibleDepartment; + + /** + * 分管业务员 + */ + @NotBlank(message = "分管业务员不能为空", groups = { AddGroup.class, EditGroup.class }) + private String responsibleSalesman; + + /** + * 归属组织 + */ + @NotBlank(message = "归属组织不能为空", groups = { AddGroup.class, EditGroup.class }) + private String belongingOrganization; + + /** + * 创建者 + */ + @NotBlank(message = "创建者不能为空", groups = { AddGroup.class, EditGroup.class }) + private String creator; + + /** + * 创建日期 + */ + @NotNull(message = "创建日期不能为空", groups = { AddGroup.class, EditGroup.class }) + private Date createDate; + + /** + * 审核标志(0:未审核,1:已审核) + */ + @NotNull(message = "审核标志(0:未审核,1:已审核)不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long auditFlag; + + /** + * 冻结标志(0:未冻结,1:已冻结) + */ + @NotNull(message = "冻结标志(0:未冻结,1:已冻结)不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long freezeFlag; + + /** + * 冻结开始时间 + */ + @NotNull(message = "冻结开始时间不能为空", groups = { AddGroup.class, EditGroup.class }) + private Date freezeStartTime; + + /** + * 冻结结束时间 + */ + @NotNull(message = "冻结结束时间不能为空", groups = { AddGroup.class, EditGroup.class }) + private Date freezeEndTime; + + /** + * 供应商主类型 + */ + @NotBlank(message = "供应商主类型不能为空", groups = { AddGroup.class, EditGroup.class }) + private String supplierMainType; + + /** + * 默认财务组织 + */ + @NotBlank(message = "默认财务组织不能为空", groups = { AddGroup.class, EditGroup.class }) + private String defaultFinanceOrganization; + + /** + * 投标状态 + */ + @NotBlank(message = "投标状态不能为空", groups = { AddGroup.class, EditGroup.class }) + private String biddingStatus; + + /** + * 服务区域 + */ + @NotBlank(message = "服务区域不能为空", groups = { AddGroup.class, EditGroup.class }) + private String serviceArea; + + /** + * 合格有效期 + */ + @NotNull(message = "合格有效期不能为空", groups = { AddGroup.class, EditGroup.class }) + private Date qualificationValidity; + + /** + * 考核小组组长 + */ + @NotBlank(message = "考核小组组长不能为空", groups = { AddGroup.class, EditGroup.class }) + private String assessmentTeamLeader; + + /** + * 考核小组成员 + */ + @NotBlank(message = "考核小组成员不能为空", groups = { AddGroup.class, EditGroup.class }) + private String assessmentTeamMembers; + + /** + * 备案组织 + */ + @NotBlank(message = "备案组织不能为空", groups = { AddGroup.class, EditGroup.class }) + private String recordOrganization; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSupplyMaterialsBo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSupplyMaterialsBo.java new file mode 100644 index 00000000..f26ed697 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/bo/XzdSupplyMaterialsBo.java @@ -0,0 +1,124 @@ +package org.dromara.xzd.domain.bo; + +import org.dromara.xzd.domain.XzdSupplyMaterials; +import org.dromara.common.mybatis.core.domain.BaseEntity; +import org.dromara.common.core.validate.AddGroup; +import org.dromara.common.core.validate.EditGroup; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import jakarta.validation.constraints.*; + +/** + * 供应物料业务对象 _xzd_supply_materials + * + * @author Lion Li + * @date 2025-09-30 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = XzdSupplyMaterials.class, reverseConvertGenerate = false) +public class XzdSupplyMaterialsBo extends BaseEntity { + + /** + * + */ + @NotNull(message = "不能为空", groups = { EditGroup.class }) + private Long id; + + /** + * 供应商ID + */ + private Long supplierId; + + /** + * 资源分类 + */ + @NotBlank(message = "资源分类不能为空", groups = { AddGroup.class, EditGroup.class }) + private String resourceCategory; + + /** + * SKU编码 + */ + @NotBlank(message = "SKU编码不能为空", groups = { AddGroup.class, EditGroup.class }) + private String skuCode; + + /** + * SKU名称 + */ + @NotBlank(message = "SKU名称不能为空", groups = { AddGroup.class, EditGroup.class }) + private String skuName; + + /** + * 规格 + */ + @NotBlank(message = "规格不能为空", groups = { AddGroup.class, EditGroup.class }) + private String specification; + + /** + * 计量单位 + */ + @NotBlank(message = "计量单位不能为空", groups = { AddGroup.class, EditGroup.class }) + private String unitOfMeasure; + + /** + * 供应商方物料编码 + */ + @NotBlank(message = "供应商方物料编码不能为空", groups = { AddGroup.class, EditGroup.class }) + private String supplierMaterialCode; + + /** + * 供应商方物料名称 + */ + @NotBlank(message = "供应商方物料名称不能为空", groups = { AddGroup.class, EditGroup.class }) + private String supplierMaterialName; + + /** + * 供应商方物料条形码 + */ + @NotBlank(message = "供应商方物料条形码不能为空", groups = { AddGroup.class, EditGroup.class }) + private String supplierMaterialBarcode; + + /** + * 含税单价 + */ + @NotNull(message = "含税单价不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long taxInclusiveUnitPrice; + + /** + * 配额(%) + */ + @NotNull(message = "配额(%)不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long quota; + + /** + * 换货率(%) + */ + @NotNull(message = "换货率(%)不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long exchangeRate; + + /** + * 换货周期(天) + */ + @NotNull(message = "换货周期(天)不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long exchangeCycle; + + /** + * 交货周期(天) + */ + @NotNull(message = "交货周期(天)不能为空", groups = { AddGroup.class, EditGroup.class }) + private Long deliveryCycle; + + /** + * 付款条件 + */ + @NotBlank(message = "付款条件不能为空", groups = { AddGroup.class, EditGroup.class }) + private String paymentTerms; + + /** + * 备注 + */ + private String remarks; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdCustomertypeVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdCustomertypeVo.java index a75428cf..3ace3bcb 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdCustomertypeVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdCustomertypeVo.java @@ -11,7 +11,7 @@ import lombok.Data; import java.io.Serial; import java.io.Serializable; import java.util.Date; - +import java.util.List; /** @@ -65,5 +65,9 @@ public class XzdCustomertypeVo implements Serializable { @ExcelProperty(value = "客户类型") private String customerType; + /** + * 子节点 + */ + List children; } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSupplierEvaluationVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSupplierEvaluationVo.java new file mode 100644 index 00000000..22ce5dc6 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSupplierEvaluationVo.java @@ -0,0 +1,75 @@ +package org.dromara.xzd.domain.vo; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.dromara.xzd.domain.XzdSupplierEvaluation; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 供应商评价视图对象 xzd_supplier_evaluation + * + * @author Lion Li + * @date 2025-09-30 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = XzdSupplierEvaluation.class) +public class XzdSupplierEvaluationVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + private Long id; + + /** + * 供应商ID + */ + private Long supplierId; + + /** + * 评价类型 + */ + @ExcelProperty(value = "评价类型") + private String evaluationType; + + /** + * 评价内容 + */ + @ExcelProperty(value = "评价内容") + private String evaluationContent; + + /** + * 评价结果 + */ + @ExcelProperty(value = "评价结果") + private String evaluationResult; + + /** + * 评价人 + */ + @ExcelProperty(value = "评价人") + private String evaluator; + + /** + * 评价时间 + */ + @ExcelProperty(value = "评价时间") + private Date evaluationTime; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSupplierInfoVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSupplierInfoVo.java new file mode 100644 index 00000000..426716e5 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSupplierInfoVo.java @@ -0,0 +1,417 @@ +package org.dromara.xzd.domain.vo; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.dromara.xzd.domain.*; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 供应商信息视图对象 xzd_supplier_info + * + * @author Lion Li + * @date 2025-09-30 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = XzdSupplierInfo.class) +public class XzdSupplierInfoVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + private Long id; + + /** + * 单位编号 + */ + @ExcelProperty(value = "单位编号") + private String unitCode; + + /** + * 单位名称 + */ + @ExcelProperty(value = "单位名称") + private String unitName; + + /** + * 单位属性(字典) + */ + @ExcelProperty(value = "单位属性", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "字=典") + private String unitProperty; + + /** + * 简称 + */ + @ExcelProperty(value = "简称") + private String abbreviation; + + /** + * 英文简称 + */ + @ExcelProperty(value = "英文简称") + private String englishAbbreviation; + + /** + * 助记码 + */ + @ExcelProperty(value = "助记码") + private String mnemonicCode; + + /** + * 统一社会信用代码 + */ + @ExcelProperty(value = "统一社会信用代码") + private String unifiedSocialCreditCode; + + /** + * 税务登记号 + */ + @ExcelProperty(value = "税务登记号") + private String taxRegistrationNumber; + + /** + * 证件类型 + */ + @ExcelProperty(value = "证件类型") + private String certificateType; + + /** + * 证件编号 + */ + @ExcelProperty(value = "证件编号") + private String certificateNumber; + + /** + * 国家 + */ + @ExcelProperty(value = "国家") + private String country; + + /** + * 省 + */ + @ExcelProperty(value = "省") + private String province; + + /** + * 市 + */ + @ExcelProperty(value = "市") + private String city; + + /** + * 区县 + */ + @ExcelProperty(value = "区县") + private String districtCounty; + + /** + * 行业类型 + */ + @ExcelProperty(value = "行业类型") + private String industryType; + + /** + * 上级单位 + */ + @ExcelProperty(value = "上级单位") + private String superiorUnit; + + /** + * 集团供应商(0=否,1=是) + */ + @ExcelProperty(value = "集团供应商", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "0==否,1=是") + private Long isGroupSupplier; + + /** + * 工商变更时间 + */ + @ExcelProperty(value = "工商变更时间") + private Date industrialCommercialChangeTime; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remarks; + + /** + * 内部(0=否,1=是) + */ + @ExcelProperty(value = "内部", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "0==否,1=是") + private Long isInternal; + + /** + * 黑名单(0=否,1=是) + */ + @ExcelProperty(value = "黑名单", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "0==否,1=是") + private Long isBlacklist; + + /** + * 自动生成客户(0=否,1=是) + */ + @ExcelProperty(value = "自动生成客户", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "0==否,1=是") + private Long isAutoGenerateCustomer; + + /** + * 单位成立日期 + */ + @ExcelProperty(value = "单位成立日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date establishmentDate; + + /** + * 纳税身份类型(字典) + */ + @ExcelProperty(value = "纳税身份类型", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "字=典") + private String taxIdentityType; + + /** + * 纳税人名称 + */ + @ExcelProperty(value = "纳税人名称") + private String taxpayerName; + + /** + * 税务银行行号 + */ + @ExcelProperty(value = "税务银行行号") + private String taxBankCode; + + /** + * 税务银行名称 + */ + @ExcelProperty(value = "税务银行名称") + private String taxBankName; + + /** + * 税务登记账号 + */ + @ExcelProperty(value = "税务登记账号") + private String taxRegistrationAccount; + + /** + * 税务登记地址 + */ + @ExcelProperty(value = "税务登记地址") + private String taxRegistrationAddress; + + /** + * 税务登记电话 + */ + @ExcelProperty(value = "税务登记电话") + private String taxRegistrationPhone; + + /** + * 注册资金 + */ + @ExcelProperty(value = "注册资金") + private Long registeredCapital; + + /** + * 注册时间 + */ + @ExcelProperty(value = "注册时间") + private Date registrationTime; + + /** + * 法人代表 + */ + @ExcelProperty(value = "法人代表") + private String legalRepresentative; + + /** + * 营业范围 + */ + @ExcelProperty(value = "营业范围") + private String businessScope; + + /** + * 币种(字典) + */ + @ExcelProperty(value = "币种", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "字=典") + private String currency; + + /** + * 行业地位(字典) + */ + @ExcelProperty(value = "行业地位", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "字=典") + private String industryPosition; + + /** + * 企业性质(字典) + */ + @ExcelProperty(value = "企业性质", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "字=典") + private String enterpriseNature; + + /** + * 规模(字典) + */ + @ExcelProperty(value = "规模", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "字=典") + private String scale; + + /** + * 网址 + */ + @ExcelProperty(value = "网址") + private String website; + + /** + * 邮箱 + */ + @ExcelProperty(value = "邮箱") + private String email; + + /** + * 资质信息 + */ + private List qualifications; + + /** + * 所属组织 + */ + private String sszz; + + /** + * 供应商补充信息 + */ + private XzdSupplierSupplement supplement; + /** + * 分管部门 + */ + private String fgbm; + /** + * 分管业务员 + */ + private String fgywy; + /** + * 供应商状态 + */ + private String gyszt; + /** + * 供应商类型 + */ + private String gyslx; + /** + * 供应商等级 + */ + private String gysdj; + /** + * 审核标志(0:未审核,1:已审核) + */ + private String shbz; + /** + * 冻结标志(0:未冻结,1:已冻结) + */ + private String djbz; + /** + * 投标状态 + */ + private String tbzt; + + /** + * 地址信息 + */ + private List addresses; + + /** + * 联系人信息 + */ + private List contacts; + /** + * 主联系人姓名 + */ + private String zlxrxm; + /** + * 主联系人手机 + */ + private String zlxrsj; + /** + * 主联系人地址 + */ + private String zlxrdz; + + /** + * 证照信息 + */ + private List certificates; + + /** + * 结算信息 + */ + private XzdSettlementInfo settlement; + + /** + * 开户银行 + */ + private String khyh; + + /** + * 开户行账号 + */ + private String khhzh; + + /** + * 创建者 + */ + private String createByUser; + private Long createBy; + private Date createTime; + private Date updateTime; + + /** + * 业务信息 + */ + private XzdBusinessInfo business; + + /** + * 供应商类型 + */ + private List customerTypes; + + /** + * 供应物料 + */ + private List materials; + + /** + * 供应商评价 + */ + private List evaluations; + + /** + * 项目信息 + */ + private List projects; + + /** + * 合同信息 + */ + private List contracts; + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSupplierQualificationVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSupplierQualificationVo.java new file mode 100644 index 00000000..26eec7f8 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSupplierQualificationVo.java @@ -0,0 +1,82 @@ +package org.dromara.xzd.domain.vo; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.dromara.xzd.domain.XzdSupplierQualification; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 供应商资质信息视图对象 xzd_supplier_qualification + * + * @author Lion Li + * @date 2025-09-30 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = XzdSupplierQualification.class) +public class XzdSupplierQualificationVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + private Long id; + + /** + * 供应商ID + */ + @ExcelProperty(value = "供应商ID") + private Long supplierId; + + /** + * 资质名称 + */ + @ExcelProperty(value = "资质名称") + private String name; + + /** + * 资质起始日期 + */ + @ExcelProperty(value = "资质起始日期") + private Date beginTime; + + /** + * 资质到期日期 + */ + @ExcelProperty(value = "资质到期日期") + private Date endTime; + + /** + * 文件路径 + */ + @ExcelProperty(value = "文件路径") + private String fileUrl; + + /** + * 文件ID + */ + @ExcelProperty(value = "文件ID") + private Long fileId; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remark; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSupplierSupplementVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSupplierSupplementVo.java new file mode 100644 index 00000000..b14cfd6f --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSupplierSupplementVo.java @@ -0,0 +1,161 @@ +package org.dromara.xzd.domain.vo; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.dromara.xzd.domain.XzdSupplierSupplement; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 供应商信息补充视图对象 xzd_supplier_supplement + * + * @author Lion Li + * @date 2025-09-30 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = XzdSupplierSupplement.class) +public class XzdSupplierSupplementVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + private Long id; + + /** + * 供应商ID + */ + private Long supplierId; + + /** + * 供应商状态 + */ + @ExcelProperty(value = "供应商状态") + private String supplierStatus; + + /** + * 供应商等级 + */ + @ExcelProperty(value = "供应商等级") + private String supplierLevel; + + /** + * 分管部门 + */ + @ExcelProperty(value = "分管部门") + private String responsibleDepartment; + + /** + * 分管业务员 + */ + @ExcelProperty(value = "分管业务员") + private String responsibleSalesman; + + /** + * 归属组织 + */ + @ExcelProperty(value = "归属组织") + private String belongingOrganization; + + /** + * 创建者 + */ + @ExcelProperty(value = "创建者") + private String creator; + + /** + * 创建日期 + */ + @ExcelProperty(value = "创建日期") + private Date createDate; + + /** + * 审核标志(0:未审核,1:已审核) + */ + @ExcelProperty(value = "审核标志", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "0=:未审核,1:已审核") + private Long auditFlag; + + /** + * 冻结标志(0:未冻结,1:已冻结) + */ + @ExcelProperty(value = "冻结标志", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "0=:未冻结,1:已冻结") + private Long freezeFlag; + + /** + * 冻结开始时间 + */ + @ExcelProperty(value = "冻结开始时间") + private Date freezeStartTime; + + /** + * 冻结结束时间 + */ + @ExcelProperty(value = "冻结结束时间") + private Date freezeEndTime; + + /** + * 供应商主类型 + */ + @ExcelProperty(value = "供应商主类型") + private String supplierMainType; + + /** + * 默认财务组织 + */ + @ExcelProperty(value = "默认财务组织") + private String defaultFinanceOrganization; + + /** + * 投标状态 + */ + @ExcelProperty(value = "投标状态") + private String biddingStatus; + + /** + * 服务区域 + */ + @ExcelProperty(value = "服务区域") + private String serviceArea; + + /** + * 合格有效期 + */ + @ExcelProperty(value = "合格有效期") + private Date qualificationValidity; + + /** + * 考核小组组长 + */ + @ExcelProperty(value = "考核小组组长") + private String assessmentTeamLeader; + + /** + * 考核小组成员 + */ + @ExcelProperty(value = "考核小组成员") + private String assessmentTeamMembers; + + /** + * 备案组织 + */ + @ExcelProperty(value = "备案组织") + private String recordOrganization; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSupplyMaterialsVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSupplyMaterialsVo.java new file mode 100644 index 00000000..9918cef4 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/domain/vo/XzdSupplyMaterialsVo.java @@ -0,0 +1,133 @@ +package org.dromara.xzd.domain.vo; + +import org.dromara.xzd.domain.XzdSupplyMaterials; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + + +/** + * 供应物料视图对象 _xzd_supply_materials + * + * @author Lion Li + * @date 2025-09-30 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = XzdSupplyMaterials.class) +public class XzdSupplyMaterialsVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + private Long id; + + /** + * 供应商ID + */ + private Long supplierId; + + /** + * 资源分类 + */ + @ExcelProperty(value = "资源分类") + private String resourceCategory; + + /** + * SKU编码 + */ + @ExcelProperty(value = "SKU编码") + private String skuCode; + + /** + * SKU名称 + */ + @ExcelProperty(value = "SKU名称") + private String skuName; + + /** + * 规格 + */ + @ExcelProperty(value = "规格") + private String specification; + + /** + * 计量单位 + */ + @ExcelProperty(value = "计量单位") + private String unitOfMeasure; + + /** + * 供应商方物料编码 + */ + @ExcelProperty(value = "供应商方物料编码") + private String supplierMaterialCode; + + /** + * 供应商方物料名称 + */ + @ExcelProperty(value = "供应商方物料名称") + private String supplierMaterialName; + + /** + * 供应商方物料条形码 + */ + @ExcelProperty(value = "供应商方物料条形码") + private String supplierMaterialBarcode; + + /** + * 含税单价 + */ + @ExcelProperty(value = "含税单价") + private Long taxInclusiveUnitPrice; + + /** + * 配额(%) + */ + @ExcelProperty(value = "配额(%)") + private Long quota; + + /** + * 换货率(%) + */ + @ExcelProperty(value = "换货率(%)") + private Long exchangeRate; + + /** + * 换货周期(天) + */ + @ExcelProperty(value = "换货周期(天)") + private Long exchangeCycle; + + /** + * 交货周期(天) + */ + @ExcelProperty(value = "交货周期(天)") + private Long deliveryCycle; + + /** + * 付款条件 + */ + @ExcelProperty(value = "付款条件") + private String paymentTerms; + + /** + * 备注 + */ + @ExcelProperty(value = "备注") + private String remarks; + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/mapper/XzdSupplierEvaluationMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/mapper/XzdSupplierEvaluationMapper.java new file mode 100644 index 00000000..7e358c95 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/mapper/XzdSupplierEvaluationMapper.java @@ -0,0 +1,15 @@ +package org.dromara.xzd.mapper; + +import org.dromara.xzd.domain.XzdSupplierEvaluation; +import org.dromara.xzd.domain.vo.XzdSupplierEvaluationVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 供应商评价Mapper接口 + * + * @author Lion Li + * @date 2025-09-30 + */ +public interface XzdSupplierEvaluationMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/mapper/XzdSupplierInfoMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/mapper/XzdSupplierInfoMapper.java new file mode 100644 index 00000000..35aec25b --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/mapper/XzdSupplierInfoMapper.java @@ -0,0 +1,25 @@ +package org.dromara.xzd.mapper; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.xzd.domain.XzdSupplierInfo; +import org.dromara.xzd.domain.bo.XzdSupplierInfoBo; +import org.dromara.xzd.domain.vo.XzdSupplierInfoVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +import java.util.List; + +/** + * 供应商信息Mapper接口 + * + * @author Lion Li + * @date 2025-09-30 + */ +public interface XzdSupplierInfoMapper extends BaseMapperPlus { + + List search(@Param("bo")XzdSupplierInfoBo bo); + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/mapper/XzdSupplierQualificationMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/mapper/XzdSupplierQualificationMapper.java new file mode 100644 index 00000000..eb82bf71 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/mapper/XzdSupplierQualificationMapper.java @@ -0,0 +1,15 @@ +package org.dromara.xzd.mapper; + +import org.dromara.xzd.domain.XzdSupplierQualification; +import org.dromara.xzd.domain.vo.XzdSupplierQualificationVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 供应商资质信息Mapper接口 + * + * @author Lion Li + * @date 2025-09-30 + */ +public interface XzdSupplierQualificationMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/mapper/XzdSupplierSupplementMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/mapper/XzdSupplierSupplementMapper.java new file mode 100644 index 00000000..a1f91de7 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/mapper/XzdSupplierSupplementMapper.java @@ -0,0 +1,15 @@ +package org.dromara.xzd.mapper; + +import org.dromara.xzd.domain.XzdSupplierSupplement; +import org.dromara.xzd.domain.vo.XzdSupplierSupplementVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 供应商信息补充Mapper接口 + * + * @author Lion Li + * @date 2025-09-30 + */ +public interface XzdSupplierSupplementMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/mapper/XzdSupplyMaterialsMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/mapper/XzdSupplyMaterialsMapper.java new file mode 100644 index 00000000..a575b151 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/mapper/XzdSupplyMaterialsMapper.java @@ -0,0 +1,15 @@ +package org.dromara.xzd.mapper; + +import org.dromara.xzd.domain.XzdSupplyMaterials; +import org.dromara.xzd.domain.vo.XzdSupplyMaterialsVo; +import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; + +/** + * 供应物料Mapper接口 + * + * @author Lion Li + * @date 2025-09-30 + */ +public interface XzdSupplyMaterialsMapper extends BaseMapperPlus { + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdSupplierEvaluationService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdSupplierEvaluationService.java new file mode 100644 index 00000000..22888db6 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdSupplierEvaluationService.java @@ -0,0 +1,70 @@ +package org.dromara.xzd.service; + +import org.dromara.xzd.domain.vo.XzdSupplierEvaluationVo; +import org.dromara.xzd.domain.bo.XzdSupplierEvaluationBo; +import org.dromara.xzd.domain.XzdSupplierEvaluation; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.Collection; +import java.util.List; + +/** + * 供应商评价Service接口 + * + * @author Lion Li + * @date 2025-09-30 + */ +public interface IXzdSupplierEvaluationService extends IService{ + + /** + * 查询供应商评价 + * + * @param id 主键 + * @return 供应商评价 + */ + XzdSupplierEvaluationVo queryById(Long id); + + /** + * 分页查询供应商评价列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 供应商评价分页列表 + */ + TableDataInfo queryPageList(XzdSupplierEvaluationBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的供应商评价列表 + * + * @param bo 查询条件 + * @return 供应商评价列表 + */ + List queryList(XzdSupplierEvaluationBo bo); + + /** + * 新增供应商评价 + * + * @param bo 供应商评价 + * @return 是否新增成功 + */ + Boolean insertByBo(XzdSupplierEvaluationBo bo); + + /** + * 修改供应商评价 + * + * @param bo 供应商评价 + * @return 是否修改成功 + */ + Boolean updateByBo(XzdSupplierEvaluationBo bo); + + /** + * 校验并批量删除供应商评价信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdSupplierInfoService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdSupplierInfoService.java new file mode 100644 index 00000000..9df420e6 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdSupplierInfoService.java @@ -0,0 +1,76 @@ +package org.dromara.xzd.service; + +import org.dromara.common.core.domain.R; +import org.dromara.xzd.domain.vo.XzdCustomertypeInfoVo; +import org.dromara.xzd.domain.vo.XzdCustomertypeVo; +import org.dromara.xzd.domain.vo.XzdSupplierInfoVo; +import org.dromara.xzd.domain.bo.XzdSupplierInfoBo; +import org.dromara.xzd.domain.XzdSupplierInfo; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.Collection; +import java.util.List; + +/** + * 供应商信息Service接口 + * + * @author Lion Li + * @date 2025-09-30 + */ +public interface IXzdSupplierInfoService extends IService{ + + /** + * 查询供应商信息 + * + * @param id 主键 + * @return 供应商信息 + */ + XzdSupplierInfoVo queryById(Long id); + + /** + * 分页查询供应商信息列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 供应商信息分页列表 + */ + TableDataInfo queryPageList(XzdSupplierInfoBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的供应商信息列表 + * + * @param bo 查询条件 + * @return 供应商信息列表 + */ + List queryList(XzdSupplierInfoBo bo); + + /** + * 新增供应商信息 + * + * @param bo 供应商信息 + * @return 是否新增成功 + */ + Boolean insertByBo(XzdSupplierInfoBo bo); + + /** + * 修改供应商信息 + * + * @param bo 供应商信息 + * @return 是否修改成功 + */ + Boolean updateByBo(XzdSupplierInfoBo bo); + + /** + * 校验并批量删除供应商信息信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); + + R> typeList(); + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdSupplierQualificationService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdSupplierQualificationService.java new file mode 100644 index 00000000..b98b807a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdSupplierQualificationService.java @@ -0,0 +1,70 @@ +package org.dromara.xzd.service; + +import org.dromara.xzd.domain.vo.XzdSupplierQualificationVo; +import org.dromara.xzd.domain.bo.XzdSupplierQualificationBo; +import org.dromara.xzd.domain.XzdSupplierQualification; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.Collection; +import java.util.List; + +/** + * 供应商资质信息Service接口 + * + * @author Lion Li + * @date 2025-09-30 + */ +public interface IXzdSupplierQualificationService extends IService{ + + /** + * 查询供应商资质信息 + * + * @param id 主键 + * @return 供应商资质信息 + */ + XzdSupplierQualificationVo queryById(Long id); + + /** + * 分页查询供应商资质信息列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 供应商资质信息分页列表 + */ + TableDataInfo queryPageList(XzdSupplierQualificationBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的供应商资质信息列表 + * + * @param bo 查询条件 + * @return 供应商资质信息列表 + */ + List queryList(XzdSupplierQualificationBo bo); + + /** + * 新增供应商资质信息 + * + * @param bo 供应商资质信息 + * @return 是否新增成功 + */ + Boolean insertByBo(XzdSupplierQualificationBo bo); + + /** + * 修改供应商资质信息 + * + * @param bo 供应商资质信息 + * @return 是否修改成功 + */ + Boolean updateByBo(XzdSupplierQualificationBo bo); + + /** + * 校验并批量删除供应商资质信息信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdSupplierSupplementService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdSupplierSupplementService.java new file mode 100644 index 00000000..b591c44a --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdSupplierSupplementService.java @@ -0,0 +1,70 @@ +package org.dromara.xzd.service; + +import org.dromara.xzd.domain.vo.XzdSupplierSupplementVo; +import org.dromara.xzd.domain.bo.XzdSupplierSupplementBo; +import org.dromara.xzd.domain.XzdSupplierSupplement; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.Collection; +import java.util.List; + +/** + * 供应商信息补充Service接口 + * + * @author Lion Li + * @date 2025-09-30 + */ +public interface IXzdSupplierSupplementService extends IService{ + + /** + * 查询供应商信息补充 + * + * @param id 主键 + * @return 供应商信息补充 + */ + XzdSupplierSupplementVo queryById(Long id); + + /** + * 分页查询供应商信息补充列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 供应商信息补充分页列表 + */ + TableDataInfo queryPageList(XzdSupplierSupplementBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的供应商信息补充列表 + * + * @param bo 查询条件 + * @return 供应商信息补充列表 + */ + List queryList(XzdSupplierSupplementBo bo); + + /** + * 新增供应商信息补充 + * + * @param bo 供应商信息补充 + * @return 是否新增成功 + */ + Boolean insertByBo(XzdSupplierSupplementBo bo); + + /** + * 修改供应商信息补充 + * + * @param bo 供应商信息补充 + * @return 是否修改成功 + */ + Boolean updateByBo(XzdSupplierSupplementBo bo); + + /** + * 校验并批量删除供应商信息补充信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdSupplyMaterialsService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdSupplyMaterialsService.java new file mode 100644 index 00000000..c5208366 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/IXzdSupplyMaterialsService.java @@ -0,0 +1,70 @@ +package org.dromara.xzd.service; + +import org.dromara.xzd.domain.vo.XzdSupplyMaterialsVo; +import org.dromara.xzd.domain.bo.XzdSupplyMaterialsBo; +import org.dromara.xzd.domain.XzdSupplyMaterials; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; + +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.Collection; +import java.util.List; + +/** + * 供应物料Service接口 + * + * @author Lion Li + * @date 2025-09-30 + */ +public interface IXzdSupplyMaterialsService extends IService{ + + /** + * 查询供应物料 + * + * @param id 主键 + * @return 供应物料 + */ + XzdSupplyMaterialsVo queryById(Long id); + + /** + * 分页查询供应物料列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 供应物料分页列表 + */ + TableDataInfo queryPageList(XzdSupplyMaterialsBo bo, PageQuery pageQuery); + + /** + * 查询符合条件的供应物料列表 + * + * @param bo 查询条件 + * @return 供应物料列表 + */ + List queryList(XzdSupplyMaterialsBo bo); + + /** + * 新增供应物料 + * + * @param bo 供应物料 + * @return 是否新增成功 + */ + Boolean insertByBo(XzdSupplyMaterialsBo bo); + + /** + * 修改供应物料 + * + * @param bo 供应物料 + * @return 是否修改成功 + */ + Boolean updateByBo(XzdSupplyMaterialsBo bo); + + /** + * 校验并批量删除供应物料信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + Boolean deleteWithValidByIds(Collection ids, Boolean isValid); +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplierEvaluationServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplierEvaluationServiceImpl.java new file mode 100644 index 00000000..30f48442 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplierEvaluationServiceImpl.java @@ -0,0 +1,135 @@ +package org.dromara.xzd.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; +import org.dromara.xzd.domain.bo.XzdSupplierEvaluationBo; +import org.dromara.xzd.domain.vo.XzdSupplierEvaluationVo; +import org.dromara.xzd.domain.XzdSupplierEvaluation; +import org.dromara.xzd.mapper.XzdSupplierEvaluationMapper; +import org.dromara.xzd.service.IXzdSupplierEvaluationService; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 供应商评价Service业务层处理 + * + * @author Lion Li + * @date 2025-09-30 + */ +@RequiredArgsConstructor +@Service +public class XzdSupplierEvaluationServiceImpl extends ServiceImpl implements IXzdSupplierEvaluationService { + + private final XzdSupplierEvaluationMapper baseMapper; + + /** + * 查询供应商评价 + * + * @param id 主键 + * @return 供应商评价 + */ + @Override + public XzdSupplierEvaluationVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询供应商评价列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 供应商评价分页列表 + */ + @Override + public TableDataInfo queryPageList(XzdSupplierEvaluationBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的供应商评价列表 + * + * @param bo 查询条件 + * @return 供应商评价列表 + */ + @Override + public List queryList(XzdSupplierEvaluationBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdSupplierEvaluationBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(XzdSupplierEvaluation::getId); + lqw.eq(StringUtils.isNotBlank(bo.getEvaluationType()), XzdSupplierEvaluation::getEvaluationType, bo.getEvaluationType()); + lqw.eq(StringUtils.isNotBlank(bo.getEvaluationContent()), XzdSupplierEvaluation::getEvaluationContent, bo.getEvaluationContent()); + lqw.eq(StringUtils.isNotBlank(bo.getEvaluationResult()), XzdSupplierEvaluation::getEvaluationResult, bo.getEvaluationResult()); + lqw.eq(StringUtils.isNotBlank(bo.getEvaluator()), XzdSupplierEvaluation::getEvaluator, bo.getEvaluator()); + lqw.eq(bo.getEvaluationTime() != null, XzdSupplierEvaluation::getEvaluationTime, bo.getEvaluationTime()); + return lqw; + } + + /** + * 新增供应商评价 + * + * @param bo 供应商评价 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(XzdSupplierEvaluationBo bo) { + XzdSupplierEvaluation add = MapstructUtils.convert(bo, XzdSupplierEvaluation.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改供应商评价 + * + * @param bo 供应商评价 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(XzdSupplierEvaluationBo bo) { + XzdSupplierEvaluation update = MapstructUtils.convert(bo, XzdSupplierEvaluation.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(XzdSupplierEvaluation entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除供应商评价信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplierInfoServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplierInfoServiceImpl.java new file mode 100644 index 00000000..9c18d6ad --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplierInfoServiceImpl.java @@ -0,0 +1,762 @@ +package org.dromara.xzd.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.dromara.common.core.domain.R; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.dromara.common.satoken.utils.LoginHelper; +import org.dromara.system.domain.vo.SysUserVo; +import org.dromara.system.service.impl.SysOssServiceImpl; +import org.dromara.system.service.impl.SysUserServiceImpl; +import org.dromara.xzd.domain.*; +import org.dromara.xzd.domain.bo.XzdSupplierQualificationBo; +import org.dromara.xzd.domain.vo.XzdCustomertypeInfoVo; +import org.dromara.xzd.domain.vo.XzdCustomertypeVo; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.dromara.xzd.domain.bo.XzdSupplierInfoBo; +import org.dromara.xzd.domain.vo.XzdSupplierInfoVo; +import org.dromara.xzd.mapper.XzdSupplierInfoMapper; +import org.dromara.xzd.service.IXzdSupplierInfoService; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 供应商信息Service业务层处理 + * + * @author Lion Li + * @date 2025-09-30 + */ +@RequiredArgsConstructor +@Service +public class XzdSupplierInfoServiceImpl extends ServiceImpl implements IXzdSupplierInfoService { + + private final XzdSupplierInfoMapper baseMapper; + + @Autowired + private XzdSupplierQualificationServiceImpl xzdSupplierQualificationService; + @Autowired + private XzdSupplierSupplementServiceImpl xzdSupplierSupplementService; + @Autowired + private XzdAddressInfoServiceImpl xzdAddressInfoService; + @Autowired + private XzdContactServiceImpl xzdContactService; + @Autowired + private XzdCertificateInfoServiceImpl xzdCertificateInfoService; + @Autowired + private XzdSettlementInfoServiceImpl xzdSettlementInfoService; + @Autowired + private XzdBusinessInfoServiceImpl xzdBusinessInfoService; + @Autowired + private XzdCustomertypeInfoServiceImpl xzdCustomertypeInfoService; + @Autowired + private XzdSupplyMaterialsServiceImpl xzdSupplyMaterialsService; + @Autowired + private XzdSupplierEvaluationServiceImpl xzdSupplierEvaluationService; + @Autowired + private XzdProjectInfoServiceImpl xzdProjectInfoService; + @Autowired + private XzdContractInfoServiceImpl xzdContractInfoService; + @Autowired + private XzdCustomertypeServiceImpl xzdCustomertypeService; + + @Autowired + private SysUserServiceImpl sysUserService; + @Autowired + private SysOssServiceImpl sysOssService; + + /** + * 查询供应商信息 + * + * @param id 主键 + * @return 供应商信息 + */ + @Override + public XzdSupplierInfoVo queryById(Long id){ + XzdSupplierInfoVo xzdSupplierInfoVo = baseMapper.selectVoById(id); + List xzdSupplierInfoVo1 = List.of(xzdSupplierInfoVo); + setValue(xzdSupplierInfoVo1); + return xzdSupplierInfoVo1.getFirst(); + } + + /** + * 分页查询供应商信息列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 供应商信息分页列表 + */ + @Override + public TableDataInfo queryPageList(XzdSupplierInfoBo bo, PageQuery pageQuery) { + if(pageQuery.getPageNum() != null && pageQuery.getPageSize() != null) { + bo.setPageNum(pageQuery.getPageNum()); + bo.setPageSize(pageQuery.getPageSize()); + }else { + bo.setPageNum(1); + bo.setPageSize(10); + } + + int i = (bo.getPageNum() - 1) * bo.getPageSize(); + bo.setOffset(i); + + List xzdSupplierInfoVos = baseMapper.search(bo); + +// LambdaQueryWrapper lqw = buildQueryWrapper(bo); +// Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); +// setValue(result.getRecords()); + return TableDataInfo.build(xzdSupplierInfoVos); + } + + /** + * 查询符合条件的供应商信息列表 + * + * @param bo 查询条件 + * @return 供应商信息列表 + */ + @Override + public List queryList(XzdSupplierInfoBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdSupplierInfoBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(XzdSupplierInfo::getId); + lqw.eq(StringUtils.isNotBlank(bo.getUnitCode()), XzdSupplierInfo::getUnitCode, bo.getUnitCode()); + lqw.like(StringUtils.isNotBlank(bo.getUnitName()), XzdSupplierInfo::getUnitName, bo.getUnitName()); + lqw.eq(StringUtils.isNotBlank(bo.getUnitProperty()), XzdSupplierInfo::getUnitProperty, bo.getUnitProperty()); + lqw.eq(StringUtils.isNotBlank(bo.getAbbreviation()), XzdSupplierInfo::getAbbreviation, bo.getAbbreviation()); + lqw.eq(StringUtils.isNotBlank(bo.getEnglishAbbreviation()), XzdSupplierInfo::getEnglishAbbreviation, bo.getEnglishAbbreviation()); + lqw.eq(StringUtils.isNotBlank(bo.getMnemonicCode()), XzdSupplierInfo::getMnemonicCode, bo.getMnemonicCode()); + lqw.eq(StringUtils.isNotBlank(bo.getUnifiedSocialCreditCode()), XzdSupplierInfo::getUnifiedSocialCreditCode, bo.getUnifiedSocialCreditCode()); + lqw.eq(StringUtils.isNotBlank(bo.getTaxRegistrationNumber()), XzdSupplierInfo::getTaxRegistrationNumber, bo.getTaxRegistrationNumber()); + lqw.eq(StringUtils.isNotBlank(bo.getCertificateType()), XzdSupplierInfo::getCertificateType, bo.getCertificateType()); + lqw.eq(StringUtils.isNotBlank(bo.getCertificateNumber()), XzdSupplierInfo::getCertificateNumber, bo.getCertificateNumber()); + lqw.eq(StringUtils.isNotBlank(bo.getCountry()), XzdSupplierInfo::getCountry, bo.getCountry()); + lqw.eq(StringUtils.isNotBlank(bo.getProvince()), XzdSupplierInfo::getProvince, bo.getProvince()); + lqw.eq(StringUtils.isNotBlank(bo.getCity()), XzdSupplierInfo::getCity, bo.getCity()); + lqw.eq(StringUtils.isNotBlank(bo.getDistrictCounty()), XzdSupplierInfo::getDistrictCounty, bo.getDistrictCounty()); + lqw.eq(StringUtils.isNotBlank(bo.getIndustryType()), XzdSupplierInfo::getIndustryType, bo.getIndustryType()); + lqw.eq(StringUtils.isNotBlank(bo.getSuperiorUnit()), XzdSupplierInfo::getSuperiorUnit, bo.getSuperiorUnit()); + lqw.eq(bo.getIsGroupSupplier() != null, XzdSupplierInfo::getIsGroupSupplier, bo.getIsGroupSupplier()); + lqw.eq(bo.getIndustrialCommercialChangeTime() != null, XzdSupplierInfo::getIndustrialCommercialChangeTime, bo.getIndustrialCommercialChangeTime()); + lqw.eq(StringUtils.isNotBlank(bo.getRemarks()), XzdSupplierInfo::getRemarks, bo.getRemarks()); + lqw.eq(bo.getIsInternal() != null, XzdSupplierInfo::getIsInternal, bo.getIsInternal()); + lqw.eq(bo.getIsBlacklist() != null, XzdSupplierInfo::getIsBlacklist, bo.getIsBlacklist()); + lqw.eq(bo.getIsAutoGenerateCustomer() != null, XzdSupplierInfo::getIsAutoGenerateCustomer, bo.getIsAutoGenerateCustomer()); + lqw.eq(bo.getEstablishmentDate() != null, XzdSupplierInfo::getEstablishmentDate, bo.getEstablishmentDate()); + lqw.eq(StringUtils.isNotBlank(bo.getTaxIdentityType()), XzdSupplierInfo::getTaxIdentityType, bo.getTaxIdentityType()); + lqw.like(StringUtils.isNotBlank(bo.getTaxpayerName()), XzdSupplierInfo::getTaxpayerName, bo.getTaxpayerName()); + lqw.eq(StringUtils.isNotBlank(bo.getTaxBankCode()), XzdSupplierInfo::getTaxBankCode, bo.getTaxBankCode()); + lqw.like(StringUtils.isNotBlank(bo.getTaxBankName()), XzdSupplierInfo::getTaxBankName, bo.getTaxBankName()); + lqw.eq(StringUtils.isNotBlank(bo.getTaxRegistrationAccount()), XzdSupplierInfo::getTaxRegistrationAccount, bo.getTaxRegistrationAccount()); + lqw.eq(StringUtils.isNotBlank(bo.getTaxRegistrationAddress()), XzdSupplierInfo::getTaxRegistrationAddress, bo.getTaxRegistrationAddress()); + lqw.eq(StringUtils.isNotBlank(bo.getTaxRegistrationPhone()), XzdSupplierInfo::getTaxRegistrationPhone, bo.getTaxRegistrationPhone()); + lqw.eq(bo.getRegisteredCapital() != null, XzdSupplierInfo::getRegisteredCapital, bo.getRegisteredCapital()); + lqw.eq(bo.getRegistrationTime() != null, XzdSupplierInfo::getRegistrationTime, bo.getRegistrationTime()); + lqw.eq(StringUtils.isNotBlank(bo.getLegalRepresentative()), XzdSupplierInfo::getLegalRepresentative, bo.getLegalRepresentative()); + lqw.eq(StringUtils.isNotBlank(bo.getBusinessScope()), XzdSupplierInfo::getBusinessScope, bo.getBusinessScope()); + lqw.eq(StringUtils.isNotBlank(bo.getCurrency()), XzdSupplierInfo::getCurrency, bo.getCurrency()); + lqw.eq(StringUtils.isNotBlank(bo.getIndustryPosition()), XzdSupplierInfo::getIndustryPosition, bo.getIndustryPosition()); + lqw.eq(StringUtils.isNotBlank(bo.getEnterpriseNature()), XzdSupplierInfo::getEnterpriseNature, bo.getEnterpriseNature()); + lqw.eq(StringUtils.isNotBlank(bo.getScale()), XzdSupplierInfo::getScale, bo.getScale()); + lqw.eq(StringUtils.isNotBlank(bo.getWebsite()), XzdSupplierInfo::getWebsite, bo.getWebsite()); + lqw.eq(StringUtils.isNotBlank(bo.getEmail()), XzdSupplierInfo::getEmail, bo.getEmail()); + return lqw; + } + + /** + * 新增供应商信息 + * + * @param bo 供应商信息 + * @return 是否新增成功 + */ + @Transactional + @Override + public Boolean insertByBo(XzdSupplierInfoBo bo) { + XzdSupplierInfo add = MapstructUtils.convert(bo, XzdSupplierInfo.class); + validEntityBeforeSave(add); + + if (add == null){ + log.warn("转换对象类型失败"); + return false; + } + + boolean flag = baseMapper.insert(add) > 0; + if (!flag) { + return false; + } + bo.setId(add.getId()); + + //处理资质信息 + if (bo.getQualifications() != null && !bo.getQualifications().isEmpty()){ + for (XzdSupplierQualification qualification : bo.getQualifications()) { + qualification.setSupplierId(add.getId()); + } + xzdSupplierQualificationService.saveBatch(bo.getQualifications()); + } + + + //处理供应商信息补充 + if (bo.getSupplement() != null){ + bo.getSupplement().setSupplierId(add.getId()); + if (LoginHelper.getLoginUser() != null){ + bo.getSupplement().setCreator(LoginHelper.getLoginUser().getNickname()); + }else { + bo.getSupplement().setCreator("暂无"); + } + xzdSupplierSupplementService.save(bo.getSupplement()); + } + + + //处理地址信息 + if (bo.getAddresses()!= null && !bo.getAddresses().isEmpty()){ + for (XzdAddressInfo address : bo.getAddresses()) { + address.setType("2"); + address.setCustomerinformationId(add.getId()); + } + xzdAddressInfoService.saveBatch(bo.getAddresses()); + } + + //处理联系人信息 + if (bo.getContacts()!=null && !bo.getContacts().isEmpty()){ + for (XzdContact contact : bo.getContacts()) { + contact.setType("2"); + contact.setCustomerinformationId(add.getId()); + } + xzdContactService.saveBatch(bo.getContacts()); + } + + //处理证照信息 + if (bo.getCertificates()!= null && !bo.getCertificates().isEmpty()){ + for (XzdCertificateInfo certificate : bo.getCertificates()) { + certificate.setType("2"); + certificate.setCustomerinformationId(add.getId()); + } + xzdCertificateInfoService.saveBatch(bo.getCertificates()); + } + + //处理结算信息 + if (bo.getSettlement()!= null){ + bo.getSettlement().setType("2"); + bo.getSettlement().setCustomerinformationId(add.getId()); + xzdSettlementInfoService.save(bo.getSettlement()); + } + + //处理业务信息 + if (bo.getBusiness() != null){ + bo.getBusiness().setType("2"); + bo.getBusiness().setCustomerinformationId(add.getId()); + xzdBusinessInfoService.save(bo.getBusiness()); + } + + //处理供应商类型 + if (bo.getCustomerTypes() != null && !bo.getCustomerTypes().isEmpty()){ + for (XzdCustomertypeInfo customerType : bo.getCustomerTypes()) { + customerType.setType("2"); + customerType.setCustomerinformationId(add.getId()); + } + xzdCustomertypeInfoService.saveBatch(bo.getCustomerTypes()); + } + + //处理供应物料 + if (bo.getMaterials()!= null && !bo.getMaterials().isEmpty()){ + for (XzdSupplyMaterials material : bo.getMaterials()) { + material.setSupplierId(add.getId()); + } + xzdSupplyMaterialsService.saveBatch(bo.getMaterials()); + } + + //供应商评价 + if (bo.getEvaluations()!= null && !bo.getEvaluations().isEmpty()){ + for (XzdSupplierEvaluation evaluation : bo.getEvaluations()) { + evaluation.setSupplierId(add.getId()); + } + xzdSupplierEvaluationService.saveBatch(bo.getEvaluations()); + } + + //项目信息 + if (bo.getProjects()!= null && !bo.getProjects().isEmpty()){ + for (XzdProjectInfo project : bo.getProjects()) { + project.setCustomerinformationId(add.getId()); + project.setType("2"); + } + xzdProjectInfoService.saveBatch(bo.getProjects()); + } + + //合同信息 + if (bo.getContracts()!= null && !bo.getContracts().isEmpty()){ + for (XzdContractInfo contract : bo.getContracts()) { + contract.setType("2"); + contract.setCustomerinformationId(add.getId()); + } + xzdContractInfoService.saveBatch(bo.getContracts()); + } + + return true; + } + + /** + * 修改供应商信息 + * + * @param bo 供应商信息 + * @return 是否修改成功 + */ + @Override + @Transactional + public Boolean updateByBo(XzdSupplierInfoBo bo) { + XzdSupplierInfo update = MapstructUtils.convert(bo, XzdSupplierInfo.class); + validEntityBeforeSave(update); + boolean b = baseMapper.updateById(update) > 0; + + //处理资质信息更新 + List qualifications = bo.getQualifications(); + for (XzdSupplierQualification qualification : qualifications) { + qualification.setSupplierId(update.getId()); + } + xzdSupplierQualificationService.saveOrUpdateBatch(qualifications); + + //处理供应商信息补充 + if (bo.getSupplement() != null){ + bo.getSupplement().setSupplierId(update.getId()); + xzdSupplierSupplementService.saveOrUpdate(bo.getSupplement()); + } + + + //处理地址信息 + if (bo.getAddresses()!= null && !bo.getAddresses().isEmpty()){ + for (XzdAddressInfo address : bo.getAddresses()) { + address.setType("2"); + address.setCustomerinformationId(update.getId()); + } + xzdAddressInfoService.saveOrUpdateBatch(bo.getAddresses()); + } + + //处理联系人信息 + if (bo.getContacts()!=null && !bo.getContacts().isEmpty()){ + for (XzdContact contact : bo.getContacts()) { + contact.setType("2"); + contact.setCustomerinformationId(update.getId()); + } + xzdContactService.saveOrUpdateBatch(bo.getContacts()); + } + + //处理证照信息 + if (bo.getCertificates()!= null && !bo.getCertificates().isEmpty()){ + for (XzdCertificateInfo certificate : bo.getCertificates()) { + certificate.setType("2"); + certificate.setCustomerinformationId(update.getId()); + } + xzdCertificateInfoService.saveOrUpdateBatch(bo.getCertificates()); + } + + //处理结算信息 + if (bo.getSettlement()!= null){ + bo.getSettlement().setType("2"); + bo.getSettlement().setCustomerinformationId(update.getId()); + xzdSettlementInfoService.saveOrUpdate(bo.getSettlement()); + } + + //处理业务信息 + if (bo.getBusiness() != null){ + bo.getBusiness().setType("2"); + bo.getBusiness().setCustomerinformationId(update.getId()); + xzdBusinessInfoService.saveOrUpdate(bo.getBusiness()); + } + + //处理供应商类型 + if (bo.getCustomerTypes() != null && !bo.getCustomerTypes().isEmpty()){ + + //删除原来的再新增 + LambdaQueryWrapper xzdCustomertypeInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); + xzdCustomertypeInfoLambdaQueryWrapper.eq(XzdCustomertypeInfo::getType,"2"); + xzdCustomertypeInfoLambdaQueryWrapper.eq(XzdCustomertypeInfo::getCustomerinformationId, update.getId()); + xzdCustomertypeInfoService.remove(xzdCustomertypeInfoLambdaQueryWrapper); + + for (XzdCustomertypeInfo customerType : bo.getCustomerTypes()) { + customerType.setType("2"); + customerType.setCustomerinformationId(update.getId()); + } + xzdCustomertypeInfoService.saveBatch(bo.getCustomerTypes()); + } + + //处理供应物料 + if (bo.getMaterials()!= null && !bo.getMaterials().isEmpty()){ + for (XzdSupplyMaterials material : bo.getMaterials()) { + material.setSupplierId(update.getId()); + } + xzdSupplyMaterialsService.saveOrUpdateBatch(bo.getMaterials()); + } + + //供应商评价 + if (bo.getEvaluations()!= null && !bo.getEvaluations().isEmpty()){ + for (XzdSupplierEvaluation evaluation : bo.getEvaluations()) { + evaluation.setSupplierId(update.getId()); + } + xzdSupplierEvaluationService.saveOrUpdateBatch(bo.getEvaluations()); + } + + //项目信息 + if (bo.getProjects()!= null && !bo.getProjects().isEmpty()){ + for (XzdProjectInfo project : bo.getProjects()) { + project.setCustomerinformationId(update.getId()); + project.setType("2"); + } + xzdProjectInfoService.saveOrUpdateBatch(bo.getProjects()); + } + + //合同信息 + if (bo.getContracts()!= null && !bo.getContracts().isEmpty()){ + for (XzdContractInfo contract : bo.getContracts()) { + contract.setType("2"); + contract.setCustomerinformationId(update.getId()); + } + xzdContractInfoService.saveOrUpdateBatch(bo.getContracts()); + } + + return b; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(XzdSupplierInfo entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除供应商信息信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + @Transactional + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + boolean b = baseMapper.deleteByIds(ids) > 0; + + for (Long id : ids) { + + XzdSupplierInfoVo vo = baseMapper.selectVoById(id); + if(vo == null){ + continue; + } + + //删除资质新信息 + LambdaQueryWrapper qualificationLambdaQueryWrapper = new LambdaQueryWrapper<>(); + qualificationLambdaQueryWrapper.eq(XzdSupplierQualification::getSupplierId, id); + //删除附件 + List list1 = xzdSupplierQualificationService.list(qualificationLambdaQueryWrapper); + List fileIds = new ArrayList<>(); + for (XzdSupplierQualification qualification : list1) { + if (qualification.getFileId() != null){ + fileIds.add(qualification.getFileId()); + } + } + if (!fileIds.isEmpty()){ + sysOssService.deleteWithValidByIds(fileIds,false); + } + + xzdSupplierQualificationService.remove(qualificationLambdaQueryWrapper); + + + //删除供应商信息补充 + LambdaQueryWrapper supplementLambdaQueryWrapper = new LambdaQueryWrapper<>(); + supplementLambdaQueryWrapper.eq(XzdSupplierSupplement::getSupplierId, id); + xzdSupplierSupplementService.remove(supplementLambdaQueryWrapper); + + //删除地址信息 + LambdaQueryWrapper addressInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); + addressInfoLambdaQueryWrapper.eq(XzdAddressInfo::getType,"2"); + addressInfoLambdaQueryWrapper.eq(XzdAddressInfo::getCustomerinformationId, id); + xzdAddressInfoService.remove(addressInfoLambdaQueryWrapper); + + //删除联系人信息 + LambdaQueryWrapper contactLambdaQueryWrapper = new LambdaQueryWrapper<>(); + contactLambdaQueryWrapper.eq(XzdContact::getType,"2"); + contactLambdaQueryWrapper.eq(XzdContact::getCustomerinformationId, id); + //删除附件 + fileIds = new ArrayList<>(); + List list2 = xzdContactService.list(contactLambdaQueryWrapper); + for (XzdContact xzdContact : list2) { + if (xzdContact.getAttachment() != null){ + fileIds.add(Long.valueOf(xzdContact.getAttachment())); + } + } + if (!list2.isEmpty()){ + sysOssService.deleteWithValidByIds(fileIds,false); + } + xzdContactService.remove(contactLambdaQueryWrapper); + + //处理证照信息 + LambdaQueryWrapper certificateInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); + certificateInfoLambdaQueryWrapper.eq(XzdCertificateInfo::getType,"2"); + certificateInfoLambdaQueryWrapper.eq(XzdCertificateInfo::getCustomerinformationId, id); + //删除附件 + fileIds = new ArrayList<>(); + List list3 = xzdCertificateInfoService.list(certificateInfoLambdaQueryWrapper); + for (XzdCertificateInfo value : list3) { + if (value.getAttachment() != null){ + fileIds.add(Long.valueOf(value.getAttachment())); + } + } + if (!list2.isEmpty()){ + sysOssService.deleteWithValidByIds(fileIds,false); + } + xzdCertificateInfoService.remove(certificateInfoLambdaQueryWrapper); + + //处理结算信息 + LambdaQueryWrapper settlementInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); + settlementInfoLambdaQueryWrapper.eq(XzdSettlementInfo::getType,"2"); + settlementInfoLambdaQueryWrapper.eq(XzdSettlementInfo::getCustomerinformationId, id); + xzdSettlementInfoService.remove(settlementInfoLambdaQueryWrapper); + + //处理业务信息 + LambdaQueryWrapper businessInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); + businessInfoLambdaQueryWrapper.eq(XzdBusinessInfo::getType,"2"); + businessInfoLambdaQueryWrapper.eq(XzdBusinessInfo::getCustomerinformationId, id); + xzdBusinessInfoService.remove(businessInfoLambdaQueryWrapper); + + //处理供应商类型 + LambdaQueryWrapper xzdCustomertypeInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); + xzdCustomertypeInfoLambdaQueryWrapper.eq(XzdCustomertypeInfo::getType,"2"); + xzdCustomertypeInfoLambdaQueryWrapper.eq(XzdCustomertypeInfo::getCustomerinformationId, id); + xzdCustomertypeInfoService.remove(xzdCustomertypeInfoLambdaQueryWrapper); + + //处理供应物料 + LambdaQueryWrapper xzdSupplyMaterialsLambdaQueryWrapper = new LambdaQueryWrapper<>(); + xzdSupplyMaterialsLambdaQueryWrapper.eq(XzdSupplyMaterials::getSupplierId, id); + xzdSupplyMaterialsService.remove(xzdSupplyMaterialsLambdaQueryWrapper); + + //供应商评价 + LambdaQueryWrapper evaluationLambdaQueryWrapper = new LambdaQueryWrapper<>(); + evaluationLambdaQueryWrapper.eq(XzdSupplierEvaluation::getSupplierId, id); + xzdSupplierEvaluationService.remove(evaluationLambdaQueryWrapper); + + //项目信息 + LambdaQueryWrapper projectInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); + projectInfoLambdaQueryWrapper.eq(XzdProjectInfo::getCustomerinformationId, id); + projectInfoLambdaQueryWrapper.eq(XzdProjectInfo::getType, "2"); + xzdProjectInfoService.remove(projectInfoLambdaQueryWrapper); + + //合同信息 + LambdaQueryWrapper contractInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); + contractInfoLambdaQueryWrapper.eq(XzdContractInfo::getCustomerinformationId, id); + contractInfoLambdaQueryWrapper.eq(XzdContractInfo::getType, "2"); + xzdContractInfoService.remove(contractInfoLambdaQueryWrapper); + } + + return b; + } + + + @Override + public R> typeList(){ + LambdaQueryWrapper infoLambdaQueryWrapper = new LambdaQueryWrapper<>(); + infoLambdaQueryWrapper.eq(XzdCustomertype::getType,"2"); + infoLambdaQueryWrapper.isNull(XzdCustomertype::getPid); + List typeList = xzdCustomertypeService.list(infoLambdaQueryWrapper); + + if (typeList == null || typeList.isEmpty()){ + return R.fail("暂无数据"); + } + + + XzdCustomertypeVo vo; + List vos = new ArrayList<>(); + for (XzdCustomertype type : typeList) { + vo = new XzdCustomertypeVo(); + BeanUtils.copyProperties(type, vo); + //查询子节点 + vos.add(vo); + } + getChildren(vos); + return R.ok(vos); + } + + + private void getChildren(List list){ + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + for (XzdCustomertypeVo vo : list) { + queryWrapper.clear(); + queryWrapper.eq(XzdCustomertype::getPid,vo.getId()); + List children = xzdCustomertypeService.list(queryWrapper); + + if (children!= null && !children.isEmpty()){ + //再次转换VO + List vos = new ArrayList<>(); + for (XzdCustomertype child : children) { + XzdCustomertypeVo temp = new XzdCustomertypeVo(); + BeanUtils.copyProperties(child, temp); + vos.add(temp); + } + vo.setChildren(vos); + getChildren(vos); + } + } + } + + private void setValue(List vos){ + + if (vos == null || vos.isEmpty()){ + return; + } + + for (XzdSupplierInfoVo vo : vos) { + //处理资质信息 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(XzdSupplierQualification::getSupplierId,vo.getId()); + List list = xzdSupplierQualificationService.list(queryWrapper); + if (list!= null && !list.isEmpty()){ + vo.setQualifications(list); + } + + //处理供应商补充信息 + LambdaQueryWrapper xzdSupplierSupplementLqw = new LambdaQueryWrapper<>(); + xzdSupplierSupplementLqw.eq(XzdSupplierSupplement::getSupplierId,vo.getId()); + XzdSupplierSupplement supplements = xzdSupplierSupplementService.getOne(xzdSupplierSupplementLqw); + if (supplements!= null){ + vo.setSupplement( supplements); + vo.setSszz(supplements.getBelongingOrganization()); + vo.setFgbm(supplements.getResponsibleDepartment()); + vo.setFgywy(supplements.getResponsibleSalesman()); + vo.setGyszt(supplements.getSupplierStatus()); + vo.setGysdj(supplements.getSupplierLevel()); + vo.setGyslx(supplements.getSupplierMainType()); + vo.setDjbz(String.valueOf(supplements.getFreezeFlag())); + vo.setShbz(String.valueOf(supplements.getAuditFlag())); + vo.setTbzt(supplements.getBiddingStatus()); + }else { + vo.setSszz("暂无数据"); + vo.setFgbm("暂无数据"); + vo.setFgywy("暂无数据"); + vo.setGyszt("暂无数据"); + vo.setGyslx("暂无数据"); + vo.setGysdj("暂无数据"); + vo.setShbz(null); + vo.setDjbz(null); + vo.setTbzt("暂无数据"); + } + + //处理地址信息 + LambdaQueryWrapper addressInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); + addressInfoLambdaQueryWrapper.eq(XzdAddressInfo::getCustomerinformationId,vo.getId()).eq(XzdAddressInfo::getType,"2"); + List addressInfos = xzdAddressInfoService.list(addressInfoLambdaQueryWrapper); + if (addressInfos!= null && !addressInfos.isEmpty()){ + vo.setAddresses(addressInfos); + } + + //处理联系人信息 + LambdaQueryWrapper contactLambdaQueryWrapper = new LambdaQueryWrapper<>(); + contactLambdaQueryWrapper.eq(XzdContact::getCustomerinformationId,vo.getId()).eq(XzdContact::getType,"2"); + List contacts = xzdContactService.list(contactLambdaQueryWrapper); + if (contacts!= null && !contacts.isEmpty()){ +// vo.getContacts().addAll(contacts); + vo.setContacts(contacts); + } + + //处理证照信息 + LambdaQueryWrapper certificateInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); + certificateInfoLambdaQueryWrapper.eq(XzdCertificateInfo::getCustomerinformationId,vo.getId()).eq(XzdCertificateInfo::getType,"2"); + List certificates = xzdCertificateInfoService.list(certificateInfoLambdaQueryWrapper); + if (certificates!= null && !certificates.isEmpty()){ +// vo.getCertificates().addAll(certificates); + vo.setCertificates( certificates); + } + + //处理结算信息 + LambdaQueryWrapper settlementInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); + settlementInfoLambdaQueryWrapper.eq(XzdSettlementInfo::getCustomerinformationId,vo.getId()).eq(XzdSettlementInfo::getType,"2"); + XzdSettlementInfo settlements = xzdSettlementInfoService.getOne(settlementInfoLambdaQueryWrapper); + if (settlements!= null){ + vo.setSettlement(settlements); + vo.setKhyh(settlements.getOpeningBank()); + vo.setKhhzh(settlements.getAccountNumber()); + }else { + vo.setKhyh("暂无数据"); + vo.setKhhzh("暂无数据"); + } + + //处理业务信息 + LambdaQueryWrapper businessInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); + businessInfoLambdaQueryWrapper.eq(XzdBusinessInfo::getCustomerinformationId,vo.getId()).eq(XzdBusinessInfo::getType,"2"); + XzdBusinessInfo businessInfo = xzdBusinessInfoService.getOne(businessInfoLambdaQueryWrapper); + if (businessInfo!= null){ + vo.setBusiness(businessInfo); + } + + //处理供应商类型 + LambdaQueryWrapper supplierTypeLambdaQueryWrapper = new LambdaQueryWrapper<>(); + supplierTypeLambdaQueryWrapper.eq(XzdCustomertypeInfo::getCustomerinformationId,vo.getId()).eq(XzdCustomertypeInfo::getType,"2"); + List supplierTypes = xzdCustomertypeInfoService.list(supplierTypeLambdaQueryWrapper); + if (supplierTypes!= null && !supplierTypes.isEmpty()){ +// vo.getCustomerTypes().addAll(supplierTypes); + vo.setCustomerTypes(supplierTypes); + } + + //处理供应物料 + LambdaQueryWrapper supplyMaterielLambdaQueryWrapper = new LambdaQueryWrapper<>(); + supplyMaterielLambdaQueryWrapper.eq(XzdSupplyMaterials::getSupplierId,vo.getId()); + List materials = xzdSupplyMaterialsService.list(supplyMaterielLambdaQueryWrapper); + if (materials!= null && !materials.isEmpty()){ +// vo.getMaterials().addAll(materials); + vo.setMaterials(materials); + } + + //处理供应商评价 + LambdaQueryWrapper evaluationLambdaQueryWrapper = new LambdaQueryWrapper<>(); + evaluationLambdaQueryWrapper.eq(XzdSupplierEvaluation::getSupplierId,vo.getId()); + List evaluations = xzdSupplierEvaluationService.list(evaluationLambdaQueryWrapper); + if (evaluations!= null && !evaluations.isEmpty()){ +// vo.getEvaluations().addAll(evaluations); + vo.setEvaluations( evaluations); + } + + //处理项目信息 + LambdaQueryWrapper projectInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); + projectInfoLambdaQueryWrapper.eq(XzdProjectInfo::getCustomerinformationId,vo.getId()); + List projects = xzdProjectInfoService.list(projectInfoLambdaQueryWrapper); + if (projects!= null && !projects.isEmpty()){ +// vo.getProjects().addAll(projects); + vo.setProjects(projects); + } + + //处理合同信息 + LambdaQueryWrapper contractInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); + contractInfoLambdaQueryWrapper.eq(XzdContractInfo::getCustomerinformationId,vo.getId()); + List contracts = xzdContractInfoService.list(contractInfoLambdaQueryWrapper); + if (contracts!= null && !contracts.isEmpty()){ +// vo.getContracts().addAll(contracts); + vo.setContracts(contracts); + } + + //处理创建者 + SysUserVo sysUserVo = sysUserService.selectUserById(vo.getCreateBy()); + if (sysUserVo != null){ + vo.setCreateByUser(sysUserVo.getUserName()); + }else { + vo.setCreateByUser("暂无"); + } + + } + + } + + +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplierQualificationServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplierQualificationServiceImpl.java new file mode 100644 index 00000000..8cc796dd --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplierQualificationServiceImpl.java @@ -0,0 +1,136 @@ +package org.dromara.xzd.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; +import org.dromara.xzd.domain.bo.XzdSupplierQualificationBo; +import org.dromara.xzd.domain.vo.XzdSupplierQualificationVo; +import org.dromara.xzd.domain.XzdSupplierQualification; +import org.dromara.xzd.mapper.XzdSupplierQualificationMapper; +import org.dromara.xzd.service.IXzdSupplierQualificationService; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 供应商资质信息Service业务层处理 + * + * @author Lion Li + * @date 2025-09-30 + */ +@RequiredArgsConstructor +@Service +public class XzdSupplierQualificationServiceImpl extends ServiceImpl implements IXzdSupplierQualificationService { + + private final XzdSupplierQualificationMapper baseMapper; + + /** + * 查询供应商资质信息 + * + * @param id 主键 + * @return 供应商资质信息 + */ + @Override + public XzdSupplierQualificationVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询供应商资质信息列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 供应商资质信息分页列表 + */ + @Override + public TableDataInfo queryPageList(XzdSupplierQualificationBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的供应商资质信息列表 + * + * @param bo 查询条件 + * @return 供应商资质信息列表 + */ + @Override + public List queryList(XzdSupplierQualificationBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdSupplierQualificationBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(XzdSupplierQualification::getId); + lqw.eq(bo.getSupplierId() != null, XzdSupplierQualification::getSupplierId, bo.getSupplierId()); + lqw.like(StringUtils.isNotBlank(bo.getName()), XzdSupplierQualification::getName, bo.getName()); + lqw.eq(bo.getBeginTime() != null, XzdSupplierQualification::getBeginTime, bo.getBeginTime()); + lqw.eq(bo.getEndTime() != null, XzdSupplierQualification::getEndTime, bo.getEndTime()); + lqw.eq(StringUtils.isNotBlank(bo.getFileUrl()), XzdSupplierQualification::getFileUrl, bo.getFileUrl()); + lqw.eq(bo.getFileId() != null, XzdSupplierQualification::getFileId, bo.getFileId()); + return lqw; + } + + /** + * 新增供应商资质信息 + * + * @param bo 供应商资质信息 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(XzdSupplierQualificationBo bo) { + XzdSupplierQualification add = MapstructUtils.convert(bo, XzdSupplierQualification.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改供应商资质信息 + * + * @param bo 供应商资质信息 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(XzdSupplierQualificationBo bo) { + XzdSupplierQualification update = MapstructUtils.convert(bo, XzdSupplierQualification.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(XzdSupplierQualification entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除供应商资质信息信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplierSupplementServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplierSupplementServiceImpl.java new file mode 100644 index 00000000..ee271a78 --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplierSupplementServiceImpl.java @@ -0,0 +1,149 @@ +package org.dromara.xzd.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; +import org.dromara.xzd.domain.bo.XzdSupplierSupplementBo; +import org.dromara.xzd.domain.vo.XzdSupplierSupplementVo; +import org.dromara.xzd.domain.XzdSupplierSupplement; +import org.dromara.xzd.mapper.XzdSupplierSupplementMapper; +import org.dromara.xzd.service.IXzdSupplierSupplementService; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 供应商信息补充Service业务层处理 + * + * @author Lion Li + * @date 2025-09-30 + */ +@RequiredArgsConstructor +@Service +public class XzdSupplierSupplementServiceImpl extends ServiceImpl implements IXzdSupplierSupplementService { + + private final XzdSupplierSupplementMapper baseMapper; + + /** + * 查询供应商信息补充 + * + * @param id 主键 + * @return 供应商信息补充 + */ + @Override + public XzdSupplierSupplementVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询供应商信息补充列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 供应商信息补充分页列表 + */ + @Override + public TableDataInfo queryPageList(XzdSupplierSupplementBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的供应商信息补充列表 + * + * @param bo 查询条件 + * @return 供应商信息补充列表 + */ + @Override + public List queryList(XzdSupplierSupplementBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdSupplierSupplementBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(XzdSupplierSupplement::getId); + lqw.eq(StringUtils.isNotBlank(bo.getSupplierStatus()), XzdSupplierSupplement::getSupplierStatus, bo.getSupplierStatus()); + lqw.eq(StringUtils.isNotBlank(bo.getSupplierLevel()), XzdSupplierSupplement::getSupplierLevel, bo.getSupplierLevel()); + lqw.eq(StringUtils.isNotBlank(bo.getResponsibleDepartment()), XzdSupplierSupplement::getResponsibleDepartment, bo.getResponsibleDepartment()); + lqw.eq(StringUtils.isNotBlank(bo.getResponsibleSalesman()), XzdSupplierSupplement::getResponsibleSalesman, bo.getResponsibleSalesman()); + lqw.eq(StringUtils.isNotBlank(bo.getBelongingOrganization()), XzdSupplierSupplement::getBelongingOrganization, bo.getBelongingOrganization()); + lqw.eq(StringUtils.isNotBlank(bo.getCreator()), XzdSupplierSupplement::getCreator, bo.getCreator()); + lqw.eq(bo.getCreateDate() != null, XzdSupplierSupplement::getCreateDate, bo.getCreateDate()); + lqw.eq(bo.getAuditFlag() != null, XzdSupplierSupplement::getAuditFlag, bo.getAuditFlag()); + lqw.eq(bo.getFreezeFlag() != null, XzdSupplierSupplement::getFreezeFlag, bo.getFreezeFlag()); + lqw.eq(bo.getFreezeStartTime() != null, XzdSupplierSupplement::getFreezeStartTime, bo.getFreezeStartTime()); + lqw.eq(bo.getFreezeEndTime() != null, XzdSupplierSupplement::getFreezeEndTime, bo.getFreezeEndTime()); + lqw.eq(StringUtils.isNotBlank(bo.getSupplierMainType()), XzdSupplierSupplement::getSupplierMainType, bo.getSupplierMainType()); + lqw.eq(StringUtils.isNotBlank(bo.getDefaultFinanceOrganization()), XzdSupplierSupplement::getDefaultFinanceOrganization, bo.getDefaultFinanceOrganization()); + lqw.eq(StringUtils.isNotBlank(bo.getBiddingStatus()), XzdSupplierSupplement::getBiddingStatus, bo.getBiddingStatus()); + lqw.eq(StringUtils.isNotBlank(bo.getServiceArea()), XzdSupplierSupplement::getServiceArea, bo.getServiceArea()); + lqw.eq(bo.getQualificationValidity() != null, XzdSupplierSupplement::getQualificationValidity, bo.getQualificationValidity()); + lqw.eq(StringUtils.isNotBlank(bo.getAssessmentTeamLeader()), XzdSupplierSupplement::getAssessmentTeamLeader, bo.getAssessmentTeamLeader()); + lqw.eq(StringUtils.isNotBlank(bo.getAssessmentTeamMembers()), XzdSupplierSupplement::getAssessmentTeamMembers, bo.getAssessmentTeamMembers()); + lqw.eq(StringUtils.isNotBlank(bo.getRecordOrganization()), XzdSupplierSupplement::getRecordOrganization, bo.getRecordOrganization()); + return lqw; + } + + /** + * 新增供应商信息补充 + * + * @param bo 供应商信息补充 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(XzdSupplierSupplementBo bo) { + XzdSupplierSupplement add = MapstructUtils.convert(bo, XzdSupplierSupplement.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改供应商信息补充 + * + * @param bo 供应商信息补充 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(XzdSupplierSupplementBo bo) { + XzdSupplierSupplement update = MapstructUtils.convert(bo, XzdSupplierSupplement.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(XzdSupplierSupplement entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除供应商信息补充信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplyMaterialsServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplyMaterialsServiceImpl.java new file mode 100644 index 00000000..10e37acd --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/service/impl/XzdSupplyMaterialsServiceImpl.java @@ -0,0 +1,145 @@ +package org.dromara.xzd.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; +import org.dromara.xzd.domain.bo.XzdSupplyMaterialsBo; +import org.dromara.xzd.domain.vo.XzdSupplyMaterialsVo; +import org.dromara.xzd.domain.XzdSupplyMaterials; +import org.dromara.xzd.mapper.XzdSupplyMaterialsMapper; +import org.dromara.xzd.service.IXzdSupplyMaterialsService; + +import java.util.List; +import java.util.Map; +import java.util.Collection; + +/** + * 供应物料Service业务层处理 + * + * @author Lion Li + * @date 2025-09-30 + */ +@RequiredArgsConstructor +@Service +public class XzdSupplyMaterialsServiceImpl extends ServiceImpl implements IXzdSupplyMaterialsService { + + private final XzdSupplyMaterialsMapper baseMapper; + + /** + * 查询供应物料 + * + * @param id 主键 + * @return 供应物料 + */ + @Override + public XzdSupplyMaterialsVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 分页查询供应物料列表 + * + * @param bo 查询条件 + * @param pageQuery 分页参数 + * @return 供应物料分页列表 + */ + @Override + public TableDataInfo queryPageList(XzdSupplyMaterialsBo bo, PageQuery pageQuery) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 查询符合条件的供应物料列表 + * + * @param bo 查询条件 + * @return 供应物料列表 + */ + @Override + public List queryList(XzdSupplyMaterialsBo bo) { + LambdaQueryWrapper lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper buildQueryWrapper(XzdSupplyMaterialsBo bo) { + Map params = bo.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.orderByDesc(XzdSupplyMaterials::getId); + lqw.eq(StringUtils.isNotBlank(bo.getResourceCategory()), XzdSupplyMaterials::getResourceCategory, bo.getResourceCategory()); + lqw.eq(StringUtils.isNotBlank(bo.getSkuCode()), XzdSupplyMaterials::getSkuCode, bo.getSkuCode()); + lqw.like(StringUtils.isNotBlank(bo.getSkuName()), XzdSupplyMaterials::getSkuName, bo.getSkuName()); + lqw.eq(StringUtils.isNotBlank(bo.getSpecification()), XzdSupplyMaterials::getSpecification, bo.getSpecification()); + lqw.eq(StringUtils.isNotBlank(bo.getUnitOfMeasure()), XzdSupplyMaterials::getUnitOfMeasure, bo.getUnitOfMeasure()); + lqw.eq(StringUtils.isNotBlank(bo.getSupplierMaterialCode()), XzdSupplyMaterials::getSupplierMaterialCode, bo.getSupplierMaterialCode()); + lqw.like(StringUtils.isNotBlank(bo.getSupplierMaterialName()), XzdSupplyMaterials::getSupplierMaterialName, bo.getSupplierMaterialName()); + lqw.eq(StringUtils.isNotBlank(bo.getSupplierMaterialBarcode()), XzdSupplyMaterials::getSupplierMaterialBarcode, bo.getSupplierMaterialBarcode()); + lqw.eq(bo.getTaxInclusiveUnitPrice() != null, XzdSupplyMaterials::getTaxInclusiveUnitPrice, bo.getTaxInclusiveUnitPrice()); + lqw.eq(bo.getQuota() != null, XzdSupplyMaterials::getQuota, bo.getQuota()); + lqw.eq(bo.getExchangeRate() != null, XzdSupplyMaterials::getExchangeRate, bo.getExchangeRate()); + lqw.eq(bo.getExchangeCycle() != null, XzdSupplyMaterials::getExchangeCycle, bo.getExchangeCycle()); + lqw.eq(bo.getDeliveryCycle() != null, XzdSupplyMaterials::getDeliveryCycle, bo.getDeliveryCycle()); + lqw.eq(StringUtils.isNotBlank(bo.getPaymentTerms()), XzdSupplyMaterials::getPaymentTerms, bo.getPaymentTerms()); + lqw.eq(StringUtils.isNotBlank(bo.getRemarks()), XzdSupplyMaterials::getRemarks, bo.getRemarks()); + return lqw; + } + + /** + * 新增供应物料 + * + * @param bo 供应物料 + * @return 是否新增成功 + */ + @Override + public Boolean insertByBo(XzdSupplyMaterialsBo bo) { + XzdSupplyMaterials add = MapstructUtils.convert(bo, XzdSupplyMaterials.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 修改供应物料 + * + * @param bo 供应物料 + * @return 是否修改成功 + */ + @Override + public Boolean updateByBo(XzdSupplyMaterialsBo bo) { + XzdSupplyMaterials update = MapstructUtils.convert(bo, XzdSupplyMaterials.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 保存前的数据校验 + */ + private void validEntityBeforeSave(XzdSupplyMaterials entity){ + //TODO 做一些数据校验,如唯一约束 + } + + /** + * 校验并批量删除供应物料信息 + * + * @param ids 待删除的主键集合 + * @param isValid 是否进行有效性校验 + * @return 是否删除成功 + */ + @Override + public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { + if(isValid){ + //TODO 做一些业务上的校验,判断是否需要校验 + } + return baseMapper.deleteByIds(ids) > 0; + } +} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/XzdSupplierInfoMapper.xml b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/XzdSupplierInfoMapper.xml new file mode 100644 index 00000000..c77bcbde --- /dev/null +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/resources/mapper/xzd/XzdSupplierInfoMapper.xml @@ -0,0 +1,97 @@ + + + + + + + +