瀏覽代碼

卡下黑反白接口调整

master
huminghao 4 週之前
父節點
當前提交
c724dd056c

+ 7
- 4
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/manager/bls/BlackCardManagerImpl.java 查看文件

@@ -173,10 +173,13 @@ public class BlackCardManagerImpl extends AbstractCommManager implements BlackCa
errorModelList.add(importErrorModel);
}
}
//errorModelList导出成excel
File exportFile = EasyExcelUtil.exportExcelFile(BlackCardImportErrorModel.class, errorModelList, "卡下黑、反白导入异常");
String filePath = minioUtil.fileUploadHttp(exportFile, BucketFileBus.MANAGEW);
return new BlackCardImportResponseDTO(minioUtil.getOuterUrl(filePath));
if (!CollectionTools.isEmpty(errorModelList)){
//errorModelList导出成excel
File exportFile = EasyExcelUtil.exportExcelFile(BlackCardImportErrorModel.class, errorModelList, "卡下黑、反白导入异常");
String filePath = minioUtil.fileUploadHttp(exportFile, BucketFileBus.MANAGEW);
return new BlackCardImportResponseDTO(minioUtil.getOuterUrl(filePath));
}
return new BlackCardImportResponseDTO(null);
}

private void importModelValid(BlackCardImportModel model, StringBuffer errorMsg) {

+ 7
- 4
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/manager/bls/BlackObuManagerImpl.java 查看文件

@@ -171,10 +171,13 @@ public class BlackObuManagerImpl extends AbstractCommManager implements BlackObu
errorModelList.add(importErrorModel);
}
}
//errorModelList导出成excel
File exportFile = EasyExcelUtil.exportExcelFile(BlackObuImportErrorModel.class, errorModelList, "签下黑、反白导入异常");
String filePath = minioUtil.fileUploadHttp(exportFile, BucketFileBus.MANAGEW);
return new BlackObuImportResponseDTO(minioUtil.getOuterUrl(filePath));
if (!CollectionTools.isEmpty(errorModelList)){
//errorModelList导出成excel
File exportFile = EasyExcelUtil.exportExcelFile(BlackObuImportErrorModel.class, errorModelList, "签下黑、反白导入异常");
String filePath = minioUtil.fileUploadHttp(exportFile, BucketFileBus.MANAGEW);
return new BlackObuImportResponseDTO(minioUtil.getOuterUrl(filePath));
}
return new BlackObuImportResponseDTO(null);
}

private void importModelValid(BlackObuImportModel model, StringBuffer errorMsg) {

+ 2
- 4
zhywpt-service-bls/src/main/java/cn/com/taiji/bls/manager/blk/BlackCardInManager.java 查看文件

@@ -76,10 +76,10 @@ public class BlackCardInManager extends AbstractCommManager implements LogManage
}
//添加一条事务,方便定时器处理调用失败的情况
transactionManager.addTransaction(TransactionBizType.BLACK_CARD_SYNC, blackCard.getId(), 0, blackCard.getCardId());
//异步更新老库
//更新老库
if (blackCard != null) {
String id = blackCard.getId();
asyncRepeatSafe(1, () -> dsiBasicDataUpdateRequest(id, 1), null);
dsiBasicDataUpdateRequest(id, 1);
}
AbstractBlsResponse blsResponse = new AbstractBlsResponse();
blsResponse.setUploadStatus(1);
@@ -121,8 +121,6 @@ public class BlackCardInManager extends AbstractCommManager implements LogManage
//反白
if (syncBlackHisCard != null) {
QtkBlackCardHis blackCardHis = blackCardHisRepo.findById(id).orElse(null);
QtkBlackCard blackCard = copyProperties(blackCardHis, new QtkBlackCard());
request.setBlackCard(blackCard);
request.setBlackCardHis(blackCardHis);
}
}

+ 2
- 2
zhywpt-service-bls/src/main/java/cn/com/taiji/bls/manager/blk/BlackCardOutManager.java 查看文件

@@ -85,8 +85,8 @@ public class BlackCardOutManager extends AbstractCommManager implements LogManag
//更新老库
if (blackCardHis != null){
String id = blackCardHis.getId();
//异步更新老库
asyncRepeatSafe(1, () -> blackCardInManager.dsiBasicDataUpdateRequest(id,2), null);
//更新老库
blackCardInManager.dsiBasicDataUpdateRequest(id,2);
}

AbstractBlsResponse blsResponse = new AbstractBlsResponse();

+ 1
- 1
zhywpt-service-bls/src/main/java/cn/com/taiji/bls/manager/blk/BlackObuInManager.java 查看文件

