|
|
@@ -53,7 +53,7 @@ import java.math.RoundingMode;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDate;
|
|
|
-import java.time.format.DateTimeFormatter;
|
|
|
+import java.time.ZoneId;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
import java.util.zip.ZipEntry;
|
|
|
@@ -664,11 +664,12 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
int yearSum=1;
|
|
|
List<String> peopleList = new ArrayList<>();
|
|
|
LocalDate startDate = LocalDate.now().withMonth(1).withDayOfMonth(1);
|
|
|
+ String sumYear= String.valueOf(startDate.getYear());
|
|
|
LocalDate endDate = startDate.withYear(startDate.getYear()+1);
|
|
|
//分成会员统计和非会员统计
|
|
|
if (!tTaskMembers.isEmpty()){
|
|
|
for (PublicRelease e : list) {
|
|
|
- LocalDate date = LocalDate.parse(e.getReleaseStart().toString(), DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
|
|
+ LocalDate date = e.getReleaseStart().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
|
|
if (date.isAfter(startDate)&&date.isBefore(endDate)){
|
|
|
durationCount=durationCount.add(BigDecimal.valueOf(e.getDuration()));
|
|
|
if (!peopleList.contains(e.getAid())){
|
|
|
@@ -691,7 +692,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
count++;
|
|
|
}
|
|
|
}
|
|
|
- TOrderPublicReleaseCount out = tOrderPublicReleaseCountMapper.selectByOrderNo(orderNo);
|
|
|
+ TOrderPublicReleaseCount out = tOrderPublicReleaseCountMapper.selectByOrderNo(orderNo,sumYear);
|
|
|
if (out==null){
|
|
|
out=new TOrderPublicReleaseCount();
|
|
|
out.setOrderNo(orderNo);
|
|
|
@@ -699,7 +700,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
out.setActualDuration(durationCount.doubleValue());
|
|
|
out.setPeopleCount(peopleList.size());
|
|
|
out.setFrequency(count);
|
|
|
- out.setSumYear(String.valueOf(startDate.getYear()));
|
|
|
+ out.setSumYear(sumYear);
|
|
|
pushMaxDuration(t,out,yearSum);
|
|
|
tOrderPublicReleaseCountMapper.insertSelective(out);
|
|
|
}else {
|