Ver Fonte

Merge remote-tracking branch 'origin/master'

zhengqiang há 4 anos atrás
pai
commit
3980c37761

+ 1 - 0
common/src/main/java/com/jpsoft/shinestar/modules/base/dto/PersonInfoDTO.java

@@ -87,4 +87,5 @@ public class PersonInfoDTO {
     @ApiModelProperty(value="健康码")
     private String healthyCode;
     private String jobNumber;
+    private String carNum;
 }

+ 6 - 0
common/src/main/resources/mapper/base/PersonInfo.xml

@@ -434,6 +434,12 @@
                     #{popedom}
                 </foreach>
             </if>
+            <if test="searchParams.jobNumber != null">
+                and a.job_number = #{searchParams.jobNumber}
+            </if>
+            <if test="searchParams.carNum != null">
+                and a.car_num like #{searchParams.carNum}
+            </if>
         </where>
         <foreach item="sort" collection="sortList" open="order by" separator=",">
             ${sort.name} ${sort.order}

+ 27 - 1
web/src/main/java/com/jpsoft/shinestar/modules/base/controller/PersonInfoController.java

@@ -568,6 +568,8 @@ public class PersonInfoController {
             @ApiImplicitParam(name = "parkId",value = "园区ID", required = false, paramType = "form",dataType = "String"),
             @ApiImplicitParam(name = "healthyCode", value = "健康码", required = false, paramType = "form", dataType = "String"),
             @ApiImplicitParam(name = "outsourcerStatus",value = "是否外勤人员", required = false, paramType = "form",dataType = "String"),
+            @ApiImplicitParam(name = "jobNumber",value = "工号", required = false, paramType = "form",dataType = "String"),
+            @ApiImplicitParam(name = "carNum",value = "车牌号", required = false, paramType = "form",dataType = "String"),
     })
     public MessageResult<Map> pageList(
             @RequestParam(value = "id", defaultValue = "") String id,
@@ -594,6 +596,8 @@ public class PersonInfoController {
             @RequestParam(value="enableAttendance",defaultValue="") Boolean enableAttendance,
             @RequestParam(value = "healthyCode", defaultValue = "")String healthyCode ,
             @RequestParam(value="outsourcerStatus",defaultValue="")  String outsourcerStatus,
+            @RequestParam(value="jobNumber",defaultValue="")  String jobNumber,
+            @RequestParam(value="carNum",defaultValue="")  String carNum,
             @RequestAttribute String subject){
         //当前用户ID
         User user = userService.get(subject);
@@ -732,6 +736,16 @@ public class PersonInfoController {
             }
         }
 
+        if (StringUtils.isNotEmpty(jobNumber)) {
+            searchParams.put("jobNumber", jobNumber);
+        }
+
+        if (StringUtils.isNotEmpty(carNum)) {
+            searchParams.put("carNum", "%" + carNum + "%");
+        }
+
+
+
         Page<PersonInfo> page = personInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
         Page<PersonInfoDTO> pageDTO = PojoUtils.convertPage(page, PersonInfoDTO.class);
 
@@ -1369,7 +1383,9 @@ public class PersonInfoController {
             @ApiImplicitParam(name = "position4",value = "四级位置", required = false, paramType = "form",dataType = "String"),
             @ApiImplicitParam(name = "position5",value = "五级位置", required = false, paramType = "form",dataType = "String"),
             @ApiImplicitParam(name = "faceBound",value = "是否同步", required = false, paramType = "form",dataType = "String"),
-            @ApiImplicitParam(name = "isUploadPhoto",value = "是否上传照片", required = false, paramType = "form",dataType = "String")
+            @ApiImplicitParam(name = "isUploadPhoto",value = "是否上传照片", required = false, paramType = "form",dataType = "String"),
+            @ApiImplicitParam(name = "jobNumber",value = "工号", required = false, paramType = "form",dataType = "String"),
+            @ApiImplicitParam(name = "carNum",value = "车牌号", required = false, paramType = "form",dataType = "String")
     })
     public MessageResult<String> exportXls(
             @RequestParam(value = "id", defaultValue = "") String id,
@@ -1388,6 +1404,8 @@ public class PersonInfoController {
             @RequestParam(value="pageSize",defaultValue="20") int pageSize,
             @RequestParam(value="faceBound",defaultValue="") Integer faceBound,
             @RequestParam(value="isUploadPhoto",defaultValue="") String isUploadPhoto,
+            @RequestParam(value="jobNumber",defaultValue="")  String jobNumber,
+            @RequestParam(value="carNum",defaultValue="")  String carNum,
             @RequestAttribute String subject){
         MessageResult<String> msgResult = new MessageResult<>();
         User user = userService.get(subject);
@@ -1523,6 +1541,14 @@ public class PersonInfoController {
                 searchParams.put("isUploadPhoto", isUploadPhoto);
             }
 
+            if (StringUtils.isNotEmpty(jobNumber)) {
+                searchParams.put("jobNumber", jobNumber);
+            }
+
+            if (StringUtils.isNotEmpty(carNum)) {
+                searchParams.put("carNum", "%" + carNum + "%");
+            }
+
             Page<PersonInfo> page = personInfoService.pageSearch(searchParams,1,10000,false,sortList);
 
             for(int i=0; i<page.size(); i++){

+ 3 - 4
web/src/main/java/com/jpsoft/shinestar/modules/business/controller/MeetingPersonRecodeController.java

@@ -260,7 +260,7 @@ public class MeetingPersonRecodeController {
         Map<String, Object> searchParams = new HashMap<>();
 
         List<Sort> sortList = new ArrayList<>();
-        sortList.add(new Sort("create_time", "desc"));
+        sortList.add(new Sort("a.sign_time", "desc"));
 
         if (StringUtils.isNotEmpty(meetingId)) {
             searchParams.put("meetingId", meetingId);
@@ -678,7 +678,7 @@ public class MeetingPersonRecodeController {
                 titles = new String[]{"序号","姓名","工号"};
             }
             else{
-                titles = new String[]{"序号","姓名","工号","会前签到时间","会后签到时间"};
+                titles = new String[]{"序号","姓名","工号","签到时间"};
             }
 
             for (int i=0;i<titles.length;i++) {
@@ -709,8 +709,7 @@ public class MeetingPersonRecodeController {
                     row.createCell(colIndex++).setCellValue(i+1);
                     row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("name"),""));
                     row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("jobNumber"),""));
-                    row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("startTime"),""));
-                    row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("endTime"),""));
+                    row.createCell(colIndex++).setCellValue(com.jpsoft.shinestar.modules.common.utils.StringUtils.strValue(map.get("sign_time"),""));
                 }
             }
         }