fix
This commit is contained in:
parent
ad9b449f99
commit
8871de88b3
@ -69,6 +69,7 @@ public class ShiroConfig {
|
|||||||
filterMap.put("/dtlg/jump", "anon");
|
filterMap.put("/dtlg/jump", "anon");
|
||||||
filterMap.put("/luck/getLuckById", "anon");
|
filterMap.put("/luck/getLuckById", "anon");
|
||||||
filterMap.put("/luck/updateLuck", "anon");
|
filterMap.put("/luck/updateLuck", "anon");
|
||||||
|
filterMap.put("/report/**","anon");
|
||||||
filterMap.put("/**", "oauth2");
|
filterMap.put("/**", "oauth2");
|
||||||
shiroFilter.setFilterChainDefinitionMap(filterMap);
|
shiroFilter.setFilterChainDefinitionMap(filterMap);
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,51 @@
|
|||||||
|
package com.lz.modules.app.controller;
|
||||||
|
|
||||||
|
import com.lz.common.utils.R;
|
||||||
|
import com.lz.modules.app.enums.ResultRecordStatusEnum;
|
||||||
|
import com.lz.modules.app.resp.OwnResultResp;
|
||||||
|
import com.lz.modules.app.service.DepartmentsService;
|
||||||
|
import com.lz.modules.app.service.DepartmentsStaffRelateService;
|
||||||
|
import com.lz.modules.sys.controller.AbstractController;
|
||||||
|
import com.lz.modules.sys.entity.app.ResultRecord;
|
||||||
|
import com.lz.modules.sys.service.app.ResultRecordService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: djc
|
||||||
|
* @Desc:
|
||||||
|
* @Date: 2020/9/11 10:22
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/report")
|
||||||
|
public class ReportResultController extends AbstractController{
|
||||||
|
@Autowired
|
||||||
|
private ResultRecordService resultRecordService;
|
||||||
|
@Autowired
|
||||||
|
private DepartmentsStaffRelateService departmentsStaffRelateService;
|
||||||
|
@Autowired
|
||||||
|
private DepartmentsService departmentsService;
|
||||||
|
|
||||||
|
|
||||||
|
@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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("/team/result")
|
||||||
|
public R teamResult(){
|
||||||
|
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
package com.lz.modules.app.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: djc
|
||||||
|
* @Desc:
|
||||||
|
* @Date: 2020/9/14 9:38
|
||||||
|
*/
|
||||||
|
public enum ResultRecordStatusEnum {
|
||||||
|
CREATE(0,"新建"),
|
||||||
|
AUDIT(1,"提交审批中"),
|
||||||
|
REFUSE(2,"拒绝"),
|
||||||
|
WAIT_COMMIT(3,"侍提交"),
|
||||||
|
AGREE(4,"审批通过"),
|
||||||
|
REJECT(5,"驳回");
|
||||||
|
|
||||||
|
private int status;
|
||||||
|
private String desc;
|
||||||
|
|
||||||
|
ResultRecordStatusEnum(int status, String desc) {
|
||||||
|
this.status = status;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDesc(String desc) {
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
18
src/main/java/com/lz/modules/app/resp/OwnResultResp.java
Normal file
18
src/main/java/com/lz/modules/app/resp/OwnResultResp.java
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
package com.lz.modules.app.resp;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: djc
|
||||||
|
* @Desc:
|
||||||
|
* @Date: 2020/9/14 10:07
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OwnResultResp {
|
||||||
|
//月份
|
||||||
|
private String monthTime;
|
||||||
|
//最后得分
|
||||||
|
private BigDecimal lastScore;
|
||||||
|
}
|
||||||
@ -10,8 +10,8 @@ package com.lz.modules.sys.dao.app;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.lz.modules.app.req.ResultRecordReq;
|
import com.lz.modules.app.req.ResultRecordReq;
|
||||||
|
import com.lz.modules.app.resp.OwnResultResp;
|
||||||
import com.lz.modules.flow.model.ResultRecordDto;
|
import com.lz.modules.flow.model.ResultRecordDto;
|
||||||
import com.lz.modules.sys.entity.app.ResultRecord;
|
import com.lz.modules.sys.entity.app.ResultRecord;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
@ -50,4 +50,6 @@ public interface ResultRecordMapper extends BaseMapper<ResultRecord> {
|
|||||||
void updateFlowStaffIdRoleToNull(@Param("id") Long id);
|
void updateFlowStaffIdRoleToNull(@Param("id") Long id);
|
||||||
|
|
||||||
List<ResultRecord> selectResultRecordByIds(@Param("recordIds") List<Long> recordIds);
|
List<ResultRecord> selectResultRecordByIds(@Param("recordIds") List<Long> recordIds);
|
||||||
|
|
||||||
|
List<OwnResultResp> ownResult(@Param("userId") Long userId, @Param("status") int status);
|
||||||
}
|
}
|
||||||
@ -6,13 +6,13 @@ import com.lz.common.utils.PageUtils;
|
|||||||
import com.lz.common.utils.R;
|
import com.lz.common.utils.R;
|
||||||
import com.lz.modules.app.entity.StaffEntity;
|
import com.lz.modules.app.entity.StaffEntity;
|
||||||
import com.lz.modules.app.req.ResultRecordReq;
|
import com.lz.modules.app.req.ResultRecordReq;
|
||||||
|
import com.lz.modules.app.resp.OwnResultResp;
|
||||||
import com.lz.modules.app.utils.t.TwoTuple;
|
import com.lz.modules.app.utils.t.TwoTuple;
|
||||||
import com.lz.modules.flow.entity.Flow;
|
import com.lz.modules.flow.entity.Flow;
|
||||||
import com.lz.modules.sys.entity.SysUserEntity;
|
import com.lz.modules.sys.entity.SysUserEntity;
|
||||||
import com.lz.modules.sys.entity.app.ResultRecord;
|
import com.lz.modules.sys.entity.app.ResultRecord;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -67,4 +67,8 @@ public interface ResultRecordService extends IService<ResultRecord> {
|
|||||||
|
|
||||||
void sendWorkMSG(StaffEntity mySelf, StaffEntity toSelf, WorkMsgTypeEnum workMsgTypeEnum
|
void sendWorkMSG(StaffEntity mySelf, StaffEntity toSelf, WorkMsgTypeEnum workMsgTypeEnum
|
||||||
, Long recordResultId, int count);
|
, Long recordResultId, int count);
|
||||||
|
|
||||||
|
List<OwnResultResp> ownResult(Long userId, int status);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -12,6 +12,7 @@ import com.lz.modules.app.entity.DepartmentsEntity;
|
|||||||
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
||||||
import com.lz.modules.app.entity.StaffEntity;
|
import com.lz.modules.app.entity.StaffEntity;
|
||||||
import com.lz.modules.app.req.ResultRecordReq;
|
import com.lz.modules.app.req.ResultRecordReq;
|
||||||
|
import com.lz.modules.app.resp.OwnResultResp;
|
||||||
import com.lz.modules.app.resp.ResultRecordResp;
|
import com.lz.modules.app.resp.ResultRecordResp;
|
||||||
import com.lz.modules.app.service.DepartmentsService;
|
import com.lz.modules.app.service.DepartmentsService;
|
||||||
import com.lz.modules.app.service.DepartmentsStaffRelateService;
|
import com.lz.modules.app.service.DepartmentsStaffRelateService;
|
||||||
@ -608,4 +609,10 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
String msg = dingtalkBusiness.sendWorkMSGByEntity(appid, mySelf, toSelf, workMsgTypeEnum, url + jump);
|
String msg = dingtalkBusiness.sendWorkMSGByEntity(appid, mySelf, toSelf, workMsgTypeEnum, url + jump);
|
||||||
log.info("发送钉钉工作消息{}", msg);
|
log.info("发送钉钉工作消息{}", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OwnResultResp> ownResult(Long userId, int status) {
|
||||||
|
return resultRecordMapper.ownResult(userId,status);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -247,5 +247,9 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="ownResult" resultType="com.lz.modules.app.resp.OwnResultResp">
|
||||||
|
SELECT last_score,DATE_FORMAT(month_time, '%Y-%m-%d') 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>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user