@@ -76,7 +76,7 @@ public class BlackObuInManager extends AbstractCommManager implements LogManager
//异步更新老库
if (blackObu != null) {
String id = blackObu.getId();
asyncRepeatSafe(1, () -> dsiBasicDataUpdateRequest(id, 1), null);
dsiBasicDataUpdateRequest(id, 1);
}
//返回
AbstractBlsResponse blsResponse = new AbstractBlsResponse();

+ 1
- 1
zhywpt-service-bls/src/main/java/cn/com/taiji/bls/manager/blk/BlackObuOutManager.java 查看文件

@@ -86,7 +86,7 @@ public class BlackObuOutManager extends AbstractCommManager implements LogManage
//异步更新老库
if (blackObuHis != null){
String id = blackObuHis.getId();
asyncRepeatSafe(1, () -> blackObuInManager.dsiBasicDataUpdateRequest(id, 2), null);
blackObuInManager.dsiBasicDataUpdateRequest(id, 2);
}

AbstractBlsResponse blsResponse = new AbstractBlsResponse();

+ 14
- 13
zhywpt-service-ods/src/main/java/cn/com/taiji/ods/manager/ois/issue/IssueCommManagerImpl.java 查看文件

@@ -10,6 +10,7 @@ import cn.com.taiji.ods.dict.dsi.DeviceVersionType;
import cn.com.taiji.ods.dict.dsi.ImsCardType;
import cn.com.taiji.ods.dict.dsi.InventoryStatus;
import cn.com.taiji.ods.entity.dsi.*;
import org.apache.commons.lang3.StringUtils;

import java.time.format.DateTimeFormatter;

@@ -20,7 +21,7 @@ public abstract class IssueCommManagerImpl {
dsiCustomerInfo.setUpdateTime(customerInfo.getUpdateTime());
dsiCustomerInfo.setCustomerId(customerInfo.getCustomerId());
dsiCustomerInfo.setIssuerId(customerInfo.getIssuerId());
dsiCustomerInfo.setRegisteredTime(customerInfo.getRegisteredDate().replace(" ","T"));
dsiCustomerInfo.setRegisteredTime(StringUtils.isEmpty(customerInfo.getRegisteredDate()) ? null : customerInfo.getRegisteredDate().replace(" ","T") );
dsiCustomerInfo.setRegisteredDate(customerInfo.getRegisteredDate());
dsiCustomerInfo.setSeriseNo(customerInfo.getSeriseNo());
dsiCustomerInfo.setCustomerType(customerInfo.getUserType().getCode());
@@ -95,7 +96,7 @@ public abstract class IssueCommManagerImpl {
dsiVehicleInfo.setAxisType(vehicleInfo.getAxisType());
dsiVehicleInfo.setTestRecord(vehicleInfo.getTestRecord());
dsiVehicleInfo.setFileNum(vehicleInfo.getFileNum());
dsiVehicleInfo.setRegisteredTime(vehicleInfo.getRegisteredTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiVehicleInfo.setRegisteredTime(vehicleInfo.getRegisteredTime() == null ? null : vehicleInfo.getRegisteredTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiVehicleInfo.setOwnerTel(vehicleInfo.getOwnerTel());
dsiVehicleInfo.setUseCharacter(vehicleInfo.getUseCharacter().getCode());
dsiVehicleInfo.setRegisterDate(vehicleInfo.getRegisterDate());
@@ -121,8 +122,8 @@ public abstract class IssueCommManagerImpl {
dsiCardInfo.setAgencyId(cardInfo.getAgencyId());
dsiCardInfo.setCustomerId(cardInfo.getCustomerId());
dsiCardInfo.setVehicleId(cardInfo.getVehicleId());
dsiCardInfo.setEnableTime(cardInfo.getCardEnableTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiCardInfo.setExpireTime(cardInfo.getCardExpireTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiCardInfo.setEnableTime(cardInfo.getCardEnableTime() == null ? null : cardInfo.getCardEnableTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiCardInfo.setExpireTime(cardInfo.getCardExpireTime() == null ? null : cardInfo.getCardExpireTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiCardInfo.setChannelId(cardInfo.getChannelId());
dsiCardInfo.setIssuedType(cardInfo.getCardIssuedType());
// dsiCardInfo.setIssuedTime(cardInfo.getCardIssuedTime());
@@ -135,7 +136,7 @@ public abstract class IssueCommManagerImpl {
dsiCardInfo.setCreateTime(TimeTools.localDateTime2Calendar(cardInfo.getInsertTime()));
dsiCardInfo.setUpdateTime(TimeTools.localDateTime2Calendar(cardInfo.getUpdateTime()));
dsiCardInfo.setAccountId(cardInfo.getAccountId());
dsiCardInfo.setPackageEnableTime(cardInfo.getPackageEnableTime().replace(" ","T"));
dsiCardInfo.setPackageEnableTime(StringUtils.isEmpty(cardInfo.getPackageEnableTime()) ? null : cardInfo.getPackageEnableTime().replace(" ","T"));
dsiCardInfo.setCardVersion(DeviceVersion.cardFromDeviceVersion(cardInfo.getCardVersion()));
// dsiCardInfo.setApplyStaffId(cardInfo.getApplyStaffId());
// if (cardInfo.getCustomer() != null) {
@@ -161,11 +162,11 @@ public abstract class IssueCommManagerImpl {
// dsiOBUInfo.setModel(obuInfo.getObuModel());
dsiOBUInfo.setCustomerId(obuInfo.getCustomerId());
dsiOBUInfo.setVehicleId(obuInfo.getVehicleId());
dsiOBUInfo.setEnableTime(obuInfo.getObuEnableTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiOBUInfo.setExpireTime(obuInfo.getObuExpireTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiOBUInfo.setEnableTime(obuInfo.getObuEnableTime() == null ? null : obuInfo.getObuEnableTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiOBUInfo.setExpireTime(obuInfo.getObuExpireTime() == null ? null : obuInfo.getObuExpireTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiOBUInfo.setRegisteredType(obuInfo.getRegisteredType());
dsiOBUInfo.setRegisteredChannelId(obuInfo.getRegisteredChannelId());
dsiOBUInfo.setRegisteredTime(obuInfo.getRegisteredTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiOBUInfo.setRegisteredTime(obuInfo.getRegisteredTime() == null ? null : obuInfo.getRegisteredTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
// dsiOBUInfo.setInstallType(obuInfo.getInstallType());
// dsiOBUInfo.setInstallChannelId(obuInfo.getInstallChannelId());
// dsiOBUInfo.setInstallTime(obuInfo.getInstallTime());
@@ -229,7 +230,7 @@ public abstract class IssueCommManagerImpl {
public static void enc(DsiBlackCard dsiBlackCard, QtkBlackCard blackCard) {
dsiBlackCard.setId(blackCard.getId());
dsiBlackCard.setIssuerId(blackCard.getIssuerId());
dsiBlackCard.setCreationTime(blackCard.getCreationTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiBlackCard.setCreationTime(blackCard.getCreationTime() == null ? null : blackCard.getCreationTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiBlackCard.setType(blackCard.getType().getCode());
dsiBlackCard.setCardId(blackCard.getCardId());
dsiBlackCard.setStatus(blackCard.getStatus());
@@ -241,8 +242,8 @@ public abstract class IssueCommManagerImpl {
public static void enc(DsiBlackCardHis dsiBlackCardHis, QtkBlackCardHis blackCardHis) {
dsiBlackCardHis.setId(blackCardHis.getId());
dsiBlackCardHis.setIssuerId(blackCardHis.getIssuerId());
dsiBlackCardHis.setCreationTime(blackCardHis.getCreationTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiBlackCardHis.setReleaseTime(blackCardHis.getReleaseTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiBlackCardHis.setCreationTime(blackCardHis.getCreationTime() == null ? null : blackCardHis.getCreationTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiBlackCardHis.setReleaseTime(blackCardHis.getReleaseTime() == null ? null : blackCardHis.getReleaseTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiBlackCardHis.setType(blackCardHis.getType().getCode());
dsiBlackCardHis.setCardId(blackCardHis.getCardId());
dsiBlackCardHis.setStatus(blackCardHis.getStatus());
@@ -256,8 +257,8 @@ public abstract class IssueCommManagerImpl {
public static void enc(DsiBlackObu dsiBlackObu, QtkBlackObu qtkBlackObu) {
dsiBlackObu.setId(qtkBlackObu.getId());
dsiBlackObu.setIssuerId(qtkBlackObu.getIssuerId());
dsiBlackObu.setCreationTime(qtkBlackObu.getCreationTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiBlackObu.setReleaseTime(qtkBlackObu.getReleaseTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiBlackObu.setCreationTime(qtkBlackObu.getCreationTime() == null ? null : qtkBlackObu.getCreationTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiBlackObu.setReleaseTime(qtkBlackObu.getReleaseTime() == null ? null : qtkBlackObu.getReleaseTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")));
dsiBlackObu.setType(qtkBlackObu.getType().getCode());
dsiBlackObu.setObuId(qtkBlackObu.getObuId());
dsiBlackObu.setStatus(qtkBlackObu.getStatus());

Loading…
取消
儲存