|
|
|
@ -168,16 +168,16 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
|
|
|
|
|
} |
|
|
|
|
//对比两个客户信息进行比对
|
|
|
|
|
boolean flag = contrastOldClientAndNewClient(oldClientEntity, basicdataClient); |
|
|
|
|
if (!flag){ |
|
|
|
|
if (!flag) { |
|
|
|
|
log.info(">>>>>>>>>>>>>>>>>>>>>>>记录客户修改日志操作失败"); |
|
|
|
|
} |
|
|
|
|
if (Objects.isNull(basicdataClient.getBladeRegionProvinceId())){ |
|
|
|
|
if (Objects.isNull(basicdataClient.getBladeRegionProvinceId())) { |
|
|
|
|
basicdataClient.setBladeRegionProvinceId(""); |
|
|
|
|
} |
|
|
|
|
if (Objects.isNull(basicdataClient.getBladeRegionAreaId())){ |
|
|
|
|
if (Objects.isNull(basicdataClient.getBladeRegionAreaId())) { |
|
|
|
|
basicdataClient.setBladeRegionAreaId(""); |
|
|
|
|
} |
|
|
|
|
if (Objects.isNull(basicdataClient.getBladeRegionCityId())){ |
|
|
|
|
if (Objects.isNull(basicdataClient.getBladeRegionCityId())) { |
|
|
|
|
basicdataClient.setBladeRegionCityId(""); |
|
|
|
|
} |
|
|
|
|
//修改
|
|
|
|
@ -324,13 +324,13 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
|
|
|
|
|
StringBuilder content = new StringBuilder(); |
|
|
|
|
Predicate<String> predicateClientName = Predicate.isEqual(oldClientEntity.getClientName()); |
|
|
|
|
boolean clientName = predicateClientName.test(newClientEntity.getClientName()); |
|
|
|
|
if (!clientName){ |
|
|
|
|
if (!clientName) { |
|
|
|
|
//客户名称
|
|
|
|
|
content.append("客户名称由[").append(oldClientEntity.getClientName()).append("]变更为-->[").append(newClientEntity.getClientName()).append("],"); |
|
|
|
|
} |
|
|
|
|
Predicate<String> predicateClientType = Predicate.isEqual(oldClientEntity.getClientType()); |
|
|
|
|
boolean clientType = predicateClientType.test(newClientEntity.getClientType()); |
|
|
|
|
if (!clientType){ |
|
|
|
|
if (!clientType) { |
|
|
|
|
//类型
|
|
|
|
|
String oldClientTypeValue = DictBizCache.getValue(DictBizConstant.CLIENT_TYPE, oldClientEntity.getClientType()); |
|
|
|
|
String newClientTypeValue = DictBizCache.getValue(DictBizConstant.CLIENT_TYPE, newClientEntity.getClientType()); |
|
|
|
@ -338,21 +338,21 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
|
|
|
|
|
} |
|
|
|
|
Predicate<String> predicateDetailedly = Predicate.isEqual(oldClientEntity.getDetailedly()); |
|
|
|
|
boolean detailedly = predicateDetailedly.test(newClientEntity.getDetailedly()); |
|
|
|
|
if (!detailedly){ |
|
|
|
|
if (!detailedly) { |
|
|
|
|
//详细地址
|
|
|
|
|
content.append("详细地址由[").append(oldClientEntity.getDetailedly()).append("]变更为-->[").append(newClientEntity.getDetailedly()).append("],"); |
|
|
|
|
} |
|
|
|
|
Predicate<Integer> predicateTypeService = Predicate.isEqual(oldClientEntity.getTypeService()); |
|
|
|
|
boolean typeService = predicateTypeService.test(newClientEntity.getTypeService()); |
|
|
|
|
if (!typeService){ |
|
|
|
|
if (!typeService) { |
|
|
|
|
//配送类型
|
|
|
|
|
String oldDeliveryType = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, oldClientEntity.getTypeService()); |
|
|
|
|
String oldDeliveryType = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, oldClientEntity.getTypeService()); |
|
|
|
|
String newDeliveryType = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, newClientEntity.getTypeService()); |
|
|
|
|
content.append("配送类型由[").append(oldDeliveryType).append("]变更为-->[").append(newDeliveryType).append("],"); |
|
|
|
|
} |
|
|
|
|
Predicate<String> predicateDefaultPaymentMethods = Predicate.isEqual(oldClientEntity.getDefaultPaymentMethods()); |
|
|
|
|
boolean defaultPaymentMethods = predicateDefaultPaymentMethods.test(newClientEntity.getDefaultPaymentMethods()); |
|
|
|
|
if (!defaultPaymentMethods){ |
|
|
|
|
if (!defaultPaymentMethods) { |
|
|
|
|
//结算方式
|
|
|
|
|
String oldDefaultPaymentMethodsValue = DictBizCache.getValue(DictBizConstant.MAINLINE_WAYBILL_PAYMENTMETHOD, oldClientEntity.getDefaultPaymentMethods()); |
|
|
|
|
String newDefaultPaymentMethodsValue = DictBizCache.getValue(DictBizConstant.MAINLINE_WAYBILL_PAYMENTMETHOD, newClientEntity.getDefaultPaymentMethods()); |
|
|
|
@ -361,7 +361,7 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
|
|
|
|
|
|
|
|
|
|
String oldAddress = handleClientCityCode(oldClientEntity); |
|
|
|
|
String newAddress = handleClientCityCode(newClientEntity); |
|
|
|
|
if (!oldAddress.equals(newAddress)){ |
|
|
|
|
if (!oldAddress.equals(newAddress)) { |
|
|
|
|
//地址变更
|
|
|
|
|
content.append("地址由[").append(oldAddress).append("]变更为-->[").append(newAddress).append("],"); |
|
|
|
|
} |
|
|
|
@ -398,7 +398,7 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
|
|
|
|
|
if (!historicalContractEntities.isEmpty()) { |
|
|
|
|
oldFileName = historicalContractEntities.get(0).getFileName(); |
|
|
|
|
} |
|
|
|
|
if (!newClientEntity.getFileName().equals(oldFileName)){ |
|
|
|
|
if (!newClientEntity.getFileName().equals(oldFileName)) { |
|
|
|
|
content.append("合同附件由[").append(oldFileName).append("]变更为-->[").append(newClientEntity.getFileName()).append("],"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -406,13 +406,13 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
|
|
|
|
|
//对于合同开始时间比对
|
|
|
|
|
Predicate<Date> predicateContractStartTime = Predicate.isEqual(oldClientEntity.getContractStartTime()); |
|
|
|
|
boolean contractStartTime = predicateContractStartTime.test(newClientEntity.getContractStartTime()); |
|
|
|
|
if (!contractStartTime){ |
|
|
|
|
if (!contractStartTime) { |
|
|
|
|
content.append("合同开始时间由[").append(sdf.format(oldClientEntity.getContractStartTime())).append("]变更为-->[").append(sdf.format(oldClientEntity.getContractStartTime())).append("],"); |
|
|
|
|
} |
|
|
|
|
//对于合同结束时间比对
|
|
|
|
|
Predicate<Date> predicateContractEntTime = Predicate.isEqual(oldClientEntity.getContractEntTime()); |
|
|
|
|
boolean contractEndTime = predicateContractEntTime.test(newClientEntity.getContractEntTime()); |
|
|
|
|
if (!contractEndTime){ |
|
|
|
|
if (!contractEndTime) { |
|
|
|
|
content.append("合同开始时间由[").append(sdf.format(oldClientEntity.getContractEntTime())).append("]变更为-->[").append(sdf.format(newClientEntity.getContractEntTime())).append("],"); |
|
|
|
|
} |
|
|
|
|
BasicdataClientLogEntity basicdataClientLogEntity = new BasicdataClientLogEntity(); |
|
|
|
@ -825,7 +825,8 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
|
|
|
|
|
for (ClientInfoVO clientInfoVO : ls) { |
|
|
|
|
Long clientId = clientInfoVO.getClientId(); |
|
|
|
|
List<BasicdataStoreBrandEntity> storeBrandEntityList = collect.get(clientId); |
|
|
|
|
if(storeBrandEntityList.size() == 1){ |
|
|
|
|
|
|
|
|
|
if (storeBrandEntityList != null && storeBrandEntityList.size() == 1) { |
|
|
|
|
clientInfoVO.setBrandId(storeBrandEntityList.get(0).getBrandId()); |
|
|
|
|
} |
|
|
|
|
list.add(JSON.parseObject(JSON.toJSONString(clientInfoVO))); |
|
|
|
@ -932,23 +933,23 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
|
|
|
|
|
return R.success("校验成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private String handleClientCityCode(BasicdataClientEntity clientEntity){ |
|
|
|
|
private String handleClientCityCode(BasicdataClientEntity clientEntity) { |
|
|
|
|
StringBuilder oldAddress = new StringBuilder(); |
|
|
|
|
if (!Objects.isNull(clientEntity.getBladeRegionProvinceId())){ |
|
|
|
|
if (!Objects.isNull(clientEntity.getBladeRegionProvinceId())) { |
|
|
|
|
String provinceName = regionFeign.getName(clientEntity.getBladeRegionProvinceId()); |
|
|
|
|
if (Func.isNotEmpty(provinceName)){ |
|
|
|
|
if (Func.isNotEmpty(provinceName)) { |
|
|
|
|
oldAddress.append(provinceName); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (!Objects.isNull(clientEntity.getBladeRegionCityId())){ |
|
|
|
|
if (!Objects.isNull(clientEntity.getBladeRegionCityId())) { |
|
|
|
|
String cityName = regionFeign.getName(clientEntity.getBladeRegionCityId()); |
|
|
|
|
if (Func.isNotEmpty(cityName)){ |
|
|
|
|
if (Func.isNotEmpty(cityName)) { |
|
|
|
|
oldAddress.append(cityName); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (!Objects.isNull(clientEntity.getBladeRegionAreaId())){ |
|
|
|
|
if (!Objects.isNull(clientEntity.getBladeRegionAreaId())) { |
|
|
|
|
String areaName = regionFeign.getName(clientEntity.getBladeRegionAreaId()); |
|
|
|
|
if (Func.isNotEmpty(areaName)){ |
|
|
|
|
if (Func.isNotEmpty(areaName)) { |
|
|
|
|
oldAddress.append(areaName); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -956,6 +957,4 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|