Compare commits

...

3 Commits

2 changed files with 13 additions and 6 deletions

View File

@ -144,12 +144,19 @@ public class TAbilityApplicationController {
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"), @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"), @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"), @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "ended", value = "是否完成(true, false)", paramType = "query", dataType = "String")} @ApiImplicitParam(name = "ended", value = "是否完成(true, false)", paramType = "query", dataType = "String")
}
) )
public Result<PageData<TAbilityApplicationDTO>> myPage(@ApiIgnore @RequestParam Map<String, Object> params) { public Result<PageData<TAbilityApplicationDTO>> myPage(@ApiIgnore @RequestParam Map<String, Object> params) {
final UserDetail user = SecurityUser.getUser(); final UserDetail user = SecurityUser.getUser();
params.put("abilityprocess_v2", Boolean.TRUE); // 是否根据流程 abilityprocess_v2 来分页 params.put("abilityprocess_v2", Boolean.TRUE); // 是否根据流程 abilityprocess_v2 来分页
params.put("user_id", user == null ? null : user.getId()); params.put("user_id", user == null ? null : user.getId());
//2022-12-28 西海岸个人中心-我的申请去除已过期申请
if (Constant.ProjectPlace.TSINGTAO_XHA.equals(projectPlace)) {
params.put("date", "xha");
}
PageData<TAbilityApplicationDTO> page = tAbilityApplicationService.page(params); PageData<TAbilityApplicationDTO> page = tAbilityApplicationService.page(params);
List<TAbilityApplicationDTO> list = List<TAbilityApplicationDTO> list =
page.getList().stream().map(index -> { page.getList().stream().map(index -> {

View File

@ -1,19 +1,15 @@
package io.renren.modules.processForm.service.impl; package io.renren.modules.processForm.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl; import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.utils.ConvertUtils; import io.renren.common.utils.ConvertUtils;
import io.renren.common.utils.DateUtils; import io.renren.common.utils.DateUtils;
import io.renren.modules.activiti.service.ActRunningService;
import io.renren.modules.processForm.dao.TAbilityApplicationDao; import io.renren.modules.processForm.dao.TAbilityApplicationDao;
import io.renren.modules.processForm.dto.TAbilityApplicationDTO; import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
import io.renren.modules.processForm.entity.TAbilityApplicationEntity; import io.renren.modules.processForm.entity.TAbilityApplicationEntity;
import io.renren.modules.processForm.service.TAbilityApplicationService; import io.renren.modules.processForm.service.TAbilityApplicationService;
import io.renren.modules.security.user.SecurityUser; import io.renren.modules.security.user.SecurityUser;
import io.renren.modules.security.user.UserDetail; import io.renren.modules.security.user.UserDetail;
import net.sf.jsqlparser.statement.create.table.Index;
import org.activiti.engine.HistoryService; import org.activiti.engine.HistoryService;
import org.activiti.engine.history.HistoricProcessInstance; import org.activiti.engine.history.HistoricProcessInstance;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -23,7 +19,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -72,6 +67,11 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityAppl
case "resourceId": case "resourceId":
wrapper.eq(StringUtils.isNotEmpty(params.get("resourceId").toString()), "resource_id", params.get("resourceId").toString()); wrapper.eq(StringUtils.isNotEmpty(params.get("resourceId").toString()), "resource_id", params.get("resourceId").toString());
break; break;
case "date":
wrapper.and(wq -> wq.isNull("expire_date")
.or()
.gt("expire_date", DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN)));
break;
} }
}); });
if (params.containsKey("abilityprocess_v2")) { if (params.containsKey("abilityprocess_v2")) {