Kaynağa Gözat

1.经销商app增加门店审核通过批量生成用户接口
2.经销商app门店添加保存接口代码流程修改
3.经销商app增加轮胎保注册表及理赔记录表相关接口

纪新园 6 gün önce
ebeveyn
işleme
e07bba03ba
21 değiştirilmiş dosya ile 1229 ekleme ve 105 silme
  1. 34 0
      blade-service-api/gubersail-dealer-app-api/src/main/java/com/gubersail/app/api/insurance/dto/AppTireInsuranceRecordDTO.java
  2. 34 0
      blade-service-api/gubersail-dealer-app-api/src/main/java/com/gubersail/app/api/insurance/dto/AppTireInsuranceRegisterDTO.java
  3. 108 0
      blade-service-api/gubersail-dealer-app-api/src/main/java/com/gubersail/app/api/insurance/entity/AppTireInsuranceRecord.java
  4. 145 0
      blade-service-api/gubersail-dealer-app-api/src/main/java/com/gubersail/app/api/insurance/entity/AppTireInsuranceRegister.java
  5. 36 0
      blade-service-api/gubersail-dealer-app-api/src/main/java/com/gubersail/app/api/insurance/vo/AppTireInsuranceRecordVO.java
  6. 41 0
      blade-service-api/gubersail-dealer-app-api/src/main/java/com/gubersail/app/api/insurance/vo/AppTireInsuranceRegisterVO.java
  7. 2 3
      blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/corp/controller/AppCorpsDescController.java
  8. 5 17
      blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/corp/service/IAppCorpsAttnService.java
  9. 2 9
      blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/corp/service/IAppCorpsDescService.java
  10. 34 16
      blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/corp/service/impl/AppCorpsAttnServiceImpl.java
  11. 102 60
      blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/corp/service/impl/AppCorpsDescServiceImpl.java
  12. 152 0
      blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/controller/TireInsuranceRegisterController.java
  13. 42 0
      blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/mapper/AppTireInsuranceRecordMapper.java
  14. 28 0
      blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/mapper/AppTireInsuranceRecordMapper.xml
  15. 42 0
      blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/mapper/AppTireInsuranceRegisterMapper.java
  16. 34 0
      blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/mapper/AppTireInsuranceRegisterMapper.xml
  17. 41 0
      blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/service/IAppTireInsuranceRecordService.java
  18. 47 0
      blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/service/IAppTireInsuranceRegisterService.java
  19. 41 0
      blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/service/impl/AppTireInsuranceRecordServiceImpl.java
  20. 208 0
      blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/service/impl/AppTireInsuranceRegisterServiceImpl.java
  21. 51 0
      blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/wrapper/AppTireInsuranceWrapper.java

+ 34 - 0
blade-service-api/gubersail-dealer-app-api/src/main/java/com/gubersail/app/api/insurance/dto/AppTireInsuranceRecordDTO.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.app.api.insurance.dto;
+
+import com.gubersail.app.api.insurance.entity.AppTireInsuranceRecord;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 轮胎理赔记录表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2025-09-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AppTireInsuranceRecordDTO extends AppTireInsuranceRecord {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/gubersail-dealer-app-api/src/main/java/com/gubersail/app/api/insurance/dto/AppTireInsuranceRegisterDTO.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.app.api.insurance.dto;
+
+import com.gubersail.app.api.insurance.entity.AppTireInsuranceRegister;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 轮胎保险注册表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2025-09-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class AppTireInsuranceRegisterDTO extends AppTireInsuranceRegister {
+	private static final long serialVersionUID = 1L;
+
+}

+ 108 - 0
blade-service-api/gubersail-dealer-app-api/src/main/java/com/gubersail/app/api/insurance/entity/AppTireInsuranceRecord.java

@@ -0,0 +1,108 @@
+/*
+ *      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.app.api.insurance.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 轮胎理赔记录表实体类
+ *
+ * @author BladeX
+ * @since 2025-09-22
+ */
+@Data
+@TableName("pjpf_tire_insurance_record")
+@ApiModel(value = "TireInsuranceRecord对象", description = "轮胎理赔记录表")
+public class AppTireInsuranceRecord implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	private Long id;
+	/**
+	* 保险单号
+	*/
+		@ApiModelProperty(value = "保险单号")
+		private String insuranceNo;
+	/**
+	* 保险单id
+	*/
+		@ApiModelProperty(value = "保险单id")
+		private Long insuranceId;
+	/**
+	* 备注(系统继承)
+	*/
+		@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 isDeleted;
+	/**
+	* 理赔单ID
+	*/
+		@ApiModelProperty(value = "理赔单ID")
+		private Long claimId;
+	/**
+	* 理赔单号
+	*/
+		@ApiModelProperty(value = "理赔单号")
+		private String claimNo;
+	/**
+	* 故障描述/理赔原因
+	*/
+		@ApiModelProperty(value = "故障描述/理赔原因")
+		private String claimReason;
+	/**
+	* 理赔时间
+	*/
+		@ApiModelProperty(value = "理赔时间")
+		private LocalDate claimDate;
+
+
+}

+ 145 - 0
blade-service-api/gubersail-dealer-app-api/src/main/java/com/gubersail/app/api/insurance/entity/AppTireInsuranceRegister.java

