Browse Source

供应商修改

yzc 1 year ago
parent
commit
d0903ca5f8
17 changed files with 305 additions and 9 deletions
  1. 17 0
      code/src/test/java/SupplyDataSource.java
  2. 5 0
      hx-sale/src/main/java/com/fjhx/sale/entity/ext/vo/ExtQuotationProductVo.java
  3. 3 1
      hx-sale/src/main/resources/mapper/ext/ExtQuotationProductMapper.xml
  4. 20 0
      hx-supply/src/main/java/com/fjhx/supply/controller/supplier/SupplierContactController.java
  5. 17 0
      hx-supply/src/main/java/com/fjhx/supply/entity/supplier/dto/SupplierContactDto.java
  6. 17 0
      hx-supply/src/main/java/com/fjhx/supply/entity/supplier/dto/SupplierContactSelectDto.java
  7. 8 0
      hx-supply/src/main/java/com/fjhx/supply/entity/supplier/dto/SupplierInfoDto.java
  8. 48 0
      hx-supply/src/main/java/com/fjhx/supply/entity/supplier/po/SupplierContact.java
  9. 59 5
      hx-supply/src/main/java/com/fjhx/supply/entity/supplier/po/SupplierInfo.java
  10. 5 0
      hx-supply/src/main/java/com/fjhx/supply/entity/supplier/po/SupplierPrice.java
  11. 17 0
      hx-supply/src/main/java/com/fjhx/supply/entity/supplier/vo/SupplierContactVo.java
  12. 5 0
      hx-supply/src/main/java/com/fjhx/supply/entity/supplier/vo/SupplierInfoVo.java
  13. 17 0
      hx-supply/src/main/java/com/fjhx/supply/mapper/supplier/SupplierContactMapper.java
  14. 17 0
      hx-supply/src/main/java/com/fjhx/supply/service/supplier/SupplierContactService.java
  15. 21 0
      hx-supply/src/main/java/com/fjhx/supply/service/supplier/impl/SupplierContactServiceImpl.java
  16. 25 3
      hx-supply/src/main/java/com/fjhx/supply/service/supplier/impl/SupplierInfoServiceImpl.java
  17. 4 0
      hx-supply/src/main/resources/mapper/supplier/SupplierContactMapper.xml

+ 17 - 0
code/src/test/java/SupplyDataSource.java

@@ -0,0 +1,17 @@
+import fly.generator.GeneratorApplication;
+
+public class SupplyDataSource {
+
+    public static void main(String[] args) {
+        GeneratorApplication.builder()
+                .url(DataSourceInfo.URL)
+                .username(DataSourceInfo.USER_NAME)
+                .password(DataSourceInfo.PASSWORD)
+                .port(9989)
+                .module("hx-supply")
+                .parent("com.fjhx.supply")
+                .superServiceClass("com.ruoyi.common.core.service.BaseService")
+                .build();
+    }
+
+}

+ 5 - 0
hx-sale/src/main/java/com/fjhx/sale/entity/ext/vo/ExtQuotationProductVo.java

@@ -76,4 +76,9 @@ public class ExtQuotationProductVo extends ExtQuotationProduct {
      */
      */
     private Date waitProductTime;
     private Date waitProductTime;
 
 
+    /**
+     * 业务成本单价
+     */
+    private BigDecimal businessCostPrice;
+
 }
 }

+ 3 - 1
hx-sale/src/main/resources/mapper/ext/ExtQuotationProductMapper.xml

@@ -5,8 +5,10 @@
         SELECT eqp.*,
         SELECT eqp.*,
                eq.`code` AS extQuotationCode,
                eq.`code` AS extQuotationCode,
                eq.wait_product_time,
                eq.wait_product_time,
-               sq.`code` AS quotationCode
+               sq.`code` AS quotationCode,
+               qp.business_cost_price
         FROM ext_quotation_product eqp
         FROM ext_quotation_product eqp
+                 JOIN quotation_product qp ON eqp.quotation_product_id = qp.id
                  JOIN ext_quotation eq ON eqp.sale_quotation_id = eq.id
                  JOIN ext_quotation eq ON eqp.sale_quotation_id = eq.id
                  JOIN sale_quotation sq ON eq.sale_quotation_id = sq.id
                  JOIN sale_quotation sq ON eq.sale_quotation_id = sq.id
             ${ew.customSqlSegment}
             ${ew.customSqlSegment}

+ 20 - 0
hx-supply/src/main/java/com/fjhx/supply/controller/supplier/SupplierContactController.java

@@ -0,0 +1,20 @@
+package com.fjhx.supply.controller.supplier;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * <p>
+ * 供应商其他联系人 前端控制器
+ * </p>
+ *
+ * @author
+ * @since 2024-03-04
+ */
+@RestController
+@RequestMapping("/supplierContact")
+public class SupplierContactController {
+
+
+}

