Przeglądaj źródła

Merge remote-tracking branch 'origin/dev1.0' into dev1.0

zhangc 8 miesięcy temu
rodzic
commit
7b5b1a40eb

+ 120 - 0
src/main/java/com/sunxung/factoring/entity/businessConsulting/BusinessConsultingDO.java

@@ -0,0 +1,120 @@
+package com.sunxung.factoring.entity.businessConsulting;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.sunxung.factoring.entity.BaseEntity;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+
+/**
+* @author liutao
+* @date  2024-03-30
+*/
+@Getter
+@Setter
+@TableName("c_business_consulting")
+public class BusinessConsultingDO {
+
+    private static final long serialVersionUID = 1L;
+
+
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+    * 企业名称
+    */
+
+    @TableField("enterprice_cn")
+    private String enterpriceCn;
+
+    /**
+    * 联系人
+    */
+
+    @TableField("contact_name")
+    private String contactName;
+
+    /**
+    * 联系人职务
+    */
+
+    @TableField("contact_post")
+    private String contactPost;
+
+    /**
+    * 工作邮箱
+    */
+
+    @TableField("email")
+    private String email;
+
+    /**
+    * 手机号(大陆)
+    */
+
+    @TableField("phone_number")
+    private String phoneNumber;
+
+    /**
+    * 企业类型
+    */
+
+    @TableField("enterprise_type")
+    private String enterpriseType;
+
+    /**
+    * 主营品类
+    */
+
+    @TableField("main_categories")
+    private String mainCategories;
+
+    /**
+    * 年销售额(万元)
+    */
+
+    @TableField("annual_sales_revenue")
+    private String annualSalesRevenue;
+
+    /**
+    * 主要客户
+    */
+
+    @TableField("main_customers")
+    private String mainCustomers;
+
+    /**
+    * 预估账期
+    */
+
+    @TableField("estimated_accounting_period")
+    private String estimatedAccountingPeriod;
+
+    /**
+    * 应收余额(万元)
+    */
+
+    @TableField("accounts_receivable_balance")
+    private String accountsReceivableBalance;
+
+    /**
+    * 信息内容
+    */
+
+    @TableField("info_content")
+    private String infoContent;
+
+    /**
+    * 创建时间
+    */
+
+    @TableField("gmt_create")
+    private Date gmtCreate;
+
+}

+ 69 - 0
src/main/java/com/sunxung/factoring/entity/businessConsulting/model/dto/BusinessConsultingDTO.java

@@ -0,0 +1,69 @@
+package com.sunxung.factoring.entity.businessConsulting.model.dto;
+
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+* @author liutao
+* @date  2024-03-30
+*/
+@Data
+public class BusinessConsultingDTO {
+
+    private Long id;
+
+    /**
+    *企业名称
+    */
+    private String enterpriceCn;
+    /**
+    *联系人
+    */
+    private String contactName;
+    /**
+    *联系人职务
+    */
+    private String contactPost;
+    /**
+    *工作邮箱
+    */
+    private String email;
+    /**
+    *手机号(大陆)
+    */
+    private String phoneNumber;
+    /**
+    *企业类型
+    */
+    private String enterpriseType;
+    /**
+    *主营品类
+    */
+    private String mainCategories;
+    /**
+    *年销售额(万元)
+    */
+    private String annualSalesRevenue;
+    /**
+    *主要客户
+    */
+    private String mainCustomers;
+    /**
+    *预估账期
+    */
+    private String estimatedAccountingPeriod;
+    /**
+    *应收余额(万元)
+    */
+    private String accountsReceivableBalance;
+    /**
+    *信息内容
+    */
+    private String infoContent;
+    /**
+    *创建时间
+    */
+    private Date gmtCreate;
+
+}

+ 88 - 0
src/main/java/com/sunxung/factoring/entity/businessConsulting/model/request/AddBusinessConsultingRequest.java