@@ -0,0 +1,145 @@
+/*
+ *      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.app.api.insurance.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 轮胎保险注册表实体类
+ *
+ * @author BladeX
+ * @since 2025-09-22
+ */
+@Data
+@TableName("pjpf_tire_insurance_register")
+@ApiModel(value = "TireInsuranceRegister对象", description = "轮胎保险注册表")
+public class AppTireInsuranceRegister implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 主键ID(系统继承)
+	 */
+	@ApiModelProperty(value = "主键ID(系统继承)")
+	@TableId(value = "id", type = IdType.AUTO)
+	private Long id;
+	/**
+	 * 保险单号(业务唯一)
+	 */
+	@ApiModelProperty(value = "保险单号(业务唯一)")
+	private String insuranceNo;
+	/**
+	 * 消费者姓名
+	 */
+	@ApiModelProperty(value = "消费者姓名")
+	private String consumerName;
+	/**
+	 * 消费者电话
+	 */
+	@ApiModelProperty(value = "消费者电话")
+	private String consumerPhone;
+	/**
+	 * 规格型号
+	 */
+	@ApiModelProperty(value = "规格型号")
+	private String tyreSpecs;
+	/**
+	 * 保险日期
+	 */
+	@ApiModelProperty(value = "保险日期")
+	private Date insuranceTime;
+	/**
+	 * 备注(系统继承)
+	 */
+	@ApiModelProperty(value = "备注(系统继承)")
+	private String remark;
+	/**
+	 * 创建人(系统继承)
+	 */
+	@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已提交(在保),2受理中(理赔提交),3已通过(工厂审核通过)
+	 */
+	@ApiModelProperty(value = "状态 0录入,1已提交(在保),2受理中(理赔提交),3已通过(工厂审核通过)")
+	private Integer status;
+	/**
+	 * 是否已删除(系统继承)
+	 */
+	@ApiModelProperty(value = "是否已删除(系统继承)")
+	private Integer isDeleted;
+	/**
+	 * 车牌号
+	 */
+	@ApiModelProperty(value = "车牌号")
+	private String vehicleNumber;
+	/**
+	 * 轮胎数量
+	 */
+	@ApiModelProperty(value = "轮胎数量")
+	private Integer tireQuantity;
+	/**
+	 * 行驶证照片地址
+	 */
+	@ApiModelProperty(value = "行驶证照片地址")
+	private String vehicleLicenseUrl;
+	/**
+	 * 车辆整体照片地址
+	 */
+	@ApiModelProperty(value = "车辆整体照片地址")
+	private String overallVehicleUrl;
+	/**
+	 * 轮胎DOT照片地址
+	 */
+	@ApiModelProperty(value = "轮胎DOT照片地址")
+	private String tireDotUrl;
+	/**
+	 * 轮胎花纹照片地址
+	 */
+	@ApiModelProperty(value = "轮胎花纹照片地址")
+	private String tirePatternUrl;
+
+
+}

+ 36 - 0
blade-service-api/gubersail-dealer-app-api/src/main/java/com/gubersail/app/api/insurance/vo/AppTireInsuranceRecordVO.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.app.api.insurance.vo;
+
+import com.gubersail.app.api.insurance.entity.AppTireInsuranceRecord;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 轮胎理赔记录表视图实体类
+ *
+ * @author BladeX
+ * @since 2025-09-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "TireInsuranceRecordVO对象", description = "轮胎理赔记录表")
+public class AppTireInsuranceRecordVO extends AppTireInsuranceRecord {
+	private static final long serialVersionUID = 1L;
+
+}

+ 41 - 0
blade-service-api/gubersail-dealer-app-api/src/main/java/com/gubersail/app/api/insurance/vo/AppTireInsuranceRegisterVO.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.app.api.insurance.vo;
+
+import com.gubersail.app.api.insurance.entity.AppTireInsuranceRecord;
+import com.gubersail.app.api.insurance.entity.AppTireInsuranceRegister;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+import java.util.List;
+
+/**
+ * 轮胎保险注册表视图实体类
+ *
+ * @author BladeX
+ * @since 2025-09-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "TireInsuranceRegisterVO对象", description = "轮胎保险注册表")
+public class AppTireInsuranceRegisterVO extends AppTireInsuranceRegister {
+	private static final long serialVersionUID = 1L;
+
+	private List<AppTireInsuranceRecord> tireInsuranceRecordList;
+
+}

+ 2 - 3
blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/corp/controller/AppCorpsDescController.java

@@ -114,12 +114,11 @@ public class AppCorpsDescController extends BladeController {
 	 */
 	@PostMapping("/review")
 	@RepeatSubmit
-	public R review(@Valid @RequestBody AppPjCorpsDesc corpsDesc) {
+	public R review(@Valid @RequestBody AppCorpsDescVO corpsDesc) {
 		if (corpsDesc.getId() == null) {
 			return R.fail(500, "请选择数据");
 		}
-		boolean status = corpsDescService.updateById(corpsDesc);
-		return R.status(status);
+		return corpsDescService.review(corpsDesc.getId(),corpsDesc.getType());
 	}
 
 	/**

+ 5 - 17
blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/corp/service/IAppCorpsAttnService.java

@@ -16,12 +16,12 @@
  */
 package com.gubersail.app.corp.service;
 
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.gubersail.app.api.corps.entity.AppPjCorpsAttn;
-import com.gubersail.app.api.corps.vo.AppCorpsAttnVO;
 import org.springblade.core.tool.api.R;
 
+import java.util.List;
+
 /**
  * 配件批发客户明细联系人 服务类
  *
@@ -31,24 +31,12 @@ import org.springblade.core.tool.api.R;
 public interface IAppCorpsAttnService extends IService<AppPjCorpsAttn> {
 
 	/**
-	 * 自定义分页
-	 *
-	 * @param page
-	 * @param corpsAttn
-	 * @return
-	 */
-	IPage<AppCorpsAttnVO> selectCorpsAttnPage(IPage<AppCorpsAttnVO> page, AppCorpsAttnVO corpsAttn);
-
-	/**
 	 * 创建用户
 	 *
-	 * @param id
+	 * @param attn
 	 * @return
 	 */
-	R createUser(Long id);
+	R createUser(AppPjCorpsAttn attn);
 
-	/**
-	 * 根据当前登陆人获得客户联系人
-	 */
-	AppPjCorpsAttn getAttn(Long userId);
+	void createUserBatch(List<AppPjCorpsAttn> corpsAttnList);
 }

+ 2 - 9
blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/corp/service/IAppCorpsDescService.java

@@ -22,18 +22,11 @@ public interface IAppCorpsDescService extends IService<AppPjCorpsDesc> {
 	AppCorpsDescVO getMessageByID(AppPjCorpsDesc corpsDesc);
 
 	/**
-	 * 自定义分页
-	 *
-	 * @param page
-	 * @param corpsDesc
-	 * @return
-	 */
-	IPage<AppCorpsDescVO> selectCorpsDescPage(IPage<AppCorpsDescVO> page, AppCorpsDescVO corpsDesc);
-
-	/**
 	 * 保存客户信息
 	 * @param corpsDescVO
 	 * @return
 	 */
 	R submit(AppCorpsDescVO corpsDescVO);
+
+    R review(Long id, String type);
 }

+ 34 - 16
blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/corp/service/impl/AppCorpsAttnServiceImpl.java

@@ -36,6 +36,8 @@ import org.springblade.system.user.feign.IUserClient;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.List;
+
 /**
  * 配件批发客户明细联系人 服务实现类
  *
@@ -50,21 +52,15 @@ public class AppCorpsAttnServiceImpl extends ServiceImpl<AppCorpsAttnMapper, App
 
 	private final ISysClient sysClient;
 
-	@Override
-	public IPage<AppCorpsAttnVO> selectCorpsAttnPage(IPage<AppCorpsAttnVO> page, AppCorpsAttnVO corpsAttn) {
-		return page.setRecords(baseMapper.selectCorpsAttnPage(page, corpsAttn));
-	}
-
 	/**
 	 * 创建用户
 	 *
-	 * @param id
+	 * @param attn
 	 * @return
 	 */
 	@Override
 	@Transactional(rollbackFor = Exception.class)
-	public R createUser(Long id) {
-		AppPjCorpsAttn attn = baseMapper.selectById(id);
+	public R createUser(AppPjCorpsAttn attn) {
 		User user = new User();
 		user.setTenantId(AuthUtil.getTenantId());
 		user.setAccount(attn.getTel());
@@ -119,14 +115,36 @@ public class AppCorpsAttnServiceImpl extends ServiceImpl<AppCorpsAttnMapper, App
 	}
 
 	@Override
-	public AppPjCorpsAttn getAttn(Long userId) {
-		AppPjCorpsAttn corpsAttn = baseMapper.selectOne(new LambdaQueryWrapper<AppPjCorpsAttn>()
-			.eq(AppPjCorpsAttn::getUserId, userId)
-			.eq(AppPjCorpsAttn::getIsDeleted, 0)
-			.eq(AppPjCorpsAttn::getSalesCompanyId, AuthUtil.getDeptId())
-			.eq(AppPjCorpsAttn::getTenantId, AuthUtil.getTenantId())
-		);
-		return corpsAttn;
+	@Transactional(rollbackFor = Exception.class)
+	public void createUserBatch(List<AppPjCorpsAttn> corpsAttnList) {
+		R<String> resRole = sysClient.getRoleIds(AuthUtil.getTenantId(), "门店");
+		if (!resRole.isSuccess() || ObjectUtils.isNull(resRole.getData())) {
+			throw new RuntimeException("请先维护门店角色信息");
+		}
+		for (AppPjCorpsAttn attn : corpsAttnList) {
+			User user = new User();
+			user.setTenantId(AuthUtil.getTenantId());
+			user.setAccount(attn.getTel());
+			user.setName(attn.getCname());
+			user.setRealName(attn.getCname());
+			user.setUserType(1);
+			user.setPhone(attn.getTel());
+			user.setUserTypeRole(3);
+
+			user.setRoleId(resRole.getData());
+			user.setDeptId(attn.getCreateDept() + "");
+			user.setPassword(LandConstant.USER_PASSWORD);
+			R<Boolean> result = userClient.saveUser(user);
+			if (!result.isSuccess()) {
+				throw new ServiceException(result.getMsg());
+			}
+			R<User> userTemp = userClient.userByAccount(AuthUtil.getTenantId(), attn.getTel());
+			if (!userTemp.isSuccess()) {
+				throw new ServiceException(userTemp.getMsg());
+			}
+			attn.setUserId(userTemp.getData().getId());
+		}
+		this.updateBatchById(corpsAttnList);
 	}
 
 }

+ 102 - 60
blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/corp/service/impl/AppCorpsDescServiceImpl.java

@@ -2,7 +2,6 @@ package com.gubersail.app.corp.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
@@ -21,7 +20,6 @@ import org.springblade.system.user.entity.User;
 import org.springblade.system.user.feign.IUserClient;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.transaction.interceptor.TransactionAspectSupport;
 
 import java.util.*;
 import java.util.stream.Collectors;
@@ -57,11 +55,27 @@ public class AppCorpsDescServiceImpl extends ServiceImpl<AppCorpsDescMapper, App
 		if (desc != null) {
 			BeanUtil.copyProperties(desc, corpsDescVO);
 			//获取客户联系人
-			corpsDescVO.setCorpsAttnList(corpsAttnService.list(new LambdaQueryWrapper<AppPjCorpsAttn>()
-				.eq(AppPjCorpsAttn::getPid, corpsDesc.getId()).eq(AppPjCorpsAttn::getIsDeleted, 0)));
+			AppPjCorpsAttn attn = corpsAttnService.getOne(new LambdaQueryWrapper<AppPjCorpsAttn>()
+				.eq(AppPjCorpsAttn::getTel, desc.getTel())
+				.eq(AppPjCorpsAttn::getPid, desc.getId())
+				.eq(AppPjCorpsAttn::getIsDeleted, 0)
+				.eq(AppPjCorpsAttn::getTenantId, AuthUtil.getTenantId())
+				.last("LIMIT 1"));
+			if (attn != null) {
+				corpsDescVO.setContacts(attn.getCname());
+				corpsDescVO.setContactsPhone(attn.getTel());
+			}
 			//获取客户地址
-			corpsDescVO.setCorpsAddrList(corpsAddrService.list(new LambdaQueryWrapper<AppPjCorpsAddr>()
-				.eq(AppPjCorpsAddr::getPid, corpsDesc.getId()).eq(AppPjCorpsAddr::getIsDeleted, 0)));
+			AppPjCorpsAddr addr = corpsAddrService.getOne(new LambdaQueryWrapper<AppPjCorpsAddr>()
+				.eq(AppPjCorpsAddr::getDefaultAddres, "1")
+				.eq(AppPjCorpsAddr::getPid, desc.getId())
+				.eq(AppPjCorpsAddr::getIsDeleted, 0)
+				.eq(AppPjCorpsAddr::getTenantId, AuthUtil.getTenantId())
+				.last("LIMIT 1"));
+			if (addr != null) {
+				corpsDescVO.setDetailedAddress(addr.getDetailedAddress());
+				corpsDescVO.setAddress(addr.getBelongtoarea());
+			}
 			//获取客户附件
 			corpsDescVO.setCorpsFilesList(corpsFilesService.list(new LambdaQueryWrapper<AppPjCorpsFiles>()
 				.eq(AppPjCorpsFiles::getPid, corpsDesc.getId()).eq(AppPjCorpsFiles::getIsDeleted, 0)));
@@ -89,52 +103,6 @@ public class AppCorpsDescServiceImpl extends ServiceImpl<AppCorpsDescMapper, App
 	}
 
 	/**
-	 * 自定义分页
-	 *
-	 * @param page
-	 * @param corpsDesc
-	 * @return
-	 */
-	@Override
-	public IPage<AppCorpsDescVO> selectCorpsDescPage(IPage<AppCorpsDescVO> page, AppCorpsDescVO corpsDesc) {
-		//获取客户子类别
-		if (StringUtils.isNotBlank(corpsDesc.getCorpsTypeId())) {
-			Long corpsTypeId = Long.parseLong(corpsDesc.getCorpsTypeId());
-			List<Long> corpsTypeIdList = new ArrayList<>();
-			corpsTypeService.selectChildById(corpsTypeId, corpsTypeIdList);
-			corpsTypeIdList.add(corpsTypeId);
-			corpsDesc.setTypeList(corpsTypeIdList);
-		} else if (StringUtils.isNotBlank(corpsDesc.getCorpsTypeName())) {
-			LambdaQueryWrapper<AppPjCorpsType> lambdaQueryWrapper = new LambdaQueryWrapper<>();
-			lambdaQueryWrapper.eq(AppPjCorpsType::getCname, corpsDesc.getCorpsTypeName());
-			lambdaQueryWrapper.eq(AppPjCorpsType::getIsDeleted, 0);
-			lambdaQueryWrapper.eq(AppPjCorpsType::getTenantId, SecureUtil.getTenantId());
-			List<AppPjCorpsType> corpsTypeList = corpsTypeService.list(lambdaQueryWrapper);
-			if (CollectionUtils.isNotEmpty(corpsTypeList)) {
-				List<Long> corpsTypeIdList = new ArrayList<>();
-				corpsTypeList.forEach(item -> {
-					corpsTypeService.selectChildById(item.getId(), corpsTypeIdList);
-					corpsTypeIdList.add(item.getId());
-				});
-				corpsDesc.setTypeList(corpsTypeIdList);
-			}
-		}
-		corpsDesc.setTenantId(AuthUtil.getTenantId());
-		corpsDesc.setIsDeleted(0);
-		corpsDesc.setStrTenantId(Arrays.asList(AuthUtil.getDeptId().split(",")));
-		if (!AuthUtil.getUserRole().contains("admin") && !AuthUtil.getUserRole().contains("老板")
-			&& !AuthUtil.getUserRole().contains("销售总览")) {
-			if (AuthUtil.getUserRole().contains("业务员")) {
-				corpsDesc.setSalesmanId(AuthUtil.getUserId());
-			}
-		}
-		corpsDesc.setSalesCompanyId(Long.parseLong(AuthUtil.getDeptId()));
-		IPage<AppCorpsDescVO> page1 = page.setRecords(baseMapper.selectCorpsDescPage(page, corpsDesc));
-		return page1;
-
-	}
-
-	/**
 	 * 新增或修改
 	 */
 	@Override
@@ -161,6 +129,7 @@ public class AppCorpsDescServiceImpl extends ServiceImpl<AppCorpsDescMapper, App
 			corpsDesc.setSalesCompanyId(Long.valueOf(AuthUtil.getDeptId()));
 			corpsDesc.setSalesCompanyName(sysClient.getDept(Long.valueOf(AuthUtil.getDeptId())).getData().getFullName());
 			corpsDesc.setEnableOrNot(1);
+			corpsDesc.setTel(corpsDescVO.getContactsPhone());
 			//查询当前登录人信息
 			R<User> userR = userClient.userInfoById(AuthUtil.getUserId());
 			if (!userR.isSuccess() || ObjectUtils.isNull(userR.getData())) {
@@ -176,19 +145,68 @@ public class AppCorpsDescServiceImpl extends ServiceImpl<AppCorpsDescMapper, App
 			corpsDesc.setTenantId(SecureUtil.getTenantId());
 			corpsDesc.setUpdateTime(date);
 			corpsDesc.setUpdateUser(AuthUtil.getUserId());
+			corpsDesc.setTel(corpsDescVO.getContactsPhone());
 		}
 		this.saveOrUpdate(corpsDesc);
 		Long pId = corpsDesc.getId();
 		String tenantId = corpsDesc.getTenantId();
-		//保存客户联系人信息
-		R saveOrUpdateAttn = this.saveOrUpdateAttn(corpsDescVO, userId, pId, tenantId, date);
-		if (saveOrUpdateAttn.getCode() != 200) {
-			TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-			return saveOrUpdateAttn;
+		AppPjCorpsAttn corpsAttn = corpsAttnService.getOne(new LambdaQueryWrapper<AppPjCorpsAttn>()
+			.eq(AppPjCorpsAttn::getIsDeleted, 0)
+			.eq(AppPjCorpsAttn::getTenantId, AuthUtil.getTenantId())
+			.eq(AppPjCorpsAttn::getPid, corpsDesc.getId())
+			.eq(AppPjCorpsAttn::getTel, corpsDescVO.getContactsPhone())
+			.last("LIMIT 1"));
+		if (ObjectUtils.isNotNull(corpsAttn)) {
+			corpsAttn.setCname(corpsDescVO.getContacts());
+			corpsAttn.setUpdateTime(date);
+			corpsAttn.setUpdateUser(userId);
+			corpsAttnService.updateById(corpsAttn);
+			if (ObjectUtils.isNull(corpsAttn.getUserId())) {
+				corpsAttnService.createUser(corpsAttn);
+			}
+		} else {
+			corpsAttn = new AppPjCorpsAttn();
+			corpsAttn.setTenantId(tenantId);
+			corpsAttn.setCreateTime(date);
+			corpsAttn.setCreateUser(userId);
+			corpsAttn.setCreateDept(Long.valueOf(AuthUtil.getDeptId()));
+			corpsAttn.setSalesCompanyId(corpsDesc.getSalesCompanyId());
+			corpsAttn.setSalesCompanyName(corpsDesc.getSalesCompanyName());
+			corpsAttn.setCname(corpsDescVO.getContacts());
+			corpsAttn.setTel(corpsDescVO.getContactsPhone());
+			corpsAttn.setPid(pId);
+			corpsAttnService.save(corpsAttn);
+			corpsAttnService.createUser(corpsAttn);
 		}
-
-		//保存客户地址信息
-		this.saveOrUpdateAddr(corpsDescVO, userId, pId, tenantId, date);
+		AppPjCorpsAddr corpsAddr = corpsAddrService.getOne(new LambdaQueryWrapper<AppPjCorpsAddr>()
+			.eq(AppPjCorpsAddr::getIsDeleted, 0)
+			.eq(AppPjCorpsAddr::getTenantId, AuthUtil.getTenantId())
+			.eq(AppPjCorpsAddr::getPid, corpsDesc.getId())
+			.eq(AppPjCorpsAddr::getDefaultAddres, "1")
+			.last("LIMIT 1"));
+		if (ObjectUtils.isNotNull(corpsAddr)) {
+			corpsAddr.setContacts(corpsDescVO.getContacts());
+			corpsAddr.setTel(corpsDescVO.getContactsPhone());
+			corpsAddr.setBelongtoarea(corpsDescVO.getAddress());
+			corpsAddr.setDetailedAddress(corpsDescVO.getDetailedAddress());
+			corpsAddr.setUpdateTime(date);
+			corpsAddr.setUpdateUser(userId);
+		} else {
+			corpsAddr = new AppPjCorpsAddr();
+			corpsAddr.setTenantId(tenantId);
+			corpsAddr.setCreateTime(date);
+			corpsAddr.setCreateUser(userId);
+			corpsAddr.setCreateDept(Long.valueOf(AuthUtil.getDeptId()));
+			corpsAddr.setSalesCompanyId(corpsDesc.getSalesCompanyId());
+			corpsAddr.setSalesCompanyName(corpsDesc.getSalesCompanyName());
+			corpsAddr.setContacts(corpsDescVO.getContacts());
+			corpsAddr.setTel(corpsDescVO.getContactsPhone());
+			corpsAddr.setBelongtoarea(corpsDescVO.getAddress());
+			corpsAddr.setDetailedAddress(corpsDescVO.getDetailedAddress());
+			corpsAddr.setDefaultAddres("1");
+			corpsAddr.setPid(pId);
+		}
+		corpsAddrService.saveOrUpdate(corpsAddr);
 
 		//保存客户文件信息
 		this.saveOrUpdateFiles(corpsDescVO, userId, pId, tenantId, date);
@@ -199,6 +217,30 @@ public class AppCorpsDescServiceImpl extends ServiceImpl<AppCorpsDescMapper, App
 		return R.data(corpsDesc);
 	}
 
+	@Override
+	public R review(Long id, String type) {
+		AppPjCorpsDesc corpsDesc = baseMapper.selectById(id);
+		if ("1".equals(type)) {
+			corpsDesc.setUpdateTime(new Date());
+			corpsDesc.setUpdateUser(AuthUtil.getUserId());
+			corpsDesc.setCheckStatus("审核通过");
+			List<AppPjCorpsAttn> corpsAttnList = corpsAttnService.list(new LambdaQueryWrapper<AppPjCorpsAttn>()
+				.eq(AppPjCorpsAttn::getPid, id)
+				.eq(AppPjCorpsAttn::getIsDeleted, 0)
+				.eq(AppPjCorpsAttn::getTenantId, AuthUtil.getTenantId())
+				.and(i -> i.isNull(AppPjCorpsAttn::getUserId).or().eq(AppPjCorpsAttn::getUserId, 0)));
+			if (!corpsAttnList.isEmpty()) {
+				corpsAttnService.createUserBatch(corpsAttnList);
+			}
+		} else {
+			corpsDesc.setUpdateTime(new Date());
+			corpsDesc.setUpdateUser(AuthUtil.getUserId());
+			corpsDesc.setCheckStatus("审核驳回");
+		}
+		baseMapper.updateById(corpsDesc);
+		return R.data(corpsDesc);
+	}
+
 	/**
 	 * 保存客户联系人信息
 	 *

+ 152 - 0
blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/controller/TireInsuranceRegisterController.java

@@ -0,0 +1,152 @@
+/*
+ *      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.app.insurance.controller;
+
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.gubersail.app.api.claim.entity.AppClaim;
+import com.gubersail.app.api.claim.vo.AppClaimVO;
+import com.gubersail.app.wrapper.AppClaimWrapper;
+import com.gubersail.app.wrapper.AppTireInsuranceWrapper;
+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.springblade.system.user.entity.User;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gubersail.app.api.insurance.entity.AppTireInsuranceRegister;
+import com.gubersail.app.api.insurance.vo.AppTireInsuranceRegisterVO;
+import com.gubersail.app.insurance.service.IAppTireInsuranceRegisterService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/**
+ * 轮胎保险注册表 控制器
+ *
+ * @author BladeX
+ * @since 2025-09-22
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/tireinsuranceregister")
+@Api(value = "轮胎保险注册表", tags = "轮胎保险注册表接口")
+public class TireInsuranceRegisterController extends BladeController {
+
+	private final IAppTireInsuranceRegisterService tireInsuranceRegisterService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入tireInsuranceRegister")
+	public R<AppTireInsuranceRegisterVO> detail(AppTireInsuranceRegister appTireInsuranceRegister) {
+		AppTireInsuranceRegisterVO detail = tireInsuranceRegisterService.detail(appTireInsuranceRegister);
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 轮胎保险注册表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入tireInsuranceRegister")
+	public R<IPage<AppTireInsuranceRegisterVO>> list(AppTireInsuranceRegisterVO appTireInsuranceRegister, Query query) {
+		IPage<AppTireInsuranceRegister> pages = tireInsuranceRegisterService.page(Condition.getPage(query), Condition.getQueryWrapper(appTireInsuranceRegister));
+		IPage<AppTireInsuranceRegisterVO> voPage = new Page<>();
+		if (!pages.getRecords().isEmpty()) {
+			//查询数据返回实体转换
+			voPage = AppTireInsuranceWrapper.build().pageVO(pages);
+		}
+		return R.data(voPage);
+	}
+
+	/**
+	 * 自定义分页 轮胎保险注册表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入tireInsuranceRegister")
+	public R<IPage<AppTireInsuranceRegisterVO>> page(AppTireInsuranceRegisterVO tireInsuranceRegister, Query query) {
+		IPage<AppTireInsuranceRegisterVO> pages = tireInsuranceRegisterService.selectTireInsuranceRegisterPage(Condition.getPage(query), tireInsuranceRegister);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 轮胎保险注册表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入tireInsuranceRegister")
+	public R save(@Valid @RequestBody AppTireInsuranceRegister appTireInsuranceRegister) {
+		return R.status(tireInsuranceRegisterService.save(appTireInsuranceRegister));
+	}
+
+	/**
+	 * 修改 轮胎保险注册表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入tireInsuranceRegister")
+	public R update(@Valid @RequestBody AppTireInsuranceRegister appTireInsuranceRegister) {
+		return R.status(tireInsuranceRegisterService.updateById(appTireInsuranceRegister));
+	}
+
+	/**
+	 * 新增或修改 轮胎保险注册表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入tireInsuranceRegister")
+	public R submit(@Valid @RequestBody AppTireInsuranceRegisterVO appTireInsuranceRegister) {
+		return tireInsuranceRegisterService.submit(appTireInsuranceRegister);
+	}
+
+
+	/**
+	 * 删除 轮胎保险注册表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(tireInsuranceRegisterService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+	/**
+	 * 提交
+	 */
+	@PostMapping("/submitTireInsurance")
+	public R submitTireInsurance(@Valid @RequestBody AppTireInsuranceRegisterVO appTireInsuranceRegister) {
+		return tireInsuranceRegisterService.submitTireInsurance(appTireInsuranceRegister);
+	}
+
+
+}