+ 17 - 0
hx-supply/src/main/java/com/fjhx/supply/entity/supplier/dto/SupplierContactDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.supply.entity.supplier.dto;
+
+import com.fjhx.supply.entity.supplier.po.SupplierContact;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 供应商其他联系人新增编辑入参实体
+ *
+ * @author
+ * @since 2024-03-04
+ */
+@Getter
+@Setter
+public class SupplierContactDto extends SupplierContact {
+
+}

+ 17 - 0
hx-supply/src/main/java/com/fjhx/supply/entity/supplier/dto/SupplierContactSelectDto.java

@@ -0,0 +1,17 @@
+package com.fjhx.supply.entity.supplier.dto;
+
+import com.ruoyi.common.core.domain.BaseSelectDto;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 供应商其他联系人列表查询入参实体
+ *
+ * @author
+ * @since 2024-03-04
+ */
+@Getter
+@Setter
+public class SupplierContactSelectDto extends BaseSelectDto {
+
+}

+ 8 - 0
hx-supply/src/main/java/com/fjhx/supply/entity/supplier/dto/SupplierInfoDto.java

@@ -2,6 +2,7 @@ package com.fjhx.supply.entity.supplier.dto;
 
 
 import com.fjhx.area.service.SetCustomizeAreaId;
 import com.fjhx.area.service.SetCustomizeAreaId;
 import com.fjhx.file.entity.ObsFile;
 import com.fjhx.file.entity.ObsFile;
+import com.fjhx.supply.entity.supplier.po.SupplierContact;
 import com.fjhx.supply.entity.supplier.po.SupplierInfo;
 import com.fjhx.supply.entity.supplier.po.SupplierInfo;
 import lombok.Getter;
 import lombok.Getter;
 import lombok.Setter;
 import lombok.Setter;
@@ -29,5 +30,12 @@ public class SupplierInfoDto extends SupplierInfo implements SetCustomizeAreaId
 
 
     private String cityName;
     private String cityName;
 
 
+    /**
+     * 供应商营业执照附件 类型10
+     */
+    List<ObsFile> licenseFileList;
+
+    List<SupplierContact> contactList;
+
 
 
 }
 }

+ 48 - 0
hx-supply/src/main/java/com/fjhx/supply/entity/supplier/po/SupplierContact.java

@@ -0,0 +1,48 @@
+package com.fjhx.supply.entity.supplier.po;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.core.domain.BasePo;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 供应商其他联系人
+ * </p>
+ *
+ * @author
+ * @since 2024-03-04
+ */
+@Getter
+@Setter
+@TableName("supplier_contact")
+public class SupplierContact extends BasePo {
+
+    private Long supplierId;
+
+    /**
+     * 姓名
+     */
+    private String name;
+
+    /**
+     * 职位
+     */
+    private String position;
+
+    /**
+     * 电话
+     */
+    private String phoneNum;
+
+    /**
+     * 邮箱
+     */
+    private String email;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 59 - 5
hx-supply/src/main/java/com/fjhx/supply/entity/supplier/po/SupplierInfo.java

@@ -69,11 +69,6 @@ public class SupplierInfo extends BasePo {
     private String remark;
     private String remark;
 
 
     /**
     /**
-     * 维多利亚扩展json
-     */
-    private String victoriatouristJson;
-
-    /**
      * 账户名
      * 账户名
      */
      */
     private String openingName;
     private String openingName;
@@ -123,4 +118,63 @@ public class SupplierInfo extends BasePo {
      */
      */
     private String postalCode;
     private String postalCode;
 
 
+    //--------------------------------------------------------------------
+    /**
+     * 供应商等级(字典supplier_grade)
+     */
+    private String grade;
+    /**
+     * 供应商状态(字典supplier_status)
+     */
+    private String status;
+    /**
+     * 开发人员id
+     */
+    private String devUserId;
+    /**
+     * 所属部门(供应商开发人员的所属部门)
+     */
+    private String deptId;
+    /**
+     * 纳税人识别号
+     */
+    private String taxpayerCode;
+    /**
+     * 发票类型
+     */
+    private String invoiceType;
+    /**
+     * 开票名称
+     */
+    private String invoiceName;
+    /**
+     * 开票地址
+     */
+    private String invoiceAddress;
+    /**
+     * 开票联系方式
+     */
+    private String invoiceContactInfo;
+    /**
+     * 对私_账户名
+     */
+    private String privOpeningName;
+    /**
+     * 对私_开户银行
+     */
+    private String privOpeningBank;
+    /**
+     * 对私_开户账号
+     */
+    private String privAccountOpening;
+    /**
+     * 对私_是否含税 1是 0不是
+     */
+    private String privIncludingTax;
+    /**
+     * 对私_税点(字典tax_points)
+     */
+    private String privTaxPoints;
+
+
 }
 }

+ 5 - 0
hx-supply/src/main/java/com/fjhx/supply/entity/supplier/po/SupplierPrice.java

@@ -42,4 +42,9 @@ public class SupplierPrice extends BasePo {
      */
      */
     private Long companyId;
     private Long companyId;
 
 
+    /**
+     * 含税价
+     */
+    private BigDecimal includingTaxPrice;
+
 }
 }

