fix
This commit is contained in:
parent
6f5a4105d2
commit
a34d67a231
@ -117,16 +117,6 @@ public class ReportResultController extends AbstractController{
|
||||
|
||||
}
|
||||
|
||||
@RequestMapping("/own/result")
|
||||
public R ownResult(Long userId){
|
||||
if(userId == null){
|
||||
//如果id为空,查询自己信息
|
||||
userId = getUserId();
|
||||
}
|
||||
List<OwnResultResp> ownResultResp = resultRecordService.ownResult(userId, ResultRecordStatusEnum.AGREE.getStatus());
|
||||
return R.ok().put("data",ownResultResp);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.lz.modules.app.resp;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@ -10,9 +12,12 @@ import java.math.BigDecimal;
|
||||
* @Date: 2020/9/14 10:07
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("个人成长曲线实体")
|
||||
public class OwnResultResp {
|
||||
//月份
|
||||
private String monthTime;
|
||||
//绩效
|
||||
@ApiModelProperty("绩效类型")
|
||||
private String name;
|
||||
//最后得分
|
||||
@ApiModelProperty("最后得分")
|
||||
private BigDecimal lastScore;
|
||||
}
|
||||
|
||||
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.lz.common.utils.PageUtils;
|
||||
import com.lz.common.utils.R;
|
||||
import com.lz.common.utils.StringUtil;
|
||||
import com.lz.modules.app.enums.ResultRecordStatusEnum;
|
||||
import com.lz.modules.app.resp.OwnResultResp;
|
||||
import com.lz.modules.equipment.entity.model.BasePage;
|
||||
import com.lz.modules.flow.dao.FlowStartMapper;
|
||||
import com.lz.modules.flow.entity.FlowStart;
|
||||
@ -15,6 +17,7 @@ import com.lz.modules.performance.res.ChartStatisticalRes;
|
||||
import com.lz.modules.performance.res.ResultRankListRes;
|
||||
import com.lz.modules.performance.service.ChartResultService;
|
||||
import com.lz.modules.sys.controller.AbstractController;
|
||||
import com.lz.modules.sys.service.app.ResultRecordService;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -36,6 +39,8 @@ public class ChartController extends AbstractController{
|
||||
private ChartResultService chartResultService;
|
||||
@Autowired
|
||||
private FlowStartMapper flowStartMapper;
|
||||
@Autowired
|
||||
private ResultRecordService resultRecordService;
|
||||
|
||||
@GetMapping("chart/result")
|
||||
@ApiOperation("获取绩效报表统计")
|
||||
@ -84,11 +89,16 @@ public class ChartController extends AbstractController{
|
||||
|
||||
|
||||
|
||||
@PostMapping("chart/test")
|
||||
public R chartTest(){
|
||||
List<FlowStart> starts = flowStartMapper.selectList(new QueryWrapper<FlowStart>().in("group_ids", Collections.EMPTY_LIST));
|
||||
System.out.println();
|
||||
return null;
|
||||
@RequestMapping("/own/result")
|
||||
@ApiOperation("获取个人成长曲线")
|
||||
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = OwnResultResp.class)})
|
||||
public R ownResult(Long userId){
|
||||
if(userId == null){
|
||||
//如果id为空,查询自己信息
|
||||
userId = getUserId();
|
||||
}
|
||||
List<OwnResultResp> ownResultResps = resultRecordService.ownResult(null);
|
||||
return R.ok().put("data",ownResultResps);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ public interface ResultRecordMapper extends BaseMapper<ResultRecord> {
|
||||
|
||||
List<ResultRecord> selectResultRecordByIds(@Param("recordIds") List<Long> recordIds);
|
||||
|
||||
List<OwnResultResp> ownResult(@Param("userId") Long userId, @Param("status") int status);
|
||||
List<OwnResultResp> ownResult(@Param("staffId") Long staffId);
|
||||
|
||||
List<GraphicsStatisticalDto> staffDistribution(@Param("monthTime") String monthTime,@Param("staffIds") List<String> staffIds);
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ public interface ResultRecordService extends IService<ResultRecord> {
|
||||
void sendWorkMSG(StaffEntity mySelf, StaffEntity toSelf, WorkMsgTypeEnum workMsgTypeEnum
|
||||
, Long recordResultId, int count);
|
||||
|
||||
List<OwnResultResp> ownResult(Long userId, int status);
|
||||
List<OwnResultResp> ownResult(Long staffId);
|
||||
|
||||
/**
|
||||
* 人员等级排布
|
||||
|
||||
@ -738,8 +738,8 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
||||
|
||||
|
||||
@Override
|
||||
public List<OwnResultResp> ownResult(Long userId, int status) {
|
||||
return resultRecordMapper.ownResult(userId,status);
|
||||
public List<OwnResultResp> ownResult(Long staffId) {
|
||||
return resultRecordMapper.ownResult(staffId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -281,8 +281,14 @@
|
||||
|
||||
|
||||
<select id="ownResult" resultType="com.lz.modules.app.resp.OwnResultResp">
|
||||
SELECT last_score,DATE_FORMAT(month_time, '%Y-%m') month_time from lz_result_record where is_delete=0 and status = #{status} and type=2 and staff_id = #{userId} ORDER BY month_time limit 6
|
||||
</select>
|
||||
SELECT all_score,name FROM lz_result_record r
|
||||
LEFT JOIN lz_flow_start f
|
||||
ON r.start_id = f.id
|
||||
where r.is_delete = 0 and f.is_delete = 0 and flow_process = 5 and staff_id = #{staffId}
|
||||
order by start_id desc
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<select id="staffDistribution" resultType="com.lz.modules.app.dto.GraphicsStatisticalDto">
|
||||
SELECT count(score_level) number ,score_level category from lz_result_record where
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user