评分体系修改
This commit is contained in:
@ -0,0 +1,50 @@
|
|||||||
|
package com.xjrsoft.module.sales.dto;
|
||||||
|
|
||||||
|
import com.pictc.annotations.datalog.LogField;
|
||||||
|
import com.pictc.annotations.datalog.LogTable;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 客户组
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-16
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@LogTable(source="lng_customer_group_customer",name="客户组")
|
||||||
|
public class AddLngCustomerGroupCustomerDto implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("组编码")
|
||||||
|
@LogField(name="组编码",index=0)
|
||||||
|
private String grpCode;
|
||||||
|
/**
|
||||||
|
* 客户编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("客户编码")
|
||||||
|
@LogField(name="客户编码",index=0)
|
||||||
|
private String cuCode;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
@LogField(name="备注",index=0)
|
||||||
|
private String note;
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("租户id")
|
||||||
|
@LogField(name="租户id",index=0)
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,77 @@
|
|||||||
|
package com.xjrsoft.module.sales.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.pictc.annotations.datalog.LogField;
|
||||||
|
import com.pictc.annotations.datalog.LogTable;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 客户组
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-16
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@LogTable(source="lng_customer_group",name="客户组")
|
||||||
|
public class AddLngCustomerGroupDto implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组编码(按类型自动编码)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("组编码(按类型自动编码)")
|
||||||
|
@LogField(name="组编码(按类型自动编码)",index=0)
|
||||||
|
private String grpCode;
|
||||||
|
/**
|
||||||
|
* 组说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("组说明")
|
||||||
|
@LogField(name="组说明",index=0)
|
||||||
|
private String grpName;
|
||||||
|
/**
|
||||||
|
* 类型(GD-挂单销售,JP-竞拍销售,JS-批量结算,YX-营销优惠活动,DX-客户定向销售)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("类型(GD-挂单销售,JP-竞拍销售,JS-批量结算,YX-营销优惠活动,DX-客户定向销售)")
|
||||||
|
@LogField(name="类型(GD-挂单销售,JP-竞拍销售,JS-批量结算,YX-营销优惠活动,DX-客户定向销售)",index=0)
|
||||||
|
private String typeCode;
|
||||||
|
/**
|
||||||
|
* 起始日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("起始日期")
|
||||||
|
@LogField(name="起始日期",index=0)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime dateFrom;
|
||||||
|
/**
|
||||||
|
* 结束日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("结束日期")
|
||||||
|
@LogField(name="结束日期",index=0)
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime dateTo;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
@LogField(name="备注",index=0)
|
||||||
|
private String note;
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("租户id")
|
||||||
|
@LogField(name="租户id",index=0)
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lngCustomerGroupCustomer
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("lngCustomerGroupCustomer子表")
|
||||||
|
private List<AddLngCustomerGroupCustomerDto> lngCustomerGroupCustomerList;
|
||||||
|
}
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
package com.xjrsoft.module.sales.dto;
|
||||||
|
|
||||||
|
import com.xjrsoft.common.page.PageInput;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 分页查询入参
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-16
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
public class LngCustomerGroupPageDto extends PageInput {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组编码(按类型自动编码)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("组编码(按类型自动编码)")
|
||||||
|
private String grpCode;
|
||||||
|
/**
|
||||||
|
* 类型(GD-挂单销售,JP-竞拍销售,JS-批量结算,YX-营销优惠活动,DX-客户定向销售)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("类型(GD-挂单销售,JP-竞拍销售,JS-批量结算,YX-营销优惠活动,DX-客户定向销售)")
|
||||||
|
private String typeCode;
|
||||||
|
/**
|
||||||
|
* 起始日期字段开始时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("起始日期字段开始时间")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime dateFromStart;
|
||||||
|
/**
|
||||||
|
* 起始日期字段结束时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("起始日期字段结束时间")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime dateFromEnd;
|
||||||
|
/**
|
||||||
|
* 结束日期字段开始时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("结束日期字段开始时间")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime dateToStart;
|
||||||
|
/**
|
||||||
|
* 结束日期字段结束时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("结束日期字段结束时间")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime dateToEnd;
|
||||||
|
/**
|
||||||
|
* 组说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("组说明")
|
||||||
|
private String grpName;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
package com.xjrsoft.module.sales.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.pictc.annotations.datalog.LogTable;
|
||||||
|
import com.pictc.annotations.datalog.LogField;
|
||||||
|
import com.pictc.annotations.datalog.LogJoin;
|
||||||
|
import com.pictc.annotations.datalog.LogJoinColumn;
|
||||||
|
import com.pictc.annotations.datalog.JoinCaseType;
|
||||||
|
import com.pictc.annotations.datalog.JoinType;
|
||||||
|
import com.pictc.annotations.datalog.ValueDirectionType;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 客户组
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-16
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@LogTable(source="lng_customer_group_customer",name="客户组")
|
||||||
|
public class UpdateLngCustomerGroupCustomerDto implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@LogField(name="主键",index=0)
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private String id;
|
||||||
|
/**
|
||||||
|
* 组编码
|
||||||
|
*/
|
||||||
|
@LogField(name="组编码",index=1)
|
||||||
|
@ApiModelProperty("组编码")
|
||||||
|
private String grpCode;
|
||||||
|
/**
|
||||||
|
* 客户编码
|
||||||
|
*/
|
||||||
|
@LogField(name="客户编码",index=2)
|
||||||
|
@ApiModelProperty("客户编码")
|
||||||
|
private String cuCode;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@LogField(name="备注",index=3)
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@LogField(name="租户id",index=4)
|
||||||
|
@ApiModelProperty("租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,87 @@
|
|||||||
|
package com.xjrsoft.module.sales.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.pictc.annotations.datalog.*;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 客户组
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-16
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@LogTable(source="lng_customer_group",name="客户组")
|
||||||
|
public class UpdateLngCustomerGroupDto implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@LogField(name="主键",index=0)
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 组编码(按类型自动编码)
|
||||||
|
*/
|
||||||
|
@LogField(name="组编码(按类型自动编码)",index=1)
|
||||||
|
@ApiModelProperty("组编码(按类型自动编码)")
|
||||||
|
private String grpCode;
|
||||||
|
/**
|
||||||
|
* 组说明
|
||||||
|
*/
|
||||||
|
@LogField(name="组说明",index=2)
|
||||||
|
@ApiModelProperty("组说明")
|
||||||
|
private String grpName;
|
||||||
|
/**
|
||||||
|
* 类型(GD-挂单销售,JP-竞拍销售,JS-批量结算,YX-营销优惠活动,DX-客户定向销售)
|
||||||
|
*/
|
||||||
|
@LogField(name="类型(GD-挂单销售,JP-竞拍销售,JS-批量结算,YX-营销优惠活动,DX-客户定向销售)",index=3)
|
||||||
|
@ApiModelProperty("类型(GD-挂单销售,JP-竞拍销售,JS-批量结算,YX-营销优惠活动,DX-客户定向销售)")
|
||||||
|
private String typeCode;
|
||||||
|
/**
|
||||||
|
* 起始日期
|
||||||
|
*/
|
||||||
|
@LogField(name="起始日期",index=4)
|
||||||
|
@ApiModelProperty("起始日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime dateFrom;
|
||||||
|
/**
|
||||||
|
* 结束日期
|
||||||
|
*/
|
||||||
|
@LogField(name="结束日期",index=5)
|
||||||
|
@ApiModelProperty("结束日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime dateTo;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@LogField(name="备注",index=6)
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@LogField(name="租户id",index=7)
|
||||||
|
@ApiModelProperty("租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lngCustomerGroupCustomer
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("lngCustomerGroupCustomer子表")
|
||||||
|
@LogJoin(name = "lngCustomerGroupCustomer子表",
|
||||||
|
columns = {
|
||||||
|
@LogJoinColumn(field = "grpCode",relatedField = "grpCode", valueDirection = ValueDirectionType.RIGHT)
|
||||||
|
},
|
||||||
|
caseType = JoinCaseType.FULL, target = UpdateLngCustomerGroupCustomerDto.class, type = JoinType.MANY)
|
||||||
|
private List<UpdateLngCustomerGroupCustomerDto> lngCustomerGroupCustomerList;
|
||||||
|
}
|
||||||
@ -0,0 +1,78 @@
|
|||||||
|
package com.xjrsoft.module.sales.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 表单出参
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-16
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LngCustomerGroupCustomerVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private String id;
|
||||||
|
/**
|
||||||
|
* 组编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("组编码")
|
||||||
|
private String grpCode;
|
||||||
|
/**
|
||||||
|
* 客户编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("客户编码")
|
||||||
|
private String cuCode;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
/**
|
||||||
|
* 创建人id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建人id")
|
||||||
|
private Long createUserId;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private LocalDateTime createDate;
|
||||||
|
/**
|
||||||
|
* 修改人id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改人id")
|
||||||
|
private Long modifyUserId;
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改时间")
|
||||||
|
private LocalDateTime modifyDate;
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
/**
|
||||||
|
* 部门id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("部门id")
|
||||||
|
private Long deptId;
|
||||||
|
/**
|
||||||
|
* 数据权限id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("数据权限id")
|
||||||
|
private Long ruleUserId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.xjrsoft.module.sales.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import com.xjrsoft.common.annotation.Trans;
|
||||||
|
import com.xjrsoft.common.enums.TransType;
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 分页列表出参
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-16
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LngCustomerGroupPageVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private String id;
|
||||||
|
/**
|
||||||
|
* 组编码(按类型自动编码)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("组编码(按类型自动编码)")
|
||||||
|
private String grpCode;
|
||||||
|
/**
|
||||||
|
* 组说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("组说明")
|
||||||
|
private String grpName;
|
||||||
|
/**
|
||||||
|
* 类型(GD-挂单销售,JP-竞拍销售,JS-批量结算,YX-营销优惠活动,DX-客户定向销售)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("类型(GD-挂单销售,JP-竞拍销售,JS-批量结算,YX-营销优惠活动,DX-客户定向销售)")
|
||||||
|
@Trans(type = TransType.DIC, id = "1990241330091048961")
|
||||||
|
private String typeCode;
|
||||||
|
/**
|
||||||
|
* 起始日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("起始日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime dateFrom;
|
||||||
|
/**
|
||||||
|
* 结束日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("结束日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime dateTo;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
package com.xjrsoft.module.sales.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 表单出参
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-16
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LngCustomerGroupVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 组编码(按类型自动编码)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("组编码(按类型自动编码)")
|
||||||
|
private String grpCode;
|
||||||
|
/**
|
||||||
|
* 组说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("组说明")
|
||||||
|
private String grpName;
|
||||||
|
/**
|
||||||
|
* 类型(GD-挂单销售,JP-竞拍销售,JS-批量结算,YX-营销优惠活动,DX-客户定向销售)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("类型(GD-挂单销售,JP-竞拍销售,JS-批量结算,YX-营销优惠活动,DX-客户定向销售)")
|
||||||
|
private String typeCode;
|
||||||
|
/**
|
||||||
|
* 起始日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("起始日期")
|
||||||
|
private LocalDateTime dateFrom;
|
||||||
|
/**
|
||||||
|
* 结束日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("结束日期")
|
||||||
|
private LocalDateTime dateTo;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
/**
|
||||||
|
* 创建人id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建人id")
|
||||||
|
private Long createUserId;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private LocalDateTime createDate;
|
||||||
|
/**
|
||||||
|
* 修改人id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改人id")
|
||||||
|
private Long modifyUserId;
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改时间")
|
||||||
|
private LocalDateTime modifyDate;
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
/**
|
||||||
|
* 部门id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("部门id")
|
||||||
|
private Long deptId;
|
||||||
|
/**
|
||||||
|
* 数据权限id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("数据权限id")
|
||||||
|
private Long ruleUserId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lngCustomerGroupCustomer
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("lngCustomerGroupCustomer子表")
|
||||||
|
private List<LngCustomerGroupCustomerVo> lngCustomerGroupCustomerList;
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,5 +1,7 @@
|
|||||||
package com.xjrsoft.module.sales.vo;
|
package com.xjrsoft.module.sales.vo;
|
||||||
|
|
||||||
|
import com.xjrsoft.common.annotation.Trans;
|
||||||
|
import com.xjrsoft.common.enums.TransType;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -46,8 +48,15 @@ public class LngGradeSystemItemVo {
|
|||||||
* 评价部门编码
|
* 评价部门编码
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("评价部门编码")
|
@ApiModelProperty("评价部门编码")
|
||||||
|
@Trans(type = TransType.DEPT, labelField = "eDeptName")
|
||||||
private String eDeptCode;
|
private String eDeptCode;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价部门编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价部门名称")
|
||||||
|
private String eDeptName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示顺序
|
* 显示顺序
|
||||||
|
|||||||
@ -0,0 +1,99 @@
|
|||||||
|
package com.xjrsoft.module.sales.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.xjrsoft.common.model.result.R;
|
||||||
|
import com.xjrsoft.common.page.ConventPage;
|
||||||
|
import com.xjrsoft.common.page.PageOutput;
|
||||||
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
||||||
|
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||||
|
import com.xjrsoft.module.sales.dto.LngCustomerGroupPageDto;
|
||||||
|
import com.xjrsoft.module.sales.dto.UpdateLngCustomerGroupDto;
|
||||||
|
import com.xjrsoft.module.sales.entity.LngCustomerGroup;
|
||||||
|
import com.xjrsoft.module.sales.service.ICustomerGroupService;
|
||||||
|
import com.xjrsoft.module.sales.vo.LngCustomerGroupPageVo;
|
||||||
|
import com.xjrsoft.module.sales.vo.LngCustomerGroupVo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 客户组
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-16
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/sales" + "/customerGroup")
|
||||||
|
@Api(value = "/sales" + "/customerGroup",tags = "客户组代码")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class CustomerGroupController {
|
||||||
|
|
||||||
|
|
||||||
|
private final ICustomerGroupService customerGroupService;
|
||||||
|
private final DatalogService dataService;
|
||||||
|
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
@ApiOperation(value="LngCustomerGroup列表(分页)")
|
||||||
|
@SaCheckPermission("customerGroup:list")
|
||||||
|
public R page(@Valid LngCustomerGroupPageDto dto){
|
||||||
|
|
||||||
|
LambdaQueryWrapper<LngCustomerGroup> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper
|
||||||
|
.like(StrUtil.isNotBlank(dto.getGrpCode()),LngCustomerGroup::getGrpCode,dto.getGrpCode())
|
||||||
|
.like(StrUtil.isNotBlank(dto.getTypeCode()),LngCustomerGroup::getTypeCode,dto.getTypeCode())
|
||||||
|
.between(ObjectUtil.isNotNull(dto.getDateFromStart()) && ObjectUtil.isNotNull(dto.getDateFromEnd()),LngCustomerGroup::getDateFrom,dto.getDateFromStart(),dto.getDateFromEnd())
|
||||||
|
.between(ObjectUtil.isNotNull(dto.getDateToStart()) && ObjectUtil.isNotNull(dto.getDateToEnd()),LngCustomerGroup::getDateTo,dto.getDateToStart(),dto.getDateToEnd())
|
||||||
|
.like(StrUtil.isNotBlank(dto.getGrpName()),LngCustomerGroup::getGrpName,dto.getGrpName())
|
||||||
|
.like(StrUtil.isNotBlank(dto.getNote()),LngCustomerGroup::getNote,dto.getNote())
|
||||||
|
.orderByDesc(LngCustomerGroup::getId)
|
||||||
|
.select(LngCustomerGroup.class,x -> VoToColumnUtil.fieldsToColumns(LngCustomerGroupPageVo.class).contains(x.getProperty()));
|
||||||
|
IPage<LngCustomerGroup> page = customerGroupService.page(ConventPage.getPage(dto), queryWrapper);
|
||||||
|
PageOutput<LngCustomerGroupPageVo> pageOutput = ConventPage.getPageOutput(page, LngCustomerGroupPageVo.class);
|
||||||
|
return R.ok(pageOutput);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/info")
|
||||||
|
@ApiOperation(value="根据id查询LngCustomerGroup信息")
|
||||||
|
@SaCheckPermission("customerGroup:detail")
|
||||||
|
public R info(@RequestParam Long id){
|
||||||
|
LngCustomerGroup lngCustomerGroup = customerGroupService.getByIdDeep(id);
|
||||||
|
if (lngCustomerGroup == null) {
|
||||||
|
return R.error("找不到此数据!");
|
||||||
|
}
|
||||||
|
return R.ok(BeanUtil.toBean(lngCustomerGroup, LngCustomerGroupVo.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@ApiOperation(value = "新增LngCustomerGroup")
|
||||||
|
@SaCheckPermission("customerGroup:add")
|
||||||
|
public R add(@Valid @RequestBody UpdateLngCustomerGroupDto dto){
|
||||||
|
UpdateLngCustomerGroupDto res = dataService.insert(dto);
|
||||||
|
return R.ok(res.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@ApiOperation(value = "修改LngCustomerGroup")
|
||||||
|
@SaCheckPermission("customerGroup:edit")
|
||||||
|
public R update(@Valid @RequestBody UpdateLngCustomerGroupDto dto){
|
||||||
|
return R.ok(dataService.updateById(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping
|
||||||
|
@ApiOperation(value = "删除")
|
||||||
|
@SaCheckPermission("customerGroup:delete")
|
||||||
|
public R delete(@Valid @RequestBody List<Long> ids){
|
||||||
|
return R.ok(dataService.deleteByIds(UpdateLngCustomerGroupDto.class, ids));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -17,6 +17,7 @@ import com.xjrsoft.module.sales.entity.LngGradeSystem;
|
|||||||
import com.xjrsoft.module.sales.service.IGradeSystemService;
|
import com.xjrsoft.module.sales.service.IGradeSystemService;
|
||||||
import com.xjrsoft.module.sales.vo.LngGradeSystemPageVo;
|
import com.xjrsoft.module.sales.vo.LngGradeSystemPageVo;
|
||||||
import com.xjrsoft.module.sales.vo.LngGradeSystemVo;
|
import com.xjrsoft.module.sales.vo.LngGradeSystemVo;
|
||||||
|
import com.xjrsoft.module.system.client.ICodeRuleClient;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
@ -40,6 +41,8 @@ public class GradeSystemController {
|
|||||||
|
|
||||||
private final IGradeSystemService gradeSystemService;
|
private final IGradeSystemService gradeSystemService;
|
||||||
private final DatalogService dataService;
|
private final DatalogService dataService;
|
||||||
|
private final ICodeRuleClient codeRuleClient;
|
||||||
|
private final String GS_CODE = "gsCode";
|
||||||
|
|
||||||
@GetMapping(value = "/page")
|
@GetMapping(value = "/page")
|
||||||
@ApiOperation(value="LngGradeSystem列表(分页)")
|
@ApiOperation(value="LngGradeSystem列表(分页)")
|
||||||
@ -82,7 +85,10 @@ public class GradeSystemController {
|
|||||||
@ApiOperation(value = "新增LngGradeSystem")
|
@ApiOperation(value = "新增LngGradeSystem")
|
||||||
@SaCheckPermission("gradeSystem:add")
|
@SaCheckPermission("gradeSystem:add")
|
||||||
public R add(@Valid @RequestBody UpdateLngGradeSystemDto dto){
|
public R add(@Valid @RequestBody UpdateLngGradeSystemDto dto){
|
||||||
|
String code = codeRuleClient.genEncode(GS_CODE);
|
||||||
|
dto.setGsCode(code);
|
||||||
UpdateLngGradeSystemDto res = dataService.insert(dto);
|
UpdateLngGradeSystemDto res = dataService.insert(dto);
|
||||||
|
codeRuleClient.useEncode(GS_CODE);
|
||||||
return R.ok(res.getId());
|
return R.ok(res.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,116 @@
|
|||||||
|
package com.xjrsoft.module.sales.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.yulichang.annotation.EntityMapping;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 客户组
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-16
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("lng_customer_group")
|
||||||
|
@ApiModel(value = "客户组对象", description = "客户组")
|
||||||
|
public class LngCustomerGroup implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 组编码(按类型自动编码)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("组编码(按类型自动编码)")
|
||||||
|
private String grpCode;
|
||||||
|
/**
|
||||||
|
* 组说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("组说明")
|
||||||
|
private String grpName;
|
||||||
|
/**
|
||||||
|
* 类型(GD-挂单销售,JP-竞拍销售,JS-批量结算,YX-营销优惠活动,DX-客户定向销售)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("类型(GD-挂单销售,JP-竞拍销售,JS-批量结算,YX-营销优惠活动,DX-客户定向销售)")
|
||||||
|
private String typeCode;
|
||||||
|
/**
|
||||||
|
* 起始日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("起始日期")
|
||||||
|
private LocalDateTime dateFrom;
|
||||||
|
/**
|
||||||
|
* 结束日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("结束日期")
|
||||||
|
private LocalDateTime dateTo;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
/**
|
||||||
|
* 创建人id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建人id")
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Long createUserId;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private LocalDateTime createDate;
|
||||||
|
/**
|
||||||
|
* 修改人id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改人id")
|
||||||
|
@TableField(fill = FieldFill.UPDATE)
|
||||||
|
private Long modifyUserId;
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改时间")
|
||||||
|
@TableField(fill = FieldFill.UPDATE)
|
||||||
|
private LocalDateTime modifyDate;
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
/**
|
||||||
|
* 部门id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("部门id")
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Long deptId;
|
||||||
|
/**
|
||||||
|
* 数据权限id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("数据权限id")
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Long ruleUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lngCustomerGroupCustomer
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("lngCustomerGroupCustomer子表")
|
||||||
|
@TableField(exist = false)
|
||||||
|
@EntityMapping(thisField = "grpCode", joinField = "grpCode")
|
||||||
|
private List<LngCustomerGroupCustomer> lngCustomerGroupCustomerList;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,92 @@
|
|||||||
|
package com.xjrsoft.module.sales.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
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.time.LocalDateTime;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 客户组
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-16
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("lng_customer_group_customer")
|
||||||
|
@ApiModel(value = "客户组对象", description = "客户组")
|
||||||
|
public class LngCustomerGroupCustomer implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
@TableId
|
||||||
|
private String id;
|
||||||
|
/**
|
||||||
|
* 组编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("组编码")
|
||||||
|
private String grpCode;
|
||||||
|
/**
|
||||||
|
* 客户编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("客户编码")
|
||||||
|
private String cuCode;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
/**
|
||||||
|
* 创建人id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建人id")
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Long createUserId;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private LocalDateTime createDate;
|
||||||
|
/**
|
||||||
|
* 修改人id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改人id")
|
||||||
|
@TableField(fill = FieldFill.UPDATE)
|
||||||
|
private Long modifyUserId;
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("修改时间")
|
||||||
|
@TableField(fill = FieldFill.UPDATE)
|
||||||
|
private LocalDateTime modifyDate;
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
/**
|
||||||
|
* 部门id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("部门id")
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Long deptId;
|
||||||
|
/**
|
||||||
|
* 数据权限id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("数据权限id")
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Long ruleUserId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package com.xjrsoft.module.sales.mapper;
|
||||||
|
|
||||||
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
|
import com.xjrsoft.module.sales.entity.LngCustomerGroupCustomer;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: mapper
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-16
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface LngCustomerGroupCustomerMapper extends MPJBaseMapper<LngCustomerGroupCustomer> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
package com.xjrsoft.module.sales.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
|
import com.xjrsoft.module.sales.entity.LngCustomerGroup;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: mapper
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-16
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface LngCustomerGroupMapper extends MPJBaseMapper<LngCustomerGroup> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
package com.xjrsoft.module.sales.service;
|
||||||
|
|
||||||
|
import com.github.yulichang.base.MPJBaseService;
|
||||||
|
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
||||||
|
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
||||||
|
import com.xjrsoft.module.sales.entity.LngCustomerGroup;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: service
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-16
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
public interface ICustomerGroupService extends MPJBaseService<LngCustomerGroup>, MPJDeepService<LngCustomerGroup>, MPJRelationService<LngCustomerGroup> {
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*
|
||||||
|
* @param lngCustomerGroup
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean add(LngCustomerGroup lngCustomerGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param lngCustomerGroup
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean update(LngCustomerGroup lngCustomerGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean delete(List<Long> ids);
|
||||||
|
}
|
||||||
@ -0,0 +1,88 @@
|
|||||||
|
package com.xjrsoft.module.sales.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||||
|
import com.xjrsoft.module.sales.entity.LngCustomerGroup;
|
||||||
|
import com.xjrsoft.module.sales.entity.LngCustomerGroupCustomer;
|
||||||
|
import com.xjrsoft.module.sales.mapper.LngCustomerGroupCustomerMapper;
|
||||||
|
import com.xjrsoft.module.sales.mapper.LngCustomerGroupMapper;
|
||||||
|
import com.xjrsoft.module.sales.service.ICustomerGroupService;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: service
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-16
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class CustomerGroupServiceImpl extends MPJBaseServiceImpl<LngCustomerGroupMapper, LngCustomerGroup> implements ICustomerGroupService {
|
||||||
|
private final LngCustomerGroupMapper customerGroupLngCustomerGroupMapper;
|
||||||
|
|
||||||
|
private final LngCustomerGroupCustomerMapper customerGroupLngCustomerGroupCustomerMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean add(LngCustomerGroup lngCustomerGroup) {
|
||||||
|
customerGroupLngCustomerGroupMapper.insert(lngCustomerGroup);
|
||||||
|
for (LngCustomerGroupCustomer lngCustomerGroupCustomer : lngCustomerGroup.getLngCustomerGroupCustomerList()) {
|
||||||
|
lngCustomerGroupCustomer.setGrpCode(lngCustomerGroup.getGrpCode());
|
||||||
|
customerGroupLngCustomerGroupCustomerMapper.insert(lngCustomerGroupCustomer);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean update(LngCustomerGroup lngCustomerGroup) {
|
||||||
|
customerGroupLngCustomerGroupMapper.updateById(lngCustomerGroup);
|
||||||
|
//********************************* LngCustomerGroupCustomer 增删改 开始 *******************************************/
|
||||||
|
{
|
||||||
|
// 查出所有子级的id
|
||||||
|
List<LngCustomerGroupCustomer> lngCustomerGroupCustomerList = customerGroupLngCustomerGroupCustomerMapper.selectList(Wrappers.lambdaQuery(LngCustomerGroupCustomer.class).eq(LngCustomerGroupCustomer::getGrpCode, lngCustomerGroup.getGrpCode()).select(LngCustomerGroupCustomer::getId));
|
||||||
|
List<String> lngCustomerGroupCustomerIds = lngCustomerGroupCustomerList.stream().map(LngCustomerGroupCustomer::getId).collect(Collectors.toList());
|
||||||
|
//原有子表单 没有被删除的主键
|
||||||
|
List<String> lngCustomerGroupCustomerOldIds = lngCustomerGroup.getLngCustomerGroupCustomerList().stream().map(LngCustomerGroupCustomer::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
||||||
|
//找到需要删除的id
|
||||||
|
List<String> lngCustomerGroupCustomerRemoveIds = lngCustomerGroupCustomerIds.stream().filter(item -> !lngCustomerGroupCustomerOldIds.contains(item)).collect(Collectors.toList());
|
||||||
|
|
||||||
|
for (LngCustomerGroupCustomer lngCustomerGroupCustomer : lngCustomerGroup.getLngCustomerGroupCustomerList()) {
|
||||||
|
//如果不等于空则修改
|
||||||
|
if (lngCustomerGroupCustomer.getId() != null) {
|
||||||
|
customerGroupLngCustomerGroupCustomerMapper.updateById(lngCustomerGroupCustomer);
|
||||||
|
}
|
||||||
|
//如果等于空 则新增
|
||||||
|
else {
|
||||||
|
//已经不存在的id 删除
|
||||||
|
lngCustomerGroupCustomer.setGrpCode(lngCustomerGroup.getGrpCode());
|
||||||
|
customerGroupLngCustomerGroupCustomerMapper.insert(lngCustomerGroupCustomer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//已经不存在的id 删除
|
||||||
|
if(lngCustomerGroupCustomerRemoveIds.size() > 0){
|
||||||
|
customerGroupLngCustomerGroupCustomerMapper.deleteBatchIds(lngCustomerGroupCustomerRemoveIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//********************************* LngCustomerGroupCustomer 增删改 结束 *******************************************/
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean delete(List<Long> ids) {
|
||||||
|
customerGroupLngCustomerGroupMapper.deleteBatchIds(ids);
|
||||||
|
customerGroupLngCustomerGroupCustomerMapper.delete(Wrappers.lambdaQuery(LngCustomerGroupCustomer.class).in(LngCustomerGroupCustomer::getGrpCode, ids));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user