Ver Fonte

2025年2月24日17:13:51

纪新园 há 10 meses atrás
pai
commit
e8a0ad3811
19 ficheiros alterados com 656 adições e 112 exclusões
  1. 34 0
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/dto/CorpsVisitDTO.java
  2. 132 0
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/entity/CorpsVisit.java
  3. 68 70
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/entity/PjCorpsAddr.java
  4. 15 4
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/entity/PjCorpsDesc.java
  5. 1 1
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/feign/IPJOrderClient.java
  6. 36 0
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/vo/CorpsVisitVO.java
  7. 1 1
      blade-service/blade-pay/src/main/java/org/springblade/pay/tonglianPayment/service/impl/PaymentServiceImpl.java
  8. 138 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/controller/CorpsVisitController.java
  9. 16 11
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/mapper/CorpsDescMapper.xml
  10. 42 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/mapper/CorpsVisitMapper.java
  11. 30 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/mapper/CorpsVisitMapper.xml
  12. 43 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/service/ICorpsVisitService.java
  13. 11 5
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/service/impl/CorpsDescServiceImpl.java
  14. 68 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/service/impl/CorpsVisitServiceImpl.java
  15. 3 3
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/feign/PJOrderClient.java
  16. 8 8
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/service/impl/OrderServiceImpl.java
  17. 2 2
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/payMethod/PayServiceImpl.java
  18. 2 1
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/share/service/impl/SharePutOnShelvesServiceImpl.java
  19. 6 6
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/ship/service/impl/ShipServiceImpl.java

+ 34 - 0
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/dto/CorpsVisitDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.salesPart.dto;
+
+import org.springblade.salesPart.entity.CorpsVisit;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 客户拜访表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2025-02-24
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class CorpsVisitDTO extends CorpsVisit {
+	private static final long serialVersionUID = 1L;
+
+}

+ 132 - 0
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/entity/CorpsVisit.java

@@ -0,0 +1,132 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.salesPart.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springblade.core.secure.utils.AuthUtil;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 客户拜访表实体类
+ *
+ * @author BladeX
+ * @since 2025-02-24
+ */
+@Data
+@TableName("pjpf_corps_visit")
+@ApiModel(value = "CorpsVisit对象", description = "客户拜访表")
+public class CorpsVisit implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	private Long id;
+	/**
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private Long createUser;
+	/**
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private Long updateUser;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	private Integer isDeleted;
+	/**
+	 * 租户id
+	 */
+	@ApiModelProperty(value = "租户id")
+	private String tenantId = AuthUtil.getTenantId();
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+	/**
+	 * 内容
+	 */
+	@ApiModelProperty(value = "内容")
+	private String content;
+	/**
+	 * 拜访日期
+	 */
+	@ApiModelProperty(value = "拜访日期")
+	private Date visitDate;
+	/**
+	 * 拜访人
+	 */
+	@ApiModelProperty(value = "拜访人")
+	private Long visitPeopleId;
+	/**
+	 * 拜访人
+	 */
+	@ApiModelProperty(value = "拜访人")
+	private String visitPeopleName;
+	/**
+	 * 拜访客户
+	 */
+	@ApiModelProperty(value = "拜访客户")
+	private Long customerId;
+	/**
+	 * 拜访客户
+	 */
+	@ApiModelProperty(value = "拜访客户")
+	private String customerName;
+	/**
+	 * 经度
+	 */
+	@ApiModelProperty(value = "经度")
+	private String longitude;
+	/**
+	 * 维度
+	 */
+	@ApiModelProperty(value = "维度")
+	private String dimension;
+	/**
+	 * 地址
+	 */
+	@ApiModelProperty(value = "地址")
+	private String address;
+
+	/**
+	 * 拜访日期
+	 */
+	@TableField(exist = false)
+	private List<String> visitDateList;
+
+
+}

+ 68 - 70
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/entity/PjCorpsAddr.java

@@ -17,17 +17,15 @@
 package org.springblade.salesPart.entity;
 
 import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
-import java.io.Serializable;
-import java.util.Date;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 import org.springblade.core.secure.utils.AuthUtil;
 
+import java.io.Serializable;
+import java.util.Date;
+
 /**
  * 配件批发客户明细地址实体类
  *
@@ -42,76 +40,76 @@ public class PjCorpsAddr implements Serializable {
 	private static final long serialVersionUID = 1L;
 
 	/**
-	* 主键
-	*/
-		@ApiModelProperty(value = "主键")
-		private Long id;
+	 * 主键
+	 */
+	@ApiModelProperty(value = "主键")
+	private Long id;
 	/**
-	* 主表id
-	*/
-		@ApiModelProperty(value = "主表id")
-		private Long pid;
+	 * 主表id
+	 */
+	@ApiModelProperty(value = "主表id")
+	private Long pid;
 	/**
 	 * 租户id
 	 */
 	@ApiModelProperty(value = "租户id")
-	private String tenantId = AuthUtil.getTenantId();;
-	/**
-	* 创建人
-	*/
-		@ApiModelProperty(value = "创建人")
-		private Long createUser;
-	/**
-	* 创建部门
-	*/
-		@ApiModelProperty(value = "创建部门")
-		private Long createDept;
-	/**
-	* 创建时间
-	*/
-		@ApiModelProperty(value = "创建时间")
-		private Date createTime;
-	/**
-	* 修改人
-	*/
-		@ApiModelProperty(value = "修改人")
-		private Long updateUser;
-	/**
-	* 修改时间
-	*/
-		@ApiModelProperty(value = "修改时间")
-		private Date updateTime;
-	/**
-	* 是否已删除(0 否 1是)
-	*/
-		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	private String tenantId = AuthUtil.getTenantId();
+	/**
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private Long createUser;
+	/**
+	 * 创建部门
+	 */
+	@ApiModelProperty(value = "创建部门")
+	private Long createDept;
+	/**
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private Long updateUser;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
 
-		private Integer isDeleted;
-	/**
-	* 备注
-	*/
-		@ApiModelProperty(value = "备注")
-		private String remarks;
-	/**
-	* 订单状态
-	*/
-		@ApiModelProperty(value = "订单状态")
-		private String status;
-	/**
-	* 地址
-	*/
-		@ApiModelProperty(value = "地址")
-		private String belongtoarea;
-	/**
-	* 详细地址
-	*/
-		@ApiModelProperty(value = "详细地址")
-		private String detailedAddress;
-	/**
-	* 默认地址(1 默认地址)
-	*/
-		@ApiModelProperty(value = "默认地址")
-		private String defaultAddres;
+	private Integer isDeleted;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+	/**
+	 * 订单状态
+	 */
+	@ApiModelProperty(value = "订单状态")
+	private String status;
+	/**
+	 * 地址
+	 */
+	@ApiModelProperty(value = "地址")
+	private String belongtoarea;
+	/**
+	 * 详细地址
+	 */
+	@ApiModelProperty(value = "详细地址")
+	private String detailedAddress;
+	/**
+	 * 默认地址(1 默认地址)
+	 */
+	@ApiModelProperty(value = "默认地址")
+	private String defaultAddres;
 	/**
 	 * 所属公司id
 	 */

+ 15 - 4
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/entity/PjCorpsDesc.java

@@ -17,7 +17,6 @@
 package org.springblade.salesPart.entity;
 
 import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -350,14 +349,26 @@ public class PjCorpsDesc implements Serializable {
 	@TableField(exist = false)
 	private Integer sort;
 	/**
-	 * 排序
+	 * 时间
 	 */
 	@TableField(exist = false)
 	private Date businesDate;
-/**
-	 * 排序
+	/**
+	 * 地址
 	 */
 	@TableField(exist = false)
 	private String detailedAddress;
 
+	/**
+	 * 拜访记录
+	 */
+	@TableField(exist = false)
+	private List<CorpsVisit> corpsVisitList;
+
+	/**
+	 * 未购买
+	 */
+	@TableField(exist = false)
+	private String notPurchased;
+
 }

+ 1 - 1
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/feign/IPJOrderClient.java