+ 42 - 0
blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/mapper/AppTireInsuranceRecordMapper.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.app.insurance.mapper;
+
+import com.gubersail.app.api.insurance.entity.AppTireInsuranceRecord;
+import com.gubersail.app.api.insurance.vo.AppTireInsuranceRecordVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 轮胎理赔记录表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2025-09-22
+ */
+public interface AppTireInsuranceRecordMapper extends BaseMapper<AppTireInsuranceRecord> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param tireInsuranceRecord
+	 * @return
+	 */
+	List<AppTireInsuranceRecordVO> selectTireInsuranceRecordPage(IPage page, AppTireInsuranceRecordVO tireInsuranceRecord);
+
+}

+ 28 - 0
blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/mapper/AppTireInsuranceRecordMapper.xml

@@ -0,0 +1,28 @@
+<?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.app.insurance.mapper.AppTireInsuranceRecordMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="tireInsuranceRecordResultMap" type="com.gubersail.app.api.insurance.entity.AppTireInsuranceRecord">
+        <id column="id" property="id"/>
+        <result column="insurance_no" property="insuranceNo"/>
+        <result column="insurance_id" property="insuranceId"/>
+        <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="is_deleted" property="isDeleted"/>
+        <result column="claim_id" property="claimId"/>
+        <result column="claim_no" property="claimNo"/>
+        <result column="claim_reason" property="claimReason"/>
+        <result column="claim_date" property="claimDate"/>
+    </resultMap>
+
+
+    <select id="selectTireInsuranceRecordPage" resultMap="tireInsuranceRecordResultMap">
+        select * from pjpf_tire_insurance_record where is_deleted = 0
+    </select>
+
+</mapper>