+ 17 - 0
hx-supply/src/main/java/com/fjhx/supply/entity/supplier/vo/SupplierContactVo.java

@@ -0,0 +1,17 @@
+package com.fjhx.supply.entity.supplier.vo;
+
+import com.fjhx.supply.entity.supplier.po.SupplierContact;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 供应商其他联系人列表查询返回值实体
+ *
+ * @author
+ * @since 2024-03-04
+ */
+@Getter
+@Setter
+public class SupplierContactVo extends SupplierContact {
+
+}

+ 5 - 0
hx-supply/src/main/java/com/fjhx/supply/entity/supplier/vo/SupplierInfoVo.java

@@ -1,10 +1,13 @@
 package com.fjhx.supply.entity.supplier.vo;
 package com.fjhx.supply.entity.supplier.vo;
 
 
 import com.fjhx.area.service.SetCustomizeAreaName;
 import com.fjhx.area.service.SetCustomizeAreaName;
+import com.fjhx.supply.entity.supplier.po.SupplierContact;
 import com.fjhx.supply.entity.supplier.po.SupplierInfo;
 import com.fjhx.supply.entity.supplier.po.SupplierInfo;
 import lombok.Getter;
 import lombok.Getter;
 import lombok.Setter;
 import lombok.Setter;
 
 
+import java.util.List;
+
 /**
 /**
  * 供应商列表查询返回值实体
  * 供应商列表查询返回值实体
  *
  *
@@ -23,4 +26,6 @@ public class SupplierInfoVo extends SupplierInfo implements SetCustomizeAreaName
 
 
     private String companyName;
     private String companyName;
 
 
+    List<SupplierContact> contactList;
+
 }
 }

+ 17 - 0
hx-supply/src/main/java/com/fjhx/supply/mapper/supplier/SupplierContactMapper.java

@@ -0,0 +1,17 @@
+package com.fjhx.supply.mapper.supplier;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fjhx.supply.entity.supplier.po.SupplierContact;
+
+
+/**
+ * <p>
+ * 供应商其他联系人 Mapper 接口
+ * </p>
+ *
+ * @author
+ * @since 2024-03-04
+ */
+public interface SupplierContactMapper extends BaseMapper<SupplierContact> {
+
+}

+ 17 - 0
hx-supply/src/main/java/com/fjhx/supply/service/supplier/SupplierContactService.java

@@ -0,0 +1,17 @@
+package com.fjhx.supply.service.supplier;
+
+import com.fjhx.supply.entity.supplier.po.SupplierContact;
+import com.ruoyi.common.core.service.BaseService;
+
+
+/**
+ * <p>
+ * 供应商其他联系人 服务类
+ * </p>
+ *
+ * @author
+ * @since 2024-03-04
+ */
+public interface SupplierContactService extends BaseService<SupplierContact> {
+
+}

+ 21 - 0
hx-supply/src/main/java/com/fjhx/supply/service/supplier/impl/SupplierContactServiceImpl.java

@@ -0,0 +1,21 @@
+package com.fjhx.supply.service.supplier.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fjhx.supply.entity.supplier.po.SupplierContact;
+import com.fjhx.supply.mapper.supplier.SupplierContactMapper;
+import com.fjhx.supply.service.supplier.SupplierContactService;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * <p>
+ * 供应商其他联系人 服务实现类
+ * </p>
+ *
+ * @author
+ * @since 2024-03-04
+ */
+@Service
+public class SupplierContactServiceImpl extends ServiceImpl<SupplierContactMapper, SupplierContact> implements SupplierContactService {
+
+}

+ 25 - 3
hx-supply/src/main/java/com/fjhx/supply/service/supplier/impl/SupplierInfoServiceImpl.java

@@ -13,9 +13,11 @@ import com.fjhx.common.constant.SourceConstant;
 import com.fjhx.file.utils.ObsFileUtil;
 import com.fjhx.file.utils.ObsFileUtil;
 import com.fjhx.supply.entity.supplier.dto.SupplierInfoDto;
 import com.fjhx.supply.entity.supplier.dto.SupplierInfoDto;
 import com.fjhx.supply.entity.supplier.dto.SupplierInfoSelectDto;
 import com.fjhx.supply.entity.supplier.dto.SupplierInfoSelectDto;
