提交 e473e516 authored 作者: 任建彩's avatar 任建彩

优化

上级 b1d270d7
......@@ -75,7 +75,13 @@
<!-- </dependency>-->
<!-- JSTL for JSP spring boot搭建web项目,跳转到jsp一定要添加下面的jar包,否则出现跳转的时候,变成下载的功能,保存该页面-->
<dependency>
<groupId>com.taobao.top</groupId>
<artifactId>top-api-sdk-dev</artifactId>
<version>ding-open-mc-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${pom.basedir}/src/lib/taobao-sdk-java-auto_1479188381469-20210922.jar</systemPath>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
......@@ -425,6 +431,10 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!--用于钉钉消息引用jar配置 -->
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
<!--JIB构建镜像-->
<!-- <plugin>
......
......@@ -4,6 +4,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.common.CommonResult;
......@@ -28,10 +29,6 @@ public class StatisticsController {
@Autowired
private StatisticsProjectService projectService;
@Autowired
private TaskService taskService;
@Autowired
private UserTaskLevelService service;
@ApiOperation(value = "项目统计")
......@@ -39,17 +36,17 @@ public class StatisticsController {
public CommonResult<StatisticsProjectNumVo> projectList(String years){
return CommonResult.success(projectService.projectList(years));
}
@ApiOperation(value = "各部门产出折线图数据")
@GetMapping("/echart/Data")
public CommonResult<EchartsDataVo> echartsData(String years) {
EchartsDataVo data = projectService.selectEChartsData(years);
@ApiOperation(value = "各部门产出折线图数据", notes = "各部门产出折线图数据")
@RequestMapping(value = "/echart/Data", method = RequestMethod.GET)
public CommonResult<EchartsDataVo> echartsData(String years,String project) {
EchartsDataVo data = projectService.selectEChartsData(years,project);
return CommonResult.success(data);
}
@ApiOperation(value = "售前折线图")
@GetMapping("/preSale/Data")
public CommonResult<PreSaleEchartsDataVo> preSaleEchartsData(String years) {
PreSaleEchartsDataVo data = projectService.selectPreSaleEchartsData(years);
public CommonResult<PreSaleEchartsDataVo> preSaleEchartsData(String years,Integer userId) {
PreSaleEchartsDataVo data = projectService.selectPreSaleEchartsData(years,userId);
return CommonResult.success(data);
}
}
......@@ -20,6 +20,6 @@ public class QueryStatisticsProjectRequest implements Serializable {
@ApiModelProperty("年份")
private String years;
@ApiModelProperty("项目状态: 1项目启动、2需求分析、3项目开发、4系统测试、5部署试运行、6项目结项、7售后期、8已归档 ")
@ApiModelProperty("项目状态: 1全部任务、2项目任务 ")
private String status;
}
......@@ -18,4 +18,8 @@ public class DeptTotalInfoVo {
private Integer sumUser;
@ApiModelProperty("均值")
private BigDecimal average;
@ApiModelProperty("月产出总量")
private BigDecimal monthSumTime;
@ApiModelProperty("月均值")
private BigDecimal monthAverage;
}
......@@ -161,7 +161,7 @@ public class DiyTypeController {
if(StringUtils.isNoneBlank(projectId)) {
qw.eq("project_id", projectId);
}
qw.orderByDesc("sort");
qw.orderByAsc("sort");
List<DiyType> list = service.list(qw);
List<DiyTypeVO> voList = Copy.copyList(list , DiyTypeVO.class, obj -> obj.getParentId().equals("0"));
tree(list,voList);
......
......@@ -7,6 +7,12 @@ import org.apache.ibatis.annotations.Select;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zrqx.olive.personnel.request.QueryStatisticsProjectRequest;
import com.zrqx.olive.personnel.vo.EchartsDataDaysVo;
import com.zrqx.olive.personnel.vo.EchartsDataMonthsVo;
import com.zrqx.olive.personnel.vo.EchartsDataweeksVo;
import com.zrqx.olive.personnel.vo.PreSaleEchartsDataMonthsVo;
import com.zrqx.olive.personnel.vo.PreSaleEchartsDataQuartersVo;
import com.zrqx.olive.personnel.vo.PreSaleEchartsDataYearsVo;
import com.zrqx.olive.personnel.vo.StatisticsProjectNumVo;
import com.zrqx.olive.project.model.StatisticsProject;
import com.zrqx.olive.project.request.QueryProjectRequest;
......@@ -57,5 +63,77 @@ public interface StatisticsProjectDao extends BaseMapper<StatisticsProject> {
+ "</if>"
+ "</script>")
Integer projetCount(@Param("years") String years,@Param("status") String status);
@Select("<script>"
+"SELECT days.days,IFNULL(SUM(working_hours),'0')sumTime,IFNULL(c.department_name,#{department_name}) deptName FROM "
+"(SELECT @date := DATE_ADD(@date, INTERVAL + 1 DAY) days FROM( "
+" SELECT @date := DATE_ADD(#{year1}, INTERVAL - 7 DAY) FROM t_task LIMIT 7 ) time) AS days "
+" LEFT JOIN t_task a ON TO_DAYS(a.complete_Time) = TO_DAYS(days.days) "
+"LEFT JOIN sys_department c on a.department_id=c.id where 1=1 "
+ "<if test = 'projectId!=null'> "
+ " and a.project_id =#{projectId}"
+ "</if>"
+ "<if test = 'department_name!=null'> "
+ " and (department_name =#{department_name} or department_name is null) "
+ "</if>"
+" GROUP BY days.days"
+ "</script>")
List<EchartsDataDaysVo> selectEChartsDataDs(@Param("department_name") String department_name,@Param("projectId") String projectId, @Param("year1") String year1);
@Select("<script>"
+ " SELECT IFNULL(SUM(a.working_hours),'0') sumTime,IFNULL(c.department_name,#{department_name}) deptName,DATE_FORMAT(complete_Time,'%Y年第%u周') weeks FROM t_task a, sys_department c"
+ " WHERE a.department_id=c.id and (department_name =#{department_name} or department_name is null) "
+ "<if test = 'projectId!=null'> "
+ " and a.project_id =#{projectId}"
+ "</if>"
+ " and DATE_FORMAT(a.complete_Time,'%Y-%m-%d') &gt;= DATE_FORMAT(DATE_SUB(#{year1}, INTERVAL 26 DAY),'%Y-%m-%d') "
+ " AND DATE_FORMAT(a.complete_Time,'%Y-%m-%d') &lt;= DATE_FORMAT(#{year1},'%Y-%m-%d') "
+ " GROUP BY weeks ORDER BY weeks "
+ "</script>")
List<EchartsDataweeksVo> selectEChartsWeeks(@Param("department_name") String department_name,@Param("projectId") String projectId, @Param("year1") String year1);
@Select("<script>"
+ " SELECT IFNULL(SUM(a.working_hours),'0') sumTime,IFNULL(c.department_name,#{department_name}) deptName,DATE_FORMAT(a.complete_Time,'%Y-%m') months FROM t_task a, sys_department c "
+ " WHERE a.department_id=c.id and (department_name =#{department_name} or department_name is null) "
+ "<if test = 'projectId!=null'> "
+ " and a.project_id =#{projectId}"
+ "</if>"
+ " AND a.complete_Time BETWEEN DATE_SUB(DATE_FORMAT(#{year1},'%Y-%m-%d'),INTERVAL 12 MONTH) AND DATE_FORMAT(#{year1},'%Y-%m-%d') "
+ " AND YEAR(a.complete_Time) = YEAR(#{year1}) "
+ " GROUP BY months ORDER BY months "
+ "</script>")
List<EchartsDataMonthsVo> selectEChartsDatams(@Param("department_name") String department_name,@Param("projectId") String projectId, @Param("year1") String year1);
@Select("<script>"
+ " SELECT IFNULL(SUM(a.working_hours),'0') sumTime,IFNULL(c.department_name,#{department_name}) deptName,DATE_FORMAT(a.complete_Time,'%Y-%m') months FROM t_task a, sys_department c "
+ " WHERE a.department_id=c.id and a.status=2 and (department_name =#{department_name} or department_name is null) "
+ "<if test = 'userId!=null'> "
+ " and a.user_id= #{userId}"
+ "</if>"
+ " AND a.complete_Time BETWEEN DATE_SUB(DATE_FORMAT(#{year1},'%Y-%m-%d'),INTERVAL 12 MONTH) AND DATE_FORMAT(#{year1},'%Y-%m-%d') "
+ " AND YEAR(a.complete_Time) = YEAR(#{year1}) "
+ " GROUP BY months ORDER BY months "
+ "</script>")
List<PreSaleEchartsDataMonthsVo> selectPreSaleEchartsMonthsData(@Param("department_name")String department_name,@Param("userId")Integer userId,@Param("year1")String year1);
@Select("<script>"
+"SELECT IFNULL(SUM(a.working_hours),'0') sumTime,IFNULL(c.department_name,#{department_name}) deptName,QUARTER(a.complete_Time) quarters "
+"from t_task a LEFT JOIN sys_department c ON a.department_id=c.id "
+" WHERE a.status=2 AND (department_name =#{department_name} or department_name is null)"
+ "<if test = 'userId!=null'> "
+ " and a.user_id= #{userId}"
+ "</if>"
+"AND QUARTER(a.complete_Time) IN(1,2,3,4) AND YEAR(complete_Time)=YEAR(#{year1}) "
+"GROUP BY quarters ORDER BY quarters "
+"</script>")
List<PreSaleEchartsDataQuartersVo> selectPreSaleEchartsQuartersData(@Param("department_name")String department_name,@Param("userId")Integer userId,@Param("year1")String year1);
@Select("<script>"
+"SELECT IFNULL(SUM(a.working_hours),'0') sumTime,IFNULL(c.department_name,#{department_name}) deptName,YEAR(a.complete_Time) years "
+"from t_task a LEFT JOIN sys_department c ON a.department_id=c.id "
+" WHERE a.status=2 AND (department_name =#{department_name} or department_name is null)"
+ "<if test = 'userId!=null'> "
+ " and a.user_id= #{userId}"
+ "</if>"
+"AND YEAR(a.complete_Time) &lt;= YEAR(#{year1}) "
+" GROUP BY years ORDER BY years "
+"</script>")
List<PreSaleEchartsDataYearsVo> selectPreSaleEchartsYearsData(@Param("department_name")String department_name,@Param("userId") Integer userId,@Param("year1")String year1);
}
......@@ -83,7 +83,23 @@ public interface StatisticsProjectService extends IService<StatisticsProject> {
* @date 2021年9月22日
*/
StatisticsProjectNumVo projectList(String years);
PreSaleEchartsDataVo selectPreSaleEchartsData(String years);
EchartsDataVo selectEChartsData(String years);
/**
* 售前折线图
* @Title: StatisticsProjectService.java
* @Package com.zrqx.olive.project.service
* @Description: TODO
* @author 任建彩
* @date 2021年9月24日
*/
PreSaleEchartsDataVo selectPreSaleEchartsData(String years,Integer userId);
/**
* 各部门产出折线图数据
* @Title: StatisticsProjectService.java
* @Package com.zrqx.olive.project.service
* @Description: TODO
* @author 任建彩
* @date 2021年9月24日
*/
EchartsDataVo selectEChartsData(String years,String project);
}
......@@ -30,7 +30,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, Customer> imp
@Override
public PageInfo<Customer> page(QueryCustomerRequest form, PageParamRequest pageParamRequest) {
if(pageParamRequest.getOrderBy()==null) {
pageParamRequest.setOrderBy("upload_time desc,px desc");
pageParamRequest.setOrderBy("px desc");
}
PageHelper.startPage(pageParamRequest.getPage(), pageParamRequest.getLimit());
......
package com.zrqx.olive.timeApply.controller;
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.Date;
import java.util.List;
......@@ -18,6 +21,7 @@ import com.common.CheckAdminToken;
import com.common.CommonResult;
import com.common.PageParamRequest;
import com.github.pagehelper.PageInfo;
import com.taobao.api.ApiException;
import com.zrqx.olive.project.model.StatisticsProject;
import com.zrqx.olive.project.model.Team;
import com.zrqx.olive.project.service.StatisticsProjectService;
......@@ -107,9 +111,8 @@ public class TimeApplyChangeController {
*/
@ApiOperation(value = "新增变更",notes = "新增变更")
@PostMapping("/timeApplyChange/save")
public CommonResult<Boolean> saveChange(@RequestBody TimeApplyChange form) {
public CommonResult<Boolean> saveChange(@RequestBody TimeApplyChange form) throws InvalidKeyException, NoSuchAlgorithmException, UnsupportedEncodingException, ApiException{
boolean b = timeApplyChangeService.saveChange(form);
return CommonResult.success(b);
}
......@@ -123,36 +126,11 @@ public class TimeApplyChangeController {
@ApiOperation(value = "审核",notes = "审核")
@PostMapping("/timeApplyChange/check")
public CommonResult<Boolean> updateChangeStatus(@RequestBody CheckTimeApplyStatusForm form) {
TimeApplyChange entity = timeApplyChangeService.getById(form.getId());
if (StringUtils.isNotBlank(form.getStatus1())) {
entity.setStatus1(form.getStatus1());
entity.setCheckTime1(new Date());
}
if (StringUtils.isNotBlank(form.getStatus2())) {
entity.setStatus2(form.getStatus2());
entity.setCheckTime2(new Date());
}
entity.setRemark(form.getRemark());
boolean b = timeApplyChangeService.updateById(entity);
if (b) {
if(entity.getStatus1().equals("1") && entity.getStatus2().equals("4")) {
StatisticsProject project = projectService.getById(entity.getProjectId());
if(project!=null) {
project.setTotalApplyTime(project.getTotalApplyTime().add(entity.getChangeTime()));
project.setToBeAllocated(project.getToBeAllocated().add(entity.getChangeTime()));
projectService.updateById(project);
}
QueryWrapper<Team> qw = new QueryWrapper<Team>();
qw.eq("department_id", entity.getDepartmentId());
qw.eq("project_id", entity.getProjectId());
Team team = teamService.getOne(qw);
team.setTotal(team.getTotal().add(entity.getChangeTime()));
team.setToBeAllocated(team.getToBeAllocated().add(entity.getChangeTime()));
teamService.updateById(team);
}
}
return CommonResult.success();
public CommonResult<Boolean> updateChangeStatus(@RequestBody CheckTimeApplyStatusForm form,HttpServletRequest request) throws Exception {
String token = checkAdminToken.getTokenFormRequest(request);
SystemAdminResponse systemAdminResponse = systemAdminService.getInfoByToken(token);
boolean status = timeApplyChangeService.updateChangeStatus(systemAdminResponse,form);
return CommonResult.success(status);
}
@ApiOperation(value = "删除",notes = "删除")
......
package com.zrqx.olive.timeApply.service;
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import javax.servlet.http.HttpServletRequest;
import com.baomidou.mybatisplus.extension.service.IService;
import com.common.MyRecord;
import com.common.PageParamRequest;
import com.github.pagehelper.PageInfo;
import com.taobao.api.ApiException;
import com.zrqx.olive.system.response.SystemAdminResponse;
import com.zrqx.olive.timeApply.model.TimeApplyChange;
import com.zrqx.olive.timeApply.request.CheckTimeApplyStatusForm;
import com.zrqx.olive.timeApply.request.TimeApplyChangeForm;
import com.zrqx.olive.timeApply.request.TimeApplyForm;
import com.zrqx.olive.timeApply.vo.MyTimeApplyPageVo;
......@@ -31,6 +38,10 @@ public interface TimeApplyChangeService extends IService<TimeApplyChange> {
PageInfo<TimeApplyChangeVo> pageTimeApplyChange(PageParamRequest pageParam, TimeApplyChangeForm form,SystemAdminResponse systemAdminResponse,HttpServletRequest request);
boolean saveChange(TimeApplyChange form);
boolean saveChange(TimeApplyChange form)throws InvalidKeyException, NoSuchAlgorithmException, UnsupportedEncodingException, ApiException;
boolean updateChangeStatus(SystemAdminResponse systemAdminResponse,CheckTimeApplyStatusForm form) throws Exception,InvalidKeyException, NoSuchAlgorithmException, UnsupportedEncodingException, ApiException;
}
package com.zrqx.olive.timeApply.service.impl;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.common.PageParamRequest;
import com.dingtalk.api.DefaultDingTalkClient;
import com.dingtalk.api.DingTalkClient;
import com.dingtalk.api.request.OapiRobotSendRequest;
import com.dingtalk.api.response.OapiRobotSendResponse;
import com.enums.CheckStatusEnum;
import com.enums.ProjectStatusEnum;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.taobao.api.ApiException;
import com.utils.bean.BeanUtils;
import com.zrqx.olive.project.dao.StatisticsProjectDao;
import com.zrqx.olive.project.model.StatisticsProject;
import com.zrqx.olive.project.model.Team;
import com.zrqx.olive.project.service.StatisticsProjectService;
import com.zrqx.olive.project.service.TeamService;
import com.zrqx.olive.system.response.SystemAdminResponse;
import com.zrqx.olive.timeApply.dao.TimeApplyChangeDao;
import com.zrqx.olive.timeApply.model.TimeApplyChange;
import com.zrqx.olive.timeApply.request.CheckTimeApplyStatusForm;
import com.zrqx.olive.timeApply.request.TimeApplyChangeForm;
import com.zrqx.olive.timeApply.request.TimeApplyForm;
import com.zrqx.olive.timeApply.service.TimeApplyChangeService;
......@@ -43,7 +61,12 @@ public class TimeApplyChangeServiceImpl extends ServiceImpl<TimeApplyChangeDao,T
private TimeApplyChangeDao timeApplyChangeMapper;
@Autowired
private StatisticsProjectDao projectDao;
@Autowired
private TimeApplyChangeService timeApplyChangeService;
@Autowired
private StatisticsProjectService projectService;
@Autowired
private TeamService teamService;
@Override
public PageInfo<TimeApplyVo> pageTimeApply(SystemAdminResponse request,PageParamRequest pageParamRequest) {
......@@ -226,7 +249,7 @@ public class TimeApplyChangeServiceImpl extends ServiceImpl<TimeApplyChangeDao,T
@Override
public boolean saveChange(TimeApplyChange form) {
public boolean saveChange(TimeApplyChange form) throws InvalidKeyException, NoSuchAlgorithmException, UnsupportedEncodingException, ApiException {
form.setCreateTime(new Date());
if (form.getDepartmentId() == null || form.getType() == null || form.getChangeTime() == null || form.getReason() == null) {
return false;
......@@ -237,6 +260,75 @@ public class TimeApplyChangeServiceImpl extends ServiceImpl<TimeApplyChangeDao,T
timeApplyChangeMapper.insert(form);
StatisticsProject project = projectDao.selectById(form.getProjectId());
project.setTotalApplyTime(form.getChangeTime());
dingding(1,null,project.getProject(),null);
return true;
}
@Override
public boolean updateChangeStatus(SystemAdminResponse systemAdminResponse,CheckTimeApplyStatusForm form) throws InvalidKeyException, NoSuchAlgorithmException, UnsupportedEncodingException, ApiException {
// TODO Auto-generated method stub
String value = systemAdminResponse.getRealName();
TimeApplyChange entity = timeApplyChangeService.getById(form.getId());
if (StringUtils.isNotBlank(form.getStatus1())) {
entity.setStatus1(form.getStatus1());
entity.setCheckTime1(new Date());
}
if (StringUtils.isNotBlank(form.getStatus2())) {
entity.setStatus2(form.getStatus2());
entity.setCheckTime2(new Date());
}
entity.setRemark(form.getRemark());
boolean b = timeApplyChangeService.updateById(entity);
if (b) {
StatisticsProject project = projectService.getById(entity.getProjectId());
if(entity.getStatus1().equals("1") && entity.getStatus2().equals("4")) {
if(project!=null) {
project.setTotalApplyTime(project.getTotalApplyTime().add(entity.getChangeTime()));
project.setToBeAllocated(project.getToBeAllocated().add(entity.getChangeTime()));
projectService.updateById(project);
}
QueryWrapper<Team> qw = new QueryWrapper<Team>();
qw.eq("department_id", entity.getDepartmentId());
qw.eq("project_id", entity.getProjectId());
Team team = teamService.getOne(qw);
team.setTotal(team.getTotal().add(entity.getChangeTime()));
team.setToBeAllocated(team.getToBeAllocated().add(entity.getChangeTime()));
teamService.updateById(team);
}
dingding(2,value,project.getProject(),entity.getProjectId());
}
return true;
}
public void dingding(Integer type,String name,String project,String projectId) throws NoSuchAlgorithmException, InvalidKeyException, UnsupportedEncodingException, ApiException {
Long timestamp = System.currentTimeMillis();
String secret ="SECcffcbfac4d3cc71b47d00376f10118854ad1a984bd9376eda3013df131c58ed8";
//String secret ="SECd4a6be1e02dc9864c688f283e3e0a2486d0f9211648a17b17d58dea331b15534";
String stringToSign = timestamp + "\n" + secret;
Mac mac =Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(secret.getBytes("UTF-8"), "HmacSHA256"));
byte[] signData = mac.doFinal(stringToSign.getBytes("UTF-8"));
String sign = URLEncoder.encode(new String(Base64.encodeBase64(signData)),"UTF-8");
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/robot/send?access_token=069cb654aaa03384e80a70e84e8b8c53c4c8afac5e598271600edb7b5c529518&timestamp="+timestamp+"&sign="+sign+"");
//DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/robot/send?access_token=0ae8cbc485e8a22e12373e9806492adb134106b4b33a1e719a18ca2bfc1592aa&timestamp="+timestamp+"&sign="+sign+"");
OapiRobotSendRequest request = new OapiRobotSendRequest();
request.setMsgtype("link");
OapiRobotSendRequest.Link link = new OapiRobotSendRequest.Link();
link.setPicUrl("");
link.setTitle("中软启信管理系统");
if(type==1) {
link.setMessageUrl("http://test12.zhongdianyun.com/#/project_manage/toAudit");
link.setText("段思明提交了《"+project+"》的工时申请单,请您尽快审核!");
}
if(type==2) {
link.setMessageUrl("http://test12.zhongdianyun.com/#/project_manage/project/applyDetail?projectId="+projectId);
link.setText(""+name+"已审核《"+project+"》的工时申请单!");
}
request.setLink(link);
/*
* OapiRobotSendRequest.At at = new OapiRobotSendRequest.At();
* at.setAtMobiles(Arrays.asList("15011250677"));//设置@那些人,使用的是手机号
* request.setAt(at);
*/
OapiRobotSendResponse response = client.execute(request);
}
}
......@@ -202,14 +202,13 @@ public interface TaskDao extends BaseMapper<Task> {
+ " AND a.project_id = #{id} "
+ "</if>"
+ "<if test = 'departmentId!=null and departmentId!=\"\"'> "
+ " and task_status=1 "
+ " AND a.department_id = #{departmentId} "
+ "</if>"
+ "<if test = 'userId!=null and userId!=\"\"'> "
+ " and (task_status=1 or task_status=2 or task_status=3) "
+ " AND a.user_id = #{userId} "
+ "</if>"
+ "<if test = 'userId==null and userId==\"\"'> "
+ "<if test = 'userId==null'> "
+ " and task_status=1 "
+ "</if>"
+ "</script>")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论