Explorar o código

经销商PC理赔,销售线索接口bug修改

纪新园 hai 4 meses
pai
achega
bd787cdefe

+ 34 - 0
blade-service-api/gubersail-dealer-admin-api/src/main/java/com/gubersail/dealer/admin/api/zcrm/customer/dto/ViewCustomerSelDTO.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 com.gubersail.dealer.admin.api.zcrm.customer.dto;
+
+import com.gubersail.dealer.admin.api.zcrm.customer.entity.ViewCustomerSel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 客户档案数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2025-09-16
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ViewCustomerSelDTO extends ViewCustomerSel {
+	private static final long serialVersionUID = 1L;
+
+}

+ 379 - 0
blade-service-api/gubersail-dealer-admin-api/src/main/java/com/gubersail/dealer/admin/api/zcrm/customer/entity/ViewCustomerSel.java

@@ -0,0 +1,379 @@
+/*
+ *      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 com.gubersail.dealer.admin.api.zcrm.customer.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 客户档案实体类
+ *
+ * @author BladeX
+ * @since 2025-09-16
+ */
+@Data
+@TableName("zcrm_view_customer_sel")
+@ApiModel(value = "ViewCustomerSel对象", description = "客户档案")
+public class ViewCustomerSel implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* ID
+	*/
+		@ApiModelProperty(value = "ID")
+		@TableId(value = "id", type = IdType.AUTO)
+	private Long id;
+	/**
+	* 组织 ID
+	*/
+		@ApiModelProperty(value = "组织 ID")
+		@TableField("ORG_ID")
+	private Long orgId;
+	/**
+	* 组织 编码
+	*/
+		@ApiModelProperty(value = "组织 编码")
+		@TableField("ORG_CODE")
+	private String orgCode;
+	/**
+	* 组织 名称
+	*/
+		@ApiModelProperty(value = "组织 名称")
+		@TableField("ORG_NAME")
+	private String orgName;
+	/**
+	* 客户 ID
+	*/
+		@ApiModelProperty(value = "客户 ID")
+		@TableField("Customer_ID")
+	private Long customerId;
+	/**
+	* 客户 编码
+	*/
+		@ApiModelProperty(value = "客户 编码")
+		@TableField("Customer_CODE")
+	private String customerCode;
+	/**
+	* 客户 名称
+	*/
+		@ApiModelProperty(value = "客户 名称")
+		@TableField("Customer_NAME")
+	private String customerName;
+	/**
+	* 客户 简称
+	*/
+		@ApiModelProperty(value = "客户 简称")
+		@TableField("Customer_ShortName")
+	private String customerShortname;
+	/**
+	* 分类 ID
+	*/
+		@ApiModelProperty(value = "分类 ID")
+		@TableField("CustomerCategory_ID")
+	private Long customercategoryId;
+	/**
+	* 分类 编码
+	*/
+		@ApiModelProperty(value = "分类 编码")
+		@TableField("CustomerCategory_CODE")
+	private String customercategoryCode;
+	/**
+	* 分类 名称
+	*/
+		@ApiModelProperty(value = "分类 名称")
+		@TableField("CustomerCategory_NAME")
+	private String customercategoryName;
+	/**
+	* 创建人名称
+	*/
+		@ApiModelProperty(value = "创建人名称")
+		@TableField("CreatedBy")
+	private String createdby;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		@TableField("CreatedOn")
+	private LocalDateTime createdon;
+	/**
+	* 修改人名称
+	*/
+		@ApiModelProperty(value = "修改人名称")
+		@TableField("ModifiedBy")
+	private String modifiedby;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		@TableField("ModifiedOn")
+	private LocalDateTime modifiedon;
+	/**
+	* 税号
+	*/
+		@ApiModelProperty(value = "税号")
+		@TableField("StateTaxNo")
+	private String statetaxno;
+	/**
+	* 开票名称
+	*/
+		@ApiModelProperty(value = "开票名称")
+		@TableField("BuyerNoteName")
+	private String buyernotename;
+	/**
+	* 开户银行
+	*/
+		@ApiModelProperty(value = "开户银行")
+		@TableField("BuyerBankAccount")
+	private String buyerbankaccount;
+	/**
+	* 购买方账号
+	*/
+		@ApiModelProperty(value = "购买方账号")
+		@TableField("BuyerBankAccountCode")
+	private String buyerbankaccountcode;
+	/**
+	* 纳税人识别号
+	*/
+		@ApiModelProperty(value = "纳税人识别号")
+		private String extend9;
+	/**
+	* 税组合 ID
+	*/
+		@ApiModelProperty(value = "税组合 ID")
+		@TableField("TaxSchedule_ID")
+	private Long taxscheduleId;
+	/**
+	* 税组合 编号
+	*/
+		@ApiModelProperty(value = "税组合 编号")
+		@TableField("TaxSchedule_CODE")
+	private String taxscheduleCode;
+	/**
+	* 税组合 名称
+	*/
+		@ApiModelProperty(value = "税组合 名称")
+		@TableField("TaxSchedule_NAME")
+	private String taxscheduleName;
+	/**
+	* 税率
+	*/
+		@ApiModelProperty(value = "税率")
+		@TableField("TaxRate")
+	private BigDecimal taxrate;
+	/**
+	* 联系人
+	*/
+		@ApiModelProperty(value = "联系人")
+		@TableField("DescFlexField_PrivateDescSeg1")
+	private String descflexfieldPrivatedescseg1;
+	/**
+	* 电话
+	*/
+		@ApiModelProperty(value = "电话")
+		@TableField("DescFlexField_PrivateDescSeg2")
+	private String descflexfieldPrivatedescseg2;
+	/**
+	* 地址
+	*/
+		@ApiModelProperty(value = "地址")
+		@TableField("DescFlexField_PrivateDescSeg3")
+	private String descflexfieldPrivatedescseg3;
+	/**
+	* 部门 ID
+	*/
+		@ApiModelProperty(value = "部门 ID")
+		@TableField("Department_ID")
+	private Long departmentId;
+	/**
+	* 部门 编号
+	*/
+		@ApiModelProperty(value = "部门 编号")
+		@TableField("Department_CODE")
+	private String departmentCode;
+	/**
+	* 部门 名称
+	*/
+		@ApiModelProperty(value = "部门 名称")
+		@TableField("Department_NAME")
+	private String departmentName;
+	/**
+	* 业务员 ID
+	*/
+		@ApiModelProperty(value = "业务员 ID")
+		@TableField("Saleser_ID")
+	private Long saleserId;
+	/**
+	* 业务员 编号
+	*/
+		@ApiModelProperty(value = "业务员 编号")
+		@TableField("Saleser_CODE")
+	private String saleserCode;
+	/**
+	* 业务员 名称
+	*/
+		@ApiModelProperty(value = "业务员 名称")
+		@TableField("Saleser_NAME")
+	private String saleserName;
+	/**
+	* 币种 ID
+	*/
+		@ApiModelProperty(value = "币种 ID")
+		@TableField("TradeCurrency_ID")
+	private Long tradecurrencyId;
+	/**
+	* 币种 币种
+	*/
+		@ApiModelProperty(value = "币种 币种")
+		@TableField("TradeCurrency_CODE")
+	private String tradecurrencyCode;
+	/**
+	* 币种 名称
+	*/
+		@ApiModelProperty(value = "币种 名称")
+		@TableField("TradeCurrency_NAME")
+	private String tradecurrencyName;
+	/**
+	* 价目表 ID
+	*/
+		@ApiModelProperty(value = "价目表 ID")
+		@TableField("PriceList_ID")
+	private Long pricelistId;
+	/**
+	* 价目表 编号
+	*/
+		@ApiModelProperty(value = "价目表 编号")
+		@TableField("PriceList_CODE")
+	private String pricelistCode;
+	/**
+	* 价目表 名称
+	*/
+		@ApiModelProperty(value = "价目表 名称")
+		@TableField("PriceList_NAME")
+	private String pricelistName;
+	/**
+	* 价格含税 0 不含税 1 含税
+	*/
+		@ApiModelProperty(value = "价格含税 0 不含税 1 含税")
+		@TableField("IsTaxPrice")
+	private Integer istaxprice;
+	/**
+	* 出货原则 ID
+	*/
+		@ApiModelProperty(value = "出货原则 ID")
+		@TableField("ShippmentRule_ID")
+	private Long shippmentruleId;
+	/**
+	* 出货原则 编号
+	*/
+		@ApiModelProperty(value = "出货原则 编号")
+		@TableField("ShippmentRule_CODE")
+	private String shippmentruleCode;
+	/**
+	* 出货原则 名称
+	*/
+		@ApiModelProperty(value = "出货原则 名称")
+		@TableField("ShippmentRule_NAME")
+	private String shippmentruleName;
+	/**
+	* 收款条件 ID
+	*/
+		@ApiModelProperty(value = "收款条件 ID")
+		@TableField("RecervalTerm_ID")
+	private Long recervaltermId;
+	/**
+	* 收款条件 编号
+	*/
+		@ApiModelProperty(value = "收款条件 编号")
+		@TableField("RecervalTerm_CODE")
+	private String recervaltermCode;
+	/**
+	* 收款条件 名称
+	*/
+		@ApiModelProperty(value = "收款条件 名称")
+		@TableField("RecervalTerm_NAME")
+	private String recervaltermName;
+	/**
+	* 应收立账条件 ID
+	*/
+		@ApiModelProperty(value = "应收立账条件 ID")
+		@TableField("ARConfirmTerm_ID")
+	private Long arconfirmtermId;
+	/**
+	* 应收立账条件 编号
+	*/
+		@ApiModelProperty(value = "应收立账条件 编号")
+		@TableField("ARConfirmTerm_CODE")
+	private String arconfirmtermCode;
+	/**
+	* 应收立账条件 名称
+	*/
+		@ApiModelProperty(value = "应收立账条件 名称")
+		@TableField("ARConfirmTerm_NAME")
+	private String arconfirmtermName;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remark;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private LocalDateTime createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private LocalDateTime updateTime;
+	/**
+	* 状态
+	*/
+		@ApiModelProperty(value = "状态")
+		private Integer status;
+	/**
+	* 是否已删除
+	*/
+		@ApiModelProperty(value = "是否已删除")
+		private Integer isDeleted;
+
+
+}

