出差申请

This commit is contained in:
hanrenchun 2025-06-06 16:13:23 +08:00
parent 91978e9426
commit 3971debc10
1 changed files with 3 additions and 6 deletions

View File

@ -17,10 +17,7 @@ import com.ruoyi.system.service.ISysUserService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -45,7 +42,7 @@ public class BusinessTripApprovalController extends BaseController {
@PostMapping("/list") @PostMapping("/list")
@ApiOperation("查询出差申请") @ApiOperation("查询出差申请")
public TableDataInfo list(BusinessTripApproval businessTripApproval) { public TableDataInfo list(@RequestBody BusinessTripApproval businessTripApproval) {
startPage(); startPage();
QueryWrapper<BusinessTripApproval> queryWrapper = new QueryWrapper<>(businessTripApproval); QueryWrapper<BusinessTripApproval> queryWrapper = new QueryWrapper<>(businessTripApproval);
queryWrapper.orderByDesc("create_time"); queryWrapper.orderByDesc("create_time");
@ -57,7 +54,7 @@ public class BusinessTripApprovalController extends BaseController {
@PostMapping("/add") @PostMapping("/add")
@ApiOperation("新增出差申请") @ApiOperation("新增出差申请")
public AjaxResult add(BusinessTripApproval dto) { public AjaxResult add(@RequestBody BusinessTripApproval dto) {
SysUser user = getLoginUser().getUser(); SysUser user = getLoginUser().getUser();
if (dto.getHasOffcialCar() != null && dto.getHasOffcialCar() == 1) { if (dto.getHasOffcialCar() != null && dto.getHasOffcialCar() == 1) {
if (dto.getCarModel() == null) { if (dto.getCarModel() == null) {