fix
This commit is contained in:
parent
56b0188dd9
commit
051a5b231f
@ -19,6 +19,7 @@ import com.lz.modules.app.resp.ResultDetailResp;
|
||||
import com.lz.modules.app.resp.Step;
|
||||
import com.lz.modules.app.service.DepartmentsService;
|
||||
import com.lz.modules.app.service.DepartmentsStaffRelateService;
|
||||
import com.lz.modules.app.service.StaffOccupationService;
|
||||
import com.lz.modules.app.service.StaffService;
|
||||
import com.lz.modules.flow.entity.*;
|
||||
import com.lz.modules.flow.model.*;
|
||||
@ -27,6 +28,7 @@ import com.lz.modules.flow.service.*;
|
||||
import com.lz.modules.job.business.DingtalkBusiness;
|
||||
import com.lz.modules.performance.dto.ResultTaskDto;
|
||||
|
||||
import com.lz.modules.performance.dto.StaffTypeDto;
|
||||
import com.lz.modules.performance.req.ResultUpdateTaskReq;
|
||||
|
||||
import com.lz.modules.performance.entity.ResultTask;
|
||||
@ -140,6 +142,8 @@ public class ResultRecordController extends AbstractController {
|
||||
|
||||
@Autowired
|
||||
private ResultTaskService resultTaskService;
|
||||
@Autowired
|
||||
private StaffOccupationService staffOccupationService;
|
||||
|
||||
|
||||
|
||||
@ -654,6 +658,12 @@ public class ResultRecordController extends AbstractController {
|
||||
}
|
||||
}
|
||||
|
||||
List<Long> staffIds = Lists.newArrayList(resultRecord.getStaffId());
|
||||
List<StaffTypeDto> staffTypeDtos = staffOccupationService.selectStaffTypesByStaffIds(staffIds);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(staffTypeDtos)){
|
||||
resultRecordDetailDto.setPosition(staffTypeDtos.get(0).getPosition());
|
||||
}
|
||||
FlowStart flowStart = flowStartService.selectFlowStartById(resultRecord.getStartId());
|
||||
if(flowStart != null){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
||||
|
||||
@ -98,6 +98,8 @@ public class ResultRecordDetailDto {
|
||||
//三级部门
|
||||
@ApiModelProperty(value = "三级部门", name = "departmentThree")
|
||||
private String departmentThree;
|
||||
@ApiModelProperty(value = "职位", name = "position")
|
||||
private String position;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@ -5,20 +5,28 @@ import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.poi.excel.ExcelUtil;
|
||||
import cn.hutool.poi.excel.ExcelWriter;
|
||||
import cn.hutool.poi.excel.StyleSet;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.lz.modules.app.entity.StaffEntity;
|
||||
import com.lz.modules.app.service.StaffService;
|
||||
import com.lz.modules.flow.model.ResultDetailDto;
|
||||
import com.lz.modules.flow.model.ResultRecordDetailDto;
|
||||
import com.lz.modules.flow.model.ResultRecortModelDto;
|
||||
import com.lz.modules.job.business.DingtalkBusiness;
|
||||
import com.lz.modules.performance.dto.RecordDetailExportDto;
|
||||
import com.lz.modules.performance.enums.ResultFlowProcessEnum;
|
||||
import com.lz.modules.performance.req.ChartResultReq;
|
||||
import com.lz.modules.performance.res.LevelDetailExportRes;
|
||||
import com.lz.modules.performance.service.ChartResultService;
|
||||
import com.lz.modules.sys.service.app.ResultRecordService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddressList;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -30,6 +38,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -43,9 +52,19 @@ import java.util.stream.Collectors;
|
||||
@Slf4j
|
||||
@Api(value="导出excel接口", tags={"导出表格"})
|
||||
public class ExportController {
|
||||
private Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Autowired
|
||||
private ChartResultService chartResultService;
|
||||
@Autowired
|
||||
DingtalkBusiness dingtalkBusiness;
|
||||
@Autowired
|
||||
private ResultRecordService resultRecordService;
|
||||
@Autowired
|
||||
private StaffService staffService;
|
||||
|
||||
static final List<Integer> process = Lists.newArrayList(ResultFlowProcessEnum.TARGET.getStatus(), ResultFlowProcessEnum.CONFIRM.getStatus(),
|
||||
ResultFlowProcessEnum.DO.getStatus(), ResultFlowProcessEnum.WRITE.getStatus());
|
||||
|
||||
@GetMapping("/export/levelDetail")
|
||||
@ApiOperation("导出等级详情")
|
||||
@ -87,7 +106,15 @@ public class ExportController {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/testDingTalkTask")
|
||||
public void testDingTalkTask(){
|
||||
List<Long> ids = resultRecordService.selectStaffIdsByFlowProcess(process);
|
||||
log.info(JSON.toJSONString(ids));
|
||||
List<Long> objects = Lists.newArrayList(313L,314L,294L);
|
||||
List<StaffEntity> staffEntities = staffService.selectByIds(objects);
|
||||
String res = dingtalkBusiness.sendTaskInputMsg(staffEntities);
|
||||
logger.info("绩效任务填写通知响应:" + res);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user