@@ -105,7 +105,7 @@ public interface IPJOrderClient {
 	 * @return
 	 */
 	@PostMapping(UPDATE_SHARE_BY_SRCORGID)
-	R updateShareBySrcOrgId(@RequestParam("srcOrgId") String srcOrgId);
+	R updateShareBySrcOrgId(@RequestParam("srcOrgId") String srcOrgId,@RequestParam("tenantId") String tenantId);
 
 	/**
 	 * 审核通过

+ 36 - 0
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/vo/CorpsVisitVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.salesPart.vo;
+
+import org.springblade.salesPart.entity.CorpsVisit;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 客户拜访表视图实体类
+ *
+ * @author BladeX
+ * @since 2025-02-24
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "CorpsVisitVO对象", description = "客户拜访表")
+public class CorpsVisitVO extends CorpsVisit {
+	private static final long serialVersionUID = 1L;
+
+}

+ 1 - 1
blade-service/blade-pay/src/main/java/org/springblade/pay/tonglianPayment/service/impl/PaymentServiceImpl.java

@@ -499,7 +499,7 @@ public class PaymentServiceImpl implements IPaymentService {
 							wechatMark.setSalesCompanyId(selectOrder.getSalesCompanyId());
 							wechatMark.setSalesCompanyName(selectOrder.getSalesCompanyName());
 							amount = amount.add(selectOrder.getPaymentAmountTl());
-							ipjOrderClient.updateShareBySrcOrgId(selectOrder.getId() + "");
+							ipjOrderClient.updateShareBySrcOrgId(selectOrder.getId() + "",parametersDetails.getTenantId());
 							LocalDateTime now = LocalDateTime.now();
 							DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
 							String formatted = now.format(formatter);

+ 138 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/controller/CorpsVisitController.java

@@ -0,0 +1,138 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.salesPart.corps.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.salesPart.corps.service.ICorpsVisitService;
+import org.springblade.salesPart.entity.CorpsVisit;
+import org.springblade.salesPart.vo.CorpsVisitVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+/**
+ * 客户拜访表 控制器
+ *
+ * @author BladeX
+ * @since 2025-02-24
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/corpsvisit")
+@Api(value = "客户拜访表", tags = "客户拜访表接口")
+public class CorpsVisitController extends BladeController {
+
+	private final ICorpsVisitService corpsVisitService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入corpsVisit")
+	public R<CorpsVisit> detail(CorpsVisit corpsVisit) {
+		CorpsVisit detail = corpsVisitService.getOne(Condition.getQueryWrapper(corpsVisit));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 客户拜访表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入corpsVisit")
+	public R<IPage<CorpsVisit>> list(CorpsVisit corpsVisit, Query query) {
+		LambdaQueryWrapper<CorpsVisit> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+		lambdaQueryWrapper.eq(CorpsVisit::getTenantId, AuthUtil.getTenantId())
+			.eq(CorpsVisit::getIsDeleted, 0)
+			.eq(CorpsVisit::getCustomerName, corpsVisit.getCustomerName())
+			.eq(CorpsVisit::getVisitPeopleName, corpsVisit.getVisitPeopleName())
+			.orderByDesc(CorpsVisit::getVisitDate);
+		if (corpsVisit.getVisitDateList() != null && corpsVisit.getVisitDateList().size() > 1) {//拜访日期
+			lambdaQueryWrapper.ge(CorpsVisit::getVisitDateList, corpsVisit.getVisitDateList().get(0));
+			lambdaQueryWrapper.le(CorpsVisit::getVisitDateList, corpsVisit.getVisitDateList().get(1));
+		}
+		IPage<CorpsVisit> pages = corpsVisitService.page(Condition.getPage(query), lambdaQueryWrapper);
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 客户拜访表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入corpsVisit")
+	public R<IPage<CorpsVisitVO>> page(CorpsVisitVO corpsVisit, Query query) {
+		IPage<CorpsVisitVO> pages = corpsVisitService.selectCorpsVisitPage(Condition.getPage(query), corpsVisit);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 客户拜访表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入corpsVisit")
+	public R save(@Valid @RequestBody CorpsVisit corpsVisit) {
+		return R.status(corpsVisitService.save(corpsVisit));
+	}
+
+	/**
+	 * 修改 客户拜访表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入corpsVisit")
+	public R update(@Valid @RequestBody CorpsVisit corpsVisit) {
+		return R.status(corpsVisitService.updateById(corpsVisit));
+	}
+
+	/**
+	 * 新增或修改 客户拜访表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入corpsVisit")
+	public R submit(@Valid @RequestBody CorpsVisit corpsVisit) {
+		return corpsVisitService.submit(corpsVisit);
+	}
+
+
+	/**
+	 * 删除 客户拜访表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(corpsVisitService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 16 - 11
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/mapper/CorpsDescMapper.xml

@@ -372,19 +372,24 @@
                 FROM
                     pjpf_order po
                 WHERE
-                    po.busines_date >= CURDATE() - INTERVAL #{CorpsDesc.days} DAY
-                  AND po.tenant_id = #{CorpsDesc.tenantId}
-                  AND po.is_deleted = '0'
-                  AND po.bs_type = 'XS'
-                  AND FIND_IN_SET( po.`status`, '已发货,已收货' )
+                    po.tenant_id = #{CorpsDesc.tenantId}
+                    AND po.is_deleted = '0'
+                    AND po.bs_type = 'XS'
+                    AND FIND_IN_SET( po.`status`, '已发货,已收货' )
+                    AND  po.busines_date >= CURDATE() - INTERVAL #{CorpsDesc.days} DAY
             ) o ON pcd.id = o.customer_id
         WHERE
-            o.customer_id IS NULL
-          AND pcd.corp_type = 'KH'
-          AND pcd.tenant_id = #{CorpsDesc.tenantId}
-          AND pcd.is_deleted = '0'
-        AND pca.tenant_id = #{CorpsDesc.tenantId}
-        AND pca.is_deleted = '0'
+            pcd.corp_type = 'KH'
+            AND pcd.tenant_id = #{CorpsDesc.tenantId}
+            AND pcd.is_deleted = '0'
+            AND pca.tenant_id = #{CorpsDesc.tenantId}
+            AND pca.is_deleted = '0'
+        <if test="CorpsDesc.notPurchased !=null  and CorpsDesc.notPurchased != ''">
+            AND  o.customer_id IS NOT NULL
+        </if>
+        <if test="CorpsDesc.notPurchased == null">
+            AND  o.customer_id IS NULL
+        </if>
         <if test="CorpsDesc.cname !=null and CorpsDesc.cname != ''">
             and pcd.cname like CONCAT(CONCAT('%', #{CorpsDesc.cname}), '%')
         </if>

+ 42 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/mapper/CorpsVisitMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.salesPart.corps.mapper;
+
+import org.springblade.salesPart.entity.CorpsVisit;
+import org.springblade.salesPart.vo.CorpsVisitVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 客户拜访表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2025-02-24
+ */
+public interface CorpsVisitMapper extends BaseMapper<CorpsVisit> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param corpsVisit
+	 * @return
+	 */
+	List<CorpsVisitVO> selectCorpsVisitPage(IPage page, CorpsVisitVO corpsVisit);
+
+}

