Compare commits
2 Commits
de36e69a7f
...
2fa0201732
Author | SHA1 | Date |
---|---|---|
|
2fa0201732 | |
|
89d1c82b7c |
|
@ -49,13 +49,16 @@ public class ApprovalProcessController extends BaseController {
|
||||||
startPage();
|
startPage();
|
||||||
QueryWrapper<ApprovalProcess> queryWrapper = new QueryWrapper<>(approvalProcess);
|
QueryWrapper<ApprovalProcess> queryWrapper = new QueryWrapper<>(approvalProcess);
|
||||||
queryWrapper.orderByDesc("create_time");
|
queryWrapper.orderByDesc("create_time");
|
||||||
if (approvalProcess.getTimeType() == 1) {
|
if (approvalProcess.getTimeType() != null) {
|
||||||
queryWrapper.ge("create_time", System.currentTimeMillis() - 24 * 60 * 60 * 1000);
|
if (approvalProcess.getTimeType() == 1) {
|
||||||
} else if (approvalProcess.getTimeType() == 2) {
|
queryWrapper.ge("create_time", System.currentTimeMillis() - 3 * 24 * 60 * 60 * 1000);
|
||||||
queryWrapper.ge("create_time", System.currentTimeMillis() - 7 * 24 * 60 * 60 * 1000);
|
} else if (approvalProcess.getTimeType() == 2) {
|
||||||
} else if (approvalProcess.getTimeType() == 3) {
|
queryWrapper.ge("create_time", System.currentTimeMillis() - 7 * 24 * 60 * 60 * 1000);
|
||||||
queryWrapper.ge("create_time", System.currentTimeMillis() - 30 * 24 * 60 * 60 * 1000);
|
} else if (approvalProcess.getTimeType() == 3) {
|
||||||
|
queryWrapper.ge("create_time", System.currentTimeMillis() - 30 * 24 * 60 * 60 * 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<ApprovalProcess> list = approvalsProcessService.list(queryWrapper);
|
List<ApprovalProcess> list = approvalsProcessService.list(queryWrapper);
|
||||||
|
|
||||||
for (ApprovalProcess process : list) {
|
for (ApprovalProcess process : list) {
|
||||||
|
@ -135,13 +138,15 @@ public class ApprovalProcessController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("根据用户id查")
|
@ApiOperation("根据用户id查")
|
||||||
@PostMapping("/getByuserId/{id}")
|
@PostMapping("/getByuserId")
|
||||||
public TableDataInfo getByuserId(ApprovalProcess approvalProcess) {
|
public TableDataInfo getByuserId(ApprovalProcess approvalProcess) {
|
||||||
List<ApprovalProcess> list = approvalsProcessService.lambdaQuery()
|
List<ApprovalProcess> list = approvalsProcessService.lambdaQuery()
|
||||||
.eq(ApprovalProcess::getSubmitterId, approvalProcess.getSubmitterId())
|
.eq(ApprovalProcess::getSubmitterId, approvalProcess.getSubmitterId())
|
||||||
.eq(approvalProcess.getApprovalStatus() != null, ApprovalProcess::getApprovalStatus, approvalProcess.getApprovalStatus())
|
.eq(approvalProcess.getApprovalStatus() != null, ApprovalProcess::getApprovalStatus, approvalProcess.getApprovalStatus())
|
||||||
.eq(approvalProcess.getCcName() != null, ApprovalProcess::getCcName, approvalProcess.getCcName())
|
.eq(approvalProcess.getCcName() != null, ApprovalProcess::getCcName, approvalProcess.getCcName())
|
||||||
.eq(approvalProcess.getProcessTitle() != null, ApprovalProcess::getProcessTitle, approvalProcess.getProcessTitle())
|
.eq(approvalProcess.getProcessTitle() != null, ApprovalProcess::getProcessTitle, approvalProcess.getProcessTitle())
|
||||||
|
.eq(approvalProcess.getSubmitterName() != null, ApprovalProcess::getSubmitterName, approvalProcess.getSubmitterName())
|
||||||
|
.eq(approvalProcess.getTimeType() != null, ApprovalProcess::getTimeType, approvalProcess.getTimeType())
|
||||||
.orderByDesc(ApprovalProcess::getCreateTime)
|
.orderByDesc(ApprovalProcess::getCreateTime)
|
||||||
.list();
|
.list();
|
||||||
|
|
||||||
|
@ -200,7 +205,7 @@ public class ApprovalProcessController extends BaseController {
|
||||||
public AjaxResult getById(@PathVariable Long id) {
|
public AjaxResult getById(@PathVariable Long id) {
|
||||||
ApprovalProcess byId = approvalsProcessService.getById(id);
|
ApprovalProcess byId = approvalsProcessService.getById(id);
|
||||||
Integer matterType = byId.getMatterType();
|
Integer matterType = byId.getMatterType();
|
||||||
if (matterType == 2){
|
if (matterType == 2) {
|
||||||
BusinessTripApproval one = businessTripApprovalService.lambdaQuery()
|
BusinessTripApproval one = businessTripApprovalService.lambdaQuery()
|
||||||
.eq(BusinessTripApproval::getUuid, byId.getUuid())
|
.eq(BusinessTripApproval::getUuid, byId.getUuid())
|
||||||
.last("LIMIT 1")
|
.last("LIMIT 1")
|
||||||
|
@ -208,14 +213,14 @@ public class ApprovalProcessController extends BaseController {
|
||||||
one.setDestinationIdCn(byId.getBusinessTripDestination());
|
one.setDestinationIdCn(byId.getBusinessTripDestination());
|
||||||
return AjaxResult.success(one);
|
return AjaxResult.success(one);
|
||||||
}
|
}
|
||||||
if (matterType == 3){
|
if (matterType == 3) {
|
||||||
PoliceLeaveApproval one = policeLeaveApprovalService.lambdaQuery()
|
PoliceLeaveApproval one = policeLeaveApprovalService.lambdaQuery()
|
||||||
.eq(PoliceLeaveApproval::getUuid, byId.getUuid())
|
.eq(PoliceLeaveApproval::getUuid, byId.getUuid())
|
||||||
.last("LIMIT 1")
|
.last("LIMIT 1")
|
||||||
.one();
|
.one();
|
||||||
return AjaxResult.success(one);
|
return AjaxResult.success(one);
|
||||||
}
|
}
|
||||||
if (matterType == 4){
|
if (matterType == 4) {
|
||||||
NonWorkingDayDrinkingReport one = nonWorkingDayDrinkingReportService.lambdaQuery()
|
NonWorkingDayDrinkingReport one = nonWorkingDayDrinkingReportService.lambdaQuery()
|
||||||
.eq(NonWorkingDayDrinkingReport::getUuid, byId.getUuid())
|
.eq(NonWorkingDayDrinkingReport::getUuid, byId.getUuid())
|
||||||
.last("LIMIT 1")
|
.last("LIMIT 1")
|
||||||
|
|
Loading…
Reference in New Issue