+ 42 - 0
blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/mapper/AppTireInsuranceRegisterMapper.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.app.insurance.mapper;
+
+import com.gubersail.app.api.insurance.entity.AppTireInsuranceRegister;
+import com.gubersail.app.api.insurance.vo.AppTireInsuranceRegisterVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 轮胎保险注册表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2025-09-22
+ */
+public interface AppTireInsuranceRegisterMapper extends BaseMapper<AppTireInsuranceRegister> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param tireInsuranceRegister
+	 * @return
+	 */
+	List<AppTireInsuranceRegisterVO> selectTireInsuranceRegisterPage(IPage page, AppTireInsuranceRegisterVO tireInsuranceRegister);
+
+}

+ 34 - 0
blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/mapper/AppTireInsuranceRegisterMapper.xml

@@ -0,0 +1,34 @@
+<?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.app.insurance.mapper.AppTireInsuranceRegisterMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="tireInsuranceRegisterResultMap" type="com.gubersail.app.api.insurance.entity.AppTireInsuranceRegister">
+        <id column="id" property="id"/>
+        <result column="insurance_no" property="insuranceNo"/>
+        <result column="consumer_name" property="consumerName"/>
+        <result column="consumer_phone" property="consumerPhone"/>
+        <result column="tyre_specs" property="tyreSpecs"/>
+        <result column="insurance_time" property="insuranceTime"/>
+        <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"/>
+        <result column="vehicle_number" property="vehicleNumber"/>
+        <result column="tire_quantity" property="tireQuantity"/>
+        <result column="vehicle_license_url" property="vehicleLicenseUrl"/>
+        <result column="overall_vehicle_url" property="overallVehicleUrl"/>
+        <result column="tire_dot_url" property="tireDotUrl"/>
+        <result column="tire_pattern_url" property="tirePatternUrl"/>
+    </resultMap>
+
+
+    <select id="selectTireInsuranceRegisterPage" resultMap="tireInsuranceRegisterResultMap">
+        select * from pjpf_tire_insurance_register where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/service/IAppTireInsuranceRecordService.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.app.insurance.service;
+
+import com.gubersail.app.api.insurance.entity.AppTireInsuranceRecord;
+import com.gubersail.app.api.insurance.vo.AppTireInsuranceRecordVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 轮胎理赔记录表 服务类
+ *
+ * @author BladeX
+ * @since 2025-09-22
+ */
+public interface IAppTireInsuranceRecordService extends IService<AppTireInsuranceRecord> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param tireInsuranceRecord
+	 * @return
+	 */
+	IPage<AppTireInsuranceRecordVO> selectTireInsuranceRecordPage(IPage<AppTireInsuranceRecordVO> page, AppTireInsuranceRecordVO tireInsuranceRecord);
+
+}

