|
@@ -6,6 +6,7 @@ import com.platform.common.model.UserInfo;
|
|
|
import com.platform.common.util.*;
|
|
|
import com.platform.dao.bean.MyPage;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
+import com.platform.dao.bean.MyVOPage;
|
|
|
import com.platform.dao.dto.longyanpurchaseorder.LongYanPurchaseOrderDTO;
|
|
|
import com.platform.dao.dto.repair.RepairApplicationFormDTO;
|
|
|
import com.platform.dao.dto.sb.SbInfoDTO;
|
|
@@ -395,6 +396,60 @@ public class SbUnusedServiceImpl extends BaseServiceImpl<SbUnusedMapper, SbUnuse
|
|
|
return new MyPage(sbUnusedVOS);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public AbstractPageResultBean<SbUnusedVO> selectPageList2(SbUnusedDTO record, int pageNum, int pageSize) {
|
|
|
+ UserInfo userInfo = SecurityUtils.getUserInfo();
|
|
|
+ List<Integer> statusList = new ArrayList<>();
|
|
|
+ if (record.getSearchType()!=null){
|
|
|
+ //来自移动端
|
|
|
+ if (record.getSearchType() == 1){
|
|
|
+ //审核中,根据角色来区分主管审核还是部门负责人审核,超级管理员可看到全部
|
|
|
+ if (userInfo.getSuperAdmin()==1){
|
|
|
+ statusList.add(1);
|
|
|
+ statusList.add(2);
|
|
|
+ }else {
|
|
|
+ if (userInfo.getUserId().equals("636c57bd3abe1415981b18ec")){
|
|
|
+ statusList.add(2);
|
|
|
+ }else {
|
|
|
+ statusList.add(1);
|
|
|
+ }
|
|
|
+ record.setAllUserId(userInfo.getUserId());
|
|
|
+ }
|
|
|
+
|
|
|
+ }else if (record.getSearchType()==2){
|
|
|
+
|
|
|
+ if (userInfo.getSuperAdmin()!=1) {
|
|
|
+ if (userInfo.getSuperAdmin() != 1) {
|
|
|
+ record.setAllUserId(userInfo.getUserId());
|
|
|
+ if (userInfo.getUserId().equals("636c57bd3abe1415981b18ec")){
|
|
|
+ record.setHFlag(1);
|
|
|
+ }else {
|
|
|
+ record.setHFlag(2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ if (userInfo.getSuperAdmin()!=1){
|
|
|
+ record.setAllUserId(userInfo.getUserId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ record.setStatusList(statusList);
|
|
|
+ PageHelper.startPage(pageNum, pageSize);
|
|
|
+ List<SbUnusedVO> sbUnusedVOS = mapper.selectList(record);
|
|
|
+
|
|
|
+ List<SbUnusedDetailVO> sbUnusedDetailVOS = sbUnusedDetailMapper.selectList(null);
|
|
|
+ for (SbUnusedVO vo:sbUnusedVOS){
|
|
|
+ List<SbUnusedDetailVO> detailVOS = new ArrayList<>();
|
|
|
+ for (SbUnusedDetailVO detailVO:sbUnusedDetailVOS){
|
|
|
+ if (detailVO.getSbUnusedId().equals(vo.getId())){
|
|
|
+ detailVOS.add(detailVO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return new MyVOPage<>(sbUnusedVOS);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public AbstractPageResultBean<SbUnused> selectPageInfo(SbUnusedDTO record, int pageNum, int pageSize) {
|
|
|
PageHelper.startPage(pageNum, pageSize);
|