@@ -0,0 +1,88 @@
+package com.sunxung.factoring.entity.businessConsulting.model.request;
+
+import lombok.Data;
+
+import javax.validation.constraints.Size;
+
+/**
+* @author liutao
+* @date  2024-03-30
+*/
+@Data
+public class AddBusinessConsultingRequest {
+
+
+    /**
+    *企业名称
+    */
+    @Size(max=300,message="企业名称长度不能超过{max}位")
+    private String enterpriceCn;
+
+    /**
+    *联系人
+    */
+    @Size(max=300,message="联系人长度不能超过{max}位")
+    private String contactName;
+
+    /**
+    *联系人职务
+    */
+    @Size(max=300,message="联系人职务长度不能超过{max}位")
+    private String contactPost;
+
+    /**
+    *工作邮箱
+    */
+    @Size(max=100,message="工作邮箱长度不能超过{max}位")
+    private String email;
+
+    /**
+    *手机号(大陆)
+    */
+    @Size(max=11,message="手机号(大陆)长度不能超过{max}位")
+    private String phoneNumber;
+
+    /**
+    *企业类型
+    */
+    @Size(max=300,message="企业类型长度不能超过{max}位")
+    private String enterpriseType;
+
+    /**
+    *主营品类
+    */
+    @Size(max=300,message="主营品类长度不能超过{max}位")
+    private String mainCategories;
+
+    /**
+    *年销售额(万元)
+    */
+    @Size(max=300,message="年销售额(万元)长度不能超过{max}位")
+    private String annualSalesRevenue;
+
+    /**
+    *主要客户
+    */
+    @Size(max=300,message="主要客户长度不能超过{max}位")
+    private String mainCustomers;
+
+    /**
+    *预估账期
+    */
+    @Size(max=300,message="预估账期长度不能超过{max}位")
+    private String estimatedAccountingPeriod;
+
+    /**
+    *应收余额(万元)
+    */
+    @Size(max=300,message="应收余额(万元)长度不能超过{max}位")
+    private String accountsReceivableBalance;
+
+    /**
+    *信息内容
+    */
+    @Size(max=300,message="信息内容长度不能超过{max}位")
+    private String infoContent;
+
+
+}

+ 84 - 0
src/main/java/com/sunxung/factoring/entity/businessConsulting/model/request/EditBusinessConsultingRequest.java

@@ -0,0 +1,84 @@
+package com.sunxung.factoring.entity.businessConsulting.model.request;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+import java.util.Date;
+
+/**
+* @author liutao
+* @date  2024-03-30
+*/
+@Data
+public class EditBusinessConsultingRequest {
+
+    @NotNull
+    private Long id;
+    /**
+    * 企业名称
+    */
+    @Size(max=300,message="企业名称长度不能超过{max}位")
+    private String enterpriceCn;
+    /**
+    * 联系人
+    */
+    @Size(max=300,message="联系人长度不能超过{max}位")
+    private String contactName;
+    /**
+    * 联系人职务
+    */
+    @Size(max=300,message="联系人职务长度不能超过{max}位")
+    private String contactPost;
+    /**
+    * 工作邮箱
+    */
+    @Size(max=100,message="工作邮箱长度不能超过{max}位")
+    private String email;
+    /**
+    * 手机号(大陆)
+    */
+    @Size(max=11,message="手机号(大陆)长度不能超过{max}位")
+    private String phoneNumber;
+    /**
+    * 企业类型
+    */
+    @Size(max=300,message="企业类型长度不能超过{max}位")
+    private String enterpriseType;
+    /**
+    * 主营品类
+    */
+    @Size(max=300,message="主营品类长度不能超过{max}位")
+    private String mainCategories;
+    /**
+    * 年销售额(万元)
+    */
+    @Size(max=300,message="年销售额(万元)长度不能超过{max}位")
+    private String annualSalesRevenue;
+    /**
+    * 主要客户
+    */
+    @Size(max=300,message="主要客户长度不能超过{max}位")
+    private String mainCustomers;
+    /**
+    * 预估账期
+    */
+    @Size(max=300,message="预估账期长度不能超过{max}位")
+    private String estimatedAccountingPeriod;
+    /**
+    * 应收余额(万元)
+    */
+    @Size(max=300,message="应收余额(万元)长度不能超过{max}位")
+    private String accountsReceivableBalance;
+    /**
+    * 信息内容
+    */
+    @Size(max=300,message="信息内容长度不能超过{max}位")
+    private String infoContent;
+    /**
+    * 创建时间
+    */
+    @NotNull(message="创建时间不能为空")
+    private Date gmtCreate;
+
+}