+ 30 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/mapper/CorpsVisitMapper.xml

@@ -0,0 +1,30 @@
+<?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="org.springblade.salesPart.corps.mapper.CorpsVisitMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="corpsVisitResultMap" type="org.springblade.salesPart.entity.CorpsVisit">
+        <id column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="remarks" property="remarks"/>
+        <result column="content" property="content"/>
+        <result column="visit_date" property="visitDate"/>
+        <result column="visit_people_id" property="visitPeopleId"/>
+        <result column="visit_people_name" property="visitPeopleName"/>
+        <result column="customer_id" property="customerId"/>
+        <result column="customer_name" property="customerName"/>
+        <result column="longitude" property="longitude"/>
+        <result column="dimension" property="dimension"/>
+        <result column="address" property="address"/>
+    </resultMap>
+
+
+    <select id="selectCorpsVisitPage" resultMap="corpsVisitResultMap">
+        select * from pjpf_corps_visit where is_deleted = 0
+    </select>
+
+</mapper>

+ 43 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/service/ICorpsVisitService.java

@@ -0,0 +1,43 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.salesPart.corps.service;
+
+import org.springblade.core.tool.api.R;
+import org.springblade.salesPart.entity.CorpsVisit;
+import org.springblade.salesPart.vo.CorpsVisitVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 客户拜访表 服务类
+ *
+ * @author BladeX
+ * @since 2025-02-24
+ */
+public interface ICorpsVisitService extends IService<CorpsVisit> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param corpsVisit
+	 * @return
+	 */
+	IPage<CorpsVisitVO> selectCorpsVisitPage(IPage<CorpsVisitVO> page, CorpsVisitVO corpsVisit);
+
+	R submit(CorpsVisit corpsVisit);
+}

