Ver código fonte

ods代码调整

master
huminghao 1 semana atrás
pai
commit
f6559b4027

+ 27
- 12
zhywpt-service-ods/src/main/java/cn/com/taiji/ods/manager/oqs/issue/IssueCommManagerImpl.java Ver arquivo

import cn.com.taiji.core.entity.basic.*; import cn.com.taiji.core.entity.basic.*;
import cn.com.taiji.core.entity.dict.basic.*; import cn.com.taiji.core.entity.dict.basic.*;
import cn.com.taiji.ods.entity.dsi.*; import cn.com.taiji.ods.entity.dsi.*;
import org.springframework.util.StringUtils;


import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
vehicleInfo.setAxisType(dsiVehicleInfo.getAxisType()); vehicleInfo.setAxisType(dsiVehicleInfo.getAxisType());
vehicleInfo.setTestRecord(dsiVehicleInfo.getTestRecord()); vehicleInfo.setTestRecord(dsiVehicleInfo.getTestRecord());
vehicleInfo.setFileNum(dsiVehicleInfo.getFileNum()); vehicleInfo.setFileNum(dsiVehicleInfo.getFileNum());
if (dsiVehicleInfo.getRegisteredTime().contains("T")){
vehicleInfo.setRegisteredTime(LocalDateTime.parse(dsiVehicleInfo.getRegisteredTime(), TimeTools.ISO_LOCAL_DATE_TIME));
}else {
vehicleInfo.setRegisteredTime(LocalDateTime.parse(dsiVehicleInfo.getRegisteredTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
if (!StringUtils.isEmpty(dsiVehicleInfo.getRegisteredTime())){
vehicleInfo.setRegisteredTime(LocalDateTime.parse(dsiVehicleInfo.getRegisteredTime(), dsiVehicleInfo.getRegisteredTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER));
} }
vehicleInfo.setOwnerTel(dsiVehicleInfo.getOwnerTel()); vehicleInfo.setOwnerTel(dsiVehicleInfo.getOwnerTel());
vehicleInfo.setRegisterDate(dsiVehicleInfo.getRegisterDate()); vehicleInfo.setRegisterDate(dsiVehicleInfo.getRegisterDate());
cardInfo.setCardBrand(dsiCardInfo.getBrand()+""); cardInfo.setCardBrand(dsiCardInfo.getBrand()+"");
// cardInfo.setCardModel(dsiCardInfo.getModel()); // cardInfo.setCardModel(dsiCardInfo.getModel());
cardInfo.setAgencyId(dsiCardInfo.getAgencyId()); cardInfo.setAgencyId(dsiCardInfo.getAgencyId());
cardInfo.setCardEnableTime(LocalDateTime.parse(dsiCardInfo.getEnableTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
cardInfo.setCardExpireTime(LocalDateTime.parse(dsiCardInfo.getExpireTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
if (!StringUtils.isEmpty(dsiCardInfo.getEnableTime())){
cardInfo.setCardEnableTime(LocalDateTime.parse(dsiCardInfo.getEnableTime(), dsiCardInfo.getEnableTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER));
}
if (!StringUtils.isEmpty(dsiCardInfo.getExpireTime())){
cardInfo.setCardExpireTime(LocalDateTime.parse(dsiCardInfo.getExpireTime(), dsiCardInfo.getExpireTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER));
}
cardInfo.setChannelId(dsiCardInfo.getChannelId()); cardInfo.setChannelId(dsiCardInfo.getChannelId());
cardInfo.setCardIssuedType(dsiCardInfo.getIssuedType()); cardInfo.setCardIssuedType(dsiCardInfo.getIssuedType());
// cardInfo.setCardIssuedTime(dsiCardInfo.getIssuedTime()); // cardInfo.setCardIssuedTime(dsiCardInfo.getIssuedTime());
obuInfo.setObuBrand(dsiOBUInfo.getBrand()+""); obuInfo.setObuBrand(dsiOBUInfo.getBrand()+"");
// obuInfo.setObuModel(dsiOBUInfo.getModel()); // obuInfo.setObuModel(dsiOBUInfo.getModel());
obuInfo.setAgencyId(dsiOBUInfo.getRegisteredChannelId().substring(0, 11)); obuInfo.setAgencyId(dsiOBUInfo.getRegisteredChannelId().substring(0, 11));
obuInfo.setObuEnableTime(LocalDateTime.parse(dsiOBUInfo.getEnableTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
obuInfo.setObuExpireTime(LocalDateTime.parse(dsiOBUInfo.getExpireTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
if (!StringUtils.isEmpty(dsiOBUInfo.getEnableTime())){
obuInfo.setObuEnableTime(LocalDateTime.parse(dsiOBUInfo.getEnableTime(), dsiOBUInfo.getEnableTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER));
}
if (!StringUtils.isEmpty(dsiOBUInfo.getExpireTime())){
obuInfo.setObuExpireTime(LocalDateTime.parse(dsiOBUInfo.getExpireTime(), dsiOBUInfo.getExpireTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER));
}
obuInfo.setChannelId(dsiOBUInfo.getRegisteredChannelId()); obuInfo.setChannelId(dsiOBUInfo.getRegisteredChannelId());
obuInfo.setRegisteredType(dsiOBUInfo.getRegisteredType()); obuInfo.setRegisteredType(dsiOBUInfo.getRegisteredType());
obuInfo.setRegisteredChannelId(dsiOBUInfo.getRegisteredChannelId()); obuInfo.setRegisteredChannelId(dsiOBUInfo.getRegisteredChannelId());
obuInfo.setRegisteredTime(LocalDateTime.parse(dsiOBUInfo.getRegisteredTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
if (!StringUtils.isEmpty(dsiOBUInfo.getRegisteredTime())){
obuInfo.setRegisteredTime(LocalDateTime.parse(dsiOBUInfo.getRegisteredTime(), dsiOBUInfo.getRegisteredTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER));
}
obuInfo.setObuStatus(ObuStatus.fromCode(dsiOBUInfo.getStatus())); obuInfo.setObuStatus(ObuStatus.fromCode(dsiOBUInfo.getStatus()));
// obuInfo.setInstallType(dsiOBUInfo.getInstallType()); // obuInfo.setInstallType(dsiOBUInfo.getInstallType());
// obuInfo.setInstallChannelId(dsiOBUInfo.getInstallChannelId()); // obuInfo.setInstallChannelId(dsiOBUInfo.getInstallChannelId());
public static void enc(DsiBlackCard dsiBlackCard, QtkBlackCard blackCard) { public static void enc(DsiBlackCard dsiBlackCard, QtkBlackCard blackCard) {
blackCard.setId(dsiBlackCard.getId()); blackCard.setId(dsiBlackCard.getId());
blackCard.setCardId(dsiBlackCard.getCardId()); blackCard.setCardId(dsiBlackCard.getCardId());
blackCard.setCreationTime(LocalDateTime.parse(dsiBlackCard.getCreationTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
if (!StringUtils.isEmpty(dsiBlackCard.getCreationTime())){
blackCard.setCreationTime(LocalDateTime.parse(dsiBlackCard.getCreationTime(), dsiBlackCard.getCreationTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER));
}
blackCard.setIssuerId(dsiBlackCard.getIssuerId()); blackCard.setIssuerId(dsiBlackCard.getIssuerId());
blackCard.setStatus(dsiBlackCard.getStatus()); blackCard.setStatus(dsiBlackCard.getStatus());
blackCard.setType(CardBlackType.fromCode(dsiBlackCard.getType())); blackCard.setType(CardBlackType.fromCode(dsiBlackCard.getType()));
public static void enc(DsiBlackObu dsiBlackObu, QtkBlackObu blackObu) { public static void enc(DsiBlackObu dsiBlackObu, QtkBlackObu blackObu) {
blackObu.setId(dsiBlackObu.getId()); blackObu.setId(dsiBlackObu.getId());
blackObu.setIssuerId(dsiBlackObu.getIssuerId()); blackObu.setIssuerId(dsiBlackObu.getIssuerId());
blackObu.setCreationTime(LocalDateTime.parse(dsiBlackObu.getCreationTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
blackObu.setReleaseTime(LocalDateTime.parse(dsiBlackObu.getReleaseTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
if (!StringUtils.isEmpty(dsiBlackObu.getCreationTime())){
blackObu.setCreationTime(LocalDateTime.parse(dsiBlackObu.getCreationTime(), dsiBlackObu.getCreationTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER));
}
if (!StringUtils.isEmpty(dsiBlackObu.getReleaseTime())){
blackObu.setReleaseTime(LocalDateTime.parse(dsiBlackObu.getReleaseTime(), dsiBlackObu.getReleaseTime().contains("T") ? TimeTools.ISO_LOCAL_DATE_TIME : TimeTools.DATE_TIME_FORMATTER));
}
blackObu.setObuId(dsiBlackObu.getObuId()); blackObu.setObuId(dsiBlackObu.getObuId());
blackObu.setType(ObuBlackType.fromCode(dsiBlackObu.getType())); blackObu.setType(ObuBlackType.fromCode(dsiBlackObu.getType()));
blackObu.setStatus(dsiBlackObu.getStatus()); blackObu.setStatus(dsiBlackObu.getStatus());

Carregando…
Cancelar
Salvar