+ 67 - 0
src/main/java/com/sunxung/factoring/entity/businessConsulting/model/request/QueryBusinessConsultingRequest.java

@@ -0,0 +1,67 @@
+package com.sunxung.factoring.entity.businessConsulting.model.request;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+/**
+* @author liutao
+* @date  2024-03-30
+*/
+@Getter
+@Setter
+public class QueryBusinessConsultingRequest {
+
+        /**
+        *企业名称
+        */
+        private String enterpriceCn;
+        /**
+        *联系人
+        */
+        private String contactName;
+        /**
+        *联系人职务
+        */
+        private String contactPost;
+        /**
+        *工作邮箱
+        */
+        private String email;
+        /**
+        *手机号(大陆)
+        */
+        private String phoneNumber;
+        /**
+        *企业类型
+        */
+        private String enterpriseType;
+        /**
+        *主营品类
+        */
+        private String mainCategories;
+        /**
+        *年销售额(万元)
+        */
+        private String annualSalesRevenue;
+        /**
+        *主要客户
+        */
+        private String mainCustomers;
+        /**
+        *预估账期
+        */
+        private String estimatedAccountingPeriod;
+        /**
+        *应收余额(万元)
+        */
+        private String accountsReceivableBalance;
+        /**
+        *信息内容
+        */
+        private String infoContent;
+        /**
+        *创建时间
+        */
+        private Date gmtCreate;
+}

+ 12 - 0
src/main/java/com/sunxung/factoring/mapper/businessConsulting/BusinessConsultingDAO.java

@@ -0,0 +1,12 @@
+package com.sunxung.factoring.mapper.businessConsulting;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.sunxung.factoring.entity.businessConsulting.BusinessConsultingDO;
+
+/**
+* @author liutao
+* @date  2024-03-30
+*/
+public interface BusinessConsultingDAO extends BaseMapper<BusinessConsultingDO> {
+
+}

+ 48 - 0
src/main/java/com/sunxung/factoring/service/businessConsulting/BusinessConsultingService.java

@@ -0,0 +1,48 @@
+package com.sunxung.factoring.service.businessConsulting;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.sunxung.factoring.entity.BaseSearch;
+import com.sunxung.factoring.entity.GridPage;
+import com.sunxung.factoring.entity.businessConsulting.BusinessConsultingDO;
+import com.sunxung.factoring.entity.businessConsulting.model.dto.BusinessConsultingDTO;
+
+/**
+ * @author liutao
+ * @date 2024-03-30
+ */
+public interface BusinessConsultingService extends IService<BusinessConsultingDO> {
+
+//  /**
+//  * 添加操作
+//  * @param addBusinessConsultingRequest
+//  */
+//  void addBusinessConsulting(AddBusinessConsultingRequest addBusinessConsultingRequest);
+
+//
+//  /**
+//  * 编辑操作
+//  * @param editBusinessConsultingRequest
+//  */
+//  void editBusinessConsulting(EditBusinessConsultingRequest editBusinessConsultingRequest);
+
+    /**
+     * 通过id获取详细信息
+     *
+     * @param id
+     */
+    BusinessConsultingDTO getBusinessConsultingDtoById(Long id);
+
+    /**
+     * 分页查询
+     *
+     * @param baseSearch
+     * @return
+     */
+    GridPage findAll(BaseSearch baseSearch);
+//
+//  /**
+//  * 删除
+//  */
+//  void deleteBusinessConsulting(Long id);
+}
+

+ 62 - 0
src/main/java/com/sunxung/factoring/service/businessConsulting/impl/BusinessConsultingServiceImpl.java