+ 11 - 5
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/service/impl/CorpsDescServiceImpl.java

@@ -34,6 +34,7 @@ import org.springblade.salesPart.corps.mapper.CorpsDescMapper;
 import org.springblade.salesPart.corps.mapper.CorpsTypeDescMapper;
 import org.springblade.salesPart.corps.mapper.CorpsTypeMapper;
 import org.springblade.salesPart.corps.service.ICorpsDescService;
+import org.springblade.salesPart.corps.service.ICorpsVisitService;
 import org.springblade.salesPart.entity.*;
 import org.springblade.salesPart.excel.CorpsDescImportExcel;
 import org.springblade.salesPart.excel.CorpsImportBrandExcel;
@@ -72,6 +73,7 @@ public class CorpsDescServiceImpl extends ServiceImpl<CorpsDescMapper, PjCorpsDe
 	private final CorpsTypeDescServiceImpl corpsTypeDescService;//客户类别对应表
 	private final CorpsTypeServiceImpl corpsTypeService;//客户类别
 	private final IStorageDescService storageDescService;//仓库
+	private final ICorpsVisitService corpsVisitService;//拜访记录
 
 	private final CorpsTypeMapper corpsTypeMapper;
 	private final IUserClient userClient;
@@ -1195,6 +1197,9 @@ public class CorpsDescServiceImpl extends ServiceImpl<CorpsDescMapper, PjCorpsDe
 
 	@Override
 	public IPage<PjCorpsDesc> appCustomerAnalysis(IPage<PjCorpsDesc> page, PjCorpsDesc corpsDescDto) {
+		if(ObjectUtils.isNull(corpsDescDto.getDays())){
+
+		}
 		List<PjCorpsDesc> corpsDescList = baseMapper.appCustomerAnalysis(page, corpsDescDto);
 		Date date = new Date();
 		for (PjCorpsDesc item : corpsDescList) {
@@ -1214,11 +1219,12 @@ public class CorpsDescServiceImpl extends ServiceImpl<CorpsDescMapper, PjCorpsDe
 			.eq(PjCorpsAttn::getTenantId, AuthUtil.getTenantId())
 			.eq(PjCorpsAttn::getIsDeleted, 0)
 			.eq(PjCorpsAttn::getPid, id));
-		if (!corpsAttnList.isEmpty()) {
-			List<PjCorpsAttn> attnList = corpsAttnList.stream().filter(e -> e.getPid().equals(id))
-				.collect(Collectors.toList());
-			corpsDesc.setCorpsAttnList(attnList.isEmpty() ? new ArrayList<>() : attnList);
-		}
+		corpsDesc.setCorpsAttnList(corpsAttnList.isEmpty() ? new ArrayList<>() : corpsAttnList);
+		List<CorpsVisit> corpsVisitList = corpsVisitService.list(new LambdaQueryWrapper<CorpsVisit>()
+			.eq(CorpsVisit::getTenantId, AuthUtil.getTenantId())
+			.eq(CorpsVisit::getIsDeleted, 0)
+			.eq(CorpsVisit::getCustomerId, id));
+		corpsDesc.setCorpsVisitList(corpsVisitList.isEmpty() ? new ArrayList<>() : corpsVisitList);
 		return corpsDesc;
 	}
 

+ 68 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/corps/service/impl/CorpsVisitServiceImpl.java

