|
@@ -19,19 +19,18 @@ public class LevelAssessmentService {
|
|
|
public List<Windturbineinfodaytop2> list(String recorddate, String type,String wpid,String orderby,String isAsc) {
|
|
|
Calendar c = Calendar.getInstance();
|
|
|
Date date = DateUtils.parseDate(recorddate);
|
|
|
- c.setTime(date);
|
|
|
- int year = c.get(Calendar.YEAR);
|
|
|
- int month = c.get(Calendar.MONTH)+1;
|
|
|
+
|
|
|
QueryWrapper<Windturbineinfodaytop2> qw = new QueryWrapper<>();
|
|
|
qw.eq("type",Integer.parseInt(type));
|
|
|
qw.eq("windpowerstationid",wpid);
|
|
|
if (type.equals("1")){
|
|
|
qw.eq("recorddate", date);
|
|
|
}else if(type.equals("2")){
|
|
|
- qw.eq("month", month);
|
|
|
- qw.eq("year", year);
|
|
|
+ String[] ny = recorddate.split("-");
|
|
|
+ qw.eq("month", Integer.parseInt(ny[1]));
|
|
|
+ qw.eq("year", ny[0]);
|
|
|
}else {
|
|
|
- qw.eq("year", year);
|
|
|
+ qw.eq("year", recorddate);
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(orderby) && StringUtils.isNotEmpty(isAsc)){
|
|
|
if (isAsc.equals("1")){
|