Merge branch 'dev' of http://47.94.165.164:13000/geg-gas/geg-gas-pcitc into dev
This commit is contained in:
@ -18,8 +18,8 @@
|
|||||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||||
<libServerUrl>http://10.10.2.102:9500</libServerUrl>
|
<libServerUrl>http://10.10.2.102:9500</libServerUrl>
|
||||||
<libServerUser>admin</libServerUser>
|
<libServerUser>pcitc</libServerUser>
|
||||||
<libServerPwd>Gas@Dev123</libServerPwd>
|
<libServerPwd>K9$pQ3!zX7@rT2&w</libServerPwd>
|
||||||
<ignoreUpload>false</ignoreUpload>
|
<ignoreUpload>false</ignoreUpload>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|||||||
@ -18,8 +18,10 @@
|
|||||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||||
<docker-image-name>pcitc/itc-pcitc-demo</docker-image-name>
|
<docker-image-name>pcitc/itc-pcitc-demo</docker-image-name>
|
||||||
<libServerUrl>http://172.27.46.206:23117</libServerUrl>
|
<libServerUrl>http://10.10.2.102:9500/</libServerUrl>
|
||||||
<ignoreUpload>false</ignoreUpload>
|
<libServerUser>pcitc</libServerUser>
|
||||||
|
<libServerPwd>K9$pQ3!zX7@rT2&w</libServerPwd>
|
||||||
|
<ignoreUpload>false</ignoreUpload>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -83,22 +85,6 @@
|
|||||||
<build>
|
<build>
|
||||||
<finalName>app</finalName>
|
<finalName>app</finalName>
|
||||||
<plugins>
|
<plugins>
|
||||||
<!-- <plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
<version>2.7.6</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>repackage</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<classifier>classes</classifier>
|
|
||||||
<attach>false</attach>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin> -->
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.geg</groupId>
|
<groupId>com.geg</groupId>
|
||||||
<artifactId>tanuki-boot-maven-plugin</artifactId>
|
<artifactId>tanuki-boot-maven-plugin</artifactId>
|
||||||
@ -108,6 +94,7 @@
|
|||||||
<ignoreUpload>${ignoreUpload}</ignoreUpload>
|
<ignoreUpload>${ignoreUpload}</ignoreUpload>
|
||||||
<libServerUser>${libServerUser}</libServerUser>
|
<libServerUser>${libServerUser}</libServerUser>
|
||||||
<libServerPwd>${libServerPwd}</libServerPwd>
|
<libServerPwd>${libServerPwd}</libServerPwd>
|
||||||
|
<appName>demo-service</appName>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
|
|||||||
@ -0,0 +1,99 @@
|
|||||||
|
package com.xjrsoft.module.sales.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 客户评价
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AddLngScoreDtlDto implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分信息主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分信息主键")
|
||||||
|
private Long sId;
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
/**
|
||||||
|
* 评价体系-条目主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系-条目主键")
|
||||||
|
private Long gsiId;
|
||||||
|
/**
|
||||||
|
* 评分事项(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分事项(只读)")
|
||||||
|
private String itemName;
|
||||||
|
/**
|
||||||
|
* 评分标准(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分标准(只读)")
|
||||||
|
private String itemDesc;
|
||||||
|
/**
|
||||||
|
* 评分部门(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分部门(只读)")
|
||||||
|
private String eDeptCode;
|
||||||
|
/**
|
||||||
|
* 显示顺序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("显示顺序")
|
||||||
|
private Short sort;
|
||||||
|
/**
|
||||||
|
* 实际评分部门编码(当前登录人所在部门)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分部门编码(当前登录人所在部门)")
|
||||||
|
private String aDeptCode;
|
||||||
|
/**
|
||||||
|
* 实际评分人编码(当前登录人)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分人编码(当前登录人)")
|
||||||
|
private String aEmpCode;
|
||||||
|
/**
|
||||||
|
* 实际评分时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分时间")
|
||||||
|
private Object aTime;
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
/**
|
||||||
|
* 分数说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数说明")
|
||||||
|
private String scoreDesc;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,73 @@
|
|||||||
|
package com.xjrsoft.module.sales.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 客户评价
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AddLngScoreDto implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime dateGrade;
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
/**
|
||||||
|
* 表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)")
|
||||||
|
private String tableName;
|
||||||
|
/**
|
||||||
|
* 供应商/客户
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("供应商/客户")
|
||||||
|
private String cpCode;
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
/**
|
||||||
|
* 审批状态(未审批/审批中/已审批/已驳回)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("审批状态(未审批/审批中/已审批/已驳回)")
|
||||||
|
private String approCode;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lngScoreDtl
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("lngScoreDtl子表")
|
||||||
|
private List<AddLngScoreDtlDto> lngScoreDtlList;
|
||||||
|
}
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
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-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
public class LngScorePageDto extends PageInput {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商/客户
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("供应商/客户")
|
||||||
|
private String cpCode;
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
/**
|
||||||
|
* 评分日期字段开始时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分日期字段开始时间")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime dateGradeStart;
|
||||||
|
/**
|
||||||
|
* 评分日期字段结束时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分日期字段结束时间")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime dateGradeEnd;
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
/**
|
||||||
|
* 审批状态(未审批/审批中/已审批/已驳回)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("审批状态(未审批/审批中/已审批/已驳回)")
|
||||||
|
private String approCode;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,25 +1,16 @@
|
|||||||
package com.xjrsoft.module.sales.dto;
|
package com.xjrsoft.module.sales.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.pictc.annotations.datalog.LogAttrField;
|
||||||
|
import com.pictc.annotations.datalog.LogField;
|
||||||
|
import com.pictc.annotations.datalog.LogTable;
|
||||||
|
import com.xjrsoft.module.system.dto.UpdateLngFileUploadDto;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
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.LogAttrField;
|
|
||||||
import com.pictc.annotations.datalog.ValueDirectionType;
|
|
||||||
import com.xjrsoft.module.system.dto.UpdateLngFileUploadDto;
|
|
||||||
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -198,21 +198,21 @@ public class UpdateLngCustomerDto implements Serializable {
|
|||||||
* 是否校验预付款(Y-是,N-否)
|
* 是否校验预付款(Y-是,N-否)
|
||||||
*/
|
*/
|
||||||
@LogField(name="是否校验预付款(Y-是,N-否)",index=23)
|
@LogField(name="是否校验预付款(Y-是,N-否)",index=23)
|
||||||
@ApiModelProperty("是否校验预付款(Y-是,N-否)")
|
@ApiModelProperty("是否校验预付款")
|
||||||
private String prepaySign;
|
private String prepaySign;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 有无线上(竞拍)(Y-有,N-无)
|
* 有无线上(竞拍)(Y-有,N-无)
|
||||||
*/
|
*/
|
||||||
@LogField(name="有无线上(竞拍)(Y-有,N-无)",index=24)
|
@LogField(name="有无线上(竞拍)(Y-有,N-无)",index=24)
|
||||||
@ApiModelProperty("有无线上(竞拍)(Y-有,N-无)")
|
@ApiModelProperty("有无线上竞拍")
|
||||||
private String onlineSign;
|
private String onlineSign;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自有终端(Y-是,N-否)
|
* 自有终端(Y-是,N-否)
|
||||||
*/
|
*/
|
||||||
@LogField(name="自有终端(Y-是,N-否)",index=25)
|
@LogField(name="自有终端(Y-是,N-否)",index=25)
|
||||||
@ApiModelProperty("自有终端(Y-是,N-否)")
|
@ApiModelProperty("自有终端")
|
||||||
private String tSign;
|
private String tSign;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -226,14 +226,14 @@ public class UpdateLngCustomerDto implements Serializable {
|
|||||||
* 有效标志(不在黑名单)(Y-有效,N-无效)
|
* 有效标志(不在黑名单)(Y-有效,N-无效)
|
||||||
*/
|
*/
|
||||||
@LogField(name="有效标志(不在黑名单)(Y-有效,N-无效)",index=27)
|
@LogField(name="有效标志(不在黑名单)(Y-有效,N-无效)",index=27)
|
||||||
@ApiModelProperty("有效标志(不在黑名单)(Y-有效,N-无效)")
|
@ApiModelProperty("有效标志(不在黑名单)")
|
||||||
private String valid;
|
private String valid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态(未提交/审批中/已审批/已驳回)
|
* 状态(未提交/审批中/已审批/已驳回)
|
||||||
*/
|
*/
|
||||||
@LogField(name="状态(未提交/审批中/已审批/已驳回)",index=28)
|
@LogField(name="状态(未提交/审批中/已审批/已驳回)",index=28)
|
||||||
@ApiModelProperty("状态(未提交/审批中/已审批/已驳回)")
|
@ApiModelProperty("状态")
|
||||||
private String approCode;
|
private String approCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -0,0 +1,142 @@
|
|||||||
|
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-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@LogTable(source="lng_score_dtl",name="客户评价")
|
||||||
|
public class UpdateLngScoreDtlDto implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@LogField(name="主键",index=0)
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分信息主键
|
||||||
|
*/
|
||||||
|
@LogField(name="评分信息主键",index=1)
|
||||||
|
@ApiModelProperty("评分信息主键")
|
||||||
|
private Long sId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@LogField(name="评价体系主键",index=2)
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系-条目主键
|
||||||
|
*/
|
||||||
|
@LogField(name="评价体系-条目主键",index=3)
|
||||||
|
@ApiModelProperty("评价体系-条目主键")
|
||||||
|
private Long gsiId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分事项(只读)
|
||||||
|
*/
|
||||||
|
@LogField(name="评分事项(只读)",index=4)
|
||||||
|
@ApiModelProperty("评分事项(只读)")
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分标准(只读)
|
||||||
|
*/
|
||||||
|
@LogField(name="评分标准(只读)",index=5)
|
||||||
|
@ApiModelProperty("评分标准(只读)")
|
||||||
|
private String itemDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分部门(只读)
|
||||||
|
*/
|
||||||
|
@LogField(name="评分部门(只读)",index=6)
|
||||||
|
@ApiModelProperty("评分部门(只读)")
|
||||||
|
private String eDeptCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示顺序
|
||||||
|
*/
|
||||||
|
@LogField(name="显示顺序",index=7)
|
||||||
|
@ApiModelProperty("显示顺序")
|
||||||
|
private Short sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分部门编码(当前登录人所在部门)
|
||||||
|
*/
|
||||||
|
@LogField(name="实际评分部门编码(当前登录人所在部门)",index=8)
|
||||||
|
@ApiModelProperty("实际评分部门编码(当前登录人所在部门)")
|
||||||
|
private String aDeptCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分人编码(当前登录人)
|
||||||
|
*/
|
||||||
|
@LogField(name="实际评分人编码(当前登录人)",index=9)
|
||||||
|
@ApiModelProperty("实际评分人编码(当前登录人)")
|
||||||
|
private String aEmpCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分时间
|
||||||
|
*/
|
||||||
|
@LogField(name="实际评分时间",index=10)
|
||||||
|
@ApiModelProperty("实际评分时间")
|
||||||
|
private Object aTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@LogField(name="分数",index=11)
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数说明
|
||||||
|
*/
|
||||||
|
@LogField(name="分数说明",index=12)
|
||||||
|
@ApiModelProperty("分数说明")
|
||||||
|
private String scoreDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@LogField(name="备注",index=13)
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@LogField(name="租户id",index=14)
|
||||||
|
@ApiModelProperty("租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,109 @@
|
|||||||
|
package com.xjrsoft.module.sales.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.pictc.annotations.datalog.JoinCaseType;
|
||||||
|
import com.pictc.annotations.datalog.JoinType;
|
||||||
|
import com.pictc.annotations.datalog.LogField;
|
||||||
|
import com.pictc.annotations.datalog.LogJoin;
|
||||||
|
import com.pictc.annotations.datalog.LogJoinColumn;
|
||||||
|
import com.pictc.annotations.datalog.LogTable;
|
||||||
|
import com.pictc.annotations.datalog.ValueDirectionType;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 客户评价
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@LogTable(source="lng_score",name="客户评价")
|
||||||
|
public class UpdateLngScoreDto implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@LogField(name="主键",index=0)
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分日期
|
||||||
|
*/
|
||||||
|
@LogField(name="评分日期",index=1)
|
||||||
|
@ApiModelProperty("评分日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime dateGrade;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@LogField(name="评价体系主键",index=2)
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)
|
||||||
|
*/
|
||||||
|
@LogField(name="表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)",index=3)
|
||||||
|
@ApiModelProperty("表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)")
|
||||||
|
private String tableName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商/客户
|
||||||
|
*/
|
||||||
|
@LogField(name="供应商/客户",index=4)
|
||||||
|
@ApiModelProperty("供应商/客户")
|
||||||
|
private String cpCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@LogField(name="分数",index=5)
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批状态(未审批/审批中/已审批/已驳回)
|
||||||
|
*/
|
||||||
|
@LogField(name="审批状态(未审批/审批中/已审批/已驳回)",index=6)
|
||||||
|
@ApiModelProperty("审批状态(未审批/审批中/已审批/已驳回)")
|
||||||
|
private String approCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@LogField(name="备注",index=7)
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@LogField(name="租户id",index=8)
|
||||||
|
@ApiModelProperty("租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lngScoreDtl
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("lngScoreDtl子表")
|
||||||
|
@LogJoin(name = "lngScoreDtl子表",
|
||||||
|
columns = {
|
||||||
|
@LogJoinColumn(field = "sId",relatedField = "id", valueDirection = ValueDirectionType.RIGHT)
|
||||||
|
},
|
||||||
|
caseType = JoinCaseType.FULL, target = UpdateLngScoreDtlDto.class, type = JoinType.MANY)
|
||||||
|
private List<UpdateLngScoreDtlDto> lngScoreDtlList;
|
||||||
|
}
|
||||||
@ -0,0 +1,170 @@
|
|||||||
|
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-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LngScoreDtlVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分信息主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分信息主键")
|
||||||
|
private Long sId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系-条目主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系-条目主键")
|
||||||
|
private Long gsiId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分事项(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分事项(只读)")
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分标准(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分标准(只读)")
|
||||||
|
private String itemDesc;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分部门(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分部门(只读)")
|
||||||
|
private String eDeptCode;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示顺序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("显示顺序")
|
||||||
|
private Short sort;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分部门编码(当前登录人所在部门)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分部门编码(当前登录人所在部门)")
|
||||||
|
private String aDeptCode;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分人编码(当前登录人)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分人编码(当前登录人)")
|
||||||
|
private String aEmpCode;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分时间")
|
||||||
|
private Object aTime;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数说明")
|
||||||
|
private String scoreDesc;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@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-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LngScorePageVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private String id;
|
||||||
|
/**
|
||||||
|
* 评分日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime dateGrade;
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
@Trans(type = TransType.API, id = "93d735dcb7364a0f8102188ec4d77ac7")
|
||||||
|
private String gsId;
|
||||||
|
/**
|
||||||
|
* 供应商/客户
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("供应商/客户")
|
||||||
|
private String cpCode;
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
/**
|
||||||
|
* 审批状态(未审批/审批中/已审批/已驳回)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("审批状态(未审批/审批中/已审批/已驳回)")
|
||||||
|
@Trans(type = TransType.DIC, id = "1990669393069129729")
|
||||||
|
private String approCode;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,132 @@
|
|||||||
|
package com.xjrsoft.module.sales.vo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 表单出参
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LngScoreVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分日期")
|
||||||
|
private LocalDateTime dateGrade;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)")
|
||||||
|
private String tableName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商/客户
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("供应商/客户")
|
||||||
|
private String cpCode;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批状态(未审批/审批中/已审批/已驳回)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("审批状态(未审批/审批中/已审批/已驳回)")
|
||||||
|
private String approCode;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lngScoreDtl
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("lngScoreDtl子表")
|
||||||
|
private List<LngScoreDtlVo> lngScoreDtlList;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,99 @@
|
|||||||
|
package com.xjrsoft.module.supplier.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 供应商评价
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AddLngScoreDtlDto implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分信息主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分信息主键")
|
||||||
|
private Long sId;
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
/**
|
||||||
|
* 评价体系-条目主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系-条目主键")
|
||||||
|
private Long gsiId;
|
||||||
|
/**
|
||||||
|
* 评分事项(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分事项(只读)")
|
||||||
|
private String itemName;
|
||||||
|
/**
|
||||||
|
* 评分标准(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分标准(只读)")
|
||||||
|
private String itemDesc;
|
||||||
|
/**
|
||||||
|
* 评分部门(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分部门(只读)")
|
||||||
|
private String eDeptCode;
|
||||||
|
/**
|
||||||
|
* 显示顺序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("显示顺序")
|
||||||
|
private Short sort;
|
||||||
|
/**
|
||||||
|
* 实际评分部门编码(当前登录人所在部门)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分部门编码(当前登录人所在部门)")
|
||||||
|
private String aDeptCode;
|
||||||
|
/**
|
||||||
|
* 实际评分人编码(当前登录人)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分人编码(当前登录人)")
|
||||||
|
private String aEmpCode;
|
||||||
|
/**
|
||||||
|
* 实际评分时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分时间")
|
||||||
|
private Object aTime;
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
/**
|
||||||
|
* 分数说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数说明")
|
||||||
|
private String scoreDesc;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,73 @@
|
|||||||
|
package com.xjrsoft.module.supplier.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 供应商评价
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AddLngScoreDto implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分日期")
|
||||||
|
@JsonFormat(pattern = "HH:mm:ss")
|
||||||
|
private LocalDateTime dateGrade;
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
/**
|
||||||
|
* 表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)")
|
||||||
|
private String tableName;
|
||||||
|
/**
|
||||||
|
* 供应商/客户
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("供应商/客户")
|
||||||
|
private String cpCode;
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
/**
|
||||||
|
* 审批状态(未审批/审批中/已审批/已驳回)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("审批状态(未审批/审批中/已审批/已驳回)")
|
||||||
|
private String approCode;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lngScoreDtl
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("lngScoreDtl子表")
|
||||||
|
private List<AddLngScoreDtlDto> lngScoreDtlList;
|
||||||
|
}
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
package com.xjrsoft.module.supplier.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-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
public class LngScorePageDto extends PageInput {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商/客户
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("供应商/客户")
|
||||||
|
private String cpCode;
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
/**
|
||||||
|
* 评分日期字段开始时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分日期字段开始时间")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime dateGradeStart;
|
||||||
|
/**
|
||||||
|
* 评分日期字段结束时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分日期字段结束时间")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime dateGradeEnd;
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
/**
|
||||||
|
* 审批状态(未审批/审批中/已审批/已驳回)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("审批状态(未审批/审批中/已审批/已驳回)")
|
||||||
|
private String approCode;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,142 @@
|
|||||||
|
package com.xjrsoft.module.supplier.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-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@LogTable(source="lng_score_dtl",name="供应商评价")
|
||||||
|
public class UpdateLngScoreDtlDto implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@LogField(name="主键",index=0)
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分信息主键
|
||||||
|
*/
|
||||||
|
@LogField(name="评分信息主键",index=1)
|
||||||
|
@ApiModelProperty("评分信息主键")
|
||||||
|
private Long sId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@LogField(name="评价体系主键",index=2)
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系-条目主键
|
||||||
|
*/
|
||||||
|
@LogField(name="评价体系-条目主键",index=3)
|
||||||
|
@ApiModelProperty("评价体系-条目主键")
|
||||||
|
private Long gsiId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分事项(只读)
|
||||||
|
*/
|
||||||
|
@LogField(name="评分事项(只读)",index=4)
|
||||||
|
@ApiModelProperty("评分事项(只读)")
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分标准(只读)
|
||||||
|
*/
|
||||||
|
@LogField(name="评分标准(只读)",index=5)
|
||||||
|
@ApiModelProperty("评分标准(只读)")
|
||||||
|
private String itemDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分部门(只读)
|
||||||
|
*/
|
||||||
|
@LogField(name="评分部门(只读)",index=6)
|
||||||
|
@ApiModelProperty("评分部门(只读)")
|
||||||
|
private String eDeptCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示顺序
|
||||||
|
*/
|
||||||
|
@LogField(name="显示顺序",index=7)
|
||||||
|
@ApiModelProperty("显示顺序")
|
||||||
|
private Short sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分部门编码(当前登录人所在部门)
|
||||||
|
*/
|
||||||
|
@LogField(name="实际评分部门编码(当前登录人所在部门)",index=8)
|
||||||
|
@ApiModelProperty("实际评分部门编码(当前登录人所在部门)")
|
||||||
|
private String aDeptCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分人编码(当前登录人)
|
||||||
|
*/
|
||||||
|
@LogField(name="实际评分人编码(当前登录人)",index=9)
|
||||||
|
@ApiModelProperty("实际评分人编码(当前登录人)")
|
||||||
|
private String aEmpCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分时间
|
||||||
|
*/
|
||||||
|
@LogField(name="实际评分时间",index=10)
|
||||||
|
@ApiModelProperty("实际评分时间")
|
||||||
|
private Object aTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@LogField(name="分数",index=11)
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数说明
|
||||||
|
*/
|
||||||
|
@LogField(name="分数说明",index=12)
|
||||||
|
@ApiModelProperty("分数说明")
|
||||||
|
private String scoreDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@LogField(name="备注",index=13)
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@LogField(name="租户id",index=14)
|
||||||
|
@ApiModelProperty("租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,109 @@
|
|||||||
|
package com.xjrsoft.module.supplier.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.pictc.annotations.datalog.JoinCaseType;
|
||||||
|
import com.pictc.annotations.datalog.JoinType;
|
||||||
|
import com.pictc.annotations.datalog.LogField;
|
||||||
|
import com.pictc.annotations.datalog.LogJoin;
|
||||||
|
import com.pictc.annotations.datalog.LogJoinColumn;
|
||||||
|
import com.pictc.annotations.datalog.LogTable;
|
||||||
|
import com.pictc.annotations.datalog.ValueDirectionType;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 供应商评价
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@LogTable(source="lng_score",name="供应商评价")
|
||||||
|
public class UpdateLngScoreDto implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@LogField(name="主键",index=0)
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分日期
|
||||||
|
*/
|
||||||
|
@LogField(name="评分日期",index=1)
|
||||||
|
@ApiModelProperty("评分日期")
|
||||||
|
@JsonFormat(pattern = "HH:mm:ss")
|
||||||
|
private LocalDateTime dateGrade;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@LogField(name="评价体系主键",index=2)
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)
|
||||||
|
*/
|
||||||
|
@LogField(name="表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)",index=3)
|
||||||
|
@ApiModelProperty("表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)")
|
||||||
|
private String tableName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商/客户
|
||||||
|
*/
|
||||||
|
@LogField(name="供应商/客户",index=4)
|
||||||
|
@ApiModelProperty("供应商/客户")
|
||||||
|
private String cpCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@LogField(name="分数",index=5)
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批状态(未审批/审批中/已审批/已驳回)
|
||||||
|
*/
|
||||||
|
@LogField(name="审批状态(未审批/审批中/已审批/已驳回)",index=6)
|
||||||
|
@ApiModelProperty("审批状态(未审批/审批中/已审批/已驳回)")
|
||||||
|
private String approCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@LogField(name="备注",index=7)
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
@LogField(name="租户id",index=8)
|
||||||
|
@ApiModelProperty("租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lngScoreDtl
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("lngScoreDtl子表")
|
||||||
|
@LogJoin(name = "lngScoreDtl子表",
|
||||||
|
columns = {
|
||||||
|
@LogJoinColumn(field = "sId",relatedField = "id", valueDirection = ValueDirectionType.RIGHT)
|
||||||
|
},
|
||||||
|
caseType = JoinCaseType.FULL, target = UpdateLngScoreDtlDto.class, type = JoinType.MANY)
|
||||||
|
private List<UpdateLngScoreDtlDto> lngScoreDtlList;
|
||||||
|
}
|
||||||
@ -1,22 +1,16 @@
|
|||||||
package com.xjrsoft.module.supplier.dto;
|
package com.xjrsoft.module.supplier.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.pictc.annotations.datalog.LogAttrField;
|
||||||
|
import com.pictc.annotations.datalog.LogField;
|
||||||
|
import com.pictc.annotations.datalog.LogTable;
|
||||||
|
import com.xjrsoft.module.system.dto.UpdateLngFileUploadDto;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
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;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -103,5 +97,11 @@ public class UpdateLngSupplierDocDto implements Serializable {
|
|||||||
@ApiModelProperty("租户id")
|
@ApiModelProperty("租户id")
|
||||||
private Long tenantId;
|
private Long tenantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lngFileUpload
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("lngFileUpload子表")
|
||||||
|
@LogAttrField
|
||||||
|
private List<UpdateLngFileUploadDto> fileList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,11 +6,13 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.pictc.annotations.datalog.JoinCaseType;
|
import com.pictc.annotations.datalog.JoinCaseType;
|
||||||
import com.pictc.annotations.datalog.JoinType;
|
import com.pictc.annotations.datalog.JoinType;
|
||||||
|
import com.pictc.annotations.datalog.LogAttrField;
|
||||||
import com.pictc.annotations.datalog.LogField;
|
import com.pictc.annotations.datalog.LogField;
|
||||||
import com.pictc.annotations.datalog.LogJoin;
|
import com.pictc.annotations.datalog.LogJoin;
|
||||||
import com.pictc.annotations.datalog.LogJoinColumn;
|
import com.pictc.annotations.datalog.LogJoinColumn;
|
||||||
import com.pictc.annotations.datalog.LogTable;
|
import com.pictc.annotations.datalog.LogTable;
|
||||||
import com.pictc.annotations.datalog.ValueDirectionType;
|
import com.pictc.annotations.datalog.ValueDirectionType;
|
||||||
|
import com.xjrsoft.module.system.dto.UpdateLngFileUploadDto;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -221,4 +223,11 @@ public class UpdateLngSupplierDto implements Serializable {
|
|||||||
},
|
},
|
||||||
caseType = JoinCaseType.FULL, target = UpdateLngSupplierDocDto.class, type = JoinType.MANY)
|
caseType = JoinCaseType.FULL, target = UpdateLngSupplierDocDto.class, type = JoinType.MANY)
|
||||||
private List<UpdateLngSupplierDocDto> lngSupplierDocList;
|
private List<UpdateLngSupplierDocDto> lngSupplierDocList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lngFileUpload
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("lngFileUpload子表")
|
||||||
|
@LogAttrField
|
||||||
|
private List<UpdateLngFileUploadDto> lngFileUploadList;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,170 @@
|
|||||||
|
package com.xjrsoft.module.supplier.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-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LngScoreDtlVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分信息主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分信息主键")
|
||||||
|
private Long sId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系-条目主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系-条目主键")
|
||||||
|
private Long gsiId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分事项(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分事项(只读)")
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分标准(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分标准(只读)")
|
||||||
|
private String itemDesc;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分部门(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分部门(只读)")
|
||||||
|
private String eDeptCode;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示顺序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("显示顺序")
|
||||||
|
private Short sort;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分部门编码(当前登录人所在部门)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分部门编码(当前登录人所在部门)")
|
||||||
|
private String aDeptCode;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分人编码(当前登录人)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分人编码(当前登录人)")
|
||||||
|
private String aEmpCode;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分时间")
|
||||||
|
private Object aTime;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数说明")
|
||||||
|
private String scoreDesc;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@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.supplier.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-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LngScorePageVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private String id;
|
||||||
|
/**
|
||||||
|
* 评分日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分日期")
|
||||||
|
@JsonFormat(pattern = "HH:mm:ss")
|
||||||
|
private LocalDateTime dateGrade;
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
@Trans(type = TransType.API, id = "93d735dcb7364a0f8102188ec4d77ac7")
|
||||||
|
private String gsId;
|
||||||
|
/**
|
||||||
|
* 供应商/客户
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("供应商/客户")
|
||||||
|
private String cpCode;
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
/**
|
||||||
|
* 审批状态(未审批/审批中/已审批/已驳回)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("审批状态(未审批/审批中/已审批/已驳回)")
|
||||||
|
@Trans(type = TransType.DIC, id = "1990669393069129729")
|
||||||
|
private String approCode;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String note;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,132 @@
|
|||||||
|
package com.xjrsoft.module.supplier.vo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 表单出参
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LngScoreVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分日期")
|
||||||
|
private LocalDateTime dateGrade;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)")
|
||||||
|
private String tableName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商/客户
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("供应商/客户")
|
||||||
|
private String cpCode;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批状态(未审批/审批中/已审批/已驳回)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("审批状态(未审批/审批中/已审批/已驳回)")
|
||||||
|
private String approCode;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lngScoreDtl
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("lngScoreDtl子表")
|
||||||
|
private List<LngScoreDtlVo> lngScoreDtlList;
|
||||||
|
|
||||||
|
}
|
||||||
@ -8,6 +8,8 @@ import java.time.LocalDateTime;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title: 表单出参
|
* @title: 表单出参
|
||||||
* @Author 管理员
|
* @Author 管理员
|
||||||
@ -129,7 +131,11 @@ public class LngSupplierDocVo {
|
|||||||
private Long ruleUserId;
|
private Long ruleUserId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lngFileUpload
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("lngFileUpload子表")
|
||||||
|
private List<LngFileUploadVo> fileList;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,8 @@ package com.xjrsoft.module.supplier.vo;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -236,4 +238,10 @@ public class LngSupplierVo {
|
|||||||
@ApiModelProperty("lngSupplierDoc子表")
|
@ApiModelProperty("lngSupplierDoc子表")
|
||||||
private List<LngSupplierDocVo> lngSupplierDocList;
|
private List<LngSupplierDocVo> lngSupplierDocList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lngFileUpload
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("lngFileUpload子表")
|
||||||
|
private List<LngFileUploadVo> lngFileUploadList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,17 +15,10 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.pictc.datalog.DataOperationContent;
|
|
||||||
import com.pictc.datalog.DataOperationListener;
|
|
||||||
import com.pictc.enums.BusinessCode;
|
|
||||||
import com.pictc.enums.ExceptionCommonCode;
|
|
||||||
import com.pictc.utils.StringUtils;
|
|
||||||
import com.xjrsoft.common.exception.BusinessException;
|
|
||||||
import com.xjrsoft.common.model.result.R;
|
import com.xjrsoft.common.model.result.R;
|
||||||
import com.xjrsoft.common.page.ConventPage;
|
import com.xjrsoft.common.page.ConventPage;
|
||||||
import com.xjrsoft.common.page.PageOutput;
|
import com.xjrsoft.common.page.PageOutput;
|
||||||
import com.xjrsoft.common.utils.VoToColumnUtil;
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
||||||
import com.xjrsoft.module.common.db.utils.CommonCallUtils;
|
|
||||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||||
import com.xjrsoft.module.sales.dto.LngCustomerPageDto;
|
import com.xjrsoft.module.sales.dto.LngCustomerPageDto;
|
||||||
@ -33,11 +26,9 @@ import com.xjrsoft.module.sales.dto.UpdateLngCustomerDto;
|
|||||||
import com.xjrsoft.module.sales.entity.LngCustomer;
|
import com.xjrsoft.module.sales.entity.LngCustomer;
|
||||||
import com.xjrsoft.module.sales.service.ICustomerService;
|
import com.xjrsoft.module.sales.service.ICustomerService;
|
||||||
import com.xjrsoft.module.sales.vo.LngCustomerPageVo;
|
import com.xjrsoft.module.sales.vo.LngCustomerPageVo;
|
||||||
import com.xjrsoft.module.sales.vo.LngCustomerVo;
|
|
||||||
import com.xjrsoft.module.system.client.ICodeRuleClient;
|
import com.xjrsoft.module.system.client.ICodeRuleClient;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -92,11 +83,7 @@ public class CustomerController {
|
|||||||
@ApiOperation(value="根据id查询LngCustomer信息")
|
@ApiOperation(value="根据id查询LngCustomer信息")
|
||||||
@SaCheckPermission("customer:detail")
|
@SaCheckPermission("customer:detail")
|
||||||
public R info(@RequestParam Long id){
|
public R info(@RequestParam Long id){
|
||||||
LngCustomer lngCustomer = customerService.getCustomerById(id);
|
return R.ok(customerService.getCustomerById(id));
|
||||||
if (lngCustomer == null) {
|
|
||||||
return R.error("找不到此数据!");
|
|
||||||
}
|
|
||||||
return R.ok(BeanUtil.toBean(lngCustomer, LngCustomerVo.class));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/datalog")
|
@GetMapping(value = "/datalog")
|
||||||
@ -112,33 +99,33 @@ public class CustomerController {
|
|||||||
@ApiOperation(value = "新增LngCustomer")
|
@ApiOperation(value = "新增LngCustomer")
|
||||||
@SaCheckPermission("customer:add")
|
@SaCheckPermission("customer:add")
|
||||||
public R add(@Valid @RequestBody UpdateLngCustomerDto dto){
|
public R add(@Valid @RequestBody UpdateLngCustomerDto dto){
|
||||||
// String code = codeRuleClient.genEncode(CUSTOMER_CODE);
|
|
||||||
// dto.setCuCode("C"+code);
|
|
||||||
// Long id = customerService.add(dto);
|
|
||||||
// dto.setId(id);
|
|
||||||
// codeRuleClient.useEncode(CUSTOMER_CODE);
|
|
||||||
// return R.ok(dto);
|
|
||||||
|
|
||||||
|
String code = codeRuleClient.genEncode(CUSTOMER_CODE);
|
||||||
|
dto.setCuCode("C"+code);
|
||||||
|
UpdateLngCustomerDto obj = dataService.insert(dto);
|
||||||
|
codeRuleClient.useEncode(CUSTOMER_CODE);
|
||||||
|
return R.ok(obj);
|
||||||
|
/**
|
||||||
return R.ok(dataService.insert(dto,new DataOperationListener<UpdateLngCustomerDto>() {
|
return R.ok(dataService.insert(dto,new DataOperationListener<UpdateLngCustomerDto>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UpdateLngCustomerDto before(DataOperationContent<UpdateLngCustomerDto> content) {
|
public UpdateLngCustomerDto before(DataOperationContent<UpdateLngCustomerDto> content) {
|
||||||
String code = codeRuleClient.genEncode(CUSTOMER_CODE);
|
|
||||||
dto.setCuCode("C"+code);
|
|
||||||
return content.getObj();
|
return content.getObj();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UpdateLngCustomerDto after(DataOperationContent<UpdateLngCustomerDto> content) {
|
public UpdateLngCustomerDto after(DataOperationContent<UpdateLngCustomerDto> content) {
|
||||||
String msg = CommonCallUtils.saveAfter(content.getTableName(),content.getIdValue());
|
String msg = CommonCallUtils.saveAfter(content.getTableName(),content.getIdValue());
|
||||||
if (StringUtils.isNotEmpty(msg)) {
|
|
||||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
if (StringUtils.isNotEmpty(msg)) {
|
||||||
}
|
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
||||||
|
}
|
||||||
codeRuleClient.useEncode(CUSTOMER_CODE);
|
codeRuleClient.useEncode(CUSTOMER_CODE);
|
||||||
return content.getObj();
|
return content.getObj();
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
**/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -146,24 +133,8 @@ public class CustomerController {
|
|||||||
@ApiOperation(value = "修改LngCustomer")
|
@ApiOperation(value = "修改LngCustomer")
|
||||||
@SaCheckPermission("customer:edit")
|
@SaCheckPermission("customer:edit")
|
||||||
public R update(@Valid @RequestBody UpdateLngCustomerDto dto){
|
public R update(@Valid @RequestBody UpdateLngCustomerDto dto){
|
||||||
// customerService.update(dto);
|
|
||||||
// return R.ok();
|
|
||||||
return R.ok(dataService.updateById(dto,new DataOperationListener<UpdateLngCustomerDto>() {
|
|
||||||
|
|
||||||
@Override
|
return R.ok(dataService.updateById(dto));
|
||||||
public UpdateLngCustomerDto before(DataOperationContent<UpdateLngCustomerDto> content) {
|
|
||||||
return content.getObj();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public UpdateLngCustomerDto after(DataOperationContent<UpdateLngCustomerDto> content) {
|
|
||||||
String msg = CommonCallUtils.saveAfter(content.getTableName(),content.getIdValue());
|
|
||||||
if (StringUtils.isNotEmpty(msg)) {
|
|
||||||
throw new BusinessException(BusinessCode.ofArgs(ExceptionCommonCode.DB_FUNCTION_EXEC_ERROR, msg));
|
|
||||||
}
|
|
||||||
return content.getObj();
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
|
|||||||
@ -0,0 +1,119 @@
|
|||||||
|
package com.xjrsoft.module.sales.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
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.datalog.vo.DataChangeLogVo;
|
||||||
|
import com.xjrsoft.module.sales.dto.LngScorePageDto;
|
||||||
|
import com.xjrsoft.module.sales.dto.UpdateLngScoreDto;
|
||||||
|
import com.xjrsoft.module.sales.entity.LngScore;
|
||||||
|
import com.xjrsoft.module.sales.service.IScoreCustomerService;
|
||||||
|
import com.xjrsoft.module.sales.vo.LngScorePageVo;
|
||||||
|
import com.xjrsoft.module.sales.vo.LngScoreVo;
|
||||||
|
|
||||||
|
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 io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 客户评价
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/sales" + "/scoreCustomer")
|
||||||
|
@Api(value = "/sales" + "/scoreCustomer",tags = "客户评价代码")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ScoreCustomerController {
|
||||||
|
|
||||||
|
|
||||||
|
private final IScoreCustomerService scoreCustomerService;
|
||||||
|
private final DatalogService dataService;
|
||||||
|
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
@ApiOperation(value="LngScore列表(分页)")
|
||||||
|
@SaCheckPermission("scoreCustomer:list")
|
||||||
|
public R page(@Valid LngScorePageDto dto){
|
||||||
|
|
||||||
|
LambdaQueryWrapper<LngScore> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper
|
||||||
|
.like(StrUtil.isNotBlank(dto.getCpCode()),LngScore::getCpCode,dto.getCpCode())
|
||||||
|
.eq(ObjectUtil.isNotNull(dto.getGsId()),LngScore::getGsId,dto.getGsId())
|
||||||
|
.between(ObjectUtil.isNotNull(dto.getDateGradeStart()) && ObjectUtil.isNotNull(dto.getDateGradeEnd()),LngScore::getDateGrade,dto.getDateGradeStart(),dto.getDateGradeEnd())
|
||||||
|
.eq(ObjectUtil.isNotNull(dto.getScore()),LngScore::getScore,dto.getScore())
|
||||||
|
.like(StrUtil.isNotBlank(dto.getApproCode()),LngScore::getApproCode,dto.getApproCode())
|
||||||
|
.like(StrUtil.isNotBlank(dto.getNote()),LngScore::getNote,dto.getNote())
|
||||||
|
.orderByDesc(LngScore::getId)
|
||||||
|
.select(LngScore.class,x -> VoToColumnUtil.fieldsToColumns(LngScorePageVo.class).contains(x.getProperty()));
|
||||||
|
IPage<LngScore> page = scoreCustomerService.page(ConventPage.getPage(dto), queryWrapper);
|
||||||
|
PageOutput<LngScorePageVo> pageOutput = ConventPage.getPageOutput(page, LngScorePageVo.class);
|
||||||
|
return R.ok(pageOutput);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/info")
|
||||||
|
@ApiOperation(value="根据id查询LngScore信息")
|
||||||
|
@SaCheckPermission("scoreCustomer:detail")
|
||||||
|
public R info(@RequestParam Long id){
|
||||||
|
LngScore lngScore = scoreCustomerService.getByIdDeep(id);
|
||||||
|
if (lngScore == null) {
|
||||||
|
return R.error("找不到此数据!");
|
||||||
|
}
|
||||||
|
return R.ok(BeanUtil.toBean(lngScore, LngScoreVo.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/datalog")
|
||||||
|
@ApiOperation(value="根据id查询LngScore数据详细日志")
|
||||||
|
@SaCheckPermission("scoreCustomer:datalog")
|
||||||
|
public R datalog(@RequestParam Long id){
|
||||||
|
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngScoreDto.class,id);
|
||||||
|
return R.ok(logs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@ApiOperation(value = "新增LngScore")
|
||||||
|
@SaCheckPermission("scoreCustomer:add")
|
||||||
|
public R add(@Valid @RequestBody UpdateLngScoreDto dto){
|
||||||
|
UpdateLngScoreDto res = dataService.insert(dto);
|
||||||
|
return R.ok(res.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@ApiOperation(value = "修改LngScore")
|
||||||
|
@SaCheckPermission("scoreCustomer:edit")
|
||||||
|
public R update(@Valid @RequestBody UpdateLngScoreDto dto){
|
||||||
|
return R.ok(dataService.updateById(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping
|
||||||
|
@ApiOperation(value = "删除")
|
||||||
|
@SaCheckPermission("scoreCustomer:delete")
|
||||||
|
public R delete(@Valid @RequestBody List<Long> ids){
|
||||||
|
return R.ok(dataService.deleteByIds(UpdateLngScoreDto.class, ids));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,139 @@
|
|||||||
|
package com.xjrsoft.module.sales.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.Version;
|
||||||
|
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.LocalTime;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 客户评价
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("lng_score")
|
||||||
|
@ApiModel(value = "客户评价对象", description = "客户评价")
|
||||||
|
public class LngScore implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分日期")
|
||||||
|
private LocalDateTime dateGrade;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)")
|
||||||
|
private String tableName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商/客户
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("供应商/客户")
|
||||||
|
private String cpCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批状态(未审批/审批中/已审批/已驳回)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("审批状态(未审批/审批中/已审批/已驳回)")
|
||||||
|
private String approCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@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;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lngScoreDtl
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("lngScoreDtl子表")
|
||||||
|
@TableField(exist = false)
|
||||||
|
@EntityMapping(thisField = "id", joinField = "sId")
|
||||||
|
private List<LngScoreDtl> lngScoreDtlList;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,168 @@
|
|||||||
|
package com.xjrsoft.module.sales.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.Version;
|
||||||
|
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.LocalTime;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 客户评价
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("lng_score_dtl")
|
||||||
|
@ApiModel(value = "客户评价对象", description = "客户评价")
|
||||||
|
public class LngScoreDtl implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分信息主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分信息主键")
|
||||||
|
private Long sId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系-条目主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系-条目主键")
|
||||||
|
private Long gsiId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分事项(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分事项(只读)")
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分标准(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分标准(只读)")
|
||||||
|
private String itemDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分部门(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分部门(只读)")
|
||||||
|
private String eDeptCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示顺序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("显示顺序")
|
||||||
|
private Short sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分部门编码(当前登录人所在部门)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分部门编码(当前登录人所在部门)")
|
||||||
|
private String aDeptCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分人编码(当前登录人)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分人编码(当前登录人)")
|
||||||
|
private String aEmpCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分时间")
|
||||||
|
private Object aTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数说明")
|
||||||
|
private String scoreDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@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,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.LngScoreDtl;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: mapper
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface LngScoreDtlMapper extends MPJBaseMapper<LngScoreDtl> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -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.LngScore;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: mapper
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface LngScoreMapper extends MPJBaseMapper<LngScore> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,13 +1,12 @@
|
|||||||
package com.xjrsoft.module.sales.service;
|
package com.xjrsoft.module.sales.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import java.util.List;
|
||||||
|
|
||||||
import com.github.yulichang.base.MPJBaseService;
|
import com.github.yulichang.base.MPJBaseService;
|
||||||
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
||||||
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
||||||
import com.xjrsoft.module.sales.dto.UpdateLngCustomerDto;
|
|
||||||
import com.xjrsoft.module.sales.entity.LngCustomer;
|
import com.xjrsoft.module.sales.entity.LngCustomer;
|
||||||
import lombok.Data;
|
import com.xjrsoft.module.sales.vo.LngCustomerVo;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title: service
|
* @title: service
|
||||||
@ -17,22 +16,6 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public interface ICustomerService extends MPJBaseService<LngCustomer>, MPJDeepService<LngCustomer>, MPJRelationService<LngCustomer> {
|
public interface ICustomerService extends MPJBaseService<LngCustomer>, MPJDeepService<LngCustomer>, MPJRelationService<LngCustomer> {
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param lngCustomer
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
|
|
||||||
Long add(UpdateLngCustomerDto updateLngCustomerDto);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新
|
|
||||||
*
|
|
||||||
* @param lngCustomer
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Boolean update(UpdateLngCustomerDto updateLngCustomerDto);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
@ -42,6 +25,6 @@ public interface ICustomerService extends MPJBaseService<LngCustomer>, MPJDeepSe
|
|||||||
*/
|
*/
|
||||||
Boolean delete(List<Long> ids);
|
Boolean delete(List<Long> ids);
|
||||||
|
|
||||||
LngCustomer getCustomerById(Long id);
|
LngCustomerVo getCustomerById(Long id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,42 @@
|
|||||||
|
package com.xjrsoft.module.sales.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
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.LngScore;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: service
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
public interface IScoreCustomerService extends MPJBaseService<LngScore>, MPJDeepService<LngScore>, MPJRelationService<LngScore> {
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*
|
||||||
|
* @param lngScore
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean add(LngScore lngScore);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param lngScore
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean update(LngScore lngScore);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean delete(List<Long> ids);
|
||||||
|
}
|
||||||
@ -9,11 +9,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||||
import com.xjrsoft.module.sales.dto.UpdateLngCustomerAttrPowerDto;
|
|
||||||
import com.xjrsoft.module.sales.dto.UpdateLngCustomerBankDto;
|
|
||||||
import com.xjrsoft.module.sales.dto.UpdateLngCustomerContactDto;
|
|
||||||
import com.xjrsoft.module.sales.dto.UpdateLngCustomerDocDto;
|
|
||||||
import com.xjrsoft.module.sales.dto.UpdateLngCustomerDto;
|
|
||||||
import com.xjrsoft.module.sales.entity.LngCustomer;
|
import com.xjrsoft.module.sales.entity.LngCustomer;
|
||||||
import com.xjrsoft.module.sales.entity.LngCustomerAttrPower;
|
import com.xjrsoft.module.sales.entity.LngCustomerAttrPower;
|
||||||
import com.xjrsoft.module.sales.entity.LngCustomerBank;
|
import com.xjrsoft.module.sales.entity.LngCustomerBank;
|
||||||
@ -25,8 +20,10 @@ import com.xjrsoft.module.sales.mapper.LngCustomerContactMapper;
|
|||||||
import com.xjrsoft.module.sales.mapper.LngCustomerDocMapper;
|
import com.xjrsoft.module.sales.mapper.LngCustomerDocMapper;
|
||||||
import com.xjrsoft.module.sales.mapper.LngCustomerMapper;
|
import com.xjrsoft.module.sales.mapper.LngCustomerMapper;
|
||||||
import com.xjrsoft.module.sales.service.ICustomerService;
|
import com.xjrsoft.module.sales.service.ICustomerService;
|
||||||
|
import com.xjrsoft.module.sales.vo.LngCustomerDocVo;
|
||||||
|
import com.xjrsoft.module.sales.vo.LngCustomerVo;
|
||||||
import com.xjrsoft.module.system.client.IFileClient;
|
import com.xjrsoft.module.system.client.IFileClient;
|
||||||
import com.xjrsoft.module.system.dto.LngFileUploadBindDto;
|
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
@ -51,237 +48,6 @@ public class CustomerServiceImpl extends MPJBaseServiceImpl<LngCustomerMapper, L
|
|||||||
private final IFileClient fileClient;
|
private final IFileClient fileClient;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public Long add(UpdateLngCustomerDto updateLngCustomerDto) {
|
|
||||||
|
|
||||||
LngCustomer lngCustomer = new LngCustomer();
|
|
||||||
BeanUtil.copyProperties(updateLngCustomerDto, lngCustomer);
|
|
||||||
lngCustomerMapper.insert(lngCustomer);
|
|
||||||
for (UpdateLngCustomerAttrPowerDto updateLngCustomerAttrPowerDto : updateLngCustomerDto.getLngCustomerAttrPowerList()) {
|
|
||||||
LngCustomerAttrPower lngCustomerAttrPower = new LngCustomerAttrPower();
|
|
||||||
BeanUtil.copyProperties(updateLngCustomerAttrPowerDto, lngCustomerAttrPower);
|
|
||||||
lngCustomerAttrPower.setCuCode(lngCustomer.getCuCode());
|
|
||||||
lngCustomerAttrPowerMapper.insert(lngCustomerAttrPower);
|
|
||||||
}
|
|
||||||
for (UpdateLngCustomerBankDto updateLngCustomerBankDto : updateLngCustomerDto.getLngCustomerBankList()) {
|
|
||||||
LngCustomerBank lngCustomerBank = new LngCustomerBank();
|
|
||||||
BeanUtil.copyProperties(updateLngCustomerBankDto, lngCustomerBank);
|
|
||||||
lngCustomerBank.setCuCode(lngCustomer.getCuCode());
|
|
||||||
lngCustomerBankMapper.insert(lngCustomerBank);
|
|
||||||
}
|
|
||||||
for (UpdateLngCustomerDocDto updateLngCustomerDocDto : updateLngCustomerDto.getLngCustomerDocList()) {
|
|
||||||
LngCustomerDoc lngCustomerDoc = new LngCustomerDoc();
|
|
||||||
BeanUtil.copyProperties(updateLngCustomerDocDto, lngCustomerDoc);
|
|
||||||
lngCustomerDoc.setCuCode(lngCustomer.getCuCode());
|
|
||||||
lngCustomerDocMapper.insert(lngCustomerDoc);
|
|
||||||
|
|
||||||
if(CollectionUtil.isNotEmpty(updateLngCustomerDocDto.getFileList())) {
|
|
||||||
LngFileUploadBindDto bindDto = new LngFileUploadBindDto();
|
|
||||||
bindDto.setTableId(updateLngCustomerDocDto.getId());
|
|
||||||
bindDto.setTableName("lng_customer_doc");
|
|
||||||
bindDto.setColumnName("fileList");
|
|
||||||
bindDto.setFiles(updateLngCustomerDocDto.getFileList());
|
|
||||||
fileClient.bindTableData(bindDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
for (UpdateLngCustomerContactDto updateLngCustomerContactDto : updateLngCustomerDto.getLngCustomerContactList()) {
|
|
||||||
LngCustomerContact lngCustomerContact = new LngCustomerContact();
|
|
||||||
BeanUtil.copyProperties(updateLngCustomerContactDto, lngCustomerContact);
|
|
||||||
lngCustomerContact.setCuCode(lngCustomer.getCuCode());
|
|
||||||
lngCustomerContactMapper.insert(lngCustomerContact);
|
|
||||||
}
|
|
||||||
if(updateLngCustomerDto.getLngFileUploadList() != null) {
|
|
||||||
LngFileUploadBindDto bindDto = new LngFileUploadBindDto();
|
|
||||||
bindDto.setTableId(updateLngCustomerDto.getId());
|
|
||||||
bindDto.setTableName("lng_customer");
|
|
||||||
bindDto.setColumnName("lngFileUploadList");
|
|
||||||
bindDto.setFiles(updateLngCustomerDto.getLngFileUploadList());
|
|
||||||
fileClient.bindTableData(bindDto);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return lngCustomer.getId();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public Boolean update(UpdateLngCustomerDto updateLngCustomerDto) {
|
|
||||||
LngCustomer lngCustomer = new LngCustomer();
|
|
||||||
BeanUtil.copyProperties(updateLngCustomerDto, lngCustomer);
|
|
||||||
lngCustomerMapper.updateById(lngCustomer);
|
|
||||||
//********************************* LngCustomerAttrPower 增删改 开始 *******************************************/
|
|
||||||
{
|
|
||||||
// 查出所有子级的id
|
|
||||||
List<LngCustomerAttrPower> lngCustomerAttrPowerList = lngCustomerAttrPowerMapper.selectList(Wrappers.lambdaQuery(LngCustomerAttrPower.class).eq(LngCustomerAttrPower::getCuCode, lngCustomer.getCuCode()).select(LngCustomerAttrPower::getId));
|
|
||||||
List<Long> lngCustomerAttrPowerIds = lngCustomerAttrPowerList.stream().map(LngCustomerAttrPower::getId).collect(Collectors.toList());
|
|
||||||
//原有子表单 没有被删除的主键
|
|
||||||
List<Long> lngCustomerAttrPowerOldIds = updateLngCustomerDto.getLngCustomerAttrPowerList().stream().map(UpdateLngCustomerAttrPowerDto::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
||||||
//找到需要删除的id
|
|
||||||
List<Long> lngCustomerAttrPowerRemoveIds = lngCustomerAttrPowerIds.stream().filter(item -> !lngCustomerAttrPowerOldIds.contains(item)).collect(Collectors.toList());
|
|
||||||
|
|
||||||
for (UpdateLngCustomerAttrPowerDto lngCustomerAttrPowerDto : updateLngCustomerDto.getLngCustomerAttrPowerList()) {
|
|
||||||
LngCustomerAttrPower lngCustomerAttrPower = new LngCustomerAttrPower();
|
|
||||||
BeanUtil.copyProperties(lngCustomerAttrPowerDto, lngCustomerAttrPower);
|
|
||||||
//如果不等于空则修改
|
|
||||||
if (lngCustomerAttrPower.getId() != null) {
|
|
||||||
|
|
||||||
lngCustomerAttrPowerMapper.updateById(lngCustomerAttrPower);
|
|
||||||
}
|
|
||||||
//如果等于空 则新增
|
|
||||||
else {
|
|
||||||
//已经不存在的id 删除
|
|
||||||
lngCustomerAttrPower.setCuCode(lngCustomer.getCuCode());
|
|
||||||
lngCustomerAttrPowerMapper.insert(lngCustomerAttrPower);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//已经不存在的id 删除
|
|
||||||
if(lngCustomerAttrPowerRemoveIds.size() > 0){
|
|
||||||
lngCustomerAttrPowerMapper.deleteBatchIds(lngCustomerAttrPowerRemoveIds);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//********************************* LngCustomerAttrPower 增删改 结束 *******************************************/
|
|
||||||
|
|
||||||
//********************************* LngCustomerBank 增删改 开始 *******************************************/
|
|
||||||
{
|
|
||||||
// 查出所有子级的id
|
|
||||||
List<LngCustomerBank> lngCustomerBankList = lngCustomerBankMapper.selectList(Wrappers.lambdaQuery(LngCustomerBank.class).eq(LngCustomerBank::getCuCode, lngCustomer.getCuCode()).select(LngCustomerBank::getId));
|
|
||||||
List<Long> lngCustomerBankIds = lngCustomerBankList.stream().map(LngCustomerBank::getId).collect(Collectors.toList());
|
|
||||||
//原有子表单 没有被删除的主键
|
|
||||||
List<Long> lngCustomerBankOldIds = updateLngCustomerDto.getLngCustomerBankList().stream().map(UpdateLngCustomerBankDto::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
||||||
//找到需要删除的id
|
|
||||||
List<Long> lngCustomerBankRemoveIds = lngCustomerBankIds.stream().filter(item -> !lngCustomerBankOldIds.contains(item)).collect(Collectors.toList());
|
|
||||||
|
|
||||||
for (UpdateLngCustomerBankDto lngCustomerBankDto : updateLngCustomerDto.getLngCustomerBankList()) {
|
|
||||||
LngCustomerBank lngCustomerBank = new LngCustomerBank();
|
|
||||||
BeanUtil.copyProperties(lngCustomerBankDto, lngCustomerBank);
|
|
||||||
//如果不等于空则修改
|
|
||||||
if (lngCustomerBank.getId() != null) {
|
|
||||||
lngCustomerBankMapper.updateById(lngCustomerBank);
|
|
||||||
}
|
|
||||||
//如果等于空 则新增
|
|
||||||
else {
|
|
||||||
//已经不存在的id 删除
|
|
||||||
lngCustomerBank.setCuCode(lngCustomer.getCuCode());
|
|
||||||
lngCustomerBankMapper.insert(lngCustomerBank);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//已经不存在的id 删除
|
|
||||||
if(lngCustomerBankRemoveIds.size() > 0){
|
|
||||||
lngCustomerBankMapper.deleteBatchIds(lngCustomerBankRemoveIds);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//********************************* LngCustomerBank 增删改 结束 *******************************************/
|
|
||||||
|
|
||||||
//********************************* LngCustomerDoc 增删改 开始 *******************************************/
|
|
||||||
{
|
|
||||||
// 查出所有子级的id
|
|
||||||
List<LngCustomerDoc> lngCustomerDocList = lngCustomerDocMapper.selectList(Wrappers.lambdaQuery(LngCustomerDoc.class).eq(LngCustomerDoc::getCuCode, lngCustomer.getCuCode()).select(LngCustomerDoc::getId));
|
|
||||||
List<Long> lngCustomerDocIds = lngCustomerDocList.stream().map(LngCustomerDoc::getId).collect(Collectors.toList());
|
|
||||||
//原有子表单 没有被删除的主键
|
|
||||||
List<Long> lngCustomerDocOldIds = updateLngCustomerDto.getLngCustomerDocList().stream().map(UpdateLngCustomerDocDto::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
||||||
//找到需要删除的id
|
|
||||||
List<Long> lngCustomerDocRemoveIds = lngCustomerDocIds.stream().filter(item -> !lngCustomerDocOldIds.contains(item)).collect(Collectors.toList());
|
|
||||||
|
|
||||||
for (UpdateLngCustomerDocDto lngCustomerDocDto : updateLngCustomerDto.getLngCustomerDocList()) {
|
|
||||||
LngCustomerDoc lngCustomerDoc = new LngCustomerDoc();
|
|
||||||
BeanUtil.copyProperties(lngCustomerDocDto, lngCustomerDoc);
|
|
||||||
//如果不等于空则修改
|
|
||||||
if (lngCustomerDoc.getId() != null) {
|
|
||||||
|
|
||||||
lngCustomerDocMapper.updateById(lngCustomerDoc);
|
|
||||||
//lngFileUploadMapper.delete(Wrappers.lambdaQuery(LngFileUpload.class).eq(LngFileUpload::getTableName, "lng_customer_doc").eq(LngFileUpload::getTableId, lngCustomerDoc.getId()));
|
|
||||||
}
|
|
||||||
//如果等于空 则新增
|
|
||||||
else {
|
|
||||||
//已经不存在的id 删除
|
|
||||||
lngCustomerDoc.setCuCode(lngCustomer.getCuCode());
|
|
||||||
lngCustomerDocMapper.insert(lngCustomerDoc);
|
|
||||||
}
|
|
||||||
if(CollectionUtil.isNotEmpty(lngCustomerDocDto.getFileList())) {
|
|
||||||
// for(UpdateLngFileUploadDto lngFileUploadDto:lngCustomerDocDto.getFileList()) {
|
|
||||||
// LngFileUpload lngFileUpload = new LngFileUpload();
|
|
||||||
// BeanUtil.copyProperties(lngFileUploadDto, lngFileUpload);
|
|
||||||
// lngFileUpload.setTableName("lng_customer_doc");
|
|
||||||
// lngFileUpload.setTableId(lngCustomerDoc.getId());
|
|
||||||
// lngFileUploadMapper.insert(lngFileUpload);
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//已经不存在的id 删除
|
|
||||||
if(lngCustomerDocRemoveIds.size() > 0){
|
|
||||||
lngCustomerDocMapper.deleteBatchIds(lngCustomerDocRemoveIds);
|
|
||||||
//lngFileUploadMapper.delete(Wrappers.lambdaQuery(LngFileUpload.class).eq(LngFileUpload::getTableName, "lng_customer_doc").in(LngFileUpload::getTableId, lngCustomerDocRemoveIds));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//********************************* LngCustomerDoc 增删改 结束 *******************************************/
|
|
||||||
|
|
||||||
//********************************* LngCustomerContact 增删改 开始 *******************************************/
|
|
||||||
{
|
|
||||||
// 查出所有子级的id
|
|
||||||
List<LngCustomerContact> lngCustomerContactList = lngCustomerContactMapper.selectList(Wrappers.lambdaQuery(LngCustomerContact.class).eq(LngCustomerContact::getCuCode, lngCustomer.getCuCode()).select(LngCustomerContact::getId));
|
|
||||||
List<Long> lngCustomerContactIds = lngCustomerContactList.stream().map(LngCustomerContact::getId).collect(Collectors.toList());
|
|
||||||
//原有子表单 没有被删除的主键
|
|
||||||
List<Long> lngCustomerContactOldIds = updateLngCustomerDto.getLngCustomerContactList().stream().map(UpdateLngCustomerContactDto::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
||||||
//找到需要删除的id
|
|
||||||
List<Long> lngCustomerContactRemoveIds = lngCustomerContactIds.stream().filter(item -> !lngCustomerContactOldIds.contains(item)).collect(Collectors.toList());
|
|
||||||
|
|
||||||
for (UpdateLngCustomerContactDto lngCustomerContactDto : updateLngCustomerDto.getLngCustomerContactList()) {
|
|
||||||
LngCustomerContact lngCustomerContact = new LngCustomerContact();
|
|
||||||
BeanUtil.copyProperties(lngCustomerContactDto, lngCustomerContact);
|
|
||||||
//如果不等于空则修改
|
|
||||||
if (lngCustomerContact.getId() != null) {
|
|
||||||
lngCustomerContactMapper.updateById(lngCustomerContact);
|
|
||||||
}
|
|
||||||
//如果等于空 则新增
|
|
||||||
else {
|
|
||||||
//已经不存在的id 删除
|
|
||||||
lngCustomerContact.setCuCode(lngCustomer.getCuCode());
|
|
||||||
lngCustomerContactMapper.insert(lngCustomerContact);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//已经不存在的id 删除
|
|
||||||
if(lngCustomerContactRemoveIds.size() > 0){
|
|
||||||
lngCustomerContactMapper.deleteBatchIds(lngCustomerContactRemoveIds);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//********************************* LngCustomerContact 增删改 结束 *******************************************/
|
|
||||||
|
|
||||||
//********************************* LngFileUpload 增删改 开始 *******************************************/
|
|
||||||
{
|
|
||||||
// 查出所有子级的id
|
|
||||||
// List<LngFileUpload> lngFileUploadList = lngFileUploadMapper.selectList(Wrappers.lambdaQuery(LngFileUpload.class).eq(LngFileUpload::getTableName, "lng_customer").eq(LngFileUpload::getTableId, lngCustomer.getId()).select(LngFileUpload::getId));
|
|
||||||
// List<Long> lngFileUploadIds = lngFileUploadList.stream().map(LngFileUpload::getId).collect(Collectors.toList());
|
|
||||||
// //原有子表单 没有被删除的主键
|
|
||||||
// List<Long> lngFileUploadOldIds = updateLngCustomerDto.getLngFileUploadList().stream().map(UpdateLngFileUploadDto::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
||||||
// //找到需要删除的id
|
|
||||||
// List<Long> lngFileUploadRemoveIds = lngFileUploadIds.stream().filter(item -> !lngFileUploadOldIds.contains(item)).collect(Collectors.toList());
|
|
||||||
//
|
|
||||||
// for (UpdateLngFileUploadDto lngFileUploadDto : updateLngCustomerDto.getLngFileUploadList()) {
|
|
||||||
// LngFileUpload lngFileUpload = new LngFileUpload();
|
|
||||||
// BeanUtil.copyProperties(lngFileUploadDto, lngFileUpload);
|
|
||||||
// lngFileUpload.setTableName("lng_customer");
|
|
||||||
// //如果不等于空则修改
|
|
||||||
// if (lngFileUpload.getId() != null) {
|
|
||||||
// lngFileUploadMapper.updateById(lngFileUpload);
|
|
||||||
// }
|
|
||||||
// //如果等于空 则新增
|
|
||||||
// else {
|
|
||||||
// lngFileUpload.setTableId(lngCustomer.getId());
|
|
||||||
// lngFileUploadMapper.insert(lngFileUpload);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// //已经不存在的id 删除
|
|
||||||
// if(lngFileUploadRemoveIds.size() > 0){
|
|
||||||
// lngFileUploadMapper.deleteBatchIds(lngFileUploadRemoveIds);
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
//********************************* LngFileUpload 增删改 结束 *******************************************/
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@ -294,38 +60,26 @@ public class CustomerServiceImpl extends MPJBaseServiceImpl<LngCustomerMapper, L
|
|||||||
lngCustomerBankMapper.delete(Wrappers.lambdaQuery(LngCustomerBank.class).in(LngCustomerBank::getCuCode, cuCodeList));
|
lngCustomerBankMapper.delete(Wrappers.lambdaQuery(LngCustomerBank.class).in(LngCustomerBank::getCuCode, cuCodeList));
|
||||||
lngCustomerDocMapper.delete(Wrappers.lambdaQuery(LngCustomerDoc.class).in(LngCustomerDoc::getCuCode, cuCodeList));
|
lngCustomerDocMapper.delete(Wrappers.lambdaQuery(LngCustomerDoc.class).in(LngCustomerDoc::getCuCode, cuCodeList));
|
||||||
lngCustomerContactMapper.delete(Wrappers.lambdaQuery(LngCustomerContact.class).in(LngCustomerContact::getCuCode, cuCodeList));
|
lngCustomerContactMapper.delete(Wrappers.lambdaQuery(LngCustomerContact.class).in(LngCustomerContact::getCuCode, cuCodeList));
|
||||||
// lngFileUploadMapper.delete(Wrappers.lambdaQuery(LngFileUpload.class).in(LngFileUpload::getTableId, ids).eq(LngFileUpload::getTableName, "lng_customer"));
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LngCustomer getCustomerById(Long id) {
|
public LngCustomerVo getCustomerById(Long id) {
|
||||||
|
|
||||||
LngCustomer lngCustomer = this.getByIdDeep(id);
|
LngCustomer lngCustomer = this.getByIdDeep(id);
|
||||||
if(lngCustomer == null) {
|
if(lngCustomer == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if(CollectionUtil.isNotEmpty(lngCustomer.getLngCustomerDocList())) {
|
LngCustomerVo vo = BeanUtil.toBean(lngCustomer, LngCustomerVo.class);
|
||||||
for(LngCustomerDoc lngCustomerDoc: lngCustomer.getLngCustomerDocList()) {
|
if(CollectionUtil.isNotEmpty(vo.getLngCustomerDocList())) {
|
||||||
// List<LngFileUpload> tempList = lngFileUploadMapper.selectList(Wrappers.lambdaQuery(LngFileUpload.class).eq(LngFileUpload::getTableId, lngCustomerDoc.getId()).eq(LngFileUpload::getTableName, "lng_customer_doc"));
|
for(LngCustomerDocVo lngCustomerDoc: vo.getLngCustomerDocList()) {
|
||||||
// if(CollectionUtil.isNotEmpty(tempList)) {
|
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_customer_doc", "fileList", lngCustomerDoc.getId());
|
||||||
// CloudStorageService storageService = OssFactory.build();
|
lngCustomerDoc.setFileList(fileList);
|
||||||
// tempList.forEach(file -> {
|
|
||||||
// file.setPresignedUrl(storageService.fixUrl(file.getFilePath()));
|
|
||||||
// });
|
|
||||||
// lngCustomerDoc.setFileList(tempList);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// List<LngFileUpload> fileList = lngFileUploadMapper.selectList(Wrappers.lambdaQuery(LngFileUpload.class).eq(LngFileUpload::getTableId, lngCustomer.getId()).eq(LngFileUpload::getTableName, "lng_customer"));
|
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_customer", "lngFileUploadList", vo.getId());
|
||||||
// if (CollUtil.isNotEmpty(fileList)) {
|
vo.setLngFileUploadList(fileList);
|
||||||
// CloudStorageService storageService = OssFactory.build();
|
return vo;
|
||||||
// fileList.forEach(file -> {
|
|
||||||
// file.setPresignedUrl(storageService.fixUrl(file.getFilePath()));
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
//lngCustomer.setLngFileUploadList(fileList);
|
|
||||||
return lngCustomer;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,88 @@
|
|||||||
|
package com.xjrsoft.module.sales.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||||
|
import com.xjrsoft.module.sales.entity.LngScoreDtl;
|
||||||
|
import com.xjrsoft.module.sales.mapper.LngScoreDtlMapper;
|
||||||
|
import com.xjrsoft.module.sales.entity.LngScore;
|
||||||
|
import com.xjrsoft.module.sales.mapper.LngScoreMapper;
|
||||||
|
import com.xjrsoft.module.sales.service.IScoreCustomerService;
|
||||||
|
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;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: service
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ScoreCustomerServiceImpl extends MPJBaseServiceImpl<LngScoreMapper, LngScore> implements IScoreCustomerService {
|
||||||
|
private final LngScoreMapper scoreCustomerLngScoreMapper;
|
||||||
|
|
||||||
|
private final LngScoreDtlMapper scoreCustomerLngScoreDtlMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean add(LngScore lngScore) {
|
||||||
|
scoreCustomerLngScoreMapper.insert(lngScore);
|
||||||
|
for (LngScoreDtl lngScoreDtl : lngScore.getLngScoreDtlList()) {
|
||||||
|
lngScoreDtl.setSId(lngScore.getId());
|
||||||
|
scoreCustomerLngScoreDtlMapper.insert(lngScoreDtl);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean update(LngScore lngScore) {
|
||||||
|
scoreCustomerLngScoreMapper.updateById(lngScore);
|
||||||
|
//********************************* LngScoreDtl 增删改 开始 *******************************************/
|
||||||
|
{
|
||||||
|
// 查出所有子级的id
|
||||||
|
List<LngScoreDtl> lngScoreDtlList = scoreCustomerLngScoreDtlMapper.selectList(Wrappers.lambdaQuery(LngScoreDtl.class).eq(LngScoreDtl::getSId, lngScore.getId()).select(LngScoreDtl::getId));
|
||||||
|
List<Long> lngScoreDtlIds = lngScoreDtlList.stream().map(LngScoreDtl::getId).collect(Collectors.toList());
|
||||||
|
//原有子表单 没有被删除的主键
|
||||||
|
List<Long> lngScoreDtlOldIds = lngScore.getLngScoreDtlList().stream().map(LngScoreDtl::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
||||||
|
//找到需要删除的id
|
||||||
|
List<Long> lngScoreDtlRemoveIds = lngScoreDtlIds.stream().filter(item -> !lngScoreDtlOldIds.contains(item)).collect(Collectors.toList());
|
||||||
|
|
||||||
|
for (LngScoreDtl lngScoreDtl : lngScore.getLngScoreDtlList()) {
|
||||||
|
//如果不等于空则修改
|
||||||
|
if (lngScoreDtl.getId() != null) {
|
||||||
|
scoreCustomerLngScoreDtlMapper.updateById(lngScoreDtl);
|
||||||
|
}
|
||||||
|
//如果等于空 则新增
|
||||||
|
else {
|
||||||
|
//已经不存在的id 删除
|
||||||
|
lngScoreDtl.setSId(lngScore.getId());
|
||||||
|
scoreCustomerLngScoreDtlMapper.insert(lngScoreDtl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//已经不存在的id 删除
|
||||||
|
if(lngScoreDtlRemoveIds.size() > 0){
|
||||||
|
scoreCustomerLngScoreDtlMapper.deleteBatchIds(lngScoreDtlRemoveIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//********************************* LngScoreDtl 增删改 结束 *******************************************/
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean delete(List<Long> ids) {
|
||||||
|
scoreCustomerLngScoreMapper.deleteBatchIds(ids);
|
||||||
|
scoreCustomerLngScoreDtlMapper.delete(Wrappers.lambdaQuery(LngScoreDtl.class).in(LngScoreDtl::getSId, ids));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,115 @@
|
|||||||
|
package com.xjrsoft.module.supplier.controller;
|
||||||
|
|
||||||
|
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.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.xjrsoft.common.constant.GlobalConstant;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
||||||
|
import com.xjrsoft.common.page.ConventPage;
|
||||||
|
import com.xjrsoft.common.page.PageOutput;
|
||||||
|
import com.xjrsoft.common.model.result.R;
|
||||||
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
||||||
|
import com.xjrsoft.module.supplier.dto.AddLngScoreDto;
|
||||||
|
import com.xjrsoft.module.supplier.dto.UpdateLngScoreDto;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
|
||||||
|
import com.xjrsoft.module.supplier.dto.LngScorePageDto;
|
||||||
|
import com.xjrsoft.module.supplier.entity.LngScore;
|
||||||
|
import com.xjrsoft.module.supplier.service.IScoreSupplierService;
|
||||||
|
import com.xjrsoft.module.supplier.vo.LngScorePageVo;
|
||||||
|
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||||
|
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||||
|
import com.xjrsoft.module.supplier.vo.LngScoreVo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 供应商评价
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/supplier" + "/scoreSupplier")
|
||||||
|
@Api(value = "/supplier" + "/scoreSupplier",tags = "供应商评价代码")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ScoreSupplierController {
|
||||||
|
|
||||||
|
|
||||||
|
private final IScoreSupplierService scoreSupplierService;
|
||||||
|
private final DatalogService dataService;
|
||||||
|
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
@ApiOperation(value="LngScore列表(分页)")
|
||||||
|
@SaCheckPermission("scoreSupplier:list")
|
||||||
|
public R page(@Valid LngScorePageDto dto){
|
||||||
|
|
||||||
|
LambdaQueryWrapper<LngScore> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper
|
||||||
|
.like(StrUtil.isNotBlank(dto.getCpCode()),LngScore::getCpCode,dto.getCpCode())
|
||||||
|
.eq(ObjectUtil.isNotNull(dto.getGsId()),LngScore::getGsId,dto.getGsId())
|
||||||
|
.between(ObjectUtil.isNotNull(dto.getDateGradeStart()) && ObjectUtil.isNotNull(dto.getDateGradeEnd()),LngScore::getDateGrade,dto.getDateGradeStart(),dto.getDateGradeEnd())
|
||||||
|
.eq(ObjectUtil.isNotNull(dto.getScore()),LngScore::getScore,dto.getScore())
|
||||||
|
.like(StrUtil.isNotBlank(dto.getApproCode()),LngScore::getApproCode,dto.getApproCode())
|
||||||
|
.like(StrUtil.isNotBlank(dto.getNote()),LngScore::getNote,dto.getNote())
|
||||||
|
.orderByDesc(LngScore::getId)
|
||||||
|
.select(LngScore.class,x -> VoToColumnUtil.fieldsToColumns(LngScorePageVo.class).contains(x.getProperty()));
|
||||||
|
IPage<LngScore> page = scoreSupplierService.page(ConventPage.getPage(dto), queryWrapper);
|
||||||
|
PageOutput<LngScorePageVo> pageOutput = ConventPage.getPageOutput(page, LngScorePageVo.class);
|
||||||
|
return R.ok(pageOutput);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/info")
|
||||||
|
@ApiOperation(value="根据id查询LngScore信息")
|
||||||
|
@SaCheckPermission("scoreSupplier:detail")
|
||||||
|
public R info(@RequestParam Long id){
|
||||||
|
LngScore lngScore = scoreSupplierService.getByIdDeep(id);
|
||||||
|
if (lngScore == null) {
|
||||||
|
return R.error("找不到此数据!");
|
||||||
|
}
|
||||||
|
return R.ok(BeanUtil.toBean(lngScore, LngScoreVo.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/datalog")
|
||||||
|
@ApiOperation(value="根据id查询LngScore数据详细日志")
|
||||||
|
@SaCheckPermission("scoreSupplier:datalog")
|
||||||
|
public R datalog(@RequestParam Long id){
|
||||||
|
List<DataChangeLogVo> logs = dataService.findLogsByEntityId(UpdateLngScoreDto.class,id);
|
||||||
|
return R.ok(logs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@ApiOperation(value = "新增LngScore")
|
||||||
|
@SaCheckPermission("scoreSupplier:add")
|
||||||
|
public R add(@Valid @RequestBody UpdateLngScoreDto dto){
|
||||||
|
UpdateLngScoreDto res = dataService.insert(dto);
|
||||||
|
return R.ok(res.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@ApiOperation(value = "修改LngScore")
|
||||||
|
@SaCheckPermission("scoreSupplier:edit")
|
||||||
|
public R update(@Valid @RequestBody UpdateLngScoreDto dto){
|
||||||
|
return R.ok(dataService.updateById(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping
|
||||||
|
@ApiOperation(value = "删除")
|
||||||
|
@SaCheckPermission("scoreSupplier:delete")
|
||||||
|
public R delete(@Valid @RequestBody List<Long> ids){
|
||||||
|
return R.ok(dataService.deleteByIds(UpdateLngScoreDto.class, ids));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,36 +1,41 @@
|
|||||||
package com.xjrsoft.module.supplier.controller;
|
package com.xjrsoft.module.supplier.controller;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import java.util.List;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.xjrsoft.common.model.result.R;
|
||||||
import com.xjrsoft.common.constant.GlobalConstant;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
|
||||||
import com.xjrsoft.common.page.ConventPage;
|
import com.xjrsoft.common.page.ConventPage;
|
||||||
import com.xjrsoft.common.page.PageOutput;
|
import com.xjrsoft.common.page.PageOutput;
|
||||||
import com.xjrsoft.common.model.result.R;
|
|
||||||
import com.xjrsoft.common.utils.VoToColumnUtil;
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
||||||
import com.xjrsoft.module.supplier.dto.AddLngSupplierDto;
|
import com.xjrsoft.module.datalog.service.DatalogService;
|
||||||
import com.xjrsoft.module.supplier.dto.UpdateLngSupplierDto;
|
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import com.xjrsoft.module.sales.dto.UpdateLngCustomerDto;
|
||||||
|
|
||||||
import com.xjrsoft.module.supplier.dto.LngSupplierPageDto;
|
import com.xjrsoft.module.supplier.dto.LngSupplierPageDto;
|
||||||
|
import com.xjrsoft.module.supplier.dto.UpdateLngSupplierDto;
|
||||||
import com.xjrsoft.module.supplier.entity.LngSupplier;
|
import com.xjrsoft.module.supplier.entity.LngSupplier;
|
||||||
import com.xjrsoft.module.supplier.service.ISupplierService;
|
import com.xjrsoft.module.supplier.service.ISupplierService;
|
||||||
import com.xjrsoft.module.supplier.vo.LngSupplierPageVo;
|
import com.xjrsoft.module.supplier.vo.LngSupplierPageVo;
|
||||||
import com.xjrsoft.module.datalog.vo.DataChangeLogVo;
|
|
||||||
import com.xjrsoft.module.datalog.service.DatalogService;
|
|
||||||
import com.xjrsoft.module.supplier.vo.LngSupplierVo;
|
import com.xjrsoft.module.supplier.vo.LngSupplierVo;
|
||||||
|
import com.xjrsoft.module.system.client.ICodeRuleClient;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
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;
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title: 供应商
|
* @title: 供应商
|
||||||
@ -39,8 +44,8 @@ import java.util.List;
|
|||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/supplier" + "/supplier")
|
@RequestMapping("/supplier/supplier")
|
||||||
@Api(value = "/supplier" + "/supplier",tags = "供应商代码")
|
@Api(value = "/supplier/supplier",tags = "供应商代码")
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class SupplierController {
|
public class SupplierController {
|
||||||
|
|
||||||
@ -48,6 +53,11 @@ public class SupplierController {
|
|||||||
private final ISupplierService supplierService;
|
private final ISupplierService supplierService;
|
||||||
private final DatalogService dataService;
|
private final DatalogService dataService;
|
||||||
|
|
||||||
|
|
||||||
|
private final ICodeRuleClient codeRuleClient;
|
||||||
|
|
||||||
|
private final String SUPPLIER_CODE = "supplierCode";
|
||||||
|
|
||||||
@GetMapping(value = "/page")
|
@GetMapping(value = "/page")
|
||||||
@ApiOperation(value="LngSupplier列表(分页)")
|
@ApiOperation(value="LngSupplier列表(分页)")
|
||||||
@SaCheckPermission("supplier:list")
|
@SaCheckPermission("supplier:list")
|
||||||
@ -61,7 +71,7 @@ public class SupplierController {
|
|||||||
.like(StrUtil.isNotBlank(dto.getTypeCode()),LngSupplier::getTypeCode,dto.getTypeCode())
|
.like(StrUtil.isNotBlank(dto.getTypeCode()),LngSupplier::getTypeCode,dto.getTypeCode())
|
||||||
.like(StrUtil.isNotBlank(dto.getClassCode()),LngSupplier::getClassCode,dto.getClassCode())
|
.like(StrUtil.isNotBlank(dto.getClassCode()),LngSupplier::getClassCode,dto.getClassCode())
|
||||||
.like(StrUtil.isNotBlank(dto.getDI()),LngSupplier::getDI,dto.getDI())
|
.like(StrUtil.isNotBlank(dto.getDI()),LngSupplier::getDI,dto.getDI())
|
||||||
.like(StrUtil.isNotBlank(dto.getValid()),LngSupplier::getValid,dto.getValid())
|
.eq(StrUtil.isNotBlank(dto.getValid()),LngSupplier::getValid,dto.getValid())
|
||||||
.like(StrUtil.isNotBlank(dto.getApproCode()),LngSupplier::getApproCode,dto.getApproCode())
|
.like(StrUtil.isNotBlank(dto.getApproCode()),LngSupplier::getApproCode,dto.getApproCode())
|
||||||
.orderByDesc(LngSupplier::getId)
|
.orderByDesc(LngSupplier::getId)
|
||||||
.select(LngSupplier.class,x -> VoToColumnUtil.fieldsToColumns(LngSupplierPageVo.class).contains(x.getProperty()));
|
.select(LngSupplier.class,x -> VoToColumnUtil.fieldsToColumns(LngSupplierPageVo.class).contains(x.getProperty()));
|
||||||
@ -74,11 +84,7 @@ public class SupplierController {
|
|||||||
@ApiOperation(value="根据id查询LngSupplier信息")
|
@ApiOperation(value="根据id查询LngSupplier信息")
|
||||||
@SaCheckPermission("supplier:detail")
|
@SaCheckPermission("supplier:detail")
|
||||||
public R info(@RequestParam Long id){
|
public R info(@RequestParam Long id){
|
||||||
LngSupplier lngSupplier = supplierService.getByIdDeep(id);
|
return R.ok(supplierService.getSupplierById(id));
|
||||||
if (lngSupplier == null) {
|
|
||||||
return R.error("找不到此数据!");
|
|
||||||
}
|
|
||||||
return R.ok(BeanUtil.toBean(lngSupplier, LngSupplierVo.class));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/datalog")
|
@GetMapping(value = "/datalog")
|
||||||
@ -94,8 +100,11 @@ public class SupplierController {
|
|||||||
@ApiOperation(value = "新增LngSupplier")
|
@ApiOperation(value = "新增LngSupplier")
|
||||||
@SaCheckPermission("supplier:add")
|
@SaCheckPermission("supplier:add")
|
||||||
public R add(@Valid @RequestBody UpdateLngSupplierDto dto){
|
public R add(@Valid @RequestBody UpdateLngSupplierDto dto){
|
||||||
|
String code = codeRuleClient.genEncode(SUPPLIER_CODE);
|
||||||
|
dto.setSuCode("S"+code);
|
||||||
UpdateLngSupplierDto res = dataService.insert(dto);
|
UpdateLngSupplierDto res = dataService.insert(dto);
|
||||||
return R.ok(res.getId());
|
codeRuleClient.useEncode(SUPPLIER_CODE);
|
||||||
|
return R.ok(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@ -109,7 +118,7 @@ public class SupplierController {
|
|||||||
@ApiOperation(value = "删除")
|
@ApiOperation(value = "删除")
|
||||||
@SaCheckPermission("supplier:delete")
|
@SaCheckPermission("supplier:delete")
|
||||||
public R delete(@Valid @RequestBody List<Long> ids){
|
public R delete(@Valid @RequestBody List<Long> ids){
|
||||||
return R.ok(dataService.deleteByIds(UpdateLngSupplierDto.class, ids));
|
return R.ok(dataService.deleteByIds(UpdateLngSupplierDto.class, ids));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +126,7 @@ public class SupplierController {
|
|||||||
@ApiOperation(value = "启用LngSupplier")
|
@ApiOperation(value = "启用LngSupplier")
|
||||||
@SaCheckPermission("supplier:enable")
|
@SaCheckPermission("supplier:enable")
|
||||||
public R enable(@Valid @RequestBody List<Long> ids){
|
public R enable(@Valid @RequestBody List<Long> ids){
|
||||||
return R.ok(dataService.enable(UpdateLngSupplierDto.class,ids));
|
return R.ok(dataService.enable(UpdateLngSupplierDto.class,ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -125,7 +134,7 @@ public class SupplierController {
|
|||||||
@ApiOperation(value = "禁用LngSupplier")
|
@ApiOperation(value = "禁用LngSupplier")
|
||||||
@SaCheckPermission("supplier:disable")
|
@SaCheckPermission("supplier:disable")
|
||||||
public R disable(@Valid @RequestBody List<Long> ids){
|
public R disable(@Valid @RequestBody List<Long> ids){
|
||||||
return R.ok(dataService.disable(UpdateLngSupplierDto.class,ids));
|
return R.ok(dataService.disable(UpdateLngSupplierDto.class,ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,139 @@
|
|||||||
|
package com.xjrsoft.module.supplier.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.Version;
|
||||||
|
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.LocalTime;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 供应商评价
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("lng_score")
|
||||||
|
@ApiModel(value = "供应商评价对象", description = "供应商评价")
|
||||||
|
public class LngScore implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分日期")
|
||||||
|
private LocalDateTime dateGrade;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("表名(隐藏,供应商/客户/承运商表名;应与评价体系的对象一致)")
|
||||||
|
private String tableName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商/客户
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("供应商/客户")
|
||||||
|
private String cpCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批状态(未审批/审批中/已审批/已驳回)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("审批状态(未审批/审批中/已审批/已驳回)")
|
||||||
|
private String approCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@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;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lngScoreDtl
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("lngScoreDtl子表")
|
||||||
|
@TableField(exist = false)
|
||||||
|
@EntityMapping(thisField = "id", joinField = "sId")
|
||||||
|
private List<LngScoreDtl> lngScoreDtlList;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,168 @@
|
|||||||
|
package com.xjrsoft.module.supplier.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.Version;
|
||||||
|
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.LocalTime;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: 供应商评价
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("lng_score_dtl")
|
||||||
|
@ApiModel(value = "供应商评价对象", description = "供应商评价")
|
||||||
|
public class LngScoreDtl implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分信息主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分信息主键")
|
||||||
|
private Long sId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系主键")
|
||||||
|
private Long gsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价体系-条目主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评价体系-条目主键")
|
||||||
|
private Long gsiId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分事项(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分事项(只读)")
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分标准(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分标准(只读)")
|
||||||
|
private String itemDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分部门(只读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("评分部门(只读)")
|
||||||
|
private String eDeptCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示顺序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("显示顺序")
|
||||||
|
private Short sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分部门编码(当前登录人所在部门)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分部门编码(当前登录人所在部门)")
|
||||||
|
private String aDeptCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分人编码(当前登录人)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分人编码(当前登录人)")
|
||||||
|
private String aEmpCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际评分时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("实际评分时间")
|
||||||
|
private Object aTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数")
|
||||||
|
private BigDecimal score;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分数说明
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分数说明")
|
||||||
|
private String scoreDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@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,17 @@
|
|||||||
|
package com.xjrsoft.module.supplier.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
|
import com.xjrsoft.module.supplier.entity.LngScoreDtl;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: mapper
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface LngSupplierScoreDtlMapper extends MPJBaseMapper<LngScoreDtl> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
package com.xjrsoft.module.supplier.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
|
import com.xjrsoft.module.supplier.entity.LngScore;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: mapper
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface LngSupplierScoreMapper extends MPJBaseMapper<LngScore> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
package com.xjrsoft.module.supplier.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
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.supplier.entity.LngScore;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: service
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
public interface IScoreSupplierService extends MPJBaseService<LngScore>, MPJDeepService<LngScore>, MPJRelationService<LngScore> {
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*
|
||||||
|
* @param lngScore
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean add(LngScore lngScore);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*
|
||||||
|
* @param lngScore
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean update(LngScore lngScore);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean delete(List<Long> ids);
|
||||||
|
}
|
||||||
@ -5,6 +5,8 @@ import com.github.yulichang.base.MPJBaseService;
|
|||||||
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
import com.github.yulichang.extension.mapping.base.MPJDeepService;
|
||||||
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
import com.github.yulichang.extension.mapping.base.MPJRelationService;
|
||||||
import com.xjrsoft.module.supplier.entity.LngSupplier;
|
import com.xjrsoft.module.supplier.entity.LngSupplier;
|
||||||
|
import com.xjrsoft.module.supplier.vo.LngSupplierVo;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -16,21 +18,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public interface ISupplierService extends MPJBaseService<LngSupplier>, MPJDeepService<LngSupplier>, MPJRelationService<LngSupplier> {
|
public interface ISupplierService extends MPJBaseService<LngSupplier>, MPJDeepService<LngSupplier>, MPJRelationService<LngSupplier> {
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*
|
|
||||||
* @param lngSupplier
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Boolean add(LngSupplier lngSupplier);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新
|
|
||||||
*
|
|
||||||
* @param lngSupplier
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Boolean update(LngSupplier lngSupplier);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除
|
* 删除
|
||||||
@ -39,4 +27,6 @@ public interface ISupplierService extends MPJBaseService<LngSupplier>, MPJDeepSe
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Boolean delete(List<Long> ids);
|
Boolean delete(List<Long> ids);
|
||||||
|
|
||||||
|
LngSupplierVo getSupplierById(Long id);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,88 @@
|
|||||||
|
package com.xjrsoft.module.supplier.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||||
|
import com.xjrsoft.module.supplier.entity.LngScoreDtl;
|
||||||
|
import com.xjrsoft.module.supplier.mapper.LngSupplierScoreDtlMapper;
|
||||||
|
import com.xjrsoft.module.supplier.entity.LngScore;
|
||||||
|
import com.xjrsoft.module.supplier.mapper.LngSupplierScoreMapper;
|
||||||
|
import com.xjrsoft.module.supplier.service.IScoreSupplierService;
|
||||||
|
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;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title: service
|
||||||
|
* @Author 管理员
|
||||||
|
* @Date: 2025-12-17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ScoreSupplierServiceImpl extends MPJBaseServiceImpl<LngSupplierScoreMapper, LngScore> implements IScoreSupplierService {
|
||||||
|
private final LngSupplierScoreMapper scoreSupplierLngScoreMapper;
|
||||||
|
|
||||||
|
private final LngSupplierScoreDtlMapper scoreSupplierLngScoreDtlMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean add(LngScore lngScore) {
|
||||||
|
scoreSupplierLngScoreMapper.insert(lngScore);
|
||||||
|
for (LngScoreDtl lngScoreDtl : lngScore.getLngScoreDtlList()) {
|
||||||
|
lngScoreDtl.setSId(lngScore.getId());
|
||||||
|
scoreSupplierLngScoreDtlMapper.insert(lngScoreDtl);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean update(LngScore lngScore) {
|
||||||
|
scoreSupplierLngScoreMapper.updateById(lngScore);
|
||||||
|
//********************************* LngScoreDtl 增删改 开始 *******************************************/
|
||||||
|
{
|
||||||
|
// 查出所有子级的id
|
||||||
|
List<LngScoreDtl> lngScoreDtlList = scoreSupplierLngScoreDtlMapper.selectList(Wrappers.lambdaQuery(LngScoreDtl.class).eq(LngScoreDtl::getSId, lngScore.getId()).select(LngScoreDtl::getId));
|
||||||
|
List<Long> lngScoreDtlIds = lngScoreDtlList.stream().map(LngScoreDtl::getId).collect(Collectors.toList());
|
||||||
|
//原有子表单 没有被删除的主键
|
||||||
|
List<Long> lngScoreDtlOldIds = lngScore.getLngScoreDtlList().stream().map(LngScoreDtl::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
||||||
|
//找到需要删除的id
|
||||||
|
List<Long> lngScoreDtlRemoveIds = lngScoreDtlIds.stream().filter(item -> !lngScoreDtlOldIds.contains(item)).collect(Collectors.toList());
|
||||||
|
|
||||||
|
for (LngScoreDtl lngScoreDtl : lngScore.getLngScoreDtlList()) {
|
||||||
|
//如果不等于空则修改
|
||||||
|
if (lngScoreDtl.getId() != null) {
|
||||||
|
scoreSupplierLngScoreDtlMapper.updateById(lngScoreDtl);
|
||||||
|
}
|
||||||
|
//如果等于空 则新增
|
||||||
|
else {
|
||||||
|
//已经不存在的id 删除
|
||||||
|
lngScoreDtl.setSId(lngScore.getId());
|
||||||
|
scoreSupplierLngScoreDtlMapper.insert(lngScoreDtl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//已经不存在的id 删除
|
||||||
|
if(lngScoreDtlRemoveIds.size() > 0){
|
||||||
|
scoreSupplierLngScoreDtlMapper.deleteBatchIds(lngScoreDtlRemoveIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//********************************* LngScoreDtl 增删改 结束 *******************************************/
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean delete(List<Long> ids) {
|
||||||
|
scoreSupplierLngScoreMapper.deleteBatchIds(ids);
|
||||||
|
scoreSupplierLngScoreDtlMapper.delete(Wrappers.lambdaQuery(LngScoreDtl.class).in(LngScoreDtl::getSId, ids));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,23 +1,29 @@
|
|||||||
package com.xjrsoft.module.supplier.service.impl;
|
package com.xjrsoft.module.supplier.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import java.util.List;
|
||||||
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
||||||
import com.xjrsoft.module.supplier.entity.LngSupplierBank;
|
|
||||||
import com.xjrsoft.module.supplier.mapper.LngSupplierBankMapper;
|
|
||||||
import com.xjrsoft.module.supplier.entity.LngSupplierContact;
|
|
||||||
import com.xjrsoft.module.supplier.mapper.LngSupplierContactMapper;
|
|
||||||
import com.xjrsoft.module.supplier.entity.LngSupplierDoc;
|
|
||||||
import com.xjrsoft.module.supplier.mapper.LngSupplierDocMapper;
|
|
||||||
import com.xjrsoft.module.supplier.entity.LngSupplier;
|
|
||||||
import com.xjrsoft.module.supplier.mapper.LngSupplierMapper;
|
|
||||||
import com.xjrsoft.module.supplier.service.ISupplierService;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
||||||
|
import com.xjrsoft.module.supplier.entity.LngSupplier;
|
||||||
|
import com.xjrsoft.module.supplier.entity.LngSupplierBank;
|
||||||
|
import com.xjrsoft.module.supplier.entity.LngSupplierContact;
|
||||||
|
import com.xjrsoft.module.supplier.entity.LngSupplierDoc;
|
||||||
|
import com.xjrsoft.module.supplier.mapper.LngSupplierBankMapper;
|
||||||
|
import com.xjrsoft.module.supplier.mapper.LngSupplierContactMapper;
|
||||||
|
import com.xjrsoft.module.supplier.mapper.LngSupplierDocMapper;
|
||||||
|
import com.xjrsoft.module.supplier.mapper.LngSupplierMapper;
|
||||||
|
import com.xjrsoft.module.supplier.service.ISupplierService;
|
||||||
|
import com.xjrsoft.module.supplier.vo.LngSupplierDocVo;
|
||||||
|
import com.xjrsoft.module.supplier.vo.LngSupplierVo;
|
||||||
|
import com.xjrsoft.module.system.client.IFileClient;
|
||||||
|
import com.xjrsoft.module.system.vo.LngFileUploadVo;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title: service
|
* @title: service
|
||||||
@ -34,120 +40,7 @@ public class SupplierServiceImpl extends MPJBaseServiceImpl<LngSupplierMapper, L
|
|||||||
private final LngSupplierContactMapper supplierLngSupplierContactMapper;
|
private final LngSupplierContactMapper supplierLngSupplierContactMapper;
|
||||||
private final LngSupplierDocMapper supplierLngSupplierDocMapper;
|
private final LngSupplierDocMapper supplierLngSupplierDocMapper;
|
||||||
|
|
||||||
|
private final IFileClient fileClient;
|
||||||
@Override
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public Boolean add(LngSupplier lngSupplier) {
|
|
||||||
supplierLngSupplierMapper.insert(lngSupplier);
|
|
||||||
for (LngSupplierBank lngSupplierBank : lngSupplier.getLngSupplierBankList()) {
|
|
||||||
lngSupplierBank.setSuCode(lngSupplier.getSuCode());
|
|
||||||
supplierLngSupplierBankMapper.insert(lngSupplierBank);
|
|
||||||
}
|
|
||||||
for (LngSupplierContact lngSupplierContact : lngSupplier.getLngSupplierContactList()) {
|
|
||||||
lngSupplierContact.setSuCode(lngSupplier.getSuCode());
|
|
||||||
supplierLngSupplierContactMapper.insert(lngSupplierContact);
|
|
||||||
}
|
|
||||||
for (LngSupplierDoc lngSupplierDoc : lngSupplier.getLngSupplierDocList()) {
|
|
||||||
lngSupplierDoc.setSuCode(lngSupplier.getSuCode());
|
|
||||||
supplierLngSupplierDocMapper.insert(lngSupplierDoc);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public Boolean update(LngSupplier lngSupplier) {
|
|
||||||
supplierLngSupplierMapper.updateById(lngSupplier);
|
|
||||||
//********************************* LngSupplierBank 增删改 开始 *******************************************/
|
|
||||||
{
|
|
||||||
// 查出所有子级的id
|
|
||||||
List<LngSupplierBank> lngSupplierBankList = supplierLngSupplierBankMapper.selectList(Wrappers.lambdaQuery(LngSupplierBank.class).eq(LngSupplierBank::getSuCode, lngSupplier.getSuCode()).select(LngSupplierBank::getId));
|
|
||||||
List<Long> lngSupplierBankIds = lngSupplierBankList.stream().map(LngSupplierBank::getId).collect(Collectors.toList());
|
|
||||||
//原有子表单 没有被删除的主键
|
|
||||||
List<Long> lngSupplierBankOldIds = lngSupplier.getLngSupplierBankList().stream().map(LngSupplierBank::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
||||||
//找到需要删除的id
|
|
||||||
List<Long> lngSupplierBankRemoveIds = lngSupplierBankIds.stream().filter(item -> !lngSupplierBankOldIds.contains(item)).collect(Collectors.toList());
|
|
||||||
|
|
||||||
for (LngSupplierBank lngSupplierBank : lngSupplier.getLngSupplierBankList()) {
|
|
||||||
//如果不等于空则修改
|
|
||||||
if (lngSupplierBank.getId() != null) {
|
|
||||||
supplierLngSupplierBankMapper.updateById(lngSupplierBank);
|
|
||||||
}
|
|
||||||
//如果等于空 则新增
|
|
||||||
else {
|
|
||||||
//已经不存在的id 删除
|
|
||||||
lngSupplierBank.setSuCode(lngSupplier.getSuCode());
|
|
||||||
supplierLngSupplierBankMapper.insert(lngSupplierBank);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//已经不存在的id 删除
|
|
||||||
if(lngSupplierBankRemoveIds.size() > 0){
|
|
||||||
supplierLngSupplierBankMapper.deleteBatchIds(lngSupplierBankRemoveIds);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//********************************* LngSupplierBank 增删改 结束 *******************************************/
|
|
||||||
|
|
||||||
//********************************* LngSupplierContact 增删改 开始 *******************************************/
|
|
||||||
{
|
|
||||||
// 查出所有子级的id
|
|
||||||
List<LngSupplierContact> lngSupplierContactList = supplierLngSupplierContactMapper.selectList(Wrappers.lambdaQuery(LngSupplierContact.class).eq(LngSupplierContact::getSuCode, lngSupplier.getSuCode()).select(LngSupplierContact::getId));
|
|
||||||
List<Long> lngSupplierContactIds = lngSupplierContactList.stream().map(LngSupplierContact::getId).collect(Collectors.toList());
|
|
||||||
//原有子表单 没有被删除的主键
|
|
||||||
List<Long> lngSupplierContactOldIds = lngSupplier.getLngSupplierContactList().stream().map(LngSupplierContact::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
||||||
//找到需要删除的id
|
|
||||||
List<Long> lngSupplierContactRemoveIds = lngSupplierContactIds.stream().filter(item -> !lngSupplierContactOldIds.contains(item)).collect(Collectors.toList());
|
|
||||||
|
|
||||||
for (LngSupplierContact lngSupplierContact : lngSupplier.getLngSupplierContactList()) {
|
|
||||||
//如果不等于空则修改
|
|
||||||
if (lngSupplierContact.getId() != null) {
|
|
||||||
supplierLngSupplierContactMapper.updateById(lngSupplierContact);
|
|
||||||
}
|
|
||||||
//如果等于空 则新增
|
|
||||||
else {
|
|
||||||
//已经不存在的id 删除
|
|
||||||
lngSupplierContact.setSuCode(lngSupplier.getSuCode());
|
|
||||||
supplierLngSupplierContactMapper.insert(lngSupplierContact);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//已经不存在的id 删除
|
|
||||||
if(lngSupplierContactRemoveIds.size() > 0){
|
|
||||||
supplierLngSupplierContactMapper.deleteBatchIds(lngSupplierContactRemoveIds);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//********************************* LngSupplierContact 增删改 结束 *******************************************/
|
|
||||||
|
|
||||||
//********************************* LngSupplierDoc 增删改 开始 *******************************************/
|
|
||||||
{
|
|
||||||
// 查出所有子级的id
|
|
||||||
List<LngSupplierDoc> lngSupplierDocList = supplierLngSupplierDocMapper.selectList(Wrappers.lambdaQuery(LngSupplierDoc.class).eq(LngSupplierDoc::getSuCode, lngSupplier.getSuCode()).select(LngSupplierDoc::getId));
|
|
||||||
List<Long> lngSupplierDocIds = lngSupplierDocList.stream().map(LngSupplierDoc::getId).collect(Collectors.toList());
|
|
||||||
//原有子表单 没有被删除的主键
|
|
||||||
List<Long> lngSupplierDocOldIds = lngSupplier.getLngSupplierDocList().stream().map(LngSupplierDoc::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
||||||
//找到需要删除的id
|
|
||||||
List<Long> lngSupplierDocRemoveIds = lngSupplierDocIds.stream().filter(item -> !lngSupplierDocOldIds.contains(item)).collect(Collectors.toList());
|
|
||||||
|
|
||||||
for (LngSupplierDoc lngSupplierDoc : lngSupplier.getLngSupplierDocList()) {
|
|
||||||
//如果不等于空则修改
|
|
||||||
if (lngSupplierDoc.getId() != null) {
|
|
||||||
supplierLngSupplierDocMapper.updateById(lngSupplierDoc);
|
|
||||||
}
|
|
||||||
//如果等于空 则新增
|
|
||||||
else {
|
|
||||||
//已经不存在的id 删除
|
|
||||||
lngSupplierDoc.setSuCode(lngSupplier.getSuCode());
|
|
||||||
supplierLngSupplierDocMapper.insert(lngSupplierDoc);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//已经不存在的id 删除
|
|
||||||
if(lngSupplierDocRemoveIds.size() > 0){
|
|
||||||
supplierLngSupplierDocMapper.deleteBatchIds(lngSupplierDocRemoveIds);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//********************************* LngSupplierDoc 增删改 结束 *******************************************/
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@ -159,4 +52,24 @@ public class SupplierServiceImpl extends MPJBaseServiceImpl<LngSupplierMapper, L
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LngSupplierVo getSupplierById(Long id) {
|
||||||
|
LngSupplier lngSupplier = this.getByIdDeep(id);
|
||||||
|
if(lngSupplier == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
LngSupplierVo vo = BeanUtil.toBean(lngSupplier, LngSupplierVo.class);
|
||||||
|
if(CollectionUtil.isNotEmpty(vo.getLngSupplierDocList())) {
|
||||||
|
for(LngSupplierDocVo lngSupplierDoc: vo.getLngSupplierDocList()) {
|
||||||
|
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_Supplier_doc", "fileList", lngSupplierDoc.getId());
|
||||||
|
lngSupplierDoc.setFileList(fileList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<LngFileUploadVo> fileList = fileClient.getTableFiles("lng_Supplier", "lngFileUploadList", vo.getId());
|
||||||
|
vo.setLngFileUploadList(fileList);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user