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