Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/V1' into V1

zhengqiang 5 rokov pred
rodič
commit
48a896ffb3

+ 2 - 0
common/src/main/java/com/jpsoft/smart/modules/base/dto/WorkAttendanceDTO.java

@@ -24,6 +24,8 @@ public class WorkAttendanceDTO {
 
     private String approvalPersonName;
 
+    private String approvalContent;
+
     private String typeN;
 
     private String approvalNo;

+ 2 - 2
common/src/main/java/com/jpsoft/smart/modules/business/service/impl/FillAttendanceServiceImpl.java

@@ -107,7 +107,7 @@ public class FillAttendanceServiceImpl implements FillAttendanceService {
             fillAttendance0.setStatus("0");
             fillAttendance0.setUpdateTime(new Date());
             fillAttendanceDAO.update(fillAttendance0);
-            if (photoFile != null) {
+            if (StringUtils.isNotBlank(photoFile)) {
                 FillAttendanceFiles fillAttendanceFiles = fillAttendanceFilesDAO.findByFillAttendanceId(fillAttendance0.getId());
                 if (fillAttendanceFiles != null){
                     fillAttendanceFiles.setFileUrl(photoFile);
@@ -148,7 +148,7 @@ public class FillAttendanceServiceImpl implements FillAttendanceService {
             fillAttendance.setCreateTime(new Date());
             fillAttendance.setDelFlag(false);
             fillAttendanceDAO.insert(fillAttendance);
-            if (photoFile != null) {
+            if (StringUtils.isNotBlank(photoFile)) {
                 FillAttendanceFiles fillAttendanceFiles = new FillAttendanceFiles();
                 fillAttendanceFiles.setId(UUID.randomUUID().toString());
                 fillAttendanceFiles.setFillAttendanceId(fillAttendance.getId());

+ 4 - 2
web/src/main/java/com/jpsoft/smart/modules/mobile/controller/WorkAttendanceApiController.java

@@ -607,11 +607,13 @@ public class WorkAttendanceApiController {
 
             PersonInfo approvalPerson = personInfoService.get(fillAttendance.getApprovalPersonId());
 
+            PersonInfo workerPerson = personInfoService.get(fillAttendance.getPersonId());
+
             WorkAttendanceDTO workAttendanceDTO = new WorkAttendanceDTO();
             BeanUtils.copyProperties(fillAttendance, workAttendanceDTO);
             workAttendanceDTO.setFillAttendanceDayAndTime(fillAttendance.getFillDay() + " " + fillAttendance.getFillAttendanceTime());
-            workAttendanceDTO.setPersonName(personInfo.getName());
-            workAttendanceDTO.setFaceImageUrl(personInfo.getFaceImageUrl());
+            workAttendanceDTO.setPersonName(workerPerson.getName());
+            workAttendanceDTO.setFaceImageUrl(workerPerson.getFaceImageUrl());
             workAttendanceDTO.setApprovalPersonName(approvalPerson.getName());
             if (fillAttendance.getType().equals("1")) {
                 workAttendanceDTO.setTypeN("外勤打卡");