+ 47 - 0
blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/service/IAppTireInsuranceRegisterService.java

@@ -0,0 +1,47 @@
+/*
+ *      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.app.insurance.service;
+
+import com.gubersail.app.api.insurance.entity.AppTireInsuranceRegister;
+import com.gubersail.app.api.insurance.vo.AppTireInsuranceRegisterVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.core.tool.api.R;
+
+/**
+ * 轮胎保险注册表 服务类
+ *
+ * @author BladeX
+ * @since 2025-09-22
+ */
+public interface IAppTireInsuranceRegisterService extends IService<AppTireInsuranceRegister> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param tireInsuranceRegister
+	 * @return
+	 */
+	IPage<AppTireInsuranceRegisterVO> selectTireInsuranceRegisterPage(IPage<AppTireInsuranceRegisterVO> page, AppTireInsuranceRegisterVO tireInsuranceRegister);
+
+	AppTireInsuranceRegisterVO detail(AppTireInsuranceRegister appTireInsuranceRegister);
+
+	R submit(AppTireInsuranceRegisterVO appTireInsuranceRegister);
+
+	R submitTireInsurance(AppTireInsuranceRegisterVO appTireInsuranceRegister);
+}

+ 41 - 0
blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/service/impl/AppTireInsuranceRecordServiceImpl.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.app.insurance.service.impl;
+
+import com.gubersail.app.api.insurance.entity.AppTireInsuranceRecord;
+import com.gubersail.app.api.insurance.vo.AppTireInsuranceRecordVO;
+import com.gubersail.app.insurance.mapper.AppTireInsuranceRecordMapper;
+import com.gubersail.app.insurance.service.IAppTireInsuranceRecordService;
+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-22
+ */
+@Service
+public class AppTireInsuranceRecordServiceImpl extends ServiceImpl<AppTireInsuranceRecordMapper, AppTireInsuranceRecord> implements IAppTireInsuranceRecordService {
+
+	@Override
+	public IPage<AppTireInsuranceRecordVO> selectTireInsuranceRecordPage(IPage<AppTireInsuranceRecordVO> page, AppTireInsuranceRecordVO tireInsuranceRecord) {
+		return page.setRecords(baseMapper.selectTireInsuranceRecordPage(page, tireInsuranceRecord));
+	}
+
+}

