|
@@ -8,8 +8,11 @@ import com.gyee.common.model.StringUtils;
|
|
|
import com.gyee.runeconomy.mapper.auto.ProEconCleaningInputMapper;
|
|
|
import com.gyee.runeconomy.model.auto.ProEconCleaningInput;
|
|
|
import com.gyee.runeconomy.service.auto.IProEconCleaningInputService;
|
|
|
+import com.gyee.runeconomy.util.DateUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.text.ParseException;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
|
|
|
|
/**
|
|
@@ -24,9 +27,11 @@ import java.util.Date;
|
|
|
public class ProEconCleaningInputServiceImpl extends ServiceImpl<ProEconCleaningInputMapper, ProEconCleaningInput> implements IProEconCleaningInputService {
|
|
|
|
|
|
@Override
|
|
|
- public IPage<ProEconCleaningInput> getList(String windpowerstationId, String windpowerstationName, Date begindate, Date planEnddate, String pageNum, String pageSize) {
|
|
|
+ public IPage<ProEconCleaningInput> getList(String windpowerstationId, String windpowerstationName, String begindate, String planEnddate, String pageNum, String pageSize) {
|
|
|
QueryWrapper<ProEconCleaningInput> qw = new QueryWrapper<>();
|
|
|
|
|
|
+
|
|
|
+
|
|
|
if (StringUtils.isNotEmpty(windpowerstationId)){
|
|
|
qw.eq("windpowerstation_id",windpowerstationId);
|
|
|
}
|
|
@@ -35,17 +40,27 @@ public class ProEconCleaningInputServiceImpl extends ServiceImpl<ProEconCleaning
|
|
|
qw.like("windpowerstation_name",windpowerstationName);
|
|
|
}
|
|
|
|
|
|
- if (begindate != null){
|
|
|
- qw.like("begindate",begindate);
|
|
|
+ if (StringUtils.isNotEmpty(begindate)){
|
|
|
+ try {
|
|
|
+ Date beginDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(begindate);
|
|
|
+ qw.ge("begindate", beginDate);
|
|
|
+ } catch (ParseException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- if (planEnddate != null){
|
|
|
- qw.eq("plan_enddate",planEnddate);
|
|
|
+ if (StringUtils.isNotEmpty(planEnddate)){
|
|
|
+ try {
|
|
|
+ Date endDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(planEnddate);
|
|
|
+ qw.le("plan_enddate", endDate);
|
|
|
+ } catch (ParseException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
Page<ProEconCleaningInput> page = new Page<>(Integer.parseInt(pageNum),Integer.parseInt(pageSize));
|
|
|
IPage<ProEconCleaningInput> InputPage = getBaseMapper().selectPage(page, qw);
|
|
|
-// List<Windpowerstation> list = companysPage.getRecords();
|
|
|
+
|
|
|
return InputPage;
|
|
|
}
|
|
|
}
|