|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.palnet.biz.api.bas.group.service; |
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Optional; |
|
|
|
|
|
|
|
|
@ -11,8 +12,6 @@ import org.springframework.data.domain.PageRequest;
|
|
|
|
|
import org.springframework.data.domain.Pageable; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
import com.palnet.biz.api.anls.hstry.model.AnlsHstryModel; |
|
|
|
|
import com.palnet.biz.api.anls.hstry.model.AnlsHstryRsModel; |
|
|
|
|
import com.palnet.biz.api.bas.group.model.BasGroupAprvModel; |
|
|
|
|
import com.palnet.biz.api.bas.group.model.BasGroupAprvRqModel; |
|
|
|
|
import com.palnet.biz.api.comn.model.ComnPagingRs; |
|
|
|
@ -43,8 +42,7 @@ public class BasGroupAprvService {
|
|
|
|
|
public ComnPagingRs<BasGroupAprvModel> mylist(BasGroupAprvRqModel rq){ |
|
|
|
|
|
|
|
|
|
ComnPagingRs<BasGroupAprvModel> response = new ComnPagingRs<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Pageable pageable = PageRequest.of(rq.getPage()-1, rq.getRecord()); |
|
|
|
|
|
|
|
|
|
List<BasGroupAprvModel> result = query.aprvList(rq); |
|
|
|
@ -52,13 +50,14 @@ public class BasGroupAprvService {
|
|
|
|
|
long total = query.aprvCount(rq); |
|
|
|
|
|
|
|
|
|
long totalPage = total % rq.getRecord() > 0 ? (total/rq.getRecord()) + 1 : total/rq.getRecord(); |
|
|
|
|
PageImpl<BasGroupAprvModel> resultList =new PageImpl<BasGroupAprvModel>(result, pageable, result.size()); |
|
|
|
|
response.setItems(resultList.getContent()); |
|
|
|
|
response.setTotal(total); |
|
|
|
|
response.setPage(rq.getPage()); |
|
|
|
|
response.setTotalPage(totalPage); |
|
|
|
|
|
|
|
|
|
// response.setItems(result.getContent());
|
|
|
|
|
// response.setTotal(total);
|
|
|
|
|
// response.setPage(rq.getPage());
|
|
|
|
|
// response.setTotalPage(totalPage);
|
|
|
|
|
|
|
|
|
|
return response; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|