|
@@ -9,6 +9,8 @@ import com.zjugis.framework.mybatis.core.mapper.BaseMapperX;
|
|
|
import com.zjugis.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
|
|
|
+import java.util.Collection;
|
|
|
+import java.util.Collections;
|
|
|
import java.util.List;
|
|
|
import java.util.Set;
|
|
|
|
|
@@ -35,6 +37,7 @@ public interface CommonCostDao extends BaseMapperX<CommonCostDO> {
|
|
|
.likeIfPresent(CommonCostDO::getCommonCostNo, reqVO.getCommonCostNo())
|
|
|
.betweenIfPresent(CommonCostDO::getApplyTime, reqVO.getApplyTime())
|
|
|
.eqIfPresent(CommonCostDO::getTotalAmount, reqVO.getTotalAmount())
|
|
|
+ .eqIfPresent(CommonCostDO::getIsAgent, reqVO.getIsAgent())
|
|
|
.eqIfPresent(CommonCostDO::getFlowStatus, reqVO.getStatus())
|
|
|
.in(CommonCostDO::getFlowStatus, FLOW_FINISHED, FLOW_PAYMENT)
|
|
|
.orderByDesc(CommonCostDO::getApplyTime));
|
|
@@ -47,36 +50,37 @@ public interface CommonCostDao extends BaseMapperX<CommonCostDO> {
|
|
|
.likeIfPresent(CommonCostDO::getCommonCostNo, reqVO.getCommonCostNo())
|
|
|
.betweenIfPresent(CommonCostDO::getApplyTime, reqVO.getApplyTime())
|
|
|
.eqIfPresent(CommonCostDO::getTotalAmount, reqVO.getTotalAmount())
|
|
|
+ .eqIfPresent(CommonCostDO::getIsAgent, reqVO.getIsAgent())
|
|
|
.eqIfPresent(CommonCostDO::getFlowStatus, reqVO.getStatus())
|
|
|
.in(CommonCostDO::getFlowStatus, FLOW_FINISHED, FLOW_PAYMENT)
|
|
|
.orderByDesc(CommonCostDO::getApplyTime));
|
|
|
}
|
|
|
|
|
|
- default PageResult<CommonCostDO> getCommonCostDeptPage(CommonCostPageReqVO reqVO, List<String> projectIds) {
|
|
|
+ default PageResult<CommonCostDO> getCommonCostDeptPage(CommonCostPageReqVO reqVO, Collection<String> ids) {
|
|
|
return selectPage(reqVO, new LambdaQueryWrapperX<CommonCostDO>()
|
|
|
.eqIfPresent(CommonCostDO::getUserId, reqVO.getUserId())
|
|
|
.likeIfPresent(CommonCostDO::getCommonCostNo, reqVO.getCommonCostNo())
|
|
|
.betweenIfPresent(CommonCostDO::getApplyTime, reqVO.getApplyTime())
|
|
|
.eqIfPresent(CommonCostDO::getTotalAmount, reqVO.getTotalAmount())
|
|
|
+ .eqIfPresent(CommonCostDO::getIsAgent, reqVO.getIsAgent())
|
|
|
.eqIfPresent(CommonCostDO::getFlowStatus, reqVO.getStatus())
|
|
|
+ .inIfPresent(CommonCostDO::getId, ids)
|
|
|
.in(CommonCostDO::getFlowStatus, FLOW_FINISHED, FLOW_PAYMENT)
|
|
|
- .and(wq -> wq.eq(CommonCostDO::getDeptId, reqVO.getDeptId())
|
|
|
- .or()
|
|
|
- .in(CommonCostDO::getProjectId, projectIds))
|
|
|
+ .eq(CommonCostDO::getDeptId, reqVO.getDeptId())
|
|
|
.orderByDesc(CommonCostDO::getApplyTime));
|
|
|
}
|
|
|
|
|
|
- default List<CommonCostDO> getCommonCostDeptList(CommonCostPageReqVO reqVO, List<String> projectIds) {
|
|
|
+ default List<CommonCostDO> getCommonCostDeptList(CommonCostPageReqVO reqVO, Collection<String> ids) {
|
|
|
return selectList(new LambdaQueryWrapperX<CommonCostDO>()
|
|
|
.eqIfPresent(CommonCostDO::getUserId, reqVO.getUserId())
|
|
|
.likeIfPresent(CommonCostDO::getCommonCostNo, reqVO.getCommonCostNo())
|
|
|
.betweenIfPresent(CommonCostDO::getApplyTime, reqVO.getApplyTime())
|
|
|
.eqIfPresent(CommonCostDO::getTotalAmount, reqVO.getTotalAmount())
|
|
|
+ .eqIfPresent(CommonCostDO::getIsAgent, reqVO.getIsAgent())
|
|
|
.eqIfPresent(CommonCostDO::getFlowStatus, reqVO.getStatus())
|
|
|
+ .inIfPresent(CommonCostDO::getId, ids)
|
|
|
.in(CommonCostDO::getFlowStatus, FLOW_FINISHED, FLOW_PAYMENT)
|
|
|
- .and(wq -> wq.eq(CommonCostDO::getDeptId, reqVO.getDeptId())
|
|
|
- .or()
|
|
|
- .in(CommonCostDO::getProjectId, projectIds))
|
|
|
+ .eq(CommonCostDO::getDeptId, reqVO.getDeptId())
|
|
|
.orderByDesc(CommonCostDO::getApplyTime));
|
|
|
}
|
|
|
|