@@ -0,0 +1,68 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.salesPart.corps.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.secure.utils.SecureUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.salesPart.corps.mapper.CorpsVisitMapper;
+import org.springblade.salesPart.corps.service.ICorpsVisitService;
+import org.springblade.salesPart.entity.CorpsVisit;
+import org.springblade.salesPart.vo.CorpsVisitVO;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+
+/**
+ * 客户拜访表 服务实现类
+ *
+ * @author BladeX
+ * @since 2025-02-24
+ */
+@Service
+public class CorpsVisitServiceImpl extends ServiceImpl<CorpsVisitMapper, CorpsVisit> implements ICorpsVisitService {
+
+	@Override
+	public IPage<CorpsVisitVO> selectCorpsVisitPage(IPage<CorpsVisitVO> page, CorpsVisitVO corpsVisit) {
+		return page.setRecords(baseMapper.selectCorpsVisitPage(page, corpsVisit));
+	}
+
+	@Override
+	public R submit(CorpsVisit corpsVisit) {
+		Long userId = SecureUtil.getUserId();
+		if (corpsVisit.getId() == null) {
+			corpsVisit.setTenantId(SecureUtil.getTenantId());
+			corpsVisit.setCreateTime(new Date());
+			corpsVisit.setCreateUser(userId);
+			corpsVisit.setVisitDate(new Date());
+			corpsVisit.setVisitPeopleId(AuthUtil.getUserId());
+			corpsVisit.setVisitPeopleName(AuthUtil.getUserName());
+			baseMapper.insert(corpsVisit);
+		} else {
+			corpsVisit.setTenantId(SecureUtil.getTenantId());
+			corpsVisit.setUpdateTime(new Date());
+			corpsVisit.setUpdateUser(AuthUtil.getUserId());
+			corpsVisit.setVisitPeopleId(AuthUtil.getUserId());
+			corpsVisit.setVisitPeopleName(AuthUtil.getUserName());
+			baseMapper.updateById(corpsVisit);
+		}
+		return R.data(corpsVisit);
+	}
+
+}

+ 3 - 3
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/feign/PJOrderClient.java

@@ -131,7 +131,7 @@ public class PJOrderClient implements IPJOrderClient {
 	}
 
 	@Override
-	public R updateShareBySrcOrgId(String srcOrgId) {
+	public R updateShareBySrcOrgId(String srcOrgId, String tenantId) {
 		List<PjOrderItems> shoppingCartList = orderItemsService.list(new LambdaQueryWrapper<PjOrderItems>().eq(PjOrderItems::getPid, srcOrgId));
 		List<PjProductLaunch> productLaunchListNew = new ArrayList<>();
 		shoppingCartList.forEach(e -> {
@@ -153,8 +153,8 @@ public class PJOrderClient implements IPJOrderClient {
 				}
 			}
 		});
-		String stata = sysClient.getParamService("whether.open.share");
-		if (!productLaunchListNew.isEmpty() && "1".equals(stata)){
+		String stata = sysClient.paramServiceValue(tenantId, "whether.open.share");
+		if (!productLaunchListNew.isEmpty() && "1".equals(stata)) {
 			sharePutOnShelvesService.updateShareInventory(productLaunchListNew);
 		}
 		return R.data(shoppingCartList);

+ 8 - 8
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/service/impl/OrderServiceImpl.java

@@ -5553,7 +5553,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
 						throw new RuntimeException("商品:" + e.getGoodsName() + "未上架");
 					}
 				});
-				String stata = sysClient.getParamService("whether.open.share");
+				String stata = sysClient.paramServiceValue(AuthUtil.getTenantId(),"whether.open.share");
 				if (!productLaunchListNew.isEmpty() && "1".equals(stata)) {
 					sharePutOnShelvesService.updateShareInventory(productLaunchListNew);
 				}
@@ -5858,7 +5858,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
 						}
 					}
 				});
-				String stata = sysClient.getParamService("whether.open.share");
+				String stata = sysClient.paramServiceValue(AuthUtil.getTenantId(), "whether.open.share");
 				if (!productLaunchListNew.isEmpty() && "1".equals(stata)) {
 					sharePutOnShelvesService.updateShareInventory(productLaunchListNew);
 				}