+ 36 - 0
blade-service-api/gubersail-dealer-admin-api/src/main/java/com/gubersail/dealer/admin/api/zcrm/customer/vo/ViewCustomerSelVO.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 com.gubersail.dealer.admin.api.zcrm.customer.vo;
+
+import com.gubersail.dealer.admin.api.zcrm.customer.entity.ViewCustomerSel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 客户档案视图实体类
+ *
+ * @author BladeX
+ * @since 2025-09-16
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "ViewCustomerSelVO对象", description = "客户档案")
+public class ViewCustomerSelVO extends ViewCustomerSel {
+	private static final long serialVersionUID = 1L;
+
+}

+ 2 - 0
blade-service/gubersail-dealer-admin/src/main/java/com/gubersail/admin/lead/controller/BladeSalesLeadController.java

@@ -81,6 +81,8 @@ public class BladeSalesLeadController extends BladeController {
 		LambdaQueryWrapper<BladeSalesLead> lambdaQueryWrapper = new LambdaQueryWrapper<>();
 		lambdaQueryWrapper.eq(BladeSalesLead::getIsDeleted, 0)
 			.like(ObjectUtils.isNotNull(bladeSalesLead.getLeadCode()), BladeSalesLead::getLeadCode, bladeSalesLead.getLeadCode())
+			.like(ObjectUtils.isNotNull(bladeSalesLead.getTitle()), BladeSalesLead::getTitle, bladeSalesLead.getTitle())
+			.eq(ObjectUtils.isNotNull(bladeSalesLead.getGroupName()), BladeSalesLead::getGroupName, bladeSalesLead.getGroupName())
 			.eq(ObjectUtils.isNotNull(bladeSalesLead.getCustomerId()), BladeSalesLead::getCustomerId, bladeSalesLead.getCustomerId())
 			.like(ObjectUtils.isNotNull(bladeSalesLead.getContactName()), BladeSalesLead::getContactName, bladeSalesLead.getContactName())
 			.like(ObjectUtils.isNotNull(bladeSalesLead.getContactPhone()), BladeSalesLead::getContactPhone, bladeSalesLead.getContactPhone())

+ 34 - 6
blade-service/gubersail-dealer-admin/src/main/java/com/gubersail/admin/lead/service/impl/BladeSalesLeadServiceImpl.java

@@ -25,12 +25,11 @@ import com.gubersail.admin.lead.service.IBladeSalesLeadDetailService;
 import com.gubersail.admin.lead.service.IBladeSalesLeadService;
 import com.gubersail.admin.util.BillCodeUtil;
 import com.gubersail.admin.wrapper.SalesLeadWrapper;
-import com.gubersail.dealer.admin.api.claim.entity.BladeClaim;
-import com.gubersail.dealer.admin.api.claim.entity.BladeClaimAttachment;
-import com.gubersail.dealer.admin.api.claim.entity.BladeClaimAudit;
+import com.gubersail.admin.zcrm.customer.service.IViewCustomerSelService;
 import com.gubersail.dealer.admin.api.lead.entity.BladeSalesLead;
 import com.gubersail.dealer.admin.api.lead.entity.BladeSalesLeadDetail;
 import com.gubersail.dealer.admin.api.lead.vo.BladeSalesLeadVO;
+import com.gubersail.dealer.admin.api.zcrm.customer.entity.ViewCustomerSel;
 import lombok.AllArgsConstructor;
 import org.springblade.common.enums.NumberEnum;
 import org.springblade.core.secure.utils.AuthUtil;
@@ -63,6 +62,8 @@ public class BladeSalesLeadServiceImpl extends ServiceImpl<BladeSalesLeadMapper,
 
 	private final IUserClient userClient;
 
+	private final IViewCustomerSelService viewCustomerSelService;
+
 	@Override
 	public IPage<BladeSalesLeadVO> selectBladeSalesLeadPage(IPage<BladeSalesLeadVO> page, BladeSalesLeadVO bladeSalesLead) {
 		return page.setRecords(baseMapper.selectBladeSalesLeadPage(page, bladeSalesLead));
@@ -73,13 +74,13 @@ public class BladeSalesLeadServiceImpl extends ServiceImpl<BladeSalesLeadMapper,
 		//通过id查询销售线索数据
 		BladeSalesLead salesLead = this.getById(bladeSalesLead.getId());
 		//数据实体类转换
-		BladeSalesLeadVO salesLeadVO= SalesLeadWrapper.build().entityVO(salesLead);
+		BladeSalesLeadVO salesLeadVO = SalesLeadWrapper.build().entityVO(salesLead);
 		R<User> createUserR = userClient.userInfoById(salesLead.getCreateUser());
-		if (createUserR.isSuccess() && ObjectUtils.isNotNull(createUserR.getData())){
+		if (createUserR.isSuccess() && ObjectUtils.isNotNull(createUserR.getData())) {
 			salesLeadVO.setCreateUserName(createUserR.getData().getRealName());
 		}
 		R<User> updateUserR = userClient.userInfoById(salesLead.getUpdateUser());
-		if (updateUserR.isSuccess() && ObjectUtils.isNotNull(updateUserR.getData())){
+		if (updateUserR.isSuccess() && ObjectUtils.isNotNull(updateUserR.getData())) {
 			salesLeadVO.setUpdateUserName(updateUserR.getData().getRealName());
 		}
 		//查询销售线索详细数据
@@ -105,6 +106,33 @@ public class BladeSalesLeadServiceImpl extends ServiceImpl<BladeSalesLeadMapper,
 			salesLead.setLeadCode(billNo);
 			salesLead.setCreateTime(new Date());
 			salesLead.setCreateUser(AuthUtil.getUserId());
+			//查询当前登录人信息
+			R<User> userR = userClient.userInfoById(AuthUtil.getUserId());
+			if (!userR.isSuccess() || ObjectUtils.isNull(userR.getData())) {
+				throw new RuntimeException("未查到当前登录人用户信息");
+			}
+			//判断当前登录人角色是否是管理员
+			if (AuthUtil.getUserRole().contains("admin")) {
+				salesLead.setContactName(userR.getData().getRealName());
+				salesLead.setContactPhone(userR.getData().getPhone());
+				salesLead.setCustomerId(AuthUtil.getUserId());
+				salesLead.setCustomerCode("");
+				salesLead.setCustomerName(userR.getData().getRealName());
+			} else {
+				//不是管理员角色需要按照用户信息中客户id查询客户信息
+				ViewCustomerSel customerSel = viewCustomerSelService.getOne(new LambdaQueryWrapper<ViewCustomerSel>()
+					.eq(ViewCustomerSel::getIsDeleted, 0)
+					.eq(ViewCustomerSel::getCustomerId, userR.getData().getCustomerId())
+					.last("LIMIT 1"));
+				if (customerSel == null) {
+					throw new RuntimeException("未查到客户档案信息");
+				}
+				salesLead.setContactName(customerSel.getDescflexfieldPrivatedescseg1());
+				salesLead.setContactPhone(customerSel.getDescflexfieldPrivatedescseg2());
+				salesLead.setCustomerId(customerSel.getCustomerId());
+				salesLead.setCustomerCode(customerSel.getCustomerCode());
+				salesLead.setCustomerName(customerSel.getCustomerName());
+			}
 		} else {
 			BladeSalesLead dataSourceLead = baseMapper.selectOne(new LambdaQueryWrapper<BladeSalesLead>()
 				.select(BladeSalesLead::getId, BladeSalesLead::getVersion)

+ 126 - 0
blade-service/gubersail-dealer-admin/src/main/java/com/gubersail/admin/zcrm/customer/controller/ViewCustomerSelController.java

@@ -0,0 +1,126 @@
+/*
+ *      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 com.gubersail.admin.zcrm.customer.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gubersail.dealer.admin.api.zcrm.customer.entity.ViewCustomerSel;
+import com.gubersail.dealer.admin.api.zcrm.customer.vo.ViewCustomerSelVO;
+import com.gubersail.admin.zcrm.customer.service.IViewCustomerSelService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 客户档案 控制器
+ *
+ * @author BladeX
+ * @since 2025-09-16
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/viewcustomersel")
+@Api(value = "客户档案", tags = "客户档案接口")
+public class ViewCustomerSelController extends BladeController {
+
+	private final IViewCustomerSelService viewCustomerSelService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入viewCustomerSel")
+	public R<ViewCustomerSel> detail(ViewCustomerSel viewCustomerSel) {
+		ViewCustomerSel detail = viewCustomerSelService.getOne(Condition.getQueryWrapper(viewCustomerSel));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 客户档案
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入viewCustomerSel")
+	public R<IPage<ViewCustomerSel>> list(ViewCustomerSel viewCustomerSel, Query query) {
+		IPage<ViewCustomerSel> pages = viewCustomerSelService.page(Condition.getPage(query), Condition.getQueryWrapper(viewCustomerSel));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 客户档案
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入viewCustomerSel")
+	public R<IPage<ViewCustomerSelVO>> page(ViewCustomerSelVO viewCustomerSel, Query query) {
+		IPage<ViewCustomerSelVO> pages = viewCustomerSelService.selectViewCustomerSelPage(Condition.getPage(query), viewCustomerSel);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 客户档案
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入viewCustomerSel")
+	public R save(@Valid @RequestBody ViewCustomerSel viewCustomerSel) {
+		return R.status(viewCustomerSelService.save(viewCustomerSel));
+	}
+
+	/**
+	 * 修改 客户档案
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入viewCustomerSel")
+	public R update(@Valid @RequestBody ViewCustomerSel viewCustomerSel) {
+		return R.status(viewCustomerSelService.updateById(viewCustomerSel));
+	}
+
+	/**
+	 * 新增或修改 客户档案
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入viewCustomerSel")
+	public R submit(@Valid @RequestBody ViewCustomerSel viewCustomerSel) {
+		return R.status(viewCustomerSelService.saveOrUpdate(viewCustomerSel));
+	}
+
+
+	/**
+	 * 删除 客户档案
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(viewCustomerSelService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 42 - 0
blade-service/gubersail-dealer-admin/src/main/java/com/gubersail/admin/zcrm/customer/mapper/ViewCustomerSelMapper.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 com.gubersail.admin.zcrm.customer.mapper;
+
+import com.gubersail.dealer.admin.api.zcrm.customer.entity.ViewCustomerSel;
+import com.gubersail.dealer.admin.api.zcrm.customer.vo.ViewCustomerSelVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 客户档案 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2025-09-16
+ */
+public interface ViewCustomerSelMapper extends BaseMapper<ViewCustomerSel> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param viewCustomerSel
+	 * @return
+	 */
+	List<ViewCustomerSelVO> selectViewCustomerSelPage(IPage page, ViewCustomerSelVO viewCustomerSel);
+
+}

+ 71 - 0
blade-service/gubersail-dealer-admin/src/main/java/com/gubersail/admin/zcrm/customer/mapper/ViewCustomerSelMapper.xml

@@ -0,0 +1,71 @@
+<?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.gubersail.admin.zcrm.customer.mapper.ViewCustomerSelMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="viewCustomerSelResultMap" type="com.gubersail.dealer.admin.api.zcrm.customer.entity.ViewCustomerSel">
+        <id column="id" property="id"/>
+        <result column="ORG_ID" property="orgId"/>
+        <result column="ORG_CODE" property="orgCode"/>
+        <result column="ORG_NAME" property="orgName"/>
+        <result column="Customer_ID" property="customerId"/>
+        <result column="Customer_CODE" property="customerCode"/>
+        <result column="Customer_NAME" property="customerName"/>
+        <result column="Customer_ShortName" property="customerShortname"/>
+        <result column="CustomerCategory_ID" property="customercategoryId"/>
+        <result column="CustomerCategory_CODE" property="customercategoryCode"/>
+        <result column="CustomerCategory_NAME" property="customercategoryName"/>
+        <result column="CreatedBy" property="createdby"/>
+        <result column="CreatedOn" property="createdon"/>
+        <result column="ModifiedBy" property="modifiedby"/>
+        <result column="ModifiedOn" property="modifiedon"/>
+        <result column="StateTaxNo" property="statetaxno"/>
+        <result column="BuyerNoteName" property="buyernotename"/>
+        <result column="BuyerBankAccount" property="buyerbankaccount"/>
+        <result column="BuyerBankAccountCode" property="buyerbankaccountcode"/>
+        <result column="extend9" property="extend9"/>
+        <result column="TaxSchedule_ID" property="taxscheduleId"/>
+        <result column="TaxSchedule_CODE" property="taxscheduleCode"/>
+        <result column="TaxSchedule_NAME" property="taxscheduleName"/>
+        <result column="TaxRate" property="taxrate"/>
+        <result column="DescFlexField_PrivateDescSeg1" property="descflexfieldPrivatedescseg1"/>
+        <result column="DescFlexField_PrivateDescSeg2" property="descflexfieldPrivatedescseg2"/>
+        <result column="DescFlexField_PrivateDescSeg3" property="descflexfieldPrivatedescseg3"/>
+        <result column="Department_ID" property="departmentId"/>
+        <result column="Department_CODE" property="departmentCode"/>
+        <result column="Department_NAME" property="departmentName"/>
+        <result column="Saleser_ID" property="saleserId"/>
+        <result column="Saleser_CODE" property="saleserCode"/>
+        <result column="Saleser_NAME" property="saleserName"/>
+        <result column="TradeCurrency_ID" property="tradecurrencyId"/>
+        <result column="TradeCurrency_CODE" property="tradecurrencyCode"/>
+        <result column="TradeCurrency_NAME" property="tradecurrencyName"/>
+        <result column="PriceList_ID" property="pricelistId"/>
+        <result column="PriceList_CODE" property="pricelistCode"/>
+        <result column="PriceList_NAME" property="pricelistName"/>
+        <result column="IsTaxPrice" property="istaxprice"/>
+        <result column="ShippmentRule_ID" property="shippmentruleId"/>
+        <result column="ShippmentRule_CODE" property="shippmentruleCode"/>
+        <result column="ShippmentRule_NAME" property="shippmentruleName"/>
+        <result column="RecervalTerm_ID" property="recervaltermId"/>
+        <result column="RecervalTerm_CODE" property="recervaltermCode"/>
+        <result column="RecervalTerm_NAME" property="recervaltermName"/>
+        <result column="ARConfirmTerm_ID" property="arconfirmtermId"/>
+        <result column="ARConfirmTerm_CODE" property="arconfirmtermCode"/>
+        <result column="ARConfirmTerm_NAME" property="arconfirmtermName"/>
+        <result column="remark" property="remark"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+    </resultMap>
+
+
+    <select id="selectViewCustomerSelPage" resultMap="viewCustomerSelResultMap">
+        select * from zcrm_view_customer_sel where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/gubersail-dealer-admin/src/main/java/com/gubersail/admin/zcrm/customer/service/IViewCustomerSelService.java

@@ -0,0 +1,41 @@
+/*
+ *      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 com.gubersail.admin.zcrm.customer.service;
+
+import com.gubersail.dealer.admin.api.zcrm.customer.entity.ViewCustomerSel;
+import com.gubersail.dealer.admin.api.zcrm.customer.vo.ViewCustomerSelVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 客户档案 服务类
+ *
+ * @author BladeX
+ * @since 2025-09-16
+ */
+public interface IViewCustomerSelService extends IService<ViewCustomerSel> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param viewCustomerSel
+	 * @return
+	 */
+	IPage<ViewCustomerSelVO> selectViewCustomerSelPage(IPage<ViewCustomerSelVO> page, ViewCustomerSelVO viewCustomerSel);
+
+}

+ 41 - 0
blade-service/gubersail-dealer-admin/src/main/java/com/gubersail/admin/zcrm/customer/service/impl/ViewCustomerSelServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      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 com.gubersail.admin.zcrm.customer.service.impl;
+
+import com.gubersail.dealer.admin.api.zcrm.customer.entity.ViewCustomerSel;
+import com.gubersail.dealer.admin.api.zcrm.customer.vo.ViewCustomerSelVO;
+import com.gubersail.admin.zcrm.customer.mapper.ViewCustomerSelMapper;
+import com.gubersail.admin.zcrm.customer.service.IViewCustomerSelService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 客户档案 服务实现类
+ *
+ * @author BladeX
+ * @since 2025-09-16
+ */
+@Service
+public class ViewCustomerSelServiceImpl extends ServiceImpl<ViewCustomerSelMapper, ViewCustomerSel> implements IViewCustomerSelService {
+
+	@Override
+	public IPage<ViewCustomerSelVO> selectViewCustomerSelPage(IPage<ViewCustomerSelVO> page, ViewCustomerSelVO viewCustomerSel) {
+		return page.setRecords(baseMapper.selectViewCustomerSelPage(page, viewCustomerSel));
+	}
+
+}