|
|
@@ -27,15 +27,18 @@ import com.sckw.manage.model.vo.req.CooperateApplyQueryReqVo;
|
|
|
import com.sckw.manage.model.vo.req.CooperateApproveReqVo;
|
|
|
import com.sckw.manage.model.vo.req.InitiateReqVo;
|
|
|
import com.sckw.manage.model.vo.res.CooperateManageQueryResVo;
|
|
|
+import com.sckw.manage.model.vo.res.FindListGroupResVo;
|
|
|
import com.sckw.system.api.RemoteSystemService;
|
|
|
import com.sckw.system.api.model.dto.res.UserCacheResDto;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
+import org.jetbrains.annotations.NotNull;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @author czh
|
|
|
@@ -92,9 +95,21 @@ public class KwmCooperateApplyService {
|
|
|
}
|
|
|
//只允许查出申请中、已拒绝、已撤销的记录
|
|
|
List<Integer> status = new ArrayList<>();
|
|
|
- status.add(CooperateStatusEnum.PROCESS.getCode());
|
|
|
- status.add(CooperateStatusEnum.REFUSE.getCode());
|
|
|
- status.add(CooperateStatusEnum.CANCEL.getCode());
|
|
|
+ if (Objects.isNull(reqVo.getStatus())) {
|
|
|
+ status.add(CooperateStatusEnum.PROCESS.getCode());
|
|
|
+ status.add(CooperateStatusEnum.REFUSE.getCode());
|
|
|
+ status.add(CooperateStatusEnum.CANCEL.getCode());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (Objects.nonNull(reqVo.getStatus()) && reqVo.getStatus() == CooperateStatusEnum.PROCESS.getCode()) {
|
|
|
+ status.add(CooperateStatusEnum.PROCESS.getCode());
|
|
|
+ }
|
|
|
+ if (Objects.nonNull(reqVo.getStatus()) && reqVo.getStatus() == CooperateStatusEnum.REFUSE.getCode()) {
|
|
|
+ status.add(CooperateStatusEnum.REFUSE.getCode());
|
|
|
+ }
|
|
|
+ if (Objects.nonNull(reqVo.getStatus()) && reqVo.getStatus() == CooperateStatusEnum.CANCEL.getCode()) {
|
|
|
+ status.add(CooperateStatusEnum.CANCEL.getCode());
|
|
|
+ }
|
|
|
cooperateManageQueryReqDto.setStatus(status);
|
|
|
return cooperateManageQueryReqDto;
|
|
|
}
|
|
|
@@ -320,4 +335,30 @@ public class KwmCooperateApplyService {
|
|
|
throw new SystemException(HttpStatus.CODE_10301, HttpStatus.MSG_014);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param reqVo 查询入参
|
|
|
+ * @return HttpResult
|
|
|
+ * @desc: 分组查询
|
|
|
+ * @author: czh
|
|
|
+ * @date: 2023/7/17
|
|
|
+ */
|
|
|
+ public List<FindListGroupResVo> findListGroup(CooperateApplyQueryReqVo reqVo) {
|
|
|
+ //初始化分组返参
|
|
|
+ List<FindListGroupResVo> result = commonBusinessService.init();
|
|
|
+
|
|
|
+ List<CooperateManageQueryResVo> list = commonBusinessService.findList(buildQueryParam(reqVo));
|
|
|
+ if (CollectionUtils.isEmpty(list)) {
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ //填充分组数据
|
|
|
+ commonBusinessService.fillGroup(result, list);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|