不查不要求报工的补充
This commit is contained in:
parent
7e7b2e633b
commit
3d2134ef9a
@ -76,12 +76,20 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
|
||||
}*/
|
||||
default TaskDispatchDetailDO selectBeforeDo(TaskDispatchDetailDO taskDispatchDetailDO){
|
||||
MPJLambdaWrapper<TaskDispatchDetailDO> query = new MPJLambdaWrapper<>();
|
||||
query.leftJoin(ProcedureDO.class,"a",ProcedureDO::getId,TaskDispatchDetailDO::getProcedureId)
|
||||
query.selectAll(TaskDispatchDetailDO.class).leftJoin(ProcedureDO.class,"a",ProcedureDO::getId,TaskDispatchDetailDO::getProcedureId)
|
||||
.eq(TaskDispatchDetailDO::getSort, taskDispatchDetailDO.getSort() - 1)
|
||||
.eq(TaskDispatchDetailDO::getDispatchId, taskDispatchDetailDO.getDispatchId())
|
||||
.eq(TaskDispatchDetailDO::getProcedureStatus, 2);
|
||||
return selectOne(query);
|
||||
}
|
||||
default TaskDispatchDetailDO selectNoReportBeforeDo(TaskDispatchDetailDO taskDispatchDetailDO){
|
||||
MPJLambdaWrapper<TaskDispatchDetailDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(TaskDispatchDetailDO.class).leftJoin(ProcedureDO.class,"a",ProcedureDO::getId,TaskDispatchDetailDO::getProcedureId)
|
||||
.eq(TaskDispatchDetailDO::getSort, taskDispatchDetailDO.getSort() - 1)
|
||||
.eq(TaskDispatchDetailDO::getDispatchId, taskDispatchDetailDO.getDispatchId())
|
||||
.eq(ProcedureDO::getIsReport,0);
|
||||
return selectOne(query);
|
||||
}
|
||||
default PageResult<TaskDispatchDetailDO> selectPageGroup(YgjxPageReqVO pageReqVO) {
|
||||
MPJLambdaWrapper<TaskDispatchDetailDO> query = new MPJLambdaWrapper<>();
|
||||
query.select( "DATE_FORMAT(t.create_time, '%Y-%m') as yearMonth,\n" +
|
||||
|
@ -369,12 +369,17 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
||||
// .eq(TaskDispatchDetailDO::getDispatchId, taskDispatchDetailDO.getDispatchId())
|
||||
// .eq(TaskDispatchDetailDO::getProcedureStatus, 2)
|
||||
// );
|
||||
TaskDispatchDetailDO taskDispatchDetailDO1 = taskDispatchDetailMapper.selectBeforeDo(taskDispatchDetailDO);
|
||||
if (taskDispatchDetailDO1 == null){
|
||||
//查不出来上一道工序已完工就代表它没完成
|
||||
taskDispatchDetailDO.setBeforeProcedureStatus(0);
|
||||
}else{
|
||||
TaskDispatchDetailDO taskDispatchDetailDO2 = taskDispatchDetailMapper.selectNoReportBeforeDo(taskDispatchDetailDO);
|
||||
if (taskDispatchDetailDO2 != null){
|
||||
taskDispatchDetailDO.setBeforeProcedureStatus(1);
|
||||
}else{
|
||||
TaskDispatchDetailDO taskDispatchDetailDO1 = taskDispatchDetailMapper.selectBeforeDo(taskDispatchDetailDO);
|
||||
if (taskDispatchDetailDO1 == null){
|
||||
//查不出来上一道工序已完工就代表它没完成
|
||||
taskDispatchDetailDO.setBeforeProcedureStatus(0);
|
||||
}else{
|
||||
taskDispatchDetailDO.setBeforeProcedureStatus(1);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
taskDispatchDetailDO.setBeforeProcedureStatus(1);
|
||||
|
Loading…
Reference in New Issue
Block a user