|
@@ -4,7 +4,6 @@ import cn.hutool.core.date.StopWatch;
|
|
|
import cn.hutool.log.StaticLog;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.BeanUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -14,7 +13,6 @@ import org.apache.commons.lang.StringUtils;
|
|
|
import org.springblade.business.entity.DefaultProject;
|
|
|
import org.springblade.business.service.IDefaultProjectService;
|
|
|
import org.springblade.business.vo.UserVO;
|
|
|
-import org.springblade.core.log.exception.ServiceException;
|
|
|
import org.springblade.core.secure.BladeUser;
|
|
|
import org.springblade.core.secure.utils.AuthUtil;
|
|
|
import org.springblade.core.secure.utils.SecureUtil;
|
|
@@ -22,11 +20,15 @@ import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.core.tool.utils.BeanUtil;
|
|
|
import org.springblade.core.tool.utils.ObjectUtil;
|
|
|
import org.springblade.manager.dto.SaveUserInfoByProjectDTO;
|
|
|
-import org.springblade.manager.entity.*;
|
|
|
-import org.springblade.manager.feign.*;
|
|
|
+import org.springblade.manager.entity.ContractInfo;
|
|
|
+import org.springblade.manager.entity.ProjectInfo;
|
|
|
+import org.springblade.manager.entity.SignPfxFile;
|
|
|
+import org.springblade.manager.feign.ContractClient;
|
|
|
+import org.springblade.manager.feign.ProjectAssignmentUserClient;
|
|
|
+import org.springblade.manager.feign.ProjectClient;
|
|
|
+import org.springblade.manager.feign.SignPfxClient;
|
|
|
import org.springblade.manager.vo.ContractInfoVO;
|
|
|
import org.springblade.manager.vo.ProjectInfoVO;
|
|
|
-import org.springblade.manager.vo.ProjectInfoWbsTypeVO;
|
|
|
import org.springblade.system.entity.Role;
|
|
|
import org.springblade.system.feign.ISysClient;
|
|
|
import org.springblade.system.user.entity.User;
|
|
@@ -38,7 +40,6 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.Comparator;
|
|
|
import java.util.Iterator;
|
|
|
import java.util.List;
|
|
@@ -224,7 +225,15 @@ public class UserViewProjectContractController {
|
|
|
|
|
|
//剔除没有合同段的项目
|
|
|
projectInfoVOS.removeIf(next -> next.getContractInfoList().size() == 0);
|
|
|
-
|
|
|
+ //将合同段中业主合同段排在最前面
|
|
|
+ if(ObjectUtil.isNotEmpty(projectInfoVOS)){
|
|
|
+ for (ProjectInfoVO projectInfoVO : projectInfoVOS) {
|
|
|
+ if(ObjectUtil.isNotEmpty(projectInfoVO.getContractInfoList())){
|
|
|
+ List<ContractInfoVO> contractInfoList = projectInfoVO.getContractInfoList();
|
|
|
+ contractInfoList.sort(Comparator.comparingInt(contractInfo->contractInfo.getContractType() == 3 ? -1:0));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
return R.data(projectInfoVOS);
|
|
|
}
|
|
|
return R.data(-1, null, "数据查询失败");
|