@@ -0,0 +1,62 @@
+package com.sunxung.factoring.service.businessConsulting.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import com.sunxung.factoring.component.util.BeanUtilsProxy;
+import com.sunxung.factoring.entity.BaseSearch;
+import com.sunxung.factoring.entity.GridPage;
+import com.sunxung.factoring.entity.businessConsulting.BusinessConsultingDO;
+import com.sunxung.factoring.entity.businessConsulting.model.dto.BusinessConsultingDTO;
+import com.sunxung.factoring.mapper.businessConsulting.BusinessConsultingDAO;
+import com.sunxung.factoring.service.businessConsulting.BusinessConsultingService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+* @author liutao
+* @date  2024-03-30
+*/
+@Service
+public class BusinessConsultingServiceImpl extends ServiceImpl<BusinessConsultingDAO, BusinessConsultingDO> implements BusinessConsultingService {
+
+//
+//    @Override
+//    public void addBusinessConsulting(AddBusinessConsultingRequest addBusinessConsultingRequest) {
+//    BusinessConsultingDO businessConsulting = BeanUtilsProxy.copyPropertiesIgnoreNull(addBusinessConsultingRequest, BusinessConsultingDO.class);
+//    this.baseMapper.insert(businessConsulting);
+//    }
+
+//    @Override
+//    public void editBusinessConsulting(EditBusinessConsultingRequest editBusinessConsultingRequest) {
+//
+//    BusinessConsultingDO businessConsulting = super.getById(editBusinessConsultingRequest.getId());
+//    if (businessConsulting == null) {
+//    throw new ServiceException(400, ExceptionEnum.SYSTEM_DATE_ERROR);
+//    }
+//    BeanUtilsProxy.copyPropertiesNotIgnoreNull(editBusinessConsultingRequest,businessConsulting);
+//    this.updateById(businessConsulting);
+//    }
+
+    @Override
+    public BusinessConsultingDTO getBusinessConsultingDtoById(Long id) {
+    BusinessConsultingDO businessConsulting = super.getById(id);
+    BusinessConsultingDTO businessConsultingDto = BeanUtilsProxy.copyProperties(businessConsulting,BusinessConsultingDTO.class);
+    return businessConsultingDto;
+    }
+
+    @Override
+    public GridPage findAll(BaseSearch baseSearch) {
+        Page page = PageHelper.startPage(baseSearch.getPage(),baseSearch.getRows());
+        List<BusinessConsultingDO> list = list();
+        return new GridPage(baseSearch.getRows(),baseSearch.getPage(),page.getTotal(),page.getResult());
+    }
+//
+//    @Override
+//    public void deleteBusinessConsulting(Long id) {
+//
+//    this.removeById(id);
+//    }
+}
+

+ 67 - 0
src/main/java/com/sunxung/factoring/web/businessConsulting/BusinessConsultingController.java

@@ -0,0 +1,67 @@
+package com.sunxung.factoring.web.businessConsulting;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.sunxung.factoring.component.exception.ServiceException;
+import com.sunxung.factoring.entity.BaseSearch;
+import com.sunxung.factoring.entity.GridPage;
+import com.sunxung.factoring.entity.ResponseJson;
+import com.sunxung.factoring.entity.businessConsulting.model.dto.BusinessConsultingDTO;
+import com.sunxung.factoring.service.businessConsulting.BusinessConsultingService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author liutao
+ * @date  2024-03-30
+ */
+@RestController
+@RequestMapping(path = "businessconsulting")
+public class BusinessConsultingController {
+
+    @Autowired
+    private BusinessConsultingService businessConsultingService;
+
+
+
+//    @PostMapping(path = "businessconsulting")
+//    @PermissionAndCheck(name="添加用户咨询表",code="BusinessConsultingController:add")
+//    @Limit(key = "query",permitsPerSeconds = 1,timeout = 1,msg = "触发接口限流,请重试")
+//    public ResponseData add(@Validated @RequestBody AddBusinessConsultingRequest addBusinessConsultingRequest) {
+//
+//        businessConsultingService.addBusinessConsulting(addBusinessConsultingRequest);
+//        return ResponseData.success();
+//
+//    }
+
+//    @PutMapping(path = "businessconsulting")
+//    @PermissionAndCheck(name="更新用户咨询表",code="BusinessConsultingController:update")
+//    public ResponseData edit(@Validated @RequestBody EditBusinessConsultingRequest editBusinessConsultingRequest) {
+//        businessConsultingService.editBusinessConsulting(editBusinessConsultingRequest);
+//        return ResponseData.success();
+//    }
+//
+    @GetMapping(path = "businessconsulting/{id}")
+    public ResponseJson getById(@PathVariable("id") Long id){
+        BusinessConsultingDTO businessConsultingDTO = businessConsultingService.getBusinessConsultingDtoById(id);
+        return new ResponseJson(businessConsultingDTO);
+
+    }
+
+    @PostMapping(path = "businessconsulting/findAll")
+    public GridPage findAll(@RequestBody BaseSearch baseSearch){
+        return businessConsultingService.findAll(baseSearch);
+
+    }
+//
+//
+//    @DeleteMapping(path = "businessconsulting/{id}")
+//    @PermissionAndCheck(name = "删除用户咨询表", code="BusinessConsultingController:delete")
+//    public ResponseData deleteById(@PathVariable("id") Long id){
+//        if(id==null){
+//            throw new ServiceException(400, ExceptionEnum.SYSTEM_DATE_ERROR);
+//        }
+//        businessConsultingService.deleteBusinessConsulting(id);
+//        return ResponseData.success();
+//    }
+}

