|
@@ -10,6 +10,7 @@ import java.net.URLDecoder;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
+import com.google.common.base.Strings;
|
|
|
import org.apache.commons.beanutils.PropertyUtils;
|
|
|
import org.apache.shiro.SecurityUtils;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
@@ -72,7 +73,7 @@ public class AdminAirbridgeTestController extends JeecgController<AdminAirbridge
|
|
|
public Result<IPage<AdminAirbridgeTest>> queryPageList(AdminAirbridgeTest adminAirbridgeTest,
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
- HttpServletRequest req, String ssaircraftPositionNum, String sssubmitter) {
|
|
|
+ HttpServletRequest req, String ssaircraftPositionNum, String sssubmitter, String sCDateTime, String eCDateTime) {
|
|
|
QueryWrapper<AdminAirbridgeTest> queryWrapper = QueryGenerator.initQueryWrapper(adminAirbridgeTest, req.getParameterMap());
|
|
|
if (ssaircraftPositionNum != null) {
|
|
|
queryWrapper.like( "aircraft_position_num", ssaircraftPositionNum );
|
|
@@ -80,6 +81,12 @@ public class AdminAirbridgeTestController extends JeecgController<AdminAirbridge
|
|
|
if (sssubmitter != null) {
|
|
|
queryWrapper.like( "submitter", sssubmitter );
|
|
|
}
|
|
|
+ if (!Strings.isNullOrEmpty(sCDateTime)) {
|
|
|
+ queryWrapper.ge("create_time",sCDateTime + " 00:00:00");
|
|
|
+ }
|
|
|
+ if (!Strings.isNullOrEmpty(eCDateTime)) {
|
|
|
+ queryWrapper.le("create_time",eCDateTime + " 23:59:59");
|
|
|
+ }
|
|
|
Page<AdminAirbridgeTest> page = new Page<AdminAirbridgeTest>(pageNo, pageSize);
|
|
|
IPage<AdminAirbridgeTest> pageList = adminAirbridgeTestService.page(page, queryWrapper);
|
|
|
return Result.OK(pageList);
|
|
@@ -160,7 +167,7 @@ public class AdminAirbridgeTestController extends JeecgController<AdminAirbridge
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/exportXls")
|
|
|
- public ModelAndView exportXls(HttpServletRequest request, AdminAirbridgeTest adminAirbridgeTest, String ssaircraftPositionNum, String sssubmitter) {
|
|
|
+ public ModelAndView exportXls(HttpServletRequest request, AdminAirbridgeTest adminAirbridgeTest, String ssaircraftPositionNum, String sssubmitter, String sCDateTime, String eCDateTime) {
|
|
|
String title = "廊桥测试";
|
|
|
// Step.1 组装查询条件
|
|
|
QueryWrapper<AdminAirbridgeTest> queryWrapper = QueryGenerator.initQueryWrapper(adminAirbridgeTest, request.getParameterMap());
|
|
@@ -172,6 +179,13 @@ public class AdminAirbridgeTestController extends JeecgController<AdminAirbridge
|
|
|
}
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
|
|
|
+ if (!Strings.isNullOrEmpty(sCDateTime)) {
|
|
|
+ queryWrapper.ge("create_time",sCDateTime + " 00:00:00");
|
|
|
+ }
|
|
|
+ if (!Strings.isNullOrEmpty(eCDateTime)) {
|
|
|
+ queryWrapper.le("create_time",eCDateTime + " 23:59:59");
|
|
|
+ }
|
|
|
+
|
|
|
// Step.2 获取导出数据
|
|
|
List<AdminAirbridgeTest> pageList = service.list(queryWrapper);
|
|
|
|