|
|
|
@ -1,7 +1,6 @@
|
|
|
|
|
package com.ykMap.service.impl;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
|
import com.ykMap.entity.response.EquipResponse;
|
|
|
|
|
import com.ykMap.entity.response.GetCarIdInfoResponse;
|
|
|
|
|
import com.ykMap.entity.response.ItemsResponse;
|
|
|
|
@ -70,17 +69,17 @@ public class LineServiceImpl implements LineService {
|
|
|
|
|
@Override
|
|
|
|
|
public List<LineTemplateResponse> lineTemplate(String area) {
|
|
|
|
|
List<LineTemplateResponse> list;
|
|
|
|
|
LocalDate now = LocalDate.now();
|
|
|
|
|
if (now.getDayOfMonth() < 26) {
|
|
|
|
|
LocalDate a1 = now.minusMonths(2).withDayOfMonth(26);
|
|
|
|
|
LocalDate a2 = now.minusMonths(1).withDayOfMonth(25);
|
|
|
|
|
list = lineMapper.lineTemplate(area, a1, a2);
|
|
|
|
|
} else {
|
|
|
|
|
LocalDate a1 = now.minusMonths(1).withDayOfMonth(26);
|
|
|
|
|
LocalDate a2 = now.withDayOfMonth(25);
|
|
|
|
|
list = lineMapper.lineTemplate(area, a1, a2);
|
|
|
|
|
}
|
|
|
|
|
if (CollectionUtil.isEmpty(list)) {
|
|
|
|
|
// LocalDate now = LocalDate.now();
|
|
|
|
|
// if (now.getDayOfMonth() < 26) {
|
|
|
|
|
// LocalDate a1 = now.minusMonths(2).withDayOfMonth(26);
|
|
|
|
|
// LocalDate a2 = now.minusMonths(1).withDayOfMonth(25);
|
|
|
|
|
// list = lineMapper.lineTemplate(area, a1, a2);
|
|
|
|
|
// } else {
|
|
|
|
|
// LocalDate a1 = now.minusMonths(1).withDayOfMonth(26);
|
|
|
|
|
// LocalDate a2 = now.withDayOfMonth(25);
|
|
|
|
|
// list = lineMapper.lineTemplate(area, a1, a2);
|
|
|
|
|
// }
|
|
|
|
|
// if (CollectionUtil.isEmpty(list)) {
|
|
|
|
|
// 查询数据库最新时间
|
|
|
|
|
LocalDateTime dataTime = lineMapper.findLineTemplateTime();
|
|
|
|
|
if (dataTime == null) {
|
|
|
|
@ -91,7 +90,7 @@ public class LineServiceImpl implements LineService {
|
|
|
|
|
// 获取数据库最新时间月份的最后一天
|
|
|
|
|
LocalDate lastDayOfMonth = dataTime.with(TemporalAdjusters.lastDayOfMonth()).toLocalDate();
|
|
|
|
|
list = lineMapper.lineTemplate(area, firstDayOfMonth, lastDayOfMonth);
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|