|
|
@@ -19,7 +19,6 @@ import com.xjrsoft.module.student.dto.UpdateBaseStudentScholarshipApplicantDto;
|
|
|
import com.xjrsoft.module.student.entity.BaseStudentScholarshipApplicant;
|
|
|
import com.xjrsoft.module.student.entity.BaseStudentScholarshipCategory;
|
|
|
import com.xjrsoft.module.student.service.IBaseStudentScholarshipApplicantService;
|
|
|
-import com.xjrsoft.module.student.service.IBaseStudentScholarshipCategoryService;
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentScholarshipApplicantCategoryPageVo;
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentScholarshipApplicantPageVo;
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentScholarshipApplicantVo;
|
|
|
@@ -52,14 +51,13 @@ import java.util.List;
|
|
|
public class BaseStudentScholarshipApplicantController {
|
|
|
|
|
|
|
|
|
- private final IBaseStudentScholarshipApplicantService baseStudentScholarshipApplicantService;
|
|
|
- private final IBaseStudentScholarshipCategoryService baseStudentScholarshipCategoryService;
|
|
|
+ private final IBaseStudentScholarshipApplicantService applicantService;
|
|
|
|
|
|
@GetMapping(value = "/page")
|
|
|
@ApiOperation(value="奖学金申请列表(分页)")
|
|
|
@SaCheckPermission("basestudentscholarshipapplicant:detail")
|
|
|
public RT<PageOutput<BaseStudentScholarshipApplicantPageVo>> page(@Valid BaseStudentScholarshipApplicantPageDto dto){
|
|
|
- IPage<BaseStudentScholarshipApplicantPageVo> page = baseStudentScholarshipApplicantService.selectJoinListPage(ConventPage.getPage(dto), BaseStudentScholarshipApplicantPageVo.class,
|
|
|
+ IPage<BaseStudentScholarshipApplicantPageVo> page = applicantService.selectJoinListPage(ConventPage.getPage(dto), BaseStudentScholarshipApplicantPageVo.class,
|
|
|
MPJWrappers.<BaseStudentScholarshipApplicant>lambdaJoin()
|
|
|
.like(StrUtil.isNotEmpty(dto.getName()), BaseStudentScholarshipApplicant::getName, dto.getName())
|
|
|
.eq(ObjectUtil.isNotNull(dto.getSemesterId()), BaseStudentScholarshipCategory::getBaseSemesterId, dto.getSemesterId())
|
|
|
@@ -69,12 +67,14 @@ public class BaseStudentScholarshipApplicantController {
|
|
|
.eq(BaseStudentScholarshipApplicant::getBaseStudentScholarshipCategoryId,dto.getBaseStudentScholarshipCategoryId())
|
|
|
.orderByAsc(BaseStudentScholarshipApplicant::getSortCode)
|
|
|
.selectAs(BaseStudentScholarshipApplicant::getId, BaseStudentScholarshipApplicantPageVo::getId)
|
|
|
- .selectAs(DictionaryDetail::getName, BaseStudentScholarshipApplicantPageVo::getBankTypeCn)
|
|
|
+ .select(" t4.name as bank_type_cn")
|
|
|
.selectAs(BaseSemester::getName, BaseStudentScholarshipApplicantPageVo::getSemesterName)
|
|
|
+ .select(" t5.name as category_cn")
|
|
|
.select(BaseStudentScholarshipApplicant.class,x -> VoToColumnUtil.fieldsToColumns(BaseStudentScholarshipApplicantPageVo.class).contains(x.getProperty()))
|
|
|
.innerJoin(BaseStudentScholarshipCategory.class, BaseStudentScholarshipCategory::getId, BaseStudentScholarshipApplicant::getBaseStudentScholarshipCategoryId)
|
|
|
.leftJoin(BaseSemester.class, BaseSemester::getId, BaseStudentScholarshipApplicant::getBaseSemesterId)
|
|
|
.leftJoin(DictionaryDetail.class, DictionaryDetail::getCode, BaseStudentScholarshipApplicant::getBankType)
|
|
|
+ .leftJoin(DictionaryDetail.class, DictionaryDetail::getCode, BaseStudentScholarshipCategory::getCategory)
|
|
|
);
|
|
|
PageOutput<BaseStudentScholarshipApplicantPageVo> pageOutput = ConventPage.getPageOutput(page, BaseStudentScholarshipApplicantPageVo.class);
|
|
|
return RT.ok(pageOutput);
|
|
|
@@ -84,7 +84,7 @@ public class BaseStudentScholarshipApplicantController {
|
|
|
@ApiOperation(value="奖学金名称表(分页)")
|
|
|
@SaCheckPermission("basestudentscholarshipapplicant:detail")
|
|
|
public RT<PageOutput<BaseStudentScholarshipApplicantCategoryPageVo>> scholarshiPage(@Valid BaseStudentScholarshipApplicantCategoryPageDto dto){
|
|
|
- IPage<BaseStudentScholarshipApplicantCategoryPageVo> page = baseStudentScholarshipApplicantService.getScholarshiPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
|
|
|
+ IPage<BaseStudentScholarshipApplicantCategoryPageVo> page = applicantService.getScholarshiPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
|
|
|
PageOutput<BaseStudentScholarshipApplicantCategoryPageVo> pageOutput = ConventPage.getPageOutput(page, BaseStudentScholarshipApplicantCategoryPageVo.class);
|
|
|
return RT.ok(pageOutput);
|
|
|
}
|
|
|
@@ -93,7 +93,7 @@ public class BaseStudentScholarshipApplicantController {
|
|
|
@ApiOperation(value="根据id查询奖学金申请信息")
|
|
|
@SaCheckPermission("basestudentscholarshipapplicant:detail")
|
|
|
public RT<BaseStudentScholarshipApplicantVo> info(@RequestParam Long id){
|
|
|
- BaseStudentScholarshipApplicant baseStudentScholarshipApplicant = baseStudentScholarshipApplicantService.getById(id);
|
|
|
+ BaseStudentScholarshipApplicant baseStudentScholarshipApplicant = applicantService.getById(id);
|
|
|
if (baseStudentScholarshipApplicant == null) {
|
|
|
return RT.error("找不到此数据!");
|
|
|
}
|
|
|
@@ -106,7 +106,7 @@ public class BaseStudentScholarshipApplicantController {
|
|
|
@SaCheckPermission("basestudentscholarshipapplicant:add")
|
|
|
public RT<Boolean> add(@Valid @RequestBody AddBaseStudentScholarshipApplicantDto dto){
|
|
|
BaseStudentScholarshipApplicant baseStudentScholarshipApplicant = BeanUtil.toBean(dto, BaseStudentScholarshipApplicant.class);
|
|
|
- boolean isSuccess = baseStudentScholarshipApplicantService.save(baseStudentScholarshipApplicant);
|
|
|
+ boolean isSuccess = applicantService.save(baseStudentScholarshipApplicant);
|
|
|
return RT.ok(isSuccess);
|
|
|
}
|
|
|
|
|
|
@@ -116,7 +116,7 @@ public class BaseStudentScholarshipApplicantController {
|
|
|
public RT<Boolean> update(@Valid @RequestBody UpdateBaseStudentScholarshipApplicantDto dto){
|
|
|
|
|
|
BaseStudentScholarshipApplicant baseStudentScholarshipApplicant = BeanUtil.toBean(dto, BaseStudentScholarshipApplicant.class);
|
|
|
- return RT.ok(baseStudentScholarshipApplicantService.updateById(baseStudentScholarshipApplicant));
|
|
|
+ return RT.ok(applicantService.updateById(baseStudentScholarshipApplicant));
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -124,7 +124,7 @@ public class BaseStudentScholarshipApplicantController {
|
|
|
@ApiOperation(value = "删除奖学金申请")
|
|
|
@SaCheckPermission("basestudentscholarshipapplicant:delete")
|
|
|
public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
|
|
|
- return RT.ok(baseStudentScholarshipApplicantService.removeBatchByIds(ids));
|
|
|
+ return RT.ok(applicantService.removeBatchByIds(ids));
|
|
|
|
|
|
}
|
|
|
|