+ 208 - 0
blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/insurance/service/impl/AppTireInsuranceRegisterServiceImpl.java

@@ -0,0 +1,208 @@
+/*
+ *      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.app.insurance.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gubersail.app.api.claim.entity.AppClaim;
+import com.gubersail.app.api.claim.entity.AppClaimAttachment;
+import com.gubersail.app.api.corps.entity.AppPjCorpsAttn;
+import com.gubersail.app.api.corps.entity.AppPjCorpsDesc;
+import com.gubersail.app.api.insurance.entity.AppTireInsuranceRecord;
+import com.gubersail.app.api.insurance.entity.AppTireInsuranceRegister;
+import com.gubersail.app.api.insurance.vo.AppTireInsuranceRegisterVO;
+import com.gubersail.app.api.zcrm.customer.entity.AppViewCustomerSel;
+import com.gubersail.app.claim.service.IAppClaimAttachmentService;
+import com.gubersail.app.claim.service.IAppClaimService;
+import com.gubersail.app.corp.service.IAppCorpsAttnService;
+import com.gubersail.app.corp.service.IAppCorpsDescService;
+import com.gubersail.app.insurance.mapper.AppTireInsuranceRegisterMapper;
+import com.gubersail.app.insurance.service.IAppTireInsuranceRecordService;
+import com.gubersail.app.insurance.service.IAppTireInsuranceRegisterService;
+import com.gubersail.app.util.BillCodeUtil;
+import com.gubersail.app.wrapper.AppTireInsuranceWrapper;
+import com.gubersail.app.zcrm.customer.service.IAppCustomerSelService;
+import lombok.AllArgsConstructor;
+import org.springblade.common.enums.NumberEnum;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.secure.utils.SecureUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.system.user.entity.User;
+import org.springblade.system.user.feign.IUserClient;
+import org.springframework.http.HttpStatus;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StringUtils;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 轮胎保险注册表 服务实现类
+ *
+ * @author BladeX
+ * @since 2025-09-22
+ */
+@Service
+@AllArgsConstructor
+public class AppTireInsuranceRegisterServiceImpl extends ServiceImpl<AppTireInsuranceRegisterMapper, AppTireInsuranceRegister> implements IAppTireInsuranceRegisterService {
+
+	private final IAppTireInsuranceRecordService appTireInsuranceRecordService;
+
+	private final IUserClient userClient;
+
+	private final IAppClaimService bladeClaimService;
+
+	private final IAppClaimAttachmentService bladeClaimAttachmentService;
+
+	private final IAppCorpsAttnService corpsAttnService;
+
+	private final IAppCorpsDescService corpsDescService;
+
+	@Override
+	public IPage<AppTireInsuranceRegisterVO> selectTireInsuranceRegisterPage(IPage<AppTireInsuranceRegisterVO> page, AppTireInsuranceRegisterVO tireInsuranceRegister) {
+		return page.setRecords(baseMapper.selectTireInsuranceRegisterPage(page, tireInsuranceRegister));
+	}
+
+	@Override
+	public AppTireInsuranceRegisterVO detail(AppTireInsuranceRegister appTireInsuranceRegister) {
+		//通过id查询轮胎保险注册数据
+		AppTireInsuranceRegister tireInsuranceRegister = this.getById(appTireInsuranceRegister.getId());
+		//数据实体类转换
+		AppTireInsuranceRegisterVO tireInsuranceRegisterVO = AppTireInsuranceWrapper.build().entityVO(tireInsuranceRegister);
+		//查询轮胎理赔记录
+		List<AppTireInsuranceRecord> tireInsuranceRecordList = appTireInsuranceRecordService.list(new LambdaQueryWrapper<AppTireInsuranceRecord>()
+			.eq(AppTireInsuranceRecord::getInsuranceId, tireInsuranceRegister.getId())
+			.eq(AppTireInsuranceRecord::getIsDeleted, 0));
+		tireInsuranceRegisterVO.setTireInsuranceRecordList(tireInsuranceRecordList.isEmpty() ? new ArrayList<>() : tireInsuranceRecordList);
+		return tireInsuranceRegisterVO;
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public R submit(AppTireInsuranceRegisterVO appTireInsuranceRegister) {
+		AppTireInsuranceRegister tireInsuranceRegister = new AppTireInsuranceRegister();
+		BeanUtil.copyProperties(appTireInsuranceRegister, tireInsuranceRegister);
+		//判断是否是第一次保存
+		if (tireInsuranceRegister.getId() == null) {
+			// 获取 流水号
+			String billNo = BillCodeUtil.getBillCodeByType(SecureUtil.getTenantId(), "LTB");
+			if (!StringUtils.hasText(billNo) || billNo.length() < NumberEnum.FIFTEEN.number) {
+				return R.fail(HttpStatus.INTERNAL_SERVER_ERROR.value(), "生成系统编号失败");
+			}
+			tireInsuranceRegister.setInsuranceNo(billNo);
+			tireInsuranceRegister.setCreateTime(new Date());
+			tireInsuranceRegister.setCreateUser(AuthUtil.getUserId());
+			//查询当前登录人信息
+			R<User> userR = userClient.userInfoById(AuthUtil.getUserId());
+			if (!userR.isSuccess() || ObjectUtils.isNull(userR.getData())) {
+				throw new RuntimeException("未查到当前登录人用户信息");
+			}
+		} else {
+			tireInsuranceRegister.setUpdateUser(AuthUtil.getUserId());
+			tireInsuranceRegister.setUpdateTime(new Date());
+		}
+		//保存数据
+		this.saveOrUpdate(tireInsuranceRegister);
+		return R.data(tireInsuranceRegister);
+	}
+
+	@Override
+	public R submitTireInsurance(AppTireInsuranceRegisterVO appTireInsuranceRegister) {
+		AppTireInsuranceRegister tireInsuranceRegister = new AppTireInsuranceRegister();
+		BeanUtil.copyProperties(appTireInsuranceRegister, tireInsuranceRegister);
+		tireInsuranceRegister.setUpdateUser(AuthUtil.getUserId());
+		tireInsuranceRegister.setUpdateTime(new Date());
+		tireInsuranceRegister.setStatus(1);
+		//保存数据
+		this.updateById(tireInsuranceRegister);
+		AppClaim claim = new AppClaim();
+		// 获取 流水号
+		String billNo = BillCodeUtil.getBillCodeByType(SecureUtil.getTenantId(), "LP");
+		if (!StringUtils.hasText(billNo) || billNo.length() < NumberEnum.FIFTEEN.number) {
+			return R.fail(HttpStatus.INTERNAL_SERVER_ERROR.value(), "生成系统编号失败");
+		}
+		claim.setClaimNo(billNo);
+		claim.setCreateTime(new Date());
+		claim.setCreateUser(AuthUtil.getUserId());
+		claim.setCreateDept(Long.valueOf(AuthUtil.getDeptId()));
+		claim.setClaimSourceType(2);
+		if (AuthUtil.getUserRole().contains("admin")) {
+			claim.setSourceId(AuthUtil.getUserId());
+			claim.setSourceCode("");
+			claim.setSourceName(AuthUtil.getUserName());
+		} else {
+			AppPjCorpsAttn attn = corpsAttnService.getOne(new LambdaQueryWrapper<AppPjCorpsAttn>()
+				.eq(AppPjCorpsAttn::getTenantId,AuthUtil.getTenantId())
+				.eq(AppPjCorpsAttn::getIsDeleted,0)
+				.eq(AppPjCorpsAttn::getUserId,AuthUtil.getUserId())
+				.last("LIMIT 1"));
+			if (attn == null){
+				throw new RuntimeException("未查到对应门店联系人信息");
+			}
+			AppPjCorpsDesc corpsDesc = corpsDescService.getById(attn.getId());
+			if (corpsDesc == null){
+				throw new RuntimeException("未查到对应门店信息");
+			}
+			claim.setSourceId(corpsDesc.getId());
+			claim.setSourceName(corpsDesc.getCname());
+		}
+		//保存数据
+		bladeClaimService.save(claim);
+		List<AppClaimAttachment> claimAttachmentList = new ArrayList<>();
+		if (ObjectUtils.isNotNull(tireInsuranceRegister.getOverallVehicleUrl())) {
+			AppClaimAttachment appClaimAttachment = saveClaimAttachment(tireInsuranceRegister.getOverallVehicleUrl(), claim.getId(), 1);
+			claimAttachmentList.add(appClaimAttachment);
+		}
+		if (ObjectUtils.isNotNull(tireInsuranceRegister.getTireDotUrl())) {
+			AppClaimAttachment appClaimAttachment = saveClaimAttachment(tireInsuranceRegister.getTireDotUrl(), claim.getId(), 2);
+			claimAttachmentList.add(appClaimAttachment);
+		}
+		if (ObjectUtils.isNotNull(tireInsuranceRegister.getTirePatternUrl())) {
+			AppClaimAttachment appClaimAttachment = saveClaimAttachment(tireInsuranceRegister.getTirePatternUrl(), claim.getId(), 3);
+			claimAttachmentList.add(appClaimAttachment);
+		}
+		if (ObjectUtils.isNotNull(tireInsuranceRegister.getVehicleLicenseUrl())) {
+			AppClaimAttachment appClaimAttachment = saveClaimAttachment(tireInsuranceRegister.getVehicleLicenseUrl(), claim.getId(), 5);
+			claimAttachmentList.add(appClaimAttachment);
+		}
+		//批量保存理赔附件数据数据
+		bladeClaimAttachmentService.saveBatch(claimAttachmentList);
+		return R.data(appTireInsuranceRegister);
+	}
+
+	private AppClaimAttachment saveClaimAttachment(String url, Long claimId, int type) {
+		AppClaimAttachment appClaimAttachment = new AppClaimAttachment();
+		appClaimAttachment.setClaimId(claimId);
+		appClaimAttachment.setCreateTime(new Date());
+		appClaimAttachment.setCreateUser(AuthUtil.getUserId());
+		appClaimAttachment.setCreateDept(Long.valueOf(AuthUtil.getDeptId()));
+		String fileName = url.substring(url.lastIndexOf("/"), url.lastIndexOf("."));
+		appClaimAttachment.setFileName(fileName);
+		String fileType = url.substring(url.lastIndexOf("."));
+		appClaimAttachment.setFileType(fileType);
+		appClaimAttachment.setFileUrl(url);
+		appClaimAttachment.setFileProperties(type);
+		return appClaimAttachment;
+	}
+
+
+}

+ 51 - 0
blade-service/gubersail-dealer-app/src/main/java/com/gubersail/app/wrapper/AppTireInsuranceWrapper.java

@@ -0,0 +1,51 @@
+package com.gubersail.app.wrapper;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.gubersail.app.api.claim.entity.AppClaim;
+import com.gubersail.app.api.claim.vo.AppClaimVO;
+import com.gubersail.app.api.insurance.entity.AppTireInsuranceRegister;
+import com.gubersail.app.api.insurance.vo.AppTireInsuranceRegisterVO;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springframework.beans.BeanUtils;
+
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * @author :jixinyuan
+ * @date : 2025/9/10
+ */
+public class AppTireInsuranceWrapper extends BaseEntityWrapper<AppTireInsuranceRegister, AppTireInsuranceRegisterVO> {
+
+	public static AppTireInsuranceWrapper build() {
+		return new AppTireInsuranceWrapper();
+	}
+
+	@Override
+	public AppTireInsuranceRegisterVO entityVO(AppTireInsuranceRegister entity) {
+		if (Objects.isNull(entity)) {
+			return null;
+		}
+		AppTireInsuranceRegisterVO registerVO = new AppTireInsuranceRegisterVO();
+		BeanUtils.copyProperties(entity, registerVO);
+		return registerVO;
+	}
+
+	public IPage<AppTireInsuranceRegisterVO> pageVO(IPage<AppTireInsuranceRegister> page) {
+		if (Objects.isNull(page)) {
+			return null;
+		}
+		IPage<AppTireInsuranceRegisterVO> voPage = new Page<>();
+		List<AppTireInsuranceRegisterVO> voList = BeanUtil.copy(page.getRecords(), AppTireInsuranceRegisterVO.class);
+		voPage.setRecords(voList);
+		voPage.setPages(page.getPages());
+		voPage.setCurrent(page.getCurrent());
+		voPage.setTotal(page.getTotal());
+		voPage.setTotal(page.getTotal());
+		voPage.setSize(page.getSize());
+		return voPage;
+	}
+
+}