|
@@ -4,6 +4,7 @@ package com.management.platform.controller;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.github.pagehelper.util.StringUtil;
|
|
|
import com.management.platform.config.LimitRequest;
|
|
@@ -2450,5 +2451,27 @@ public class ReportController {
|
|
|
public HttpRespMsg getCustomDataWithDate(String startDate,String endDate,HttpServletRequest request){
|
|
|
return reportService.getCustomDataWithDate(startDate,endDate,request);
|
|
|
}
|
|
|
+
|
|
|
+ @RequestMapping("/denyByCheckId")
|
|
|
+ public HttpRespMsg denyByCheckId(String userId){
|
|
|
+ HttpRespMsg msg=new HttpRespMsg();
|
|
|
+ Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
|
|
|
+ LambdaQueryWrapper<Report> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.eq(Report::getState,0);
|
|
|
+ queryWrapper.eq(Report::getCompanyId,companyId);
|
|
|
+ queryWrapper.and(wrapper->wrapper.and(wr->wr.eq(Report::getAuditDeptManagerid,userId).eq(Report::getIsDeptAudit,1)).or(wr1->wr1.eq(Report::getProjectAuditorId,userId).eq(Report::getIsDeptAudit,0)));
|
|
|
+ List<Report> reportList = reportMapper.selectList(queryWrapper);
|
|
|
+ reportList.forEach(r->{
|
|
|
+ r.setState(2);
|
|
|
+ });
|
|
|
+ if(!reportService.updateBatchById(reportList)){
|
|
|
+ msg.setError("验证失败");
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
+ User user = userMapper.selectById(userId);
|
|
|
+ user.setIsActive(0);
|
|
|
+ userMapper.updateById(user);
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
}
|
|
|
|