Quellcode durchsuchen

:white_check_mark: 廊桥测试,字段展示同导出报表,增加时间区间筛选(精确到日)和航班号筛选

Twelve615 vor 1 Jahr
Ursprung
Commit
87b4260061

+ 33 - 7
airport-vue/src/views/admin/AdminAirbridgeTestList.vue

@@ -4,14 +4,29 @@
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+          <a-col :xl="4" :lg="5" :md="6" :sm="24">
             <a-form-item label="机位">
-              <a-input placeholder="请输入机位" v-model="queryParam.ssaircraftPositionNum"></a-input>
+              <a-input allow-clear placeholder="请输入机位" v-model="queryParam.ssaircraftPositionNum"></a-input>
             </a-form-item>
           </a-col>
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+          <a-col :xl="4" :lg="5" :md="6" :sm="24">
             <a-form-item label="提交人">
-              <a-input placeholder="请输入提交人" v-model="queryParam.sssubmitter"></a-input>
+              <a-input allow-clear placeholder="请输入提交人" v-model="queryParam.sssubmitter"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="4" :lg="5" :md="6" :sm="24">
+            <a-form-item label="航班号">
+              <a-input allow-clear placeholder="请输入航班号" v-model="queryParam.flightNum"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="测试时间">
+              <a-range-picker
+                format="YYYY-MM-DD"
+                :placeholder="['开始时间', '结束时间']"
+                @change="onCreateDateRangeChange"
+                @ok="onCreateDateRangeOk"
+              ></a-range-picker>
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -88,7 +103,7 @@
         </template>
 
         <span slot="action" slot-scope="text, record">
- <a @click="handleDetail(record)">详情</a>-->
+          <a @click="handleDetail(record)">详情</a>
 
 <!--          <a @click="handleEdit(record)">编辑</a>-->
 
@@ -192,6 +207,11 @@
             dataIndex: 'remark'
           },
           {
+            title:'测试时间',
+            align:"center",
+            dataIndex: 'createTime'
+          },
+          {
             title: '操作',
             dataIndex: 'action',
             align:"center",
@@ -230,12 +250,18 @@
         fieldList.push({type:'string',value:'flightNum',text:'航班号',dictCode:''})
         fieldList.push({type:'string',value:'submitter',text:'提交人',dictCode:''})
         fieldList.push({type:'string',value:'testType',text:'测试状态',dictCode:'testtype'})
-        fieldList.push({type:'Text',value:'testContent',text:'测试内容',dictCode:''})
+        fieldList.push({type:'Text',value:'testContent',text:'廊桥测试情况',dictCode:''})
         fieldList.push({type:'string',value:'testPic',text:'测试拍照图片',dictCode:''})
         fieldList.push({type:'string',value:'signaturePic',text:'电子签名',dictCode:''})
         fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''})
-        fieldList.push({type:'datetime',value:'createTime',text:'创建时间'})
+        fieldList.push({type:'datetime',value:'createTime',text:'测试时间'})
         this.superFieldList = fieldList
+      },
+      onCreateDateRangeChange(value, dateString) {
+        this.queryParam.sCDateTime = dateString[0];
+        this.queryParam.eCDateTime = dateString[1];
+      },
+      onCreateDateRangeOk(value) {
       }
     }
   }

+ 2 - 2
airport-vue/src/views/admin/modules/AdminAirbridgeTestForm.vue

@@ -29,7 +29,7 @@
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
-            <a-form-model-item label="测试内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="testContent">
+            <a-form-model-item label="廊桥测试情况" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="testContent">
               <a-textarea v-model="model.testContent" rows="4"/>
             </a-form-model-item>
           </a-col>
@@ -49,7 +49,7 @@
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
-            <a-form-model-item label="创建时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createTime">
+            <a-form-model-item label="测试时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createTime">
               <j-date  v-model="model.createTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
             </a-form-model-item>
           </a-col>

+ 16 - 2
airport/jeecg-boot-module-system/src/main/java/org/jeecg/modules/admin_airbridge_test/controller/AdminAirbridgeTestController.java

@@ -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);
 

+ 1 - 1
airport/jeecg-boot-module-system/src/main/java/org/jeecg/modules/admin_airbridge_test/entity/AdminAirbridgeTest.java

@@ -62,7 +62,7 @@ public class AdminAirbridgeTest implements Serializable {
     private String testType;
 	/**测试内容*/
 	@Excel(name = "廊桥测试情况", width = 15, exportConvert = true)
-    @ApiModelProperty(value = "测试内容")
+    @ApiModelProperty(value = "廊桥测试情况")
     private String testContent;
 	/**测试拍照图片*/
 	@Excel(name = "测试拍照图片", type = 2, width = 15, exportConvert = true)