Compare commits

..

No commits in common. "2fa020173262bcd19c5a69a3b75e8b161871afdf" and "de36e69a7f4435fb40d530f3300b3a1a557222d1" have entirely different histories.

1 changed files with 10 additions and 15 deletions

View File

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