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<>(); return new ArrayList<>();
} }
// 操作票查询 // 操作票查询
LambdaQueryWrapper operateWrapper = Wrappers.<StandardTicketInfoEntity>lambdaQuery() LambdaQueryWrapper wrapper = new LambdaQueryWrapper();
.between(StandardTicketInfoEntity::getCreateTime,param.getStartTime(),param.getEndTime())
.in(StandardTicketInfoEntity::getCreateDept,depts.stream().map(Dept::getId).collect(Collectors.toList()));
if(!StringUtil.isEmpty(param.getFlowTaskName())){ 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); if(!StringUtil.isEmpty(param.getStartTime())){
// 工作票查询 wrapper.ge("CREATE_TIME",param.getStartTime());
LambdaQueryWrapper workWrapper = Wrappers.<StandardTicketInfoEntity>lambdaQuery() }
.between(StandardTicketInfoEntity::getCreateTime,param.getStartTime(),param.getEndTime()) if(!StringUtil.isEmpty(param.getEndTime())){
.in(StandardTicketInfoEntity::getCreateDept,depts.stream().map(Dept::getId).collect(Collectors.toList())); wrapper.le("CREATE_TIME",param.getEndTime());
if(!StringUtil.isEmpty(param.getFlowTaskName())){
workWrapper.eq("FLOW_TASK_NAME",param.getFlowTaskName());
} }
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->{ return depts.stream().map(dept->{
CensVo cens = new CensVo(); CensVo cens = new CensVo();
@ -139,21 +142,24 @@ public class CensServiceImpl implements CensService {
} }
// 操作票查询 // 操作票查询
LambdaQueryWrapper operateWrapper = Wrappers.<StandardTicketInfoEntity>lambdaQuery() LambdaQueryWrapper wrapper = new LambdaQueryWrapper();
.between(StandardTicketInfoEntity::getCreateTime,param.getStartTime(),param.getEndTime())
.in(StandardTicketInfoEntity::getCreateDept,depts.stream().map(Dept::getId).collect(Collectors.toList()));
if(!StringUtil.isEmpty(param.getFlowTaskName())){ 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); if(!StringUtil.isEmpty(param.getStartTime())){
// 工作票查询 wrapper.ge("CREATE_TIME",param.getStartTime());
LambdaQueryWrapper workWrapper = Wrappers.<StandardTicketInfoEntity>lambdaQuery() }
.between(StandardTicketInfoEntity::getCreateTime,param.getStartTime(),param.getEndTime()) if(!StringUtil.isEmpty(param.getEndTime())){
.in(StandardTicketInfoEntity::getCreateDept,depts.stream().map(Dept::getId).collect(Collectors.toList())); wrapper.le("CREATE_TIME",param.getEndTime());
if(!StringUtil.isEmpty(param.getFlowTaskName())){
workWrapper.eq("FLOW_TASK_NAME",param.getFlowTaskName());
} }
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 -> { return depts.stream().map(dept -> {
CensYearVo censYear = new CensYearVo(); CensYearVo censYear = new CensYearVo();
censYear.setDeptId(dept.getId()); 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 org.springblade.core.tool.utils.ObjectUtil;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;

Loading…
Cancel
Save