Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4b0340d2b0
|
@ -5,7 +5,14 @@ import com.ruoyi.common.core.controller.BaseController;
|
|||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.database.domain.ApprovalProcess;
|
||||
import com.ruoyi.database.domain.BusinessTripApproval;
|
||||
import com.ruoyi.database.domain.NonWorkingDayDrinkingReport;
|
||||
import com.ruoyi.database.domain.PoliceLeaveApproval;
|
||||
import com.ruoyi.database.mapper.PoliceLeaveApprovalMapper;
|
||||
import com.ruoyi.database.service.ApprovalProcessService;
|
||||
import com.ruoyi.database.service.BusinessTripApprovalService;
|
||||
import com.ruoyi.database.service.NonWorkingDayDrinkingReportService;
|
||||
import com.ruoyi.database.service.PoliceLeaveApprovalService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
@ -32,6 +39,9 @@ import java.util.List;
|
|||
public class ApprovalProcessController extends BaseController {
|
||||
|
||||
private final ApprovalProcessService approvalsProcessService;
|
||||
private final BusinessTripApprovalService businessTripApprovalService;
|
||||
private final NonWorkingDayDrinkingReportService nonWorkingDayDrinkingReportService;
|
||||
private final PoliceLeaveApprovalService policeLeaveApprovalService;
|
||||
|
||||
|
||||
@PostMapping("/list")
|
||||
|
@ -189,11 +199,31 @@ public class ApprovalProcessController extends BaseController {
|
|||
@ApiOperation("根据id查")
|
||||
@PostMapping("/getById/{id}")
|
||||
public AjaxResult getById(@PathVariable Long id) {
|
||||
List<ApprovalProcess> list = approvalsProcessService.lambdaQuery()
|
||||
.eq(ApprovalProcess::getId, id)
|
||||
.orderByDesc(ApprovalProcess::getCreateTime)
|
||||
.list();
|
||||
return AjaxResult.success(list);
|
||||
ApprovalProcess byId = approvalsProcessService.getById(id);
|
||||
Integer matterType = byId.getMatterType();
|
||||
if (matterType == 2){
|
||||
BusinessTripApproval one = businessTripApprovalService.lambdaQuery()
|
||||
.eq(BusinessTripApproval::getUuid, byId.getUuid())
|
||||
.last("LIMIT 1")
|
||||
.one();
|
||||
one.setDestinationIdCn(byId.getBusinessTripDestination());
|
||||
return AjaxResult.success(one);
|
||||
}
|
||||
if (matterType == 3){
|
||||
PoliceLeaveApproval one = policeLeaveApprovalService.lambdaQuery()
|
||||
.eq(PoliceLeaveApproval::getUuid, byId.getUuid())
|
||||
.last("LIMIT 1")
|
||||
.one();
|
||||
return AjaxResult.success(one);
|
||||
}
|
||||
if (matterType == 4){
|
||||
NonWorkingDayDrinkingReport one = nonWorkingDayDrinkingReportService.lambdaQuery()
|
||||
.eq(NonWorkingDayDrinkingReport::getUuid, byId.getUuid())
|
||||
.last("LIMIT 1")
|
||||
.one();
|
||||
return AjaxResult.success(one);
|
||||
}
|
||||
return AjaxResult.success(null);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -102,6 +102,7 @@ public class BusinessTripApprovalController extends BaseController {
|
|||
String uuids = uuid.toString();
|
||||
|
||||
dto.setUuid(uuids);
|
||||
BaseAddressInfo byId = baseAddressInfoService.getById(dto.getDestinationId());
|
||||
ApprovalProcess approvalProcess = new ApprovalProcess();
|
||||
approvalProcess.setApprovalNo(s);
|
||||
approvalProcess.setProcessTitle("出差呈请");
|
||||
|
@ -111,8 +112,9 @@ public class BusinessTripApprovalController extends BaseController {
|
|||
approvalProcess.setMatterType(2);
|
||||
approvalProcess.setApprovalStatus(0);
|
||||
approvalProcess.setReadStatus(0);
|
||||
approvalProcess.setBusinessTripDestination(dto.getDestinationIdCn());
|
||||
approvalProcess.setStartTime(approvalProcess.getStartTime());
|
||||
approvalProcess.setBusinessTripDestination(byId.getAddName());
|
||||
approvalProcess.setStartTime(dto.getStartDate());
|
||||
approvalProcess.setEndTime(dto.getEndDate());
|
||||
approvalProcess.setCreateTime(new Date().getTime());
|
||||
approvalProcess.setUuid(uuids);
|
||||
approvalsProcessService.save(approvalProcess);
|
||||
|
|
|
@ -23,4 +23,8 @@ public class DetailsApiController extends BaseController {
|
|||
private final BusinessTripApprovalService businessTripApprovalService;
|
||||
|
||||
|
||||
public void getUserPic(){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -132,6 +132,7 @@ public class PoliceLeaveApprovalController extends BaseController {
|
|||
approvalProcess.setMatterType(3);
|
||||
approvalProcess.setApprovalStatus(0);
|
||||
approvalProcess.setReadStatus(0);
|
||||
approvalProcess.setLeaveType(policeLeaveApproval.getLeaveType());
|
||||
approvalProcess.setStartTime(policeLeaveApproval.getStartDate());
|
||||
approvalProcess.setEndTime(policeLeaveApproval.getEndDate());
|
||||
approvalProcess.setCreateTime(new Date().getTime());
|
||||
|
|
|
@ -8,10 +8,7 @@ import com.ruoyi.database.service.gwglLogService;
|
|||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -30,7 +27,7 @@ public class gwglLogController extends BaseController {
|
|||
private final gwglLogService gwglLogService;
|
||||
|
||||
@ApiOperation("查询审批日志")
|
||||
@RequestMapping("/list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo query(@RequestBody gwglLog gwglLog){
|
||||
startPage();
|
||||
QueryWrapper<gwglLog> queryWrapper = new QueryWrapper<>(gwglLog);
|
||||
|
@ -39,7 +36,7 @@ public class gwglLogController extends BaseController {
|
|||
}
|
||||
|
||||
@ApiOperation("根据编号查询日志")
|
||||
@RequestMapping("/detail/{applyNo}")
|
||||
@GetMapping("/detail/{applyNo}")
|
||||
public TableDataInfo detail(@PathVariable String applyNo){
|
||||
QueryWrapper<gwglLog> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("apply_no", applyNo);
|
||||
|
|
|
@ -125,4 +125,9 @@ public class ApprovalProcess {
|
|||
@ApiModelProperty("关联用uuid")
|
||||
private String uuid;
|
||||
|
||||
@ApiModelProperty("请假类别(1-公休假 2-事假 3-探亲假 4-婚假 5-产假 6-护理假 7-病假 8-育儿假 9-其他)")
|
||||
private Integer leaveType;
|
||||
@TableField(exist = false)
|
||||
private String leaveTypeCn;
|
||||
|
||||
}
|
||||
|
|
|
@ -57,6 +57,8 @@ public class BusinessTripApproval extends BaseEntityMini {
|
|||
|
||||
@ApiModelProperty("是否自带公务车辆")
|
||||
private Integer hasOffcialCar;
|
||||
@TableField(exist = false)
|
||||
private String hasOffcialCarCn;
|
||||
|
||||
@ApiModelProperty("车型")
|
||||
private Integer carModel;
|
||||
|
|
Loading…
Reference in New Issue