设备的发货日期和开始质保日期类型由LocalDate改为String
This commit is contained in:
parent
1edb6ce1c5
commit
f02e04016d
|
|
@ -197,9 +197,14 @@ public class AdminDeviceService {
|
||||||
ent.setProductLine(u.getProductLine__c());
|
ent.setProductLine(u.getProductLine__c());
|
||||||
if (Objects.nonNull(u.getLastCarDevliverDate__c())) {
|
if (Objects.nonNull(u.getLastCarDevliverDate__c())) {
|
||||||
ent.setShipmentDate(DateTimeUtil.asSystemDateTime(u.getLastCarDevliverDate__c()).format(DateTimeFormatter.ISO_LOCAL_DATE));
|
ent.setShipmentDate(DateTimeUtil.asSystemDateTime(u.getLastCarDevliverDate__c()).format(DateTimeFormatter.ISO_LOCAL_DATE));
|
||||||
|
} else {
|
||||||
|
ent.setShipmentDate(null);
|
||||||
}
|
}
|
||||||
ent.setWarrantyMonth(u.getWarrantyPeriod1__c());
|
ent.setWarrantyMonth(u.getWarrantyPeriod1__c());
|
||||||
if (Objects.nonNull(u.getWarrantyStartDate__c())) {
|
if (Objects.nonNull(u.getWarrantyStartDate__c())) {
|
||||||
|
if (Objects.isNull(ent.getWarrantyMonth())){
|
||||||
|
ent.setWarrantyMonth(0);
|
||||||
|
}
|
||||||
LocalDateTime warrantyStartDate=DateTimeUtil.asSystemDateTime(u.getWarrantyStartDate__c());
|
LocalDateTime warrantyStartDate=DateTimeUtil.asSystemDateTime(u.getWarrantyStartDate__c());
|
||||||
ent.setStartWarrantyDate(warrantyStartDate.format(DateTimeFormatter.ISO_LOCAL_DATE));
|
ent.setStartWarrantyDate(warrantyStartDate.format(DateTimeFormatter.ISO_LOCAL_DATE));
|
||||||
LocalDateTime now=LocalDateTime.now();
|
LocalDateTime now=LocalDateTime.now();
|
||||||
|
|
@ -210,6 +215,9 @@ public class AdminDeviceService {
|
||||||
}else {
|
}else {
|
||||||
ent.setWarrantyState(warrantyStates.stream().filter(s -> StrUtil.equals(s.getCode(), "WithinWarranty")).findFirst().get().getId());
|
ent.setWarrantyState(warrantyStates.stream().filter(s -> StrUtil.equals(s.getCode(), "WithinWarranty")).findFirst().get().getId());
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
ent.setStartWarrantyDate(null);
|
||||||
|
ent.setWarrantyState(null);
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(u.getAgent__r())) {
|
if (Objects.nonNull(u.getAgent__r())) {
|
||||||
TBaseCustomer customer = agents.stream()
|
TBaseCustomer customer = agents.stream()
|
||||||
|
|
|
||||||
|
|
@ -166,6 +166,7 @@ public class AdminDeviceService {
|
||||||
} else if (StrUtil.isBlank(u.getProductLine5__c())) {
|
} else if (StrUtil.isBlank(u.getProductLine5__c())) {
|
||||||
log.error("设备机型为空,{}", JSONUtil.toJsonStr(u));
|
log.error("设备机型为空,{}", JSONUtil.toJsonStr(u));
|
||||||
} else {
|
} else {
|
||||||
|
log.debug("处理设备:"+u.getMachine_Number__c());
|
||||||
if (StrUtil.isNotBlank(u.getMachine_Number__c())) {
|
if (StrUtil.isNotBlank(u.getMachine_Number__c())) {
|
||||||
GongfuDevice ent = deviceMap.get(u.getId());
|
GongfuDevice ent = deviceMap.get(u.getId());
|
||||||
if (Objects.nonNull(ent)) {
|
if (Objects.nonNull(ent)) {
|
||||||
|
|
@ -206,9 +207,14 @@ public class AdminDeviceService {
|
||||||
Constant1.PRODUCT_LINE.add(u.getProductLine__c());
|
Constant1.PRODUCT_LINE.add(u.getProductLine__c());
|
||||||
if (Objects.nonNull(u.getLastCarDevliverDate__c())) {
|
if (Objects.nonNull(u.getLastCarDevliverDate__c())) {
|
||||||
ent.setShipmentDate(DateTimeUtil.asSystemDateTime(u.getLastCarDevliverDate__c()).format(DateTimeFormatter.ISO_LOCAL_DATE));
|
ent.setShipmentDate(DateTimeUtil.asSystemDateTime(u.getLastCarDevliverDate__c()).format(DateTimeFormatter.ISO_LOCAL_DATE));
|
||||||
|
} else {
|
||||||
|
ent.setShipmentDate(null);
|
||||||
}
|
}
|
||||||
ent.setWarrantyMonth(u.getWarrantyPeriod1__c());
|
ent.setWarrantyMonth(u.getWarrantyPeriod1__c());
|
||||||
if (Objects.nonNull(u.getWarrantyStartDate__c())) {
|
if (Objects.nonNull(u.getWarrantyStartDate__c())) {
|
||||||
|
if (Objects.isNull(ent.getWarrantyMonth())){
|
||||||
|
ent.setWarrantyMonth(0);
|
||||||
|
}
|
||||||
LocalDateTime warrantyStartDate=DateTimeUtil.asSystemDateTime(u.getWarrantyStartDate__c());
|
LocalDateTime warrantyStartDate=DateTimeUtil.asSystemDateTime(u.getWarrantyStartDate__c());
|
||||||
ent.setStartWarrantyDate(warrantyStartDate.format(DateTimeFormatter.ISO_LOCAL_DATE));
|
ent.setStartWarrantyDate(warrantyStartDate.format(DateTimeFormatter.ISO_LOCAL_DATE));
|
||||||
LocalDateTime now=LocalDateTime.now();
|
LocalDateTime now=LocalDateTime.now();
|
||||||
|
|
@ -219,6 +225,9 @@ public class AdminDeviceService {
|
||||||
}else {
|
}else {
|
||||||
ent.setWarrantyState(warrantyStates.stream().filter(s -> StrUtil.equals(s.getCode(), "WithinWarranty")).findFirst().get().getId());
|
ent.setWarrantyState(warrantyStates.stream().filter(s -> StrUtil.equals(s.getCode(), "WithinWarranty")).findFirst().get().getId());
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
ent.setStartWarrantyDate(null);
|
||||||
|
ent.setWarrantyState(null);
|
||||||
}
|
}
|
||||||
// VUtils.trueThrow(true).throwMessage(STATE.SystemErr,"测试");
|
// VUtils.trueThrow(true).throwMessage(STATE.SystemErr,"测试");
|
||||||
if (Objects.nonNull(u.getAgent__r())) {
|
if (Objects.nonNull(u.getAgent__r())) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.nflg.mobilebroken.repository.entity;
|
package com.nflg.mobilebroken.repository.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
@ -91,16 +93,19 @@ public class Device implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 发货日期
|
* 发货日期
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private String shipmentDate;
|
private String shipmentDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 质保状态-来自字典
|
* 质保状态-来自字典
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private Integer warrantyState;
|
private Integer warrantyState;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开始质保日期
|
* 开始质保日期
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private String startWarrantyDate;
|
private String startWarrantyDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -156,5 +161,6 @@ public class Device implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 设备地址
|
* 设备地址
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private String address;
|
private String address;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
package com.nflg.mobilebroken.repository.entity;
|
package com.nflg.mobilebroken.repository.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
@ -92,16 +90,19 @@ public class GongfuDevice implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 发货日期
|
* 发货日期
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private String shipmentDate;
|
private String shipmentDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 质保状态-来自字典
|
* 质保状态-来自字典
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private Integer warrantyState;
|
private Integer warrantyState;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开始质保日期
|
* 开始质保日期
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private String startWarrantyDate;
|
private String startWarrantyDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -157,5 +158,6 @@ public class GongfuDevice implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 设备地址
|
* 设备地址
|
||||||
*/
|
*/
|
||||||
|
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||||
private String address;
|
private String address;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue