fix: license差异比较;导出到期日;按申请时间倒序
This commit is contained in:
@@ -132,6 +132,7 @@ public class LicenseController {
|
||||
|
||||
List<LicenseRespVO> results = new ArrayList<>();
|
||||
for (LicenseRespVO license : voList) {
|
||||
license.setExpiryDateExt(license.getExpiryDate().toLocalDate());
|
||||
List<LicenseDetailVO> neCodeList = license.getNeCodeList();
|
||||
if (CollUtil.isEmpty(neCodeList)) {
|
||||
results.add(license);
|
||||
|
||||
@@ -47,8 +47,11 @@ public class LicenseRespVO implements VO {
|
||||
private String serialNo;
|
||||
|
||||
@Schema(description = "到期时间")
|
||||
private LocalDateTime expiryDate;
|
||||
|
||||
@Schema(description = "到期时间导出")
|
||||
@ExcelProperty("到期时间")
|
||||
private LocalDate expiryDate;
|
||||
private LocalDate expiryDateExt;
|
||||
|
||||
@Schema(description = "网元")
|
||||
@ExcelProperty("网元")
|
||||
|
||||
@@ -28,7 +28,7 @@ public interface LicenseMapper extends BaseMapperX<LicenseDO> {
|
||||
.eqIfPresent(LicenseDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(LicenseDO::getRemark, reqVO.getRemark())
|
||||
.betweenIfPresent(LicenseDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(LicenseDO::getId));
|
||||
.orderByDesc(LicenseDO::getApplicationTime));
|
||||
}
|
||||
|
||||
default LicenseDO selectBySn(String sn) {
|
||||
|
||||
@@ -49,7 +49,6 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
import static org.agt.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
@@ -505,16 +504,10 @@ public class LicenseServiceImpl implements LicenseService {
|
||||
}
|
||||
|
||||
if (i < details.size()) {
|
||||
if (!(i < oldDetails.size() && Objects.equals(oldDetails.get(i).getActivationCode(), details.get(i).getActivationCode()))) {
|
||||
activationCodeMap.put("new", details.get(i).getActivationCode());
|
||||
}
|
||||
if (!(i < oldDetails.size() && Objects.equals(oldDetails.get(i).getNeList(), details.get(i).getNeList()))) {
|
||||
neListMap.put("new", details.get(i).getNeList());
|
||||
}
|
||||
if (!(i < oldDetails.size() && Objects.equals(oldDetails.get(i).getFileUrlList(), details.get(i).getFileUrlList()))) {
|
||||
fileUrlListMap.put("new", null);
|
||||
}
|
||||
}
|
||||
mergeDetail.setActivationCodeMap(activationCodeMap);
|
||||
mergeDetail.setNeListMap(neListMap);
|
||||
mergeDetail.setFileUrlListMap(fileUrlListMap);
|
||||
@@ -539,10 +532,12 @@ public class LicenseServiceImpl implements LicenseService {
|
||||
|
||||
Map<String, String> activationCodeMap = new HashMap<>();
|
||||
activationCodeMap.put("old", detail.getActivationCode());
|
||||
activationCodeMap.put("new", detail.getActivationCode());
|
||||
detail.setActivationCodeMap(activationCodeMap);
|
||||
|
||||
Map<String, List<Integer>> neListMap = new HashMap<>();
|
||||
neListMap.put("old", detail.getNeList());
|
||||
neListMap.put("new", detail.getNeList());
|
||||
detail.setNeListMap(neListMap);
|
||||
|
||||
Map<String, List<String>> fileUrlListMap = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user