|
|
@@ -10,6 +10,7 @@ import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
import com.xjrsoft.common.model.result.RT;
|
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
|
+import com.xjrsoft.common.utils.LocalDateTimeUtil;
|
|
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
|
import com.xjrsoft.module.base.entity.BaseClass;
|
|
|
import com.xjrsoft.module.outint.dto.AddStudentOutInRecordDto;
|
|
|
@@ -35,6 +36,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
@@ -58,18 +60,22 @@ public class StudentOutInRecordController {
|
|
|
public RT<PageOutput<StudentOutInRecordPageVo>> page(@Valid StudentOutInRecordPageDto dto){
|
|
|
|
|
|
MPJLambdaWrapper<StudentOutInRecord> queryWrapper = MPJWrappers.<StudentOutInRecord>lambdaJoin()
|
|
|
+ .disableSubLogicDel()
|
|
|
.orderByDesc(StudentOutInRecord::getId)
|
|
|
.like(StrUtil.isNotBlank(dto.getName()), XjrUser::getName,dto.getName())
|
|
|
.like(StrUtil.isNotBlank(dto.getIdentityCard()), XjrUser::getCredentialNumber,dto.getIdentityCard())
|
|
|
.eq(StrUtil.isNotBlank(dto.getStduyStatus()), BaseStudentSchoolRoll::getStduyStatus,dto.getStduyStatus())
|
|
|
- .ge(ObjectUtil.isNotNull(dto.getStartTime()), StudentOutInRecord::getRecordTime,dto.getStartTime()+" 00:00:00")
|
|
|
- .le(ObjectUtil.isNotNull(dto.getStartTime()),StudentOutInRecord::getRecordTime,dto.getStartTime()+" 23:59:59")
|
|
|
- .eq(ObjectUtil.isNotNull(dto.getStatus()), StudentOutInRecord::getStatus, dto.getStatus())
|
|
|
+ .ge(ObjectUtil.isNotNull(dto.getStartTime()), StudentOutInRecord::getRecordTime,LocalDateTimeUtil.format(dto.getStartTime(),"yyyy-MM-dd")+" 00:00:00")
|
|
|
+ .le(ObjectUtil.isNotNull(dto.getStartTime()),StudentOutInRecord::getRecordTime,LocalDateTimeUtil.format(dto.getStartTime(),"yyyy-MM-dd")+" 23:59:59")
|
|
|
+ .eq(ObjectUtil.isNotEmpty(dto.getStatus()), StudentOutInRecord::getStatus, dto.getStatus())
|
|
|
.eq(ObjectUtil.isNotNull(dto.getClassId())&&dto.getClassId()!=0, StudentOutInRecord::getClassId, dto.getClassId())
|
|
|
+ .eq(ObjectUtil.isNotNull(dto.getUserId())&&dto.getUserId()!=0, StudentOutInRecord::getUserId, dto.getUserId())
|
|
|
.select(StudentOutInRecord::getId)
|
|
|
.select(StudentOutInRecord.class,x -> VoToColumnUtil.fieldsToColumns(StudentOutInRecordPageVo.class).contains(x.getProperty()))
|
|
|
- .select(XjrUser::getName,XjrUser::getMobile,XjrUser::getCredentialNumber)
|
|
|
- .leftJoin(XjrUser.class,XjrUser::getId,StudentOutInRecord::getUserId)
|
|
|
+ .leftJoin(XjrUser.class,XjrUser::getId,StudentOutInRecord::getUserId,
|
|
|
+ ext->ext.selectAs(XjrUser::getCredentialNumber,StudentOutInRecordPageVo::getIdentityCard)
|
|
|
+ .selectAs(XjrUser::getMobile,StudentOutInRecordPageVo::getPhone)
|
|
|
+ .select(XjrUser::getName))
|
|
|
.leftJoin(BaseClass.class,BaseClass::getId,StudentOutInRecord::getClassId,ext->ext.selectAs(BaseClass::getName,StudentOutInRecordPageVo::getClassCn))
|
|
|
.leftJoin(XjrUser.class,XjrUser::getId,StudentOutInRecord::getTeacherId,ext->ext.selectAs(XjrUser::getName,StudentOutInRecordPageVo::getTeacherCn))
|
|
|
.leftJoin(BaseStudentSchoolRoll.class,BaseStudentSchoolRoll::getUserId,StudentOutInRecord::getUserId)
|