|
@@ -11,6 +11,7 @@ import com.qmth.sop.business.entity.TBDing;
|
|
import com.qmth.sop.business.entity.TBDingApply;
|
|
import com.qmth.sop.business.entity.TBDingApply;
|
|
import com.qmth.sop.business.entity.TFCustomFlowEntity;
|
|
import com.qmth.sop.business.entity.TFCustomFlowEntity;
|
|
import com.qmth.sop.business.mapper.TBDingApplyMapper;
|
|
import com.qmth.sop.business.mapper.TBDingApplyMapper;
|
|
|
|
+import com.qmth.sop.business.service.BasicAttachmentService;
|
|
import com.qmth.sop.business.service.TBDingApplyService;
|
|
import com.qmth.sop.business.service.TBDingApplyService;
|
|
import com.qmth.sop.business.service.TBDingService;
|
|
import com.qmth.sop.business.service.TBDingService;
|
|
import com.qmth.sop.business.service.TFCustomFlowEntityService;
|
|
import com.qmth.sop.business.service.TFCustomFlowEntityService;
|
|
@@ -24,10 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
-import java.util.Arrays;
|
|
|
|
-import java.util.Map;
|
|
|
|
-import java.util.Objects;
|
|
|
|
-import java.util.Optional;
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
@@ -49,6 +47,9 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
|
|
@Resource
|
|
@Resource
|
|
TBDingService tbDingService;
|
|
TBDingService tbDingService;
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ BasicAttachmentService basicAttachmentService;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 新增考勤异常补卡申请
|
|
* 新增考勤异常补卡申请
|
|
*
|
|
*
|
|
@@ -86,9 +87,23 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public IPage<DingApplyUnDoneResult> flowTaskUnDoneList(IPage<Map> iPage, Long serviceId, String name, Long supplierId, String customName, String startTime, String endTime, Long applyStartTime, Long applyEndTime) {
|
|
|
|
|
|
+ public IPage<DingApplyUnDoneResult> flowTaskUnDoneList(IPage<Map> iPage, Long serviceId, String name, Long supplierId, String customName, String startTime, String endTime, Long applyStartTime, Long applyEndTime) throws Exception {
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
- return this.baseMapper.flowTaskUnDoneList(iPage, Arrays.asList(sysUser.getId().toString()), serviceId, name, supplierId, customName, startTime, endTime, applyStartTime, applyEndTime);
|
|
|
|
|
|
+ IPage<DingApplyUnDoneResult> dingApplyUnDoneResultIPage = this.baseMapper.flowTaskUnDoneList(iPage, Arrays.asList(sysUser.getId().toString()), serviceId, name, supplierId, customName, startTime, endTime, applyStartTime, applyEndTime);
|
|
|
|
+ if (Objects.nonNull(dingApplyUnDoneResultIPage) && !CollectionUtils.isEmpty(dingApplyUnDoneResultIPage.getRecords())) {
|
|
|
|
+ for (DingApplyUnDoneResult d : dingApplyUnDoneResultIPage.getRecords()) {
|
|
|
|
+ if (Objects.nonNull(d.getAttachmentPaths())) {
|
|
|
|
+ String[] strs = d.getAttachmentPaths().split(";");
|
|
|
|
+ StringJoiner stringJoiner = new StringJoiner(";");
|
|
|
|
+ for (int i = 0; i < strs.length; i++) {
|
|
|
|
+ String path = basicAttachmentService.filePreview(strs[i]);
|
|
|
|
+ stringJoiner.add(path);
|
|
|
|
+ }
|
|
|
|
+ d.setAttachmentPaths(stringJoiner.toString());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return dingApplyUnDoneResultIPage;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -107,8 +122,22 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public IPage<DingApplyDoneResult> flowTaskDoneList(IPage<Map> iPage, Long serviceId, String name, Long supplierId, DingExceptionApproveEnum dingExceptionApprove, String customName, String startTime, String endTime, Long applyStartTime, Long applyEndTime) {
|
|
|
|
|
|
+ public IPage<DingApplyDoneResult> flowTaskDoneList(IPage<Map> iPage, Long serviceId, String name, Long supplierId, DingExceptionApproveEnum dingExceptionApprove, String customName, String startTime, String endTime, Long applyStartTime, Long applyEndTime) throws Exception {
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
- return this.baseMapper.flowTaskDoneList(iPage, Arrays.asList(sysUser.getId().toString()), serviceId, name, supplierId, Objects.nonNull(dingExceptionApprove) ? dingExceptionApprove.getTitle() : null, customName, startTime, endTime, applyStartTime, applyEndTime);
|
|
|
|
|
|
+ IPage<DingApplyDoneResult> dingApplyDoneResultIPage = this.baseMapper.flowTaskDoneList(iPage, Arrays.asList(sysUser.getId().toString()), serviceId, name, supplierId, Objects.nonNull(dingExceptionApprove) ? dingExceptionApprove.getTitle() : null, customName, startTime, endTime, applyStartTime, applyEndTime);
|
|
|
|
+ if (Objects.nonNull(dingApplyDoneResultIPage) && !CollectionUtils.isEmpty(dingApplyDoneResultIPage.getRecords())) {
|
|
|
|
+ for (DingApplyDoneResult d : dingApplyDoneResultIPage.getRecords()) {
|
|
|
|
+ if (Objects.nonNull(d.getAttachmentPaths())) {
|
|
|
|
+ String[] strs = d.getAttachmentPaths().split(";");
|
|
|
|
+ StringJoiner stringJoiner = new StringJoiner(";");
|
|
|
|
+ for (int i = 0; i < strs.length; i++) {
|
|
|
|
+ String path = basicAttachmentService.filePreview(strs[i]);
|
|
|
|
+ stringJoiner.add(path);
|
|
|
|
+ }
|
|
|
|
+ d.setAttachmentPaths(stringJoiner.toString());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return dingApplyDoneResultIPage;
|
|
}
|
|
}
|
|
}
|
|
}
|