Browse Source

Merge remote-tracking branch 'origin/master'

zhengqiang 4 years ago
parent
commit
5d6945214e

+ 3 - 0
common/src/main/resources/mapper/base/PersonDeviceRelation.xml

@@ -175,6 +175,9 @@
 			<if test="'0'.toString() == searchParams.isUploadPhoto and null != searchParams.isUploadPhoto">
 				and c.face_image_url is null
 			</if>
+			<if test="searchParams.deviceName != null">
+				and b.alias_name like #{searchParams.deviceName}
+			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
 	        a.${sort.name} ${sort.order}

+ 7 - 2
web/src/main/java/com/jpsoft/shinestar/modules/base/controller/PersonDeviceRelationController.java

@@ -604,10 +604,11 @@ public class PersonDeviceRelationController {
     @RequestMapping(value = "pageList",method = RequestMethod.POST)
     @ApiImplicitParams({
             @ApiImplicitParam(name = "deviceId",value = "设备ID",  paramType = "query"),
-            @ApiImplicitParam(name = "personId",value = "人员ID",  paramType = "query")
+            @ApiImplicitParam(name = "personId",value = "人员ID",  paramType = "query"),
+            @ApiImplicitParam(name = "deviceName",value = "设备名称",  paramType = "query")
     })
     public MessageResult<Map> pageList(
-            String deviceId,String personId,
+            String deviceId,String personId,String deviceName,
             @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
             @RequestParam(value="pageSize",defaultValue="20") int pageSize,
             @RequestAttribute String subject){
@@ -629,6 +630,10 @@ public class PersonDeviceRelationController {
             searchParams.put("personId",personId);
         }
 
+        if (StringUtils.isNotEmpty(deviceName)) {
+            searchParams.put("deviceName","%" + deviceName + "%");
+        }
+
         Page<PersonDeviceRelation> page = personDeviceRelationService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
 
 //        for(PersonDeviceRelation pdr : page.getResult()){

+ 22 - 8
web/src/main/java/com/jpsoft/shinestar/modules/base/controller/PersonInfoController.java

@@ -1401,13 +1401,15 @@ public class PersonInfoController {
             XSSFCell cellTitle1 = rowTitle.createCell(0);
             cellTitle1.setCellValue("序号");
             XSSFCell cellTitle2 = rowTitle.createCell(1);
-            cellTitle2.setCellValue("姓名");
+            cellTitle2.setCellValue("工号");
             XSSFCell cellTitle3 = rowTitle.createCell(2);
-            cellTitle3.setCellValue("手机号");
+            cellTitle3.setCellValue("姓名");
             XSSFCell cellTitle4 = rowTitle.createCell(3);
-            cellTitle4.setCellValue("身份证");
+            cellTitle4.setCellValue("手机号");
             XSSFCell cellTitle5 = rowTitle.createCell(4);
-            cellTitle5.setCellValue("单位");
+            cellTitle5.setCellValue("身份证");
+            XSSFCell cellTitle6 = rowTitle.createCell(5);
+            cellTitle6.setCellValue("单位");
 
             //获取公司
             //五级位置
@@ -1531,13 +1533,25 @@ public class PersonInfoController {
                 XSSFCell cellContent1 = rowContent.createCell(0);
                 cellContent1.setCellValue(i+1);
                 XSSFCell cellContent2 = rowContent.createCell(1);
-                if (personInfo.getName() != null) {cellContent2.setCellValue(personInfo.getName());}
+                if (personInfo.getCompanyName() != null) {
+                    cellContent2.setCellValue(personInfo.getJobNumber());
+                }
                 XSSFCell cellContent3 = rowContent.createCell(2);
-                if (personInfo.getPhone() != null) {cellContent3.setCellValue(personInfo.getPhone());}
+                if (personInfo.getName() != null) {
+                    cellContent3.setCellValue(personInfo.getName());
+                }
                 XSSFCell cellContent4 = rowContent.createCell(3);
-                if (personInfo.getIdCard() != null) {cellContent4.setCellValue(personInfo.getIdCard());}
+                if (personInfo.getPhone() != null) {
+                    cellContent4.setCellValue(personInfo.getPhone());
+                }
                 XSSFCell cellContent5 = rowContent.createCell(4);
-                if (personInfo.getCompanyName() != null) {cellContent5.setCellValue(personInfo.getCompanyName());}
+                if (personInfo.getIdCard() != null) {
+                    cellContent5.setCellValue(personInfo.getIdCard());
+                }
+                XSSFCell cellContent6 = rowContent.createCell(5);
+                if (personInfo.getCompanyName() != null) {
+                    cellContent6.setCellValue(personInfo.getCompanyName());
+                }
 
 //                HSSFCell cellContent5 = rowContent.createCell(4);
 //                if (personInfo.getPosition1() != null) {cellContent5.setCellValue(personInfo.getPosition1());}