|
|
@ -14,6 +14,8 @@ import com.hnac.hzims.operational.access.entity.OperAccessTaskEntity; |
|
|
|
import com.hnac.hzims.operational.access.feign.IOperAccessTaskClient; |
|
|
|
import com.hnac.hzims.operational.access.feign.IOperAccessTaskClient; |
|
|
|
import com.hnac.hzims.operational.maintenance.dto.OperMaintenanceTaskDTO; |
|
|
|
import com.hnac.hzims.operational.maintenance.dto.OperMaintenanceTaskDTO; |
|
|
|
import com.hnac.hzims.operational.maintenance.feign.ITaskClient; |
|
|
|
import com.hnac.hzims.operational.maintenance.feign.ITaskClient; |
|
|
|
|
|
|
|
import com.hnac.hzims.ticket.allTicket.entity.TicketInfoEvaluateEntity; |
|
|
|
|
|
|
|
import com.hnac.hzims.ticket.allTicket.service.TicketInfoEvaluateService; |
|
|
|
import com.hnac.hzims.ticket.areamonthly.vo.AreaMonthlyVo; |
|
|
|
import com.hnac.hzims.ticket.areamonthly.vo.AreaMonthlyVo; |
|
|
|
import com.hnac.hzims.ticket.areamonthly.vo.StandardTicketWithAreaVo; |
|
|
|
import com.hnac.hzims.ticket.areamonthly.vo.StandardTicketWithAreaVo; |
|
|
|
import com.hnac.hzims.ticket.areamonthly.vo.StandardWorkVo; |
|
|
|
import com.hnac.hzims.ticket.areamonthly.vo.StandardWorkVo; |
|
|
@ -93,6 +95,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
private final WorkDelayNoScopeMapper workDelayNoScopeMapper; |
|
|
|
private final WorkDelayNoScopeMapper workDelayNoScopeMapper; |
|
|
|
private final IOperAccessTaskClient operAccessTaskClient; |
|
|
|
private final IOperAccessTaskClient operAccessTaskClient; |
|
|
|
private final ITaskClient taskClient; |
|
|
|
private final ITaskClient taskClient; |
|
|
|
|
|
|
|
private final TicketInfoEvaluateService ticketInfoEvaluateService; |
|
|
|
|
|
|
|
|
|
|
|
/** 生成两票编号锁 **/ |
|
|
|
/** 生成两票编号锁 **/ |
|
|
|
private Lock lock = new ReentrantLock(); |
|
|
|
private Lock lock = new ReentrantLock(); |
|
|
@ -877,28 +880,30 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
QueryWrapper<WorkTicketInfoEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
QueryWrapper<WorkTicketInfoEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
|
|
|
|
|
|
|
//开票来源
|
|
|
|
//开票来源
|
|
|
|
queryWrapper.lambda().eq(Func.isNotEmpty(areaVo.getTaskType()), WorkTicketInfoEntity::getTaskType, |
|
|
|
queryWrapper.eq(Func.isNotEmpty(areaVo.getTaskType()), "sti.task_type", |
|
|
|
areaVo.getTaskType()); |
|
|
|
areaVo.getTaskType()); |
|
|
|
//编号
|
|
|
|
//编号
|
|
|
|
queryWrapper.lambda().like(Func.isNotEmpty(areaVo.getCode()), WorkTicketInfoEntity::getCode, areaVo.getCode()); |
|
|
|
queryWrapper.like(Func.isNotEmpty(areaVo.getCode()), "sti.code", areaVo.getCode()); |
|
|
|
|
|
|
|
|
|
|
|
//状态
|
|
|
|
//状态
|
|
|
|
queryWrapper.lambda().eq(Func.isNotEmpty(areaVo.getStatus()), WorkTicketInfoEntity::getStatus, |
|
|
|
queryWrapper.eq(Func.isNotEmpty(areaVo.getStatus()), "sti.status", |
|
|
|
areaVo.getStatus()); |
|
|
|
areaVo.getStatus()); |
|
|
|
|
|
|
|
|
|
|
|
//开始时间
|
|
|
|
//开始时间
|
|
|
|
queryWrapper.lambda().lt(Func.isNotEmpty(areaVo.getStartTime()), WorkTicketInfoEntity::getCreateTime, |
|
|
|
queryWrapper.lt(Func.isNotEmpty(areaVo.getStartTime()), "sti.create_time", |
|
|
|
areaVo.getStartTime()); |
|
|
|
areaVo.getStartTime()); |
|
|
|
|
|
|
|
|
|
|
|
//结束时间
|
|
|
|
//结束时间
|
|
|
|
queryWrapper.lambda().le(Func.isNotEmpty(areaVo.getEndTime()), WorkTicketInfoEntity::getCreateTime, |
|
|
|
queryWrapper.le(Func.isNotEmpty(areaVo.getEndTime()), "sti.create_time", |
|
|
|
areaVo.getEndTime()); |
|
|
|
areaVo.getEndTime()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
queryWrapper.eq("create_dept", areaVo.getAreaId()); |
|
|
|
queryWrapper.eq("sti.create_dept", areaVo.getAreaId()); |
|
|
|
queryWrapper.eq(areaVo.getYearMonth() != null, "date_format(create_time,'%Y-%m')", |
|
|
|
queryWrapper.eq(areaVo.getYearMonth() != null, "date_format(sti.create_time,'%Y-%m')", |
|
|
|
areaVo.getYearMonth()); |
|
|
|
areaVo.getYearMonth()); |
|
|
|
Page<WorkTicketInfoEntity> workTicketInfoEntityPage = baseMapper.selectPage(pageEntity, queryWrapper); |
|
|
|
//如果为1为合格
|
|
|
|
|
|
|
|
queryWrapper.eq("tie.status",1); |
|
|
|
|
|
|
|
Page<WorkTicketInfoEntity> workTicketInfoEntityPage = baseMapper.selectPages(pageEntity, queryWrapper); |
|
|
|
//数据转换
|
|
|
|
//数据转换
|
|
|
|
List<StandardWorkVo> standardWorkList = new ArrayList<>(); |
|
|
|
List<StandardWorkVo> standardWorkList = new ArrayList<>(); |
|
|
|
if (CollectionUtil.isNotEmpty(workTicketInfoEntityPage.getRecords())) { |
|
|
|
if (CollectionUtil.isNotEmpty(workTicketInfoEntityPage.getRecords())) { |
|
|
@ -918,4 +923,21 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap |
|
|
|
BladePage<StandardWorkVo> bladePage = BladePage.of(page); |
|
|
|
BladePage<StandardWorkVo> bladePage = BladePage.of(page); |
|
|
|
return bladePage; |
|
|
|
return bladePage; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 判断是否存在合格率 如果存在返回true 否则为false |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param item |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private boolean isTicketPercentById(WorkTicketInfoEntity item) { |
|
|
|
|
|
|
|
LambdaQueryWrapper<TicketInfoEvaluateEntity> ticketInfoEvaluateEntityLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
|
|
ticketInfoEvaluateEntityLambdaQueryWrapper.eq(TicketInfoEvaluateEntity::getTicketId, item.getId()); |
|
|
|
|
|
|
|
ticketInfoEvaluateEntityLambdaQueryWrapper.eq(TicketInfoEvaluateEntity::getStatus, |
|
|
|
|
|
|
|
TicketConstants.TicketQualifiedEnum.Qualified.getCode()); |
|
|
|
|
|
|
|
// 查询合格评价
|
|
|
|
|
|
|
|
int count = ticketInfoEvaluateService.count(ticketInfoEvaluateEntityLambdaQueryWrapper); |
|
|
|
|
|
|
|
return count > 0; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|