@@ -6079,7 +6079,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
 			}
 		}
 		List<PjOrder> pjOrderShareList = new ArrayList<>();
-		String status = sysClient.getParamService("whether.open.share");
+		String status = sysClient.paramServiceValue(AuthUtil.getTenantId(), "whether.open.share");
 		if ("1".equals(status)) {
 			pjOrderShareList = baseMapper.selectList(new LambdaQueryWrapper<PjOrder>()
 				.eq(PjOrder::getSrcOrdNo, declare.getSrcOrdNo())
@@ -6183,7 +6183,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
 		}
 		order.setVersion(order.getVersion() + 1);
 		orderListNew.add(order);
-		String shareStatus = sysClient.getParamService("whether.open.share");
+		String shareStatus = sysClient.paramServiceValue(AuthUtil.getTenantId(), "whether.open.share");
 		if ("1".equals(shareStatus)) {
 			List<PjOrder> orderShareList = baseMapper.selectList(new LambdaQueryWrapper<PjOrder>()
 				.eq(PjOrder::getSrcOrdNo, order.getSrcOrdNo())
@@ -6380,7 +6380,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
 										}
 										productLaunchListNew.add(e);
 									});
-									String stata = sysClient.getParamService("whether.open.share");
+									String stata = sysClient.paramServiceValue(AuthUtil.getTenantId(), "whether.open.share");
 									if (!productLaunchListNew.isEmpty() && "1".equals(stata)) {
 										sharePutOnShelvesService.updateShareInventory(productLaunchListNew);
 									}
@@ -6499,7 +6499,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
 		}
 		List<PjOrder> pjOrderShareList = new ArrayList<>();
 		pjOrderShareList.add(order);
