Browse Source

外勤考勤统计排序修改

xiao547607 4 years ago
parent
commit
23e7068f51

+ 2 - 0
common/src/main/java/com/jpsoft/shinestar/modules/business/dto/PersonInfoMonthWSADTO.java

@@ -39,5 +39,7 @@ public class PersonInfoMonthWSADTO {
     private BigDecimal leaveNum;
     @ApiModelProperty(value = "休息天数")
     private BigDecimal restDays;
+    @ApiModelProperty(value = "企业全称,为空则保存企业名称")
+    private String companyName;
 
 }

+ 7 - 2
web/src/main/java/com/jpsoft/shinestar/modules/business/controller/WorkScheduleAttendanceController.java

@@ -525,7 +525,12 @@ public class WorkScheduleAttendanceController {
             for (PersonInfo pi : page.getResult()) {
                 PersonInfoMonthWSADTO wsaDTO = new PersonInfoMonthWSADTO();
                 wsaDTO.setPersonInfo(pi);
-
+                CompanyInfo ci = companyInfoService.get(pi.getCompanyId());
+                if(StringUtils.isNotEmpty(ci.getFullName())){
+                    wsaDTO.setCompanyName(ci.getFullName());
+                }else{
+                    wsaDTO.setCompanyName(ci.getName());
+                }
                 //出差次数businessTripNum
 //                Map<String,Object> searchParams11 = new HashMap<>();
 //                searchParams11.put("workStatus","3");
@@ -1938,7 +1943,7 @@ public class WorkScheduleAttendanceController {
                 int colIndex = 0;
 
                 if(jsonObject.getJSONObject("personInfo")!=null){
-                    row.createCell(colIndex).setCellValue(jsonObject.getJSONObject("personInfo").getString("companyName"));
+                    row.createCell(colIndex).setCellValue(jsonObject.getString("companyName"));
                     colIndex++;
 
                     row.createCell(colIndex).setCellValue(jsonObject.getJSONObject("personInfo").getString("jobNumber"));