Browse Source

#双票统计

zhongwei
yang_shj 1 year ago
parent
commit
0b6fcf53d9
  1. 54
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/CensServiceImpl.java
  2. 1
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/ObjectUtils.java

54
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/CensServiceImpl.java

@ -64,21 +64,24 @@ public class CensServiceImpl implements CensService {
return new ArrayList<>();
}
// 操作票查询
LambdaQueryWrapper operateWrapper = Wrappers.<StandardTicketInfoEntity>lambdaQuery()
.between(StandardTicketInfoEntity::getCreateTime,param.getStartTime(),param.getEndTime())
.in(StandardTicketInfoEntity::getCreateDept,depts.stream().map(Dept::getId).collect(Collectors.toList()));
LambdaQueryWrapper wrapper = new LambdaQueryWrapper();
if(!StringUtil.isEmpty(param.getFlowTaskName())){
operateWrapper.eq("FLOW_TASK_NAME",param.getFlowTaskName());
wrapper.eq("FLOW_TASK_NAME",param.getFlowTaskName());
}
List<StandardTicketInfoEntity> operates = operateTicketService.list(operateWrapper);
// 工作票查询
LambdaQueryWrapper workWrapper = Wrappers.<StandardTicketInfoEntity>lambdaQuery()
.between(StandardTicketInfoEntity::getCreateTime,param.getStartTime(),param.getEndTime())
.in(StandardTicketInfoEntity::getCreateDept,depts.stream().map(Dept::getId).collect(Collectors.toList()));
if(!StringUtil.isEmpty(param.getFlowTaskName())){
workWrapper.eq("FLOW_TASK_NAME",param.getFlowTaskName());
if(!StringUtil.isEmpty(param.getStartTime())){
wrapper.ge("CREATE_TIME",param.getStartTime());
}
if(!StringUtil.isEmpty(param.getEndTime())){
wrapper.le("CREATE_TIME",param.getEndTime());
}
List<WorkTicketInfoEntity> works = workTicketInfoService.list(workWrapper);
if(!StringUtil.isEmpty(param.getDeptId())){
wrapper.eq("CREATE_DEPT",param.getDeptId());
}else{
wrapper.in("CREATE_DEPT",depts.stream().map(Dept::getId).collect(Collectors.toList()));
}
List<StandardTicketInfoEntity> operates = operateTicketService.list(wrapper);
// 工作票查询
List<WorkTicketInfoEntity> works = workTicketInfoService.list(wrapper);
// 工作任务单
return depts.stream().map(dept->{
CensVo cens = new CensVo();
@ -139,21 +142,24 @@ public class CensServiceImpl implements CensService {
}
// 操作票查询
LambdaQueryWrapper operateWrapper = Wrappers.<StandardTicketInfoEntity>lambdaQuery()
.between(StandardTicketInfoEntity::getCreateTime,param.getStartTime(),param.getEndTime())
.in(StandardTicketInfoEntity::getCreateDept,depts.stream().map(Dept::getId).collect(Collectors.toList()));
LambdaQueryWrapper wrapper = new LambdaQueryWrapper();
if(!StringUtil.isEmpty(param.getFlowTaskName())){
operateWrapper.eq("FLOW_TASK_NAME",param.getFlowTaskName());
wrapper.eq("FLOW_TASK_NAME",param.getFlowTaskName());
}
List<StandardTicketInfoEntity> operates = operateTicketService.list(operateWrapper);
// 工作票查询
LambdaQueryWrapper workWrapper = Wrappers.<StandardTicketInfoEntity>lambdaQuery()
.between(StandardTicketInfoEntity::getCreateTime,param.getStartTime(),param.getEndTime())
.in(StandardTicketInfoEntity::getCreateDept,depts.stream().map(Dept::getId).collect(Collectors.toList()));
if(!StringUtil.isEmpty(param.getFlowTaskName())){
workWrapper.eq("FLOW_TASK_NAME",param.getFlowTaskName());
if(!StringUtil.isEmpty(param.getStartTime())){
wrapper.ge("CREATE_TIME",param.getStartTime());
}
if(!StringUtil.isEmpty(param.getEndTime())){
wrapper.le("CREATE_TIME",param.getEndTime());
}
List<WorkTicketInfoEntity> works = workTicketInfoService.list(workWrapper);
if(!StringUtil.isEmpty(param.getDeptId())){
wrapper.eq("CREATE_DEPT",param.getDeptId());
}else{
wrapper.in("CREATE_DEPT",depts.stream().map(Dept::getId).collect(Collectors.toList()));
}
List<StandardTicketInfoEntity> operates = operateTicketService.list(wrapper);
// 工作票查询
List<WorkTicketInfoEntity> works = workTicketInfoService.list(wrapper);
return depts.stream().map(dept -> {
CensYearVo censYear = new CensYearVo();
censYear.setDeptId(dept.getId());

1
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/utils/ObjectUtils.java

@ -6,7 +6,6 @@ import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.ObjectUtil;
import java.lang.reflect.Field;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;

Loading…
Cancel
Save