| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import org.springblade.modules.task.wrapper.TaskResidencePermitApplyWrapper; |
| | | import org.springblade.modules.task.service.ITaskResidencePermitApplyService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 居住证申请 控制器 |
| | |
| | | TaskResidencePermitApplyEntity detail = taskResidencePermitApplyService.getOne(Condition.getQueryWrapper(taskResidencePermitApply)); |
| | | return R.data(TaskResidencePermitApplyWrapper.build().entityVO(detail)); |
| | | } |
| | | |
| | | /** |
| | | * 居住证申请 分页 |
| | | */ |
| | |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入taskResidencePermitApply") |
| | | public R<IPage<TaskResidencePermitApplyVO>> list(TaskResidencePermitApplyEntity taskResidencePermitApply, Query query) { |
| | | IPage<TaskResidencePermitApplyEntity> pages = taskResidencePermitApplyService.page(Condition.getPage(query), Condition.getQueryWrapper(taskResidencePermitApply)); |
| | | // 查询自己的记录 |
| | | taskResidencePermitApply.setCreateUser(AuthUtil.getUserId()); |
| | | IPage<TaskResidencePermitApplyEntity> pages = taskResidencePermitApplyService.page(Condition.getPage(query), Condition.getQueryWrapper(taskResidencePermitApply).orderByDesc("create_time")); |
| | | return R.data(TaskResidencePermitApplyWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入taskResidencePermitApply") |
| | | public R save(@Valid @RequestBody TaskResidencePermitApplyEntity taskResidencePermitApply) { |
| | | return R.status(taskResidencePermitApplyService.save(taskResidencePermitApply)); |
| | | return R.status(taskResidencePermitApplyService.saveResidencePermitApplyEntity(taskResidencePermitApply)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperation(value = "修改", notes = "传入taskResidencePermitApply") |
| | | public R update(@Valid @RequestBody TaskResidencePermitApplyEntity taskResidencePermitApply) { |
| | | return R.status(taskResidencePermitApplyService.updateById(taskResidencePermitApply)); |
| | | } |
| | | /** |
| | | * 居住证申请 审核 |
| | | */ |
| | | @PostMapping("/auditing") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "审核", notes = "传入taskResidencePermitApply") |
| | | public R updateResidencePermitApply(@Valid @RequestBody TaskResidencePermitApplyEntity taskResidencePermitApply) { |
| | | return R.status(taskResidencePermitApplyService.updateResidencePermitApplyEntity(taskResidencePermitApply)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(taskResidencePermitApplyService.removeBatchByIds(Func.toLongList(ids))); |
| | | return R.status(taskResidencePermitApplyService.removeTaskResidencePermitApplyBatchByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |