Showing
12 changed files
with
109 additions
and
5 deletions
| @@ -53,6 +53,18 @@ public class GetCustomerCreditBo extends BaseBo<CustomerCredit> implements BaseD | @@ -53,6 +53,18 @@ public class GetCustomerCreditBo extends BaseBo<CustomerCredit> implements BaseD | ||
| 53 | private String regionName; | 53 | private String regionName; |
| 54 | 54 | ||
| 55 | /** | 55 | /** |
| 56 | + * 办事处 | ||
| 57 | + */ | ||
| 58 | + @ApiModelProperty("办事处") | ||
| 59 | + private String deptId; | ||
| 60 | + | ||
| 61 | + /** | ||
| 62 | + * 办事处名称 | ||
| 63 | + */ | ||
| 64 | + @ApiModelProperty("办事处名称") | ||
| 65 | + private String deptName; | ||
| 66 | + | ||
| 67 | + /** | ||
| 56 | * 登记日期 | 68 | * 登记日期 |
| 57 | */ | 69 | */ |
| 58 | @ApiModelProperty("登记日期") | 70 | @ApiModelProperty("登记日期") |
| @@ -58,6 +58,12 @@ public class GetCustomerCreditHistoryBo extends BaseBo<CustomerCreditHistory> { | @@ -58,6 +58,12 @@ public class GetCustomerCreditHistoryBo extends BaseBo<CustomerCreditHistory> { | ||
| 58 | private String region; | 58 | private String region; |
| 59 | 59 | ||
| 60 | /** | 60 | /** |
| 61 | + * 办事处 | ||
| 62 | + */ | ||
| 63 | + @ApiModelProperty("办事处") | ||
| 64 | + private String deptId; | ||
| 65 | + | ||
| 66 | + /** | ||
| 61 | * 登记日期 | 67 | * 登记日期 |
| 62 | */ | 68 | */ |
| 63 | @ApiModelProperty("登记日期") | 69 | @ApiModelProperty("登记日期") |
| @@ -48,6 +48,17 @@ public class CustomerCredit extends BaseEntity implements BaseDto { | @@ -48,6 +48,17 @@ public class CustomerCredit extends BaseEntity implements BaseDto { | ||
| 48 | private String regionName; | 48 | private String regionName; |
| 49 | 49 | ||
| 50 | /** | 50 | /** |
| 51 | + * 办事处 | ||
| 52 | + */ | ||
| 53 | + private String deptId; | ||
| 54 | + | ||
| 55 | + /** | ||
| 56 | + * 办事处名称 | ||
| 57 | + */ | ||
| 58 | + @TableField(exist = false) | ||
| 59 | + private String deptName; | ||
| 60 | + | ||
| 61 | + /** | ||
| 51 | * 登记日期 | 62 | * 登记日期 |
| 52 | */ | 63 | */ |
| 53 | private LocalDate registerDate; | 64 | private LocalDate registerDate; |
| @@ -53,6 +53,12 @@ public class CustomerCreditHistory extends BaseEntity implements BaseDto { | @@ -53,6 +53,12 @@ public class CustomerCreditHistory extends BaseEntity implements BaseDto { | ||
| 53 | private String region; | 53 | private String region; |
| 54 | 54 | ||
| 55 | /** | 55 | /** |
| 56 | + * 办事处 | ||
| 57 | + */ | ||
| 58 | + @Label("办事处") | ||
| 59 | + private String deptId; | ||
| 60 | + | ||
| 61 | + /** | ||
| 56 | * 登记日期 | 62 | * 登记日期 |
| 57 | */ | 63 | */ |
| 58 | @Label("登记日期") | 64 | @Label("登记日期") |
| @@ -104,6 +104,9 @@ public class CustomerCreditHistoryServiceImpl extends BaseMpServiceImpl<Customer | @@ -104,6 +104,9 @@ public class CustomerCreditHistoryServiceImpl extends BaseMpServiceImpl<Customer | ||
| 104 | if (!StringUtil.isBlank(vo.getRegion())) { | 104 | if (!StringUtil.isBlank(vo.getRegion())) { |
| 105 | data.setRegion(vo.getRegion()); | 105 | data.setRegion(vo.getRegion()); |
| 106 | } | 106 | } |
| 107 | + if (!StringUtil.isBlank(vo.getDeptId())) { | ||
| 108 | + data.setDeptId(vo.getDeptId()); | ||
| 109 | + } | ||
| 107 | if (vo.getRegisterDate() != null) { | 110 | if (vo.getRegisterDate() != null) { |
| 108 | data.setRegisterDate(vo.getRegisterDate()); | 111 | data.setRegisterDate(vo.getRegisterDate()); |
| 109 | } | 112 | } |
| @@ -327,6 +330,17 @@ public class CustomerCreditHistoryServiceImpl extends BaseMpServiceImpl<Customer | @@ -327,6 +330,17 @@ public class CustomerCreditHistoryServiceImpl extends BaseMpServiceImpl<Customer | ||
| 327 | value2 = dept == null ? "" : dept.getName(); | 330 | value2 = dept == null ? "" : dept.getName(); |
| 328 | } | 331 | } |
| 329 | } | 332 | } |
| 333 | + //办事处 | ||
| 334 | + if ("deptId".equals(fieldName)) { | ||
| 335 | + if (StringUtil.isNotEmpty(data.getDeptId())) { | ||
| 336 | + SysDept dept = sysDeptService.findById(data.getDeptId()); | ||
| 337 | + value1 = dept == null ? "" : dept.getName(); | ||
| 338 | + } | ||
| 339 | + if (StringUtil.isNotEmpty(customerCreditHistory.getDeptId())) { | ||
| 340 | + SysDept dept = sysDeptService.findById(customerCreditHistory.getDeptId()); | ||
| 341 | + value2 = dept == null ? "" : dept.getName(); | ||
| 342 | + } | ||
| 343 | + } | ||
| 330 | //企业类型 | 344 | //企业类型 |
| 331 | if ("enterpriseType".equals(fieldName)) { | 345 | if ("enterpriseType".equals(fieldName)) { |
| 332 | if (StringUtil.isNotEmpty(data.getEnterpriseType())) { | 346 | if (StringUtil.isNotEmpty(data.getEnterpriseType())) { |
| @@ -473,6 +487,9 @@ public class CustomerCreditHistoryServiceImpl extends BaseMpServiceImpl<Customer | @@ -473,6 +487,9 @@ public class CustomerCreditHistoryServiceImpl extends BaseMpServiceImpl<Customer | ||
| 473 | if (!StringUtil.isBlank(customerCredit.getRegion())) { | 487 | if (!StringUtil.isBlank(customerCredit.getRegion())) { |
| 474 | customerCreditHistory.setRegion(customerCredit.getRegion()); | 488 | customerCreditHistory.setRegion(customerCredit.getRegion()); |
| 475 | } | 489 | } |
| 490 | + if (!StringUtil.isBlank(customerCredit.getDeptId())) { | ||
| 491 | + customerCreditHistory.setDeptId(customerCredit.getDeptId()); | ||
| 492 | + } | ||
| 476 | if (customerCredit.getRegisterDate() != null) { | 493 | if (customerCredit.getRegisterDate() != null) { |
| 477 | customerCreditHistory.setRegisterDate(customerCredit.getRegisterDate()); | 494 | customerCreditHistory.setRegisterDate(customerCredit.getRegisterDate()); |
| 478 | } | 495 | } |
| @@ -154,6 +154,9 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM | @@ -154,6 +154,9 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM | ||
| 154 | if (!StringUtil.isBlank(vo.getRegion())) { | 154 | if (!StringUtil.isBlank(vo.getRegion())) { |
| 155 | data.setRegion(vo.getRegion()); | 155 | data.setRegion(vo.getRegion()); |
| 156 | } | 156 | } |
| 157 | + if (!StringUtil.isBlank(vo.getDeptId())) { | ||
| 158 | + data.setDeptId(vo.getDeptId()); | ||
| 159 | + } | ||
| 157 | if (vo.getRegisterDate() != null) { | 160 | if (vo.getRegisterDate() != null) { |
| 158 | data.setRegisterDate(vo.getRegisterDate()); | 161 | data.setRegisterDate(vo.getRegisterDate()); |
| 159 | } | 162 | } |
| @@ -365,6 +368,9 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM | @@ -365,6 +368,9 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM | ||
| 365 | if (!StringUtil.isBlank(data.getRegion())) { | 368 | if (!StringUtil.isBlank(data.getRegion())) { |
| 366 | historyVo.setRegion(data.getRegion()); | 369 | historyVo.setRegion(data.getRegion()); |
| 367 | } | 370 | } |
| 371 | + if (!StringUtil.isBlank(data.getDeptId())) { | ||
| 372 | + historyVo.setDeptId(data.getDeptId()); | ||
| 373 | + } | ||
| 368 | if (data.getRegisterDate() != null) { | 374 | if (data.getRegisterDate() != null) { |
| 369 | historyVo.setRegisterDate(data.getRegisterDate()); | 375 | historyVo.setRegisterDate(data.getRegisterDate()); |
| 370 | } | 376 | } |
| @@ -563,6 +569,9 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM | @@ -563,6 +569,9 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM | ||
| 563 | if (!StringUtil.isBlank(vo.getRegion())) { | 569 | if (!StringUtil.isBlank(vo.getRegion())) { |
| 564 | historyVo1.setRegion(vo.getRegion()); | 570 | historyVo1.setRegion(vo.getRegion()); |
| 565 | } | 571 | } |
| 572 | + if (!StringUtil.isBlank(vo.getDeptId())) { | ||
| 573 | + historyVo1.setDeptId(vo.getDeptId()); | ||
| 574 | + } | ||
| 566 | if (vo.getRegisterDate() != null) { | 575 | if (vo.getRegisterDate() != null) { |
| 567 | historyVo1.setRegisterDate(vo.getRegisterDate()); | 576 | historyVo1.setRegisterDate(vo.getRegisterDate()); |
| 568 | } | 577 | } |
| @@ -772,6 +781,7 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM | @@ -772,6 +781,7 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM | ||
| 772 | //变更审核通过后再修改入库 | 781 | //变更审核通过后再修改入库 |
| 773 | LambdaUpdateWrapper<CustomerCredit> updateWrapper = Wrappers.lambdaUpdate(CustomerCredit.class) | 782 | LambdaUpdateWrapper<CustomerCredit> updateWrapper = Wrappers.lambdaUpdate(CustomerCredit.class) |
| 774 | .set(CustomerCredit::getRegion, StringUtil.isBlank(vo.getRegion()) ? null : vo.getRegion()) | 783 | .set(CustomerCredit::getRegion, StringUtil.isBlank(vo.getRegion()) ? null : vo.getRegion()) |
| 784 | + .set(CustomerCredit::getDeptId, StringUtil.isBlank(vo.getDeptId()) ? null : vo.getDeptId()) | ||
| 775 | .set(CustomerCredit::getRegisterDate, vo.getRegisterDate() == null ? null : vo.getRegisterDate()) | 785 | .set(CustomerCredit::getRegisterDate, vo.getRegisterDate() == null ? null : vo.getRegisterDate()) |
| 776 | .set(CustomerCredit::getCustomerShortName, StringUtil.isBlank(vo.getCustomerShortName()) ? null : vo.getCustomerShortName()) | 786 | .set(CustomerCredit::getCustomerShortName, StringUtil.isBlank(vo.getCustomerShortName()) ? null : vo.getCustomerShortName()) |
| 777 | .set(CustomerCredit::getEnterpriseType, vo.getEnterpriseType()) | 787 | .set(CustomerCredit::getEnterpriseType, vo.getEnterpriseType()) |
| @@ -953,6 +963,7 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM | @@ -953,6 +963,7 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM | ||
| 953 | List<CorePersonnel> corePersonnelList = corePersonnelService.query(queryCorePersonnelVo); | 963 | List<CorePersonnel> corePersonnelList = corePersonnelService.query(queryCorePersonnelVo); |
| 954 | LambdaUpdateWrapper<CustomerCredit> updateWrapper = Wrappers.lambdaUpdate(CustomerCredit.class) | 964 | LambdaUpdateWrapper<CustomerCredit> updateWrapper = Wrappers.lambdaUpdate(CustomerCredit.class) |
| 955 | .set(CustomerCredit::getRegion, StringUtil.isBlank(vo.getRegion()) ? null : vo.getRegion()) | 965 | .set(CustomerCredit::getRegion, StringUtil.isBlank(vo.getRegion()) ? null : vo.getRegion()) |
| 966 | + .set(CustomerCredit::getDeptId, StringUtil.isBlank(vo.getDeptId()) ? null : vo.getDeptId()) | ||
| 956 | .set(CustomerCredit::getRegisterDate, vo.getRegisterDate() == null ? null : vo.getRegisterDate()) | 967 | .set(CustomerCredit::getRegisterDate, vo.getRegisterDate() == null ? null : vo.getRegisterDate()) |
| 957 | .set(CustomerCredit::getCustomerShortName, StringUtil.isBlank(vo.getCustomerShortName()) ? null : vo.getCustomerShortName()) | 968 | .set(CustomerCredit::getCustomerShortName, StringUtil.isBlank(vo.getCustomerShortName()) ? null : vo.getCustomerShortName()) |
| 958 | .set(CustomerCredit::getEnterpriseType, vo.getEnterpriseType()) | 969 | .set(CustomerCredit::getEnterpriseType, vo.getEnterpriseType()) |
| @@ -54,6 +54,13 @@ public class CreateCustomerCreditHistoryVo implements BaseVo, Serializable { | @@ -54,6 +54,13 @@ public class CreateCustomerCreditHistoryVo implements BaseVo, Serializable { | ||
| 54 | private String region; | 54 | private String region; |
| 55 | 55 | ||
| 56 | /** | 56 | /** |
| 57 | + * 办事处 | ||
| 58 | + */ | ||
| 59 | + @ApiModelProperty("办事处") | ||
| 60 | + @Length(message = "办事处最多允许32个字符!") | ||
| 61 | + private String deptId; | ||
| 62 | + | ||
| 63 | + /** | ||
| 57 | * 登记日期 | 64 | * 登记日期 |
| 58 | */ | 65 | */ |
| 59 | @ApiModelProperty("登记日期") | 66 | @ApiModelProperty("登记日期") |
| @@ -32,6 +32,13 @@ public class CreateCustomerCreditVo implements BaseVo, Serializable { | @@ -32,6 +32,13 @@ public class CreateCustomerCreditVo implements BaseVo, Serializable { | ||
| 32 | private String region; | 32 | private String region; |
| 33 | 33 | ||
| 34 | /** | 34 | /** |
| 35 | + * 办事处 | ||
| 36 | + */ | ||
| 37 | + @ApiModelProperty("办事处") | ||
| 38 | + @Length(message = "办事处最多允许32个字符!") | ||
| 39 | + private String deptId; | ||
| 40 | + | ||
| 41 | + /** | ||
| 35 | * 登记日期 | 42 | * 登记日期 |
| 36 | */ | 43 | */ |
| 37 | @ApiModelProperty("登记日期") | 44 | @ApiModelProperty("登记日期") |
| @@ -105,4 +105,16 @@ public class QueryCustomerCreditVo extends PageVo implements BaseVo, Serializabl | @@ -105,4 +105,16 @@ public class QueryCustomerCreditVo extends PageVo implements BaseVo, Serializabl | ||
| 105 | */ | 105 | */ |
| 106 | @ApiModelProperty("公司单位名称") | 106 | @ApiModelProperty("公司单位名称") |
| 107 | private String companyName; | 107 | private String companyName; |
| 108 | + | ||
| 109 | + /** | ||
| 110 | + * 办事处 | ||
| 111 | + */ | ||
| 112 | + @ApiModelProperty("办事处") | ||
| 113 | + private String deptId; | ||
| 114 | + | ||
| 115 | + /** | ||
| 116 | + * 区域 | ||
| 117 | + */ | ||
| 118 | + @ApiModelProperty("区域") | ||
| 119 | + private String region; | ||
| 108 | } | 120 | } |
| 1 | package com.lframework.xingyun.sc.vo.customer.credit; | 1 | package com.lframework.xingyun.sc.vo.customer.credit; |
| 2 | 2 | ||
| 3 | -import com.baomidou.mybatisplus.annotation.FieldFill; | ||
| 4 | import com.baomidou.mybatisplus.annotation.TableField; | 3 | import com.baomidou.mybatisplus.annotation.TableField; |
| 5 | -import com.fasterxml.jackson.annotation.JsonFormat; | ||
| 6 | -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
| 7 | -import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; | ||
| 8 | -import com.lframework.starter.common.constants.StringPool; | ||
| 9 | import lombok.Data; | 4 | import lombok.Data; |
| 10 | import java.math.BigDecimal; | 5 | import java.math.BigDecimal; |
| 11 | import javax.validation.constraints.NotBlank; | 6 | import javax.validation.constraints.NotBlank; |
| @@ -45,6 +40,13 @@ public class UpdateCustomerCreditVo implements BaseVo, Serializable { | @@ -45,6 +40,13 @@ public class UpdateCustomerCreditVo implements BaseVo, Serializable { | ||
| 45 | private String region; | 40 | private String region; |
| 46 | 41 | ||
| 47 | /** | 42 | /** |
| 43 | + * 办事处 | ||
| 44 | + */ | ||
| 45 | + @ApiModelProperty("办事处") | ||
| 46 | + @Length(message = "办事处最多允许32个字符!") | ||
| 47 | + private String deptId; | ||
| 48 | + | ||
| 49 | + /** | ||
| 48 | * 登记日期 | 50 | * 登记日期 |
| 49 | */ | 51 | */ |
| 50 | @ApiModelProperty("登记日期") | 52 | @ApiModelProperty("登记日期") |
| @@ -8,6 +8,7 @@ | @@ -8,6 +8,7 @@ | ||
| 8 | <result column="sort" property="sort"/> | 8 | <result column="sort" property="sort"/> |
| 9 | <result column="serial_number" property="serialNumber"/> | 9 | <result column="serial_number" property="serialNumber"/> |
| 10 | <result column="region" property="region"/> | 10 | <result column="region" property="region"/> |
| 11 | + <result column="dept_id" property="deptId"/> | ||
| 11 | <result column="register_date" property="registerDate"/> | 12 | <result column="register_date" property="registerDate"/> |
| 12 | <result column="customer_short_name" property="customerShortName"/> | 13 | <result column="customer_short_name" property="customerShortName"/> |
| 13 | <result column="enterprise_type" property="enterpriseType"/> | 14 | <result column="enterprise_type" property="enterpriseType"/> |
| @@ -73,6 +74,7 @@ | @@ -73,6 +74,7 @@ | ||
| 73 | tb.sort, | 74 | tb.sort, |
| 74 | tb.serial_number, | 75 | tb.serial_number, |
| 75 | tb.region, | 76 | tb.region, |
| 77 | + tb.dept_id, | ||
| 76 | tb.register_date, | 78 | tb.register_date, |
| 77 | tb.customer_short_name, | 79 | tb.customer_short_name, |
| 78 | tb.enterprise_type, | 80 | tb.enterprise_type, |
| @@ -7,6 +7,8 @@ | @@ -7,6 +7,8 @@ | ||
| 7 | <result column="serial_number" property="serialNumber"/> | 7 | <result column="serial_number" property="serialNumber"/> |
| 8 | <result column="region" property="region"/> | 8 | <result column="region" property="region"/> |
| 9 | <result column="region_name" property="regionName"/> | 9 | <result column="region_name" property="regionName"/> |
| 10 | + <result column="dept_id" property="deptId"/> | ||
| 11 | + <result column="dept_name" property="deptName"/> | ||
| 10 | <result column="register_date" property="registerDate"/> | 12 | <result column="register_date" property="registerDate"/> |
| 11 | <result column="customer_short_name" property="customerShortName"/> | 13 | <result column="customer_short_name" property="customerShortName"/> |
| 12 | <result column="enterprise_type" property="enterpriseType"/> | 14 | <result column="enterprise_type" property="enterpriseType"/> |
| @@ -82,6 +84,8 @@ | @@ -82,6 +84,8 @@ | ||
| 82 | tb.serial_number, | 84 | tb.serial_number, |
| 83 | tb.region, | 85 | tb.region, |
| 84 | d.name as region_name, | 86 | d.name as region_name, |
| 87 | + tb.dept_id, | ||
| 88 | + d1.name as dept_name, | ||
| 85 | tb.register_date, | 89 | tb.register_date, |
| 86 | tb.customer_short_name, | 90 | tb.customer_short_name, |
| 87 | tb.enterprise_type, | 91 | tb.enterprise_type, |
| @@ -152,11 +156,18 @@ | @@ -152,11 +156,18 @@ | ||
| 152 | FROM customer_credit AS tb | 156 | FROM customer_credit AS tb |
| 153 | left join base_data_customer as cu on cu.id = tb.company_id | 157 | left join base_data_customer as cu on cu.id = tb.company_id |
| 154 | left join sys_dept d on tb.region = d.id | 158 | left join sys_dept d on tb.region = d.id |
| 159 | + left join sys_dept d1 on tb.dept_id = d.id | ||
| 155 | </sql> | 160 | </sql> |
| 156 | 161 | ||
| 157 | <select id="query" resultMap="CustomerCredit"> | 162 | <select id="query" resultMap="CustomerCredit"> |
| 158 | <include refid="CustomerCredit_sql"/> | 163 | <include refid="CustomerCredit_sql"/> |
| 159 | <where> | 164 | <where> |
| 165 | + <if test="vo.region != null and vo.region != ''"> | ||
| 166 | + AND tb.region = #{vo.region} | ||
| 167 | + </if> | ||
| 168 | + <if test="vo.deptId != null and vo.deptId != ''"> | ||
| 169 | + AND tb.dept_id = #{vo.deptId} | ||
| 170 | + </if> | ||
| 160 | <if test="vo.registerDateStart != null"> | 171 | <if test="vo.registerDateStart != null"> |
| 161 | AND tb.register_date >= #{vo.registerDateStart} | 172 | AND tb.register_date >= #{vo.registerDateStart} |
| 162 | </if> | 173 | </if> |