+ 6 - 1
src/main/resources/data/update/v1.0/20231117liutao.sql

@@ -1416,4 +1416,9 @@ alter table supplier_approval_second add age_compliance tinyint(3) DEFAULT null
 
 alter table supplier_approval_second add notice varchar(500) DEFAULT null COMMENT '法人必要补充资料提示';
 
-alter table video_due_diligence_comprehensive_evaluation add fix_score decimal(17,4) DEFAULT null COMMENT '修正分数';
+alter table video_due_diligence_comprehensive_evaluation add fix_score decimal(17,4) DEFAULT null COMMENT '修正分数';
+
+INSERT INTO `t_permission`( `parentId`, `type`, `cname`, `ename`, `gradation`, `moduleName`, `url`, `icon`, `user_create`, `user_modified`, `gmt_create`, `gmt_modified`)
+VALUES ( null, 'menu', '联系我们', 'ContactUSHome', 3, NULL, '', '1', NULL, NULL, now(), now());
+INSERT INTO `t_permission`( `parentId`, `type`, `cname`, `ename`, `gradation`, `moduleName`, `url`, `icon`, `user_create`, `user_modified`, `gmt_create`, `gmt_modified`)
+VALUES ( (select t.id from t_permission t where t.ename = 'ContactUSHome'), 'button', '查看', 'viewContactUSHome', 0, '联系我们', '/ContactUSHome/viewContactUSHome', NULL, NULL, NULL, now(), now());

+ 2 - 6
src/main/resources/mapper/ledger/LedgerManagementMapper.xml

@@ -44,7 +44,6 @@
 			c_acceptance_goods_info t11,
 			c_financing_basic_info t7,
 			c_financing_goods_info t8,
-			c_project_core_enterprise t9,
 			c_enterprise t10
 		WHERE
 			t1.id = t2.c_invoice_basic_info_id
@@ -55,8 +54,7 @@
 		  AND t7.id = t8.c_financing_basic_info_id
 		  AND t8.acceptance_basic_info_id = t6.id
 		  AND t8.acceptance_goods_info_id = t11.id
-		  AND t6.c_project_core_enterprise_id = t9.id
-		  AND t9.c_enterprise_id = t10.id
+		  AND t6.c_project_core_enterprise_id = t10.id
 		  AND t10.id = #{enterpriseId}
 		  AND t1.invoice_status = ( SELECT t3.id FROM t_dictionary t3 WHERE t3.CODE = 'invoice_pass' )
 		  AND t6.is_settlement = 1
@@ -122,7 +120,6 @@
 			c_settlement_goods_info t5,
 			c_acceptance_basic_info t6,
 			c_acceptance_goods_info t7,
-			c_project_core_enterprise t8,
 			c_enterprise t9
 		WHERE
 			t1.id = t2.c_invoice_basic_info_id
@@ -130,8 +127,7 @@
 		  AND t4.id = t5.c_settlement_basic_info_id
 		  AND t5.c_acceptance_goods_info_id = t7.id
 		  AND t6.id = t7.c_acceptance_basic_info_id
-		  AND t8.id = t6.c_project_core_enterprise_id
-		  AND t9.id = t8.c_enterprise_id
+		  AND t9.id = t6.c_project_core_enterprise_id
 		  AND t9.id = #{enterpriseId}
 		  AND t1.invoice_status = ( SELECT t3.id FROM t_dictionary t3 WHERE t3.CODE = 'invoice_pass' )
 		  AND t6.is_settlement = 1