-		String status = sysClient.getParamService("whether.open.share");
+		String status = sysClient.paramServiceValue(AuthUtil.getTenantId(), "whether.open.share");
 		if ("1".equals(status)) {
 			List<PjOrder> pjOrderShare = baseMapper.selectList(new LambdaQueryWrapper<PjOrder>()
 				.eq(PjOrder::getSrcOrdNo, order.getSrcOrdNo())
@@ -6531,7 +6531,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
 		if ("XS".equals(order.getBsType()) || "TKXS".equals(order.getBsType()) || "GX".equals(order.getBsType())) {
 			List<PjOrder> pjOrderShareList = new ArrayList<>();
 			pjOrderShareList.add(order);
-			String status = sysClient.getParamService("whether.open.share");
+			String status = sysClient.paramServiceValue(AuthUtil.getTenantId(), "whether.open.share");
 			if ("1".equals(status)) {
 				List<PjOrder> pjOrderShare = baseMapper.selectList(new LambdaQueryWrapper<PjOrder>()
 					.eq(PjOrder::getSrcOrdNo, order.getSrcOrdNo())
@@ -6658,7 +6658,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
 		}
 		List<PjOrder> pjOrderShareList = new ArrayList<>();
 		pjOrderShareList.add(declare);
-		String status = sysClient.getParamService("whether.open.share");
+		String status = sysClient.paramServiceValue(AuthUtil.getTenantId(), "whether.open.share");
 		if ("1".equals(status)) {
 			List<PjOrder> pjOrderShare = baseMapper.selectList(new LambdaQueryWrapper<PjOrder>()
 				.eq(PjOrder::getSrcOrdNo, declare.getSrcOrdNo())

+ 2 - 2
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/payMethod/PayServiceImpl.java

@@ -81,7 +81,7 @@ public class PayServiceImpl implements PayService {
 		}
 		try {
 
-			String count = sysClient.getParamServiceNew("cashier.payment");
+			String count = sysClient.paramServiceValue(parameters.getTenantId(), "cashier.payment");
 			PaymentDTO paymentDTO = new PaymentDTO();
 			paymentDTO.setTrxamt(amount.multiply(new BigDecimal(100)).intValue());
 			paymentDTO.setReqsn(serialNumber);
@@ -94,7 +94,7 @@ public class PayServiceImpl implements PayService {
 			paymentDTO.setRemark("备注");
 			paymentDTO.setAcct(r.getData().getOpenId());
 			paymentDTO.setValidtime(parameters.getValidtime());
-			String openShare = sysClient.getParamServiceNew("whether.open.share");
+			String openShare = sysClient.paramServiceValue(parameters.getTenantId(), "whether.open.share");
 			if ("1".equals(openShare)){
 				paymentDTO.setNotify_url(parameters.getNotifyUrl() + "/api/blade-pay/tongLianPayment/cashierPaymentShareNotify");
 			}else{

+ 2 - 1
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/share/service/impl/SharePutOnShelvesServiceImpl.java

@@ -1017,9 +1017,10 @@ public class SharePutOnShelvesServiceImpl extends ServiceImpl<SharePutOnShelvesM
 				item.setInventory(pjProductLaunch.getInventory());
 				item.setUpdateTime(new Date());
 				item.setUpdateUser(AuthUtil.getUserId());
+				baseMapper.updateSharePutOnShelves(item);
 			}
 		}
-		this.updateBatchById(sharePutOnShelvesList);
+//		this.updateBatchById(sharePutOnShelvesList);
 		return R.success("操作成功");
 	}
 

+ 6 - 6
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/ship/service/impl/ShipServiceImpl.java

@@ -2343,7 +2343,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
 			if (!res.isSuccess()) {
 				throw new RuntimeException(res.getMsg());
 			}
-			String stata = sysClient.getParamService("whether.open.share");
+			String stata = sysClient.paramServiceValue(AuthUtil.getTenantId(), "whether.open.share");
 			if (!pjProductLaunchList.isEmpty() && "1".equals(stata)){
 				sharePutOnShelvesService.updateShareInventory(pjProductLaunchList);
 			}
@@ -2969,7 +2969,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
 			if (!res.isSuccess()) {
 				throw new RuntimeException(res.getMsg());
 			}
-			String stata = sysClient.getParamService("whether.open.share");
+			String stata = sysClient.paramServiceValue(AuthUtil.getTenantId(), "whether.open.share");
 			if (!pjProductLaunchList.isEmpty() && "1".equals(stata)){
 				sharePutOnShelvesService.updateShareInventory(pjProductLaunchList);
 			}
@@ -4122,7 +4122,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
 			if (!res1.isSuccess()) {
 				throw new RuntimeException(res1.getMsg());
 			}
-			String stata = sysClient.getParamService("whether.open.share");
+			String stata = sysClient.paramServiceValue(AuthUtil.getTenantId(), "whether.open.share");
 			if (!pjProductLaunchList.isEmpty() && "1".equals(stata)){
 				sharePutOnShelvesService.updateShareInventory(pjProductLaunchList);
 			}
@@ -4570,7 +4570,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
 			if (!res1.isSuccess()) {
 				throw new RuntimeException(res1.getMsg());
 			}
-			String stata = sysClient.getParamService("whether.open.share");
+			String stata = sysClient.paramServiceValue(AuthUtil.getTenantId(), "whether.open.share");
 			if (!pjProductLaunchList.isEmpty() && "1".equals(stata)){
 				sharePutOnShelvesService.updateShareInventory(pjProductLaunchList);
 			}
@@ -5144,7 +5144,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
 			if (!res.isSuccess()) {
 				throw new RuntimeException(res.getMsg());
 			}
-			String stata = sysClient.getParamService("whether.open.share");
+			String stata = sysClient.paramServiceValue(AuthUtil.getTenantId(), "whether.open.share");
 			if (!pjProductLaunchList.isEmpty() && "1".equals(stata)){
 				sharePutOnShelvesService.updateShareInventory(pjProductLaunchList);
 			}
@@ -5470,7 +5470,7 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
 			if (!res.isSuccess()) {
 				throw new RuntimeException(res.getMsg());
 			}
-			String stata = sysClient.getParamService("whether.open.share");
+			String stata = sysClient.paramServiceValue(AuthUtil.getTenantId(), "whether.open.share");
 			if (!pjProductLaunchList.isEmpty() && "1".equals(stata)){
 				sharePutOnShelvesService.updateShareInventory(pjProductLaunchList);
 			}