xzd-客户信息
This commit is contained in:
@ -8,6 +8,7 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|||||||
@ -4,9 +4,17 @@ package org.dromara.xzd.cotroller;
|
|||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.xzd.domain.XzdCustomertype;
|
||||||
import org.dromara.xzd.domain.dto.AddCorrespondentDto;
|
import org.dromara.xzd.domain.dto.AddCorrespondentDto;
|
||||||
|
import org.dromara.xzd.domain.dto.XzdClienteleListDto;
|
||||||
|
import org.dromara.xzd.domain.vo.XzdClienteleListSumVo;
|
||||||
|
import org.dromara.xzd.domain.vo.XzdClienteleListVo;
|
||||||
|
import org.dromara.xzd.domain.vo.XzdCustomertypeVo;
|
||||||
import org.dromara.xzd.domain.vo.XzdPoiAreaVo;
|
import org.dromara.xzd.domain.vo.XzdPoiAreaVo;
|
||||||
import org.dromara.xzd.service.IXzdCorrespondentList;
|
import org.dromara.xzd.service.IXzdCorrespondentList;
|
||||||
|
import org.dromara.xzd.service.IXzdCustomertypeInfoService;
|
||||||
|
import org.dromara.xzd.service.IXzdCustomertypeService;
|
||||||
import org.dromara.xzd.service.IXzdPoiAreaService;
|
import org.dromara.xzd.service.IXzdPoiAreaService;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -22,10 +30,15 @@ public class XzdCorrespondentList {
|
|||||||
|
|
||||||
private final IXzdCorrespondentList iXzdCorrespondentList;
|
private final IXzdCorrespondentList iXzdCorrespondentList;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private final IXzdCustomertypeService iXzdCustomertypeService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询区域列表
|
* 查询区域列表
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("xzd:poiArea:list")
|
// @SaCheckPermission("xzd:poiArea:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public R<XzdPoiAreaVo> list() {
|
public R<XzdPoiAreaVo> list() {
|
||||||
return iXzdCorrespondentList.queryPageList();
|
return iXzdCorrespondentList.queryPageList();
|
||||||
@ -35,7 +48,7 @@ public class XzdCorrespondentList {
|
|||||||
/**
|
/**
|
||||||
* 客户信息添加
|
* 客户信息添加
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("xzd:poiArea:list")
|
@SaCheckPermission("xzd:poiArea:add")
|
||||||
@PostMapping("/addCorrespondent")
|
@PostMapping("/addCorrespondent")
|
||||||
public R<String> addCorrespondent(@RequestBody AddCorrespondentDto dto) {
|
public R<String> addCorrespondent(@RequestBody AddCorrespondentDto dto) {
|
||||||
return iXzdCorrespondentList.addCorrespondent(dto);
|
return iXzdCorrespondentList.addCorrespondent(dto);
|
||||||
@ -43,9 +56,9 @@ public class XzdCorrespondentList {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户信息添加
|
* 客户信息删除
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("xzd:poiArea:list")
|
@SaCheckPermission("xzd:poiArea:del")
|
||||||
@PostMapping("/delCorrespondent")
|
@PostMapping("/delCorrespondent")
|
||||||
public R<String> delCorrespondent(@RequestBody List<AddCorrespondentDto> dto) {
|
public R<String> delCorrespondent(@RequestBody List<AddCorrespondentDto> dto) {
|
||||||
return iXzdCorrespondentList.delCorrespondent(dto);
|
return iXzdCorrespondentList.delCorrespondent(dto);
|
||||||
@ -53,6 +66,30 @@ public class XzdCorrespondentList {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户信息列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("xzd:poiArea:list")
|
||||||
|
@PostMapping("/queryCustomertype")
|
||||||
|
public R<XzdClienteleListSumVo> queryCustomertype(@RequestBody XzdClienteleListDto dto, PageQuery pageQuery) {
|
||||||
|
return iXzdCorrespondentList.queryCustomertype(dto, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户类型列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("xzd:poiArea:list")
|
||||||
|
@PostMapping("/queryCustomertypeList")
|
||||||
|
public R<List<XzdCustomertypeVo>> queryCustomertypeList() {
|
||||||
|
return iXzdCustomertypeService.queryCustomertypeList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -28,13 +28,11 @@ public class XzdAddressInfoBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 1客户 2供应商
|
* 1客户 2供应商
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "1客户 2供应商不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户ID
|
* 客户ID
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "客户ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private Long customerinformationId;
|
private Long customerinformationId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -23,19 +23,16 @@ public class XzdBusinessInfoBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1客户 2供应商
|
* 1客户 2供应商
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "1客户 2供应商不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户ID
|
* 客户ID
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "客户ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private Long customerinformationId;
|
private Long customerinformationId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -25,19 +25,16 @@ public class XzdCertificateInfoBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1客户 2供应商
|
* 1客户 2供应商
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "1客户 2供应商不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户ID
|
* 客户ID
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "客户ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private Long customerinformationId;
|
private Long customerinformationId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -25,13 +25,11 @@ public class XzdCustomerDetailBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户ID
|
* 客户ID
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "客户ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private Long customerinformationId;
|
private Long customerinformationId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -25,13 +25,11 @@ public class XzdCustomerinformationBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 主键ID
|
* 主键ID
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 区域ID
|
* 区域ID
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "区域ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private Long poiAreaId;
|
private Long poiAreaId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -33,13 +33,11 @@ public class XzdCustomertypeInfoBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 数据ID
|
* 数据ID
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "数据ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private Long customertypeId;
|
private Long customertypeId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否主类(0否 1是)
|
* 是否主类(0否 1是)
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "是否主类(0否 1是)不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private String primaryClass;
|
private String primaryClass;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -25,19 +25,16 @@ public class XzdProjectInfoBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1客户 2供应商
|
* 1客户 2供应商
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "1客户 2供应商不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户ID
|
* 客户ID
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "客户ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private Long customerinformationId;
|
private Long customerinformationId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -23,7 +23,6 @@ public class XzdQualificationInfoBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -48,7 +48,6 @@ public class XzdSettlementInfoBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 结算币种
|
* 结算币种
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "结算币种不能为空", groups = { AddGroup.class, EditGroup.class })
|
|
||||||
private String settlementCurrency;
|
private String settlementCurrency;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package org.dromara.xzd.domain.dto;
|
|||||||
|
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
import org.dromara.xzd.domain.*;
|
import org.dromara.xzd.domain.*;
|
||||||
import org.dromara.xzd.domain.bo.*;
|
import org.dromara.xzd.domain.bo.*;
|
||||||
import org.dromara.xzd.domain.vo.XzdPoiAreaVo;
|
import org.dromara.xzd.domain.vo.XzdPoiAreaVo;
|
||||||
|
|||||||
@ -0,0 +1,44 @@
|
|||||||
|
package org.dromara.xzd.domain.dto;
|
||||||
|
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class XzdClienteleListDto {
|
||||||
|
|
||||||
|
|
||||||
|
//XzdCustomerinformationBo
|
||||||
|
/**
|
||||||
|
* 单位编号
|
||||||
|
*/
|
||||||
|
private String unitCode;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位名称
|
||||||
|
*/
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统一社会信用代码
|
||||||
|
*/
|
||||||
|
private String unifiedSocialCreditCode;
|
||||||
|
|
||||||
|
// XzdCustomerinformationBo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分管部门
|
||||||
|
*/
|
||||||
|
private String responsibleDepartment;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分管业务员
|
||||||
|
*/
|
||||||
|
private String responsibleSalesman;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package org.dromara.xzd.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class XzdClienteleListSumVo {
|
||||||
|
private Integer sum;
|
||||||
|
private List<XzdClienteleListVo> xzdClienteleListVo;
|
||||||
|
}
|
||||||
@ -0,0 +1,164 @@
|
|||||||
|
package org.dromara.xzd.domain.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.xzd.domain.bo.XzdCustomerDetailBo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class XzdClienteleListVo {
|
||||||
|
|
||||||
|
|
||||||
|
// 未找到字段 审核人,冻结人,工作流标志,是否加入黑名单,变更状态
|
||||||
|
|
||||||
|
|
||||||
|
// XzdCustomerinformationBo
|
||||||
|
/**
|
||||||
|
* 单位编号
|
||||||
|
*/
|
||||||
|
private String unitCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位名称
|
||||||
|
*/
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 集团客户(0=否,1=是)
|
||||||
|
*/
|
||||||
|
private Long isGroupCustomer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 黑名单(0=否,1=是)
|
||||||
|
*/
|
||||||
|
private Long isBlacklist;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remarks;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统一社会信用代码
|
||||||
|
*/
|
||||||
|
private String unifiedSocialCreditCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
private Long createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
//XzdCustomerDetailBo
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户来源
|
||||||
|
*/
|
||||||
|
private String customerSource;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户类型
|
||||||
|
*/
|
||||||
|
private String customerType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户等级
|
||||||
|
*/
|
||||||
|
private String customerLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经销商类型
|
||||||
|
*/
|
||||||
|
private String dealerType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经销等级
|
||||||
|
*/
|
||||||
|
private String dealerLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重要程度
|
||||||
|
*/
|
||||||
|
private String importanceDegree;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归属组织
|
||||||
|
*/
|
||||||
|
private String belongingOrganization;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分管部门
|
||||||
|
*/
|
||||||
|
private String responsibleDepartment;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分管业务员
|
||||||
|
*/
|
||||||
|
private String responsibleSalesman;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//XzdSettlementInfoBo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开户银行
|
||||||
|
*/
|
||||||
|
private String openingBank;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账号
|
||||||
|
*/
|
||||||
|
private String accountNumber;
|
||||||
|
|
||||||
|
|
||||||
|
// XzdContactBo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 办公地点(主联系人地址)
|
||||||
|
*/
|
||||||
|
private String officeLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机
|
||||||
|
*/
|
||||||
|
private String mobilePhone;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,9 +1,15 @@
|
|||||||
package org.dromara.xzd.mapper;
|
package org.dromara.xzd.mapper;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.xzd.domain.XzdCustomerinformation;
|
import org.dromara.xzd.domain.XzdCustomerinformation;
|
||||||
|
import org.dromara.xzd.domain.dto.XzdClienteleListDto;
|
||||||
|
import org.dromara.xzd.domain.vo.XzdClienteleListVo;
|
||||||
import org.dromara.xzd.domain.vo.XzdCustomerinformationVo;
|
import org.dromara.xzd.domain.vo.XzdCustomerinformationVo;
|
||||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户信息Mapper接口
|
* 客户信息Mapper接口
|
||||||
*
|
*
|
||||||
@ -12,4 +18,19 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
|||||||
*/
|
*/
|
||||||
public interface XzdCustomerinformationMapper extends BaseMapperPlus<XzdCustomerinformation, XzdCustomerinformationVo> {
|
public interface XzdCustomerinformationMapper extends BaseMapperPlus<XzdCustomerinformation, XzdCustomerinformationVo> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询客户信息列表
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<XzdClienteleListVo> queryCustomertype(@Param("dto") XzdClienteleListDto dto, @Param("pageSize") Integer pageSize,@Param("offset") Integer offset);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询客户信息列表总数
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer queryCustomertypeSum(@Param("dto") XzdClienteleListDto dto);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
package org.dromara.xzd.service;
|
package org.dromara.xzd.service;
|
||||||
|
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.xzd.domain.dto.AddCorrespondentDto;
|
import org.dromara.xzd.domain.dto.AddCorrespondentDto;
|
||||||
|
import org.dromara.xzd.domain.dto.XzdClienteleListDto;
|
||||||
|
import org.dromara.xzd.domain.vo.XzdClienteleListSumVo;
|
||||||
|
import org.dromara.xzd.domain.vo.XzdClienteleListVo;
|
||||||
import org.dromara.xzd.domain.vo.XzdPoiAreaVo;
|
import org.dromara.xzd.domain.vo.XzdPoiAreaVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -13,4 +17,6 @@ public interface IXzdCorrespondentList {
|
|||||||
R<String> addCorrespondent(AddCorrespondentDto dto);
|
R<String> addCorrespondent(AddCorrespondentDto dto);
|
||||||
|
|
||||||
R<String> delCorrespondent(List<AddCorrespondentDto> dto);
|
R<String> delCorrespondent(List<AddCorrespondentDto> dto);
|
||||||
|
|
||||||
|
R<XzdClienteleListSumVo> queryCustomertype(XzdClienteleListDto dto, PageQuery pageQuery);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
package org.dromara.xzd.service;
|
package org.dromara.xzd.service;
|
||||||
|
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.xzd.domain.dto.AddCorrespondentDto;
|
||||||
import org.dromara.xzd.domain.vo.XzdCustomertypeVo;
|
import org.dromara.xzd.domain.vo.XzdCustomertypeVo;
|
||||||
import org.dromara.xzd.domain.bo.XzdCustomertypeBo;
|
import org.dromara.xzd.domain.bo.XzdCustomertypeBo;
|
||||||
import org.dromara.xzd.domain.XzdCustomertype;
|
import org.dromara.xzd.domain.XzdCustomertype;
|
||||||
@ -67,4 +69,8 @@ public interface IXzdCustomertypeService extends IService<XzdCustomertype>{
|
|||||||
* @return 是否删除成功
|
* @return 是否删除成功
|
||||||
*/
|
*/
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
|
||||||
|
R<List<AddCorrespondentDto>> queryCustomertype();
|
||||||
|
|
||||||
|
R<List<XzdCustomertypeVo>> queryCustomertypeList();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,26 +4,35 @@ package org.dromara.xzd.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
import org.dromara.system.domain.vo.SysOssVo;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||||
import org.dromara.xzd.domain.*;
|
import org.dromara.xzd.domain.*;
|
||||||
import org.dromara.xzd.domain.bo.*;
|
import org.dromara.xzd.domain.bo.*;
|
||||||
import org.dromara.xzd.domain.dto.AddCorrespondentDto;
|
import org.dromara.xzd.domain.dto.AddCorrespondentDto;
|
||||||
|
import org.dromara.xzd.domain.dto.XzdClienteleListDto;
|
||||||
|
import org.dromara.xzd.domain.vo.XzdClienteleListSumVo;
|
||||||
|
import org.dromara.xzd.domain.vo.XzdClienteleListVo;
|
||||||
import org.dromara.xzd.domain.vo.XzdPoiAreaVo;
|
import org.dromara.xzd.domain.vo.XzdPoiAreaVo;
|
||||||
import org.dromara.xzd.enums.ZxdEnum;
|
import org.dromara.xzd.enums.ZxdEnum;
|
||||||
import org.dromara.xzd.mapper.XzdAddressInfoMapper;
|
import org.dromara.xzd.mapper.XzdCustomerinformationMapper;
|
||||||
import org.dromara.xzd.service.*;
|
import org.dromara.xzd.service.*;
|
||||||
import org.dromara.xzd.utilS.AreaUtil;
|
import org.dromara.xzd.utilS.AreaUtil;
|
||||||
import org.dromara.xzd.utilS.IdWorker;
|
import org.dromara.xzd.utilS.IdWorker;
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
@Service
|
||||||
public class XzdCorrespondentListImp implements IXzdCorrespondentList {
|
public class XzdCorrespondentListImp implements IXzdCorrespondentList {
|
||||||
@ -56,6 +65,8 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList {
|
|||||||
|
|
||||||
private final IXzdCustomertypeInfoService xzdCustomertypeInfoService;
|
private final IXzdCustomertypeInfoService xzdCustomertypeInfoService;
|
||||||
|
|
||||||
|
private final XzdCustomerinformationMapper xzdCustomerinformationMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -76,12 +87,18 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList {
|
|||||||
// 客户信息添加 客户id
|
// 客户信息添加 客户id
|
||||||
long id = IdWorker.getID();
|
long id = IdWorker.getID();
|
||||||
dto.getXzdCustomerinformation().setId(id);
|
dto.getXzdCustomerinformation().setId(id);
|
||||||
|
dto.getXzdCustomerinformation().setCreateDept(LoginHelper.getDeptId());
|
||||||
|
dto.getXzdCustomerinformation().setCreateBy((LoginHelper.getUserId()));
|
||||||
|
// dto.getXzdCustomerinformation().setCreateTime(LocalDateTime.now());
|
||||||
xzdCustomerinformationService.insertByBo(dto.getXzdCustomerinformation());
|
xzdCustomerinformationService.insertByBo(dto.getXzdCustomerinformation());
|
||||||
|
|
||||||
// tab客户信息添加
|
// tab客户信息添加
|
||||||
if (dto.getXzdCustomerDetail() != null){
|
if (dto.getXzdCustomerDetail() != null){
|
||||||
dto.getXzdCustomerDetail().setId(IdWorker.getID());
|
dto.getXzdCustomerDetail().setId(IdWorker.getID());
|
||||||
dto.getXzdCustomerDetail().setCustomerinformationId(id);
|
dto.getXzdCustomerDetail().setCustomerinformationId(id);
|
||||||
|
dto.getXzdCustomerDetail().setCreateDept(LoginHelper.getDeptId());
|
||||||
|
dto.getXzdCustomerDetail().setCreateBy((LoginHelper.getUserId()));
|
||||||
|
// dto.getXzdCustomerDetail().setCreateTime(LocalDateTime.now());
|
||||||
xzdCustomerDetailService.insertByBo(dto.getXzdCustomerDetail());
|
xzdCustomerDetailService.insertByBo(dto.getXzdCustomerDetail());
|
||||||
}
|
}
|
||||||
// 地址信息添加
|
// 地址信息添加
|
||||||
@ -90,6 +107,9 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList {
|
|||||||
Collection<XzdAddressInfo> collect = xzdAddressInfo.stream().map(xzdAddressInfoBo -> {
|
Collection<XzdAddressInfo> collect = xzdAddressInfo.stream().map(xzdAddressInfoBo -> {
|
||||||
xzdAddressInfoBo.setCustomerinformationId(id);
|
xzdAddressInfoBo.setCustomerinformationId(id);
|
||||||
xzdAddressInfoBo.setId(IdWorker.getID());
|
xzdAddressInfoBo.setId(IdWorker.getID());
|
||||||
|
xzdAddressInfoBo.setCreateDept(LoginHelper.getDeptId());
|
||||||
|
xzdAddressInfoBo.setCreateBy((LoginHelper.getUserId()));
|
||||||
|
// xzdAddressInfoBo.setCreateTime(LocalDateTime.now());
|
||||||
xzdAddressInfoBo.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
xzdAddressInfoBo.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
||||||
XzdAddressInfo temp = new XzdAddressInfo();
|
XzdAddressInfo temp = new XzdAddressInfo();
|
||||||
BeanUtil.copyProperties(xzdAddressInfoBo, temp);
|
BeanUtil.copyProperties(xzdAddressInfoBo, temp);
|
||||||
@ -105,6 +125,9 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList {
|
|||||||
Collection<XzdContact> collect1 = xzdContact.stream().map(xzdContactBo -> {
|
Collection<XzdContact> collect1 = xzdContact.stream().map(xzdContactBo -> {
|
||||||
xzdContactBo.setCustomerinformationId(id);
|
xzdContactBo.setCustomerinformationId(id);
|
||||||
xzdContactBo.setId(IdWorker.getID());
|
xzdContactBo.setId(IdWorker.getID());
|
||||||
|
xzdContactBo.setCreateDept(LoginHelper.getDeptId());
|
||||||
|
xzdContactBo.setCreateBy((LoginHelper.getUserId()));
|
||||||
|
// xzdContactBo.setCreateTime(LocalDateTime.now());
|
||||||
xzdContactBo.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
xzdContactBo.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
||||||
XzdContact temp = new XzdContact();
|
XzdContact temp = new XzdContact();
|
||||||
BeanUtil.copyProperties(xzdContactBo, temp);
|
BeanUtil.copyProperties(xzdContactBo, temp);
|
||||||
@ -120,6 +143,9 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList {
|
|||||||
List<XzdCertificateInfo> collect2 = xzdCertificateInfo.stream().map(xzdCertificateInfoBo -> {
|
List<XzdCertificateInfo> collect2 = xzdCertificateInfo.stream().map(xzdCertificateInfoBo -> {
|
||||||
xzdCertificateInfoBo.setId(IdWorker.getID());
|
xzdCertificateInfoBo.setId(IdWorker.getID());
|
||||||
xzdCertificateInfoBo.setCustomerinformationId(id);
|
xzdCertificateInfoBo.setCustomerinformationId(id);
|
||||||
|
xzdCertificateInfoBo.setCreateDept(LoginHelper.getDeptId());
|
||||||
|
xzdCertificateInfoBo.setCreateBy((LoginHelper.getUserId()));
|
||||||
|
// xzdCertificateInfoBo.setCreateTime(LocalDateTime.now());
|
||||||
xzdCertificateInfoBo.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
xzdCertificateInfoBo.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
||||||
|
|
||||||
XzdCertificateInfo info = new XzdCertificateInfo();
|
XzdCertificateInfo info = new XzdCertificateInfo();
|
||||||
@ -128,8 +154,6 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList {
|
|||||||
|
|
||||||
}).collect((Collectors.toList()));
|
}).collect((Collectors.toList()));
|
||||||
xzdCertificateInfoService.saveBatch(collect2);
|
xzdCertificateInfoService.saveBatch(collect2);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -140,6 +164,10 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList {
|
|||||||
xzdQualificationInfoBo.setId(IdWorker.getID());
|
xzdQualificationInfoBo.setId(IdWorker.getID());
|
||||||
xzdQualificationInfoBo.setCustomerinformationId(id);
|
xzdQualificationInfoBo.setCustomerinformationId(id);
|
||||||
xzdQualificationInfoBo.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
xzdQualificationInfoBo.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
||||||
|
xzdQualificationInfoBo.setCreateBy((LoginHelper.getUserId()));
|
||||||
|
// xzdQualificationInfoBo.setCreateTime(LocalDateTime.now());
|
||||||
|
xzdQualificationInfoBo.setUpdateBy((LoginHelper.getUserId()));
|
||||||
|
|
||||||
XzdQualificationInfo info = new XzdQualificationInfo();
|
XzdQualificationInfo info = new XzdQualificationInfo();
|
||||||
BeanUtil.copyProperties(xzdQualificationInfoBo, info);
|
BeanUtil.copyProperties(xzdQualificationInfoBo, info);
|
||||||
return info;
|
return info;
|
||||||
@ -154,6 +182,9 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList {
|
|||||||
if (xzdSettlementInfo != null) {
|
if (xzdSettlementInfo != null) {
|
||||||
xzdSettlementInfo.setId(IdWorker.getID());
|
xzdSettlementInfo.setId(IdWorker.getID());
|
||||||
xzdSettlementInfo.setCustomerinformationId(id);
|
xzdSettlementInfo.setCustomerinformationId(id);
|
||||||
|
xzdSettlementInfo.setCreateDept(LoginHelper.getDeptId());
|
||||||
|
xzdSettlementInfo.setCreateBy((LoginHelper.getUserId()));
|
||||||
|
// xzdSettlementInfo.setCreateTime(LocalDateTime.now());
|
||||||
xzdSettlementInfo.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
xzdSettlementInfo.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
||||||
XzdSettlementInfo info = new XzdSettlementInfo();
|
XzdSettlementInfo info = new XzdSettlementInfo();
|
||||||
BeanUtil.copyProperties(xzdSettlementInfo, info);
|
BeanUtil.copyProperties(xzdSettlementInfo, info);
|
||||||
@ -166,6 +197,9 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList {
|
|||||||
if (xzdBusinessInfo != null) {
|
if (xzdBusinessInfo != null) {
|
||||||
xzdBusinessInfo.setId(IdWorker.getID());
|
xzdBusinessInfo.setId(IdWorker.getID());
|
||||||
xzdBusinessInfo.setCustomerinformationId(id);
|
xzdBusinessInfo.setCustomerinformationId(id);
|
||||||
|
xzdBusinessInfo.setCreateDept(LoginHelper.getDeptId());
|
||||||
|
xzdBusinessInfo.setCreateBy((LoginHelper.getUserId()));
|
||||||
|
// xzdBusinessInfo.setCreateTime(LocalDateTime.now());
|
||||||
xzdBusinessInfo.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
xzdBusinessInfo.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
||||||
XzdBusinessInfo info = new XzdBusinessInfo();
|
XzdBusinessInfo info = new XzdBusinessInfo();
|
||||||
BeanUtil.copyProperties(xzdBusinessInfo, info);
|
BeanUtil.copyProperties(xzdBusinessInfo, info);
|
||||||
@ -179,6 +213,9 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList {
|
|||||||
if (xzdProjectInfo != null) {
|
if (xzdProjectInfo != null) {
|
||||||
xzdProjectInfo.setId(IdWorker.getID());
|
xzdProjectInfo.setId(IdWorker.getID());
|
||||||
xzdProjectInfo.setCustomerinformationId(id);
|
xzdProjectInfo.setCustomerinformationId(id);
|
||||||
|
xzdProjectInfo.setCreateDept(LoginHelper.getDeptId());
|
||||||
|
xzdProjectInfo.setCreateBy((LoginHelper.getUserId()));
|
||||||
|
// xzdProjectInfo.setCreateTime(LocalDateTime.now());
|
||||||
xzdProjectInfo.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
xzdProjectInfo.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
||||||
XzdProjectInfo info = new XzdProjectInfo();
|
XzdProjectInfo info = new XzdProjectInfo();
|
||||||
BeanUtil.copyProperties(xzdProjectInfo, info);
|
BeanUtil.copyProperties(xzdProjectInfo, info);
|
||||||
@ -190,6 +227,9 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList {
|
|||||||
XzdContractInfoBo xzdContractInfo = dto.getXzdContractInfo();
|
XzdContractInfoBo xzdContractInfo = dto.getXzdContractInfo();
|
||||||
if (xzdContractInfo != null) {
|
if (xzdContractInfo != null) {
|
||||||
xzdContractInfo.setId(IdWorker.getID());
|
xzdContractInfo.setId(IdWorker.getID());
|
||||||
|
xzdContractInfo.setCreateDept(LoginHelper.getDeptId());
|
||||||
|
xzdContractInfo.setCreateBy((LoginHelper.getUserId()));
|
||||||
|
// xzdContractInfo.setCreateTime(LocalDateTime.now());
|
||||||
xzdContractInfo.setCustomerinformationId(id);
|
xzdContractInfo.setCustomerinformationId(id);
|
||||||
xzdContractInfo.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
xzdContractInfo.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
||||||
XzdContractInfo info = new XzdContractInfo();
|
XzdContractInfo info = new XzdContractInfo();
|
||||||
@ -204,6 +244,9 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList {
|
|||||||
if (xzdCustomertypeInfo != null && xzdCustomertypeInfo.size() > 0) {
|
if (xzdCustomertypeInfo != null && xzdCustomertypeInfo.size() > 0) {
|
||||||
List<XzdCustomertypeInfo> collect = xzdCustomertypeInfo.stream().map(item -> {
|
List<XzdCustomertypeInfo> collect = xzdCustomertypeInfo.stream().map(item -> {
|
||||||
item.setCustomertypeId(id);
|
item.setCustomertypeId(id);
|
||||||
|
item.setCreateDept(LoginHelper.getDeptId());
|
||||||
|
item.setCreateBy((LoginHelper.getUserId()));
|
||||||
|
// item.setCreateTime(LocalDateTime.now());
|
||||||
item.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
item.setType(ZxdEnum.TYPE_CORRESPONDENT.getTypeValue());
|
||||||
XzdCustomertypeInfo info = new XzdCustomertypeInfo();
|
XzdCustomertypeInfo info = new XzdCustomertypeInfo();
|
||||||
BeanUtil.copyProperties(item, info);
|
BeanUtil.copyProperties(item, info);
|
||||||
@ -215,7 +258,163 @@ public class XzdCorrespondentListImp implements IXzdCorrespondentList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R<String> delCorrespondent(List<AddCorrespondentDto> dto) {
|
public R<String> delCorrespondent(List<AddCorrespondentDto> dtos) {
|
||||||
return null;
|
if (dtos != null && dtos.size() > 0) {
|
||||||
|
dtos.forEach(item -> {
|
||||||
|
delCorrespondentVoid(item);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return R.ok("删除成功");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<XzdClienteleListSumVo> queryCustomertype(XzdClienteleListDto dto, PageQuery pageQuery) {
|
||||||
|
XzdClienteleListSumVo xzdClienteleListSumVo = new XzdClienteleListSumVo();
|
||||||
|
|
||||||
|
try {
|
||||||
|
Integer offset = (pageQuery.getPageNum() - 1) * pageQuery.getPageSize();
|
||||||
|
// 查询数据
|
||||||
|
List<XzdClienteleListVo> res = xzdCustomerinformationMapper.queryCustomertype(dto,pageQuery.getPageSize(),offset);
|
||||||
|
// 查询总数
|
||||||
|
Integer i = xzdCustomerinformationMapper.queryCustomertypeSum(dto);
|
||||||
|
xzdClienteleListSumVo.setSum(i);
|
||||||
|
xzdClienteleListSumVo.setXzdClienteleListVo(res);
|
||||||
|
return R.ok(xzdClienteleListSumVo);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
return R.warn("查询失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void delCorrespondentVoid(AddCorrespondentDto dto){
|
||||||
|
|
||||||
|
// 客户信息
|
||||||
|
if( dto.getXzdCustomerinformation() != null){
|
||||||
|
xzdCustomerinformationService.removeById(dto.getXzdCustomerinformation().getId());
|
||||||
|
}
|
||||||
|
// tab客户信息
|
||||||
|
if (dto.getXzdCustomerDetail() != null){
|
||||||
|
xzdCustomerDetailService.removeById(dto.getXzdCustomerDetail().getId());
|
||||||
|
}
|
||||||
|
// 地址信息
|
||||||
|
List<XzdAddressInfoBo> xzdAddressInfo = dto.getXzdAddressInfo();
|
||||||
|
if (xzdAddressInfo != null && xzdAddressInfo.size() > 0) {
|
||||||
|
xzdAddressInfoService.removeByIds(xzdAddressInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 联系人信息添加
|
||||||
|
List<XzdContactBo> xzdContact = dto.getXzdContact();
|
||||||
|
if (xzdContact != null && xzdContact.isEmpty()) {
|
||||||
|
Collection<XzdContact> collect1 = xzdContact.stream().map(xzdContactBo -> {
|
||||||
|
// 删除附件
|
||||||
|
if (!StringUtils.isEmpty(xzdContactBo.getAttachment())){
|
||||||
|
List<Long> collect = Arrays.stream(xzdContactBo.getAttachment().split(",")).map(item -> {
|
||||||
|
return Long.parseLong(item);
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
sysOssService.deleteWithValidByIds(collect, false);
|
||||||
|
log.info("删除联系人附件成功");
|
||||||
|
}
|
||||||
|
XzdContact temp = new XzdContact();
|
||||||
|
BeanUtil.copyProperties(xzdContactBo, temp);
|
||||||
|
return temp;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
xzdContactService.removeByIds(collect1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 证件信息
|
||||||
|
List<XzdCertificateInfoBo> xzdCertificateInfo = dto.getXzdCertificateInfo();
|
||||||
|
if (xzdCertificateInfo != null && xzdCertificateInfo.size() > 0) {
|
||||||
|
List<XzdCertificateInfo> collect2 = xzdCertificateInfo.stream().map(xzdCertificateInfoBo -> {
|
||||||
|
String attachment = xzdCertificateInfoBo.getAttachment();
|
||||||
|
if (!StringUtils.isEmpty(attachment)){
|
||||||
|
List<Long> collect = Arrays.stream(attachment.split(",")).map(item -> {
|
||||||
|
return Long.parseLong(item);
|
||||||
|
}).collect((Collectors.toList()));
|
||||||
|
sysOssService.deleteWithValidByIds(collect, false);
|
||||||
|
log.info("删除证件信息附件成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
XzdCertificateInfo info = new XzdCertificateInfo();
|
||||||
|
BeanUtil.copyProperties(xzdCertificateInfoBo, info);
|
||||||
|
return info;
|
||||||
|
|
||||||
|
}).collect((Collectors.toList()));
|
||||||
|
xzdCertificateInfoService.removeByIds(collect2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 资质信息
|
||||||
|
List<XzdQualificationInfoBo> xzdQualificationInfo = dto.getXzdQualificationInfo();
|
||||||
|
if (xzdQualificationInfo != null && xzdQualificationInfo.size() > 0) {
|
||||||
|
List<XzdQualificationInfo> collect3 = xzdQualificationInfo.stream().map(xzdQualificationInfoBo -> {
|
||||||
|
String attachment = xzdQualificationInfoBo.getAttachment();
|
||||||
|
if (!StringUtils.isEmpty(attachment)){
|
||||||
|
List<Long> collect = Arrays.stream(attachment.split(",")).map(item -> {
|
||||||
|
return Long.parseLong(item);
|
||||||
|
}).collect((Collectors.toList()));
|
||||||
|
sysOssService.deleteWithValidByIds(collect, false);
|
||||||
|
log.info("删除资质信息附件成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
XzdQualificationInfo info = new XzdQualificationInfo();
|
||||||
|
BeanUtil.copyProperties(xzdQualificationInfoBo, info);
|
||||||
|
return info;
|
||||||
|
}).collect((Collectors.toList()));
|
||||||
|
xzdQualificationInfoService.removeByIds(collect3);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 结算信息
|
||||||
|
XzdSettlementInfoBo xzdSettlementInfo = dto.getXzdSettlementInfo();
|
||||||
|
if (xzdSettlementInfo != null) {
|
||||||
|
|
||||||
|
xzdSettlementInfoService.removeById(xzdSettlementInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 业务信息
|
||||||
|
XzdBusinessInfoBo xzdBusinessInfo = dto.getXzdBusinessInfo();
|
||||||
|
if (xzdBusinessInfo != null) {
|
||||||
|
xzdBusinessInfoService.removeById(xzdBusinessInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 项目信息
|
||||||
|
|
||||||
|
XzdProjectInfoBo xzdProjectInfo = dto.getXzdProjectInfo();
|
||||||
|
if (xzdProjectInfo != null) {
|
||||||
|
xzdProjectInfoService.removeById(xzdProjectInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 合同信息
|
||||||
|
XzdContractInfoBo xzdContractInfo = dto.getXzdContractInfo();
|
||||||
|
if (xzdContractInfo != null) {
|
||||||
|
xzdContractInfoService.removeById(xzdContractInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 客户类型
|
||||||
|
|
||||||
|
List<XzdCustomertypeInfoBo> xzdCustomertypeInfo = dto.getXzdCustomertypeInfo();
|
||||||
|
if (xzdCustomertypeInfo != null && xzdCustomertypeInfo.size() > 0) {
|
||||||
|
xzdCustomertypeInfoService.removeByIds(xzdCustomertypeInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
package org.dromara.xzd.service.impl;
|
package org.dromara.xzd.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -9,6 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.xzd.domain.dto.AddCorrespondentDto;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.dromara.xzd.domain.bo.XzdCustomertypeBo;
|
import org.dromara.xzd.domain.bo.XzdCustomertypeBo;
|
||||||
import org.dromara.xzd.domain.vo.XzdCustomertypeVo;
|
import org.dromara.xzd.domain.vo.XzdCustomertypeVo;
|
||||||
@ -132,4 +135,21 @@ public class XzdCustomertypeServiceImpl extends ServiceImpl<XzdCustomertypeMappe
|
|||||||
}
|
}
|
||||||
return baseMapper.deleteByIds(ids) > 0;
|
return baseMapper.deleteByIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<List<AddCorrespondentDto>> queryCustomertype() {
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<List<XzdCustomertypeVo>> queryCustomertypeList() {
|
||||||
|
|
||||||
|
QueryWrapper<XzdCustomertype> xzdCustomertypeQueryWrapper = new QueryWrapper<>();
|
||||||
|
xzdCustomertypeQueryWrapper.eq("type",1);
|
||||||
|
List<XzdCustomertypeVo> vos = baseMapper.selectVoList(xzdCustomertypeQueryWrapper);
|
||||||
|
|
||||||
|
|
||||||
|
return R.ok(vos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,17 +1,23 @@
|
|||||||
package org.dromara.xzd.utilS;
|
package org.dromara.xzd.utilS;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.xzd.domain.XzdPoiArea;
|
||||||
import org.dromara.xzd.domain.bo.XzdPoiAreaBo;
|
import org.dromara.xzd.domain.bo.XzdPoiAreaBo;
|
||||||
import org.dromara.xzd.domain.vo.XzdPoiAreaVo;
|
import org.dromara.xzd.domain.vo.XzdPoiAreaVo;
|
||||||
|
import org.dromara.xzd.mapper.XzdPoiAreaMapper;
|
||||||
import org.dromara.xzd.service.IXzdPoiAreaService;
|
import org.dromara.xzd.service.IXzdPoiAreaService;
|
||||||
import org.dromara.xzd.service.impl.XzdPoiAreaServiceImpl;
|
import org.dromara.xzd.service.impl.XzdPoiAreaServiceImpl;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ -21,6 +27,7 @@ public class AreaUtil {
|
|||||||
|
|
||||||
|
|
||||||
private final IXzdPoiAreaService xzdPoiAreaService;
|
private final IXzdPoiAreaService xzdPoiAreaService;
|
||||||
|
private final XzdPoiAreaMapper xzdPoiAreaMapper;
|
||||||
|
|
||||||
|
|
||||||
public XzdPoiAreaVo getAreaList(Long parentId,XzdPoiAreaVo vo) {
|
public XzdPoiAreaVo getAreaList(Long parentId,XzdPoiAreaVo vo) {
|
||||||
@ -28,9 +35,21 @@ public class AreaUtil {
|
|||||||
if (StringUtils.isEmpty(parentId.toString())) {
|
if (StringUtils.isEmpty(parentId.toString())) {
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
XzdPoiAreaBo xzdPoiAreaBo = new XzdPoiAreaBo();
|
QueryWrapper<XzdPoiArea> queryWrapper = new QueryWrapper<>();
|
||||||
xzdPoiAreaBo.setParentid(parentId);
|
|
||||||
List<XzdPoiAreaVo> xzdPoiAreaVos = xzdPoiAreaService.queryList(xzdPoiAreaBo);
|
queryWrapper.eq("parentid", parentId).orderByAsc("adcode");
|
||||||
|
|
||||||
|
List<XzdPoiAreaVo> xzdPoiAreaVos = xzdPoiAreaMapper.selectList(queryWrapper).stream().map(xzdPoiArea -> {
|
||||||
|
XzdPoiAreaVo xzdPoiAreaBo= new XzdPoiAreaVo();
|
||||||
|
BeanUtil.copyProperties(xzdPoiArea, xzdPoiAreaBo);
|
||||||
|
return xzdPoiAreaBo;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// xzdPoiAreaBo.setParentid(parentId);
|
||||||
|
// List<XzdPoiAreaVo> xzdPoiAreaVos = xzdPoiAreaService.queryList(xzdPoiAreaBo);
|
||||||
|
|
||||||
if (xzdPoiAreaVos.size() > 0) {
|
if (xzdPoiAreaVos.size() > 0) {
|
||||||
xzdPoiAreaVos.forEach(xzdPoiAreaVo -> {
|
xzdPoiAreaVos.forEach(xzdPoiAreaVo -> {
|
||||||
getAreaList(xzdPoiAreaVo.getAdcode(), xzdPoiAreaVo);
|
getAreaList(xzdPoiAreaVo.getAdcode(), xzdPoiAreaVo);
|
||||||
|
|||||||
@ -0,0 +1,101 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.dromara.xzd.mapper.XzdCustomerinformationMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="queryCustomertype" resultType="org.dromara.xzd.domain.vo.XzdClienteleListVo">
|
||||||
|
SELECT
|
||||||
|
a1.unit_code AS unitCode,
|
||||||
|
a1.unit_name AS unitName,
|
||||||
|
a1.is_group_customer AS isGroupCustomer,
|
||||||
|
a1.is_blacklist AS isBlacklist,
|
||||||
|
a1.remarks AS remarks,
|
||||||
|
a1.unified_social_credit_code AS unifiedSocialCreditCode,
|
||||||
|
a1.create_by AS createBy,
|
||||||
|
a1.create_time AS createTime,
|
||||||
|
a1.update_time AS updateTime,
|
||||||
|
a2.customer_source AS customerSource,
|
||||||
|
a2.customer_type AS customerType,
|
||||||
|
a2.customer_level AS customerLevel,
|
||||||
|
a2.dealer_type AS dealerType,
|
||||||
|
a2.dealer_level AS dealerLevel,
|
||||||
|
a2.importance_degree AS importanceDegree,
|
||||||
|
a2.belonging_organization AS belongingOrganization,
|
||||||
|
a2.responsible_department AS responsibleDepartment,
|
||||||
|
a2.responsible_salesman AS responsibleSalesman,
|
||||||
|
b1.opening_bank AS openingBank,
|
||||||
|
b1.account_number AS accountNumber,
|
||||||
|
c1.office_location AS officeLocation,
|
||||||
|
c1.mobile_phone AS mobilePhone,
|
||||||
|
c1.name AS name
|
||||||
|
|
||||||
|
FROM xzd_customerinformation a1
|
||||||
|
LEFT JOIN xzd_customer_detail a2 ON a1.id = a2.customerinformation_id
|
||||||
|
LEFT JOIN xzd_settlement_info b1 ON a1.id = b1.customerinformation_id
|
||||||
|
LEFT JOIN xzd_contact c1 ON a1.id = c1.customerinformation_id AND c1.is_main_contact = 1
|
||||||
|
<where>
|
||||||
|
<!-- 可选条件:单位代码 -->
|
||||||
|
<if test="dto.unitCode != null and dto.unitCode != ''">
|
||||||
|
AND a1.unit_code = #{dto.unitCode}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 可选条件:单位名称 -->
|
||||||
|
<if test="dto.unitName != null and dto.unitName != ''">
|
||||||
|
AND a1.unit_name = #{dto.unitName}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 可选条件:负责部门 -->
|
||||||
|
<if test="dto.responsibleDepartment != null and dto.responsibleDepartment != ''">
|
||||||
|
AND a2.responsible_department = #{dto.responsibleDepartment}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 可选条件:负责销售员 -->
|
||||||
|
<if test="dto.responsibleSalesman != null and dto.responsibleSalesman != ''">
|
||||||
|
AND a2.responsible_salesman = #{dto.responsibleSalesman}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 可选条件:统一社会信用代码 -->
|
||||||
|
<if test="dto.unifiedSocialCreditCode != null and dto.unifiedSocialCreditCode != ''">
|
||||||
|
AND a1.unified_social_credit_code = #{dto.unifiedSocialCreditCode}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY a1.create_time DESC
|
||||||
|
LIMIT #{offset}, #{pageSize}
|
||||||
|
</select>
|
||||||
|
<select id="queryCustomertypeSum" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
count(*)
|
||||||
|
FROM xzd_customerinformation a1
|
||||||
|
LEFT JOIN xzd_customer_detail a2 ON a1.id = a2.customerinformation_id
|
||||||
|
LEFT JOIN xzd_settlement_info b1 ON a1.id = b1.customerinformation_id
|
||||||
|
LEFT JOIN xzd_contact c1 ON a1.id = c1.customerinformation_id AND c1.is_main_contact = 1
|
||||||
|
<where>
|
||||||
|
<!-- 可选条件:单位代码 -->
|
||||||
|
<if test="dto.unitCode != null and dto.unitCode != ''">
|
||||||
|
AND a1.unit_code = #{dto.unitCode}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 可选条件:单位名称 -->
|
||||||
|
<if test="dto.unitName != null and dto.unitName != ''">
|
||||||
|
AND a1.unit_name = #{dto.unitName}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 可选条件:负责部门 -->
|
||||||
|
<if test="dto.responsibleDepartment != null and dto.responsibleDepartment != ''">
|
||||||
|
AND a2.responsible_department = #{dto.responsibleDepartment}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 可选条件:负责销售员 -->
|
||||||
|
<if test="dto.responsibleSalesman != null and dto.responsibleSalesman != ''">
|
||||||
|
AND a2.responsible_salesman = #{dto.responsibleSalesman}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 可选条件:统一社会信用代码 -->
|
||||||
|
<if test="dto.unifiedSocialCreditCode != null and dto.unifiedSocialCreditCode != ''">
|
||||||
|
AND a1.unified_social_credit_code = #{dto.unifiedSocialCreditCode}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user