+import com.fjhx.supply.entity.supplier.po.SupplierContact;
 import com.fjhx.supply.entity.supplier.po.SupplierInfo;
 import com.fjhx.supply.entity.supplier.po.SupplierInfo;
 import com.fjhx.supply.entity.supplier.vo.SupplierInfoVo;
 import com.fjhx.supply.entity.supplier.vo.SupplierInfoVo;
 import com.fjhx.supply.mapper.supplier.SupplierInfoMapper;
 import com.fjhx.supply.mapper.supplier.SupplierInfoMapper;
+import com.fjhx.supply.service.supplier.SupplierContactService;
 import com.fjhx.supply.service.supplier.SupplierInfoService;
 import com.fjhx.supply.service.supplier.SupplierInfoService;
 import com.fjhx.supply.utils.CodeEnum;
 import com.fjhx.supply.utils.CodeEnum;
 import com.fjhx.tenant.entity.dict.dto.DictTenantDataSelectDto;
 import com.fjhx.tenant.entity.dict.dto.DictTenantDataSelectDto;
@@ -49,8 +51,14 @@ import java.util.stream.Collectors;
 @Service
 @Service
 public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, SupplierInfo> implements SupplierInfoService {
 public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, SupplierInfo> implements SupplierInfoService {
 
 
+    private final DictTenantDataService dictTenantDataService;
+    private final SupplierContactService supplierContactService;
+
     @Autowired
     @Autowired
-    private DictTenantDataService dictTenantDataService;
+    public SupplierInfoServiceImpl(DictTenantDataService dictTenantDataService, SupplierContactService supplierContactService) {
+        this.dictTenantDataService = dictTenantDataService;
+        this.supplierContactService = supplierContactService;
+    }
 
 
     @Override
     @Override
     public Page<SupplierInfoVo> getPage(SupplierInfoSelectDto dto) {
     public Page<SupplierInfoVo> getPage(SupplierInfoSelectDto dto) {
@@ -96,9 +104,13 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Sup
 
 
     @Override
     @Override
     public SupplierInfoVo detail(Long id) {
     public SupplierInfoVo detail(Long id) {
-        SupplierInfo SupplierInfo = this.getById(id);
-        SupplierInfoVo result = BeanUtil.toBean(SupplierInfo, SupplierInfoVo.class);
+        SupplierInfo supplierInfo = this.getById(id);
+        SupplierInfoVo result = BeanUtil.toBean(supplierInfo, SupplierInfoVo.class);
         CustomizeAreaUtil.setAreaName(result);
         CustomizeAreaUtil.setAreaName(result);
+
+        List<SupplierContact> supplierContactList = supplierContactService.list(q -> q.eq(SupplierContact::getSupplierId, supplierInfo.getId()));
+
+        result.setContactList(supplierContactList);
         return result;
         return result;
     }
     }
 
 
@@ -116,6 +128,11 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Sup
 
 
         this.save(supplierInfoDto);
         this.save(supplierInfoDto);
         ObsFileUtil.saveFile(supplierInfoDto.getFileList(), supplierInfoDto.getId());
         ObsFileUtil.saveFile(supplierInfoDto.getFileList(), supplierInfoDto.getId());
+        //供应商营业执照附件
+        ObsFileUtil.saveFile(supplierInfoDto.getLicenseFileList(), supplierInfoDto.getId(), 10);
+
+        //其他联系人
+        supplierContactService.editLinked(supplierInfoDto.getContactList(), SupplierContact::getSupplierId, supplierInfoDto.getId());
     }
     }
 
 
     @DSTransactional
     @DSTransactional
@@ -132,6 +149,11 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Sup
 
 
         this.updateById(supplierInfoDto);
         this.updateById(supplierInfoDto);
         ObsFileUtil.editFile(supplierInfoDto.getFileList(), supplierInfoDto.getId());
         ObsFileUtil.editFile(supplierInfoDto.getFileList(), supplierInfoDto.getId());
+        //供应商营业执照附件
+        ObsFileUtil.editFile(supplierInfoDto.getLicenseFileList(), supplierInfoDto.getId(), 10);
+
+        //其他联系人
+        supplierContactService.editLinked(supplierInfoDto.getContactList(), SupplierContact::getSupplierId, supplierInfoDto.getId());
     }
     }
 
 
     @DSTransactional
     @DSTransactional

+ 4 - 0
hx-supply/src/main/resources/mapper/supplier/SupplierContactMapper.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fjhx.supply.mapper.supplier.SupplierContactMapper">
+</mapper>