瀏覽代碼

后管及客户端BUG修复

huangjn 3 年之前
父節點
當前提交
68752cd984

+ 1 - 1
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/SaveNodeVO.java → blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/AddContractTreeNodeVO.java

@@ -6,7 +6,7 @@ import lombok.Data;
 import java.util.List;
 
 @Data
-public class SaveNodeVO {
+public class AddContractTreeNodeVO {
 
     @ApiModelProperty("项目ID")
     private String projectId;

+ 47 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/CopyContractTreeNodeVO.java

@@ -0,0 +1,47 @@
+package org.springblade.business.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Data
+public class CopyContractTreeNodeVO {
+
+    @ApiModelProperty("复制类型,1单份、2多份")
+    private String copyType;
+
+    @ApiModelProperty("父级的PrimaryKeyId")
+    private String parentPrimaryKeyId;
+
+    @ApiModelProperty("需要复制的节点PrimaryKeyId")
+    private String needCopyPrimaryKeyId;
+
+    @ApiModelProperty("需要复制的节点新名称")
+    private String needCopyNodeName;
+
+    @ApiModelProperty("复制到的节点PrimaryKeyId和对应的name集合(复制多份时使用)")
+    private List<CopyBatch> copyBatchToPaths = new ArrayList<>();
+
+    public void setCopyBatchToPaths(String primaryKeyId, String nodeName){
+        this.copyBatchToPaths.add(new CopyBatch(primaryKeyId, nodeName));
+    }
+
+    @Data
+    public static class CopyBatch {
+
+        private String primaryKeyId;
+
+        private String nodeName;
+
+        public CopyBatch(){}
+
+        public CopyBatch(String primaryKeyId, String nodeName){
+            this.primaryKeyId = primaryKeyId;
+            this.nodeName = nodeName;
+        }
+
+    }
+
+}

+ 3 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/feign/WbsTreeContractClient.java

@@ -21,6 +21,9 @@ public interface WbsTreeContractClient {
      */
     String API_PREFIX = "/api/manager/WbsTreeContract";
 
+    @PostMapping(API_PREFIX + "/queryChildByParentId")
+    List<WbsTreeContract> queryChildByParentId(@RequestBody WbsTreeContract treeNode);
+
     @PostMapping(API_PREFIX + "/saveBatch")
     Boolean saveBatch(@RequestBody List<WbsTreeContract> list);
 

+ 88 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/ArchiveFileController.java

@@ -14,10 +14,13 @@ import org.springblade.business.entity.Task;
 import org.springblade.business.feign.OperationLogClient;
 import org.springblade.business.feign.TaskClient;
 import org.springblade.business.service.IArchiveShowService;
+import org.springblade.business.utils.FileUtils;
 import org.springblade.business.vo.ArchiveTaskVO;
 import org.springblade.business.vo.TaskVO;
+import org.springblade.common.utils.CommonUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.core.tool.utils.IoUtil;
 import org.springblade.manager.feign.ArchiveTreeClient;
 import org.springblade.manager.vo.ArchiveTreeVO;
 import org.springframework.beans.BeanUtils;
@@ -29,8 +32,16 @@ import org.springblade.business.vo.ArchiveFileVO;
 import org.springblade.business.service.IArchiveFileService;
 import org.springblade.core.boot.ctrl.BladeController;
 
+import javax.servlet.http.HttpServletResponse;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.InputStream;
+import java.net.URLEncoder;
 import java.util.Arrays;
 import java.util.List;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
 
 /**
  *  控制器
@@ -54,6 +65,83 @@ public class ArchiveFileController extends BladeController {
 
 	private final OperationLogClient operationLogClient;
 
+	/**
+	 * 批量下载
+	 */
+	@PostMapping("/batchDownloadFileToZip")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "批量下载")
+	public void batchDownloadFileToZip(String ids, HttpServletResponse response){
+
+		if(StringUtils.isNotEmpty(ids)){
+			//获取文件
+			List<ArchiveFile> result = this.archiveFileService.list(Wrappers.<ArchiveFile>lambdaQuery().in(ArchiveFile::getId, Arrays.asList(ids.split(","))));
+
+			// 设置压缩流:直接写入response,实现边压缩边下载
+			ZipOutputStream zipos = null;
+			// 循环将文件写入压缩流
+			DataOutputStream os = null;
+			try{
+
+				// 响应头的设置
+				response.reset();
+				response.setCharacterEncoding("utf-8");
+				response.setContentType("multipart/form-data");
+				// 设置压缩包的名字
+				// 解决不同浏览器压缩包名字含有中文时乱码的问题
+				String downloadName = "附件-" + System.currentTimeMillis() + ".zip";
+				response.setHeader("Content-Disposition", "attachment;fileName=" + URLEncoder.encode(downloadName, "UTF-8"));
+
+
+				try {
+					zipos = new ZipOutputStream(new BufferedOutputStream(response.getOutputStream()));
+					// 设置压缩方法
+					zipos.setMethod(ZipOutputStream.DEFLATED);
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+
+				if(zipos == null){
+					return;
+				}
+
+				InputStream inputStream = null;
+
+				for(ArchiveFile file : result){
+					if(StringUtils.isNotEmpty(file.getFileUrl())){
+						try{
+
+							//获取文件流
+							inputStream = CommonUtil.getOSSInputStream(file.getFileUrl());
+							//转换
+							byte[] bytes = FileUtils.InputStreamToBytes(inputStream);
+
+							String suffix = file.getFileUrl().substring(file.getFileUrl().lastIndexOf("."));
+							zipos.putNextEntry(new ZipEntry(file.getFileName()+suffix));
+
+							os = new DataOutputStream(zipos);
+							os.write(bytes);
+							zipos.closeEntry();
+
+						}catch (Exception e){
+							e.printStackTrace();
+						} finally {
+							IoUtil.closeQuietly(inputStream);
+						}
+					}
+				}
+
+			}catch (Exception e){
+				e.printStackTrace();
+			} finally {
+				IoUtil.closeQuietly(os);
+				IoUtil.closeQuietly(zipos);
+			}
+
+		}
+
+	}
+
 	/**
 	 * 批量废除
 	 * @param ids 列表主键

+ 183 - 4
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -24,17 +24,21 @@ import lombok.AllArgsConstructor;
 import javax.validation.Valid;
 
 import org.apache.commons.lang.StringUtils;
+import org.springblade.business.entity.ConstructionLedger;
 import org.springblade.business.entity.ContractTreeDrawings;
 import org.springblade.business.entity.TreeContractFirst;
 import org.springblade.business.feignClient.ClientTreePublicCodeClientImpl;
+import org.springblade.business.service.IConstructionLedgerService;
 import org.springblade.business.service.IContractTreeDrawingsService;
 import org.springblade.business.service.ITreeContractFirstService;
+import org.springblade.business.vo.CopyContractTreeNodeVO;
 import org.springblade.business.vo.FileUserVO;
 import org.springblade.business.vo.InformationQueryVO;
-import org.springblade.business.vo.SaveNodeVO;
+import org.springblade.business.vo.AddContractTreeNodeVO;
 import org.springblade.common.utils.SnowFlakeUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.manager.entity.ContractInfo;
@@ -83,6 +87,169 @@ public class InformationWriteQueryController extends BladeController {
 
 	private final ITreeContractFirstService treeContractFirstService;
 
+	private final IConstructionLedgerService constructionLedgerService;
+
+	/**
+	 * 复制节点
+	 */
+	@PostMapping("/copyContractTreeNode")
+	@ApiOperationSupport(order = 15)
+	@ApiOperation(value = "复制节点")
+	public R<Boolean> copyContractTreeNode(@RequestBody CopyContractTreeNodeVO vo){
+
+		//首先查询需要复制的节点及其下级所有子节点的信息
+		WbsTreeContract needCopyNode = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(vo.getNeedCopyPrimaryKeyId());
+
+		List<WbsTreeContract> parentList = new ArrayList<>(), childList = new ArrayList<>(), allList = new ArrayList<>(), saveList = new ArrayList<>();
+		//新增施工台账
+		List<ConstructionLedger> saveLedger = new ArrayList<>();
+
+		parentList.add(needCopyNode);
+		//查询所有有效子节点
+		this.foreachQueryChildContract(parentList, childList);
+		allList.addAll(parentList);
+		allList.addAll(childList);
+
+		if("1".equals(vo.getCopyType())){
+			if(StringUtils.isNotEmpty(vo.getNeedCopyPrimaryKeyId())){
+				WbsTreeContract parent = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(vo.getParentPrimaryKeyId());
+				//重塑关键信息
+				Map<Long,Long> oldToNewIdMap = new HashMap<>();
+				allList.forEach(node -> oldToNewIdMap.put(node.getId(), SnowFlakeUtil.getId()));
+				//todo 单份复制
+				allList.forEach(node -> {
+					WbsTreeContract newData = new WbsTreeContract();
+					BeanUtils.copyProperties(node, newData);
+
+					//重塑关键信息
+					//重塑primaryKeyId
+					newData.setPKeyId(SnowFlakeUtil.getId());
+					//设置旧ID
+					newData.setOldId(node.getId().toString());
+					//设置新ID
+					newData.setId(oldToNewIdMap.containsKey(node.getId()) ? oldToNewIdMap.get(node.getId()) : SnowFlakeUtil.getId());
+					//设置父节点ID
+					if(vo.getNeedCopyPrimaryKeyId().equals(node.getPKeyId().toString())){
+						//找到复制的节点,将parentId更改为 parent.getId()
+						newData.setParentId(parent.getId());
+						//设置新名称
+						newData.setDeptName(vo.getNeedCopyNodeName());
+						newData.setFullName(vo.getNeedCopyNodeName());
+					} else {
+						newData.setParentId(oldToNewIdMap.containsKey(node.getParentId()) ? oldToNewIdMap.get(node.getParentId()) : SnowFlakeUtil.getId());
+					}
+					newData.setCreateTime(new Date());
+					newData.setUpdateTime(new Date());
+					newData.setCreateUser(AuthUtil.getUserId());
+					//保存到集合中
+					saveList.add(newData);
+
+					if(new Integer("6").equals(node.getDeptCategory())){
+						//生成施工日志
+						this.createLedger(newData, saveLedger);
+					}
+				});
+			}
+
+		} else {
+			//todo 多份复制
+			//获取需要复制到的位置集合
+			List<CopyContractTreeNodeVO.CopyBatch> copyBatches = vo.getCopyBatchToPaths();
+			if(copyBatches.size() > 0){
+				copyBatches.forEach(copyBatch -> {
+					//查询复制到的位置信息
+					WbsTreeContract copyPath = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(copyBatch.getPrimaryKeyId());
+
+					//重塑关键信息
+					Map<Long,Long> oldToNewIdMap = new HashMap<>();
+					allList.forEach(node -> oldToNewIdMap.put(node.getId(), SnowFlakeUtil.getId()));
+
+					allList.forEach(node -> {
+						WbsTreeContract newData = new WbsTreeContract();
+						BeanUtils.copyProperties(node, newData);
+
+						//重塑关键信息
+						//设置旧ID
+						newData.setOldId(node.getId().toString());
+						//重塑primaryKeyId
+						newData.setPKeyId(SnowFlakeUtil.getId());
+						//设置新ID
+						newData.setId(oldToNewIdMap.containsKey(node.getId()) ? oldToNewIdMap.get(node.getId()) : SnowFlakeUtil.getId());
+						//设置父节点ID
+						if(vo.getNeedCopyPrimaryKeyId().equals(node.getPKeyId().toString())){
+							//找到复制的节点,将parentId更改为 parent.getId()
+							newData.setParentId(copyPath.getId());
+							//设置新名称
+							newData.setDeptName(copyBatch.getNodeName());
+							newData.setFullName(copyBatch.getNodeName());
+						} else {
+							newData.setParentId(oldToNewIdMap.containsKey(node.getParentId()) ? oldToNewIdMap.get(node.getParentId()) : SnowFlakeUtil.getId());
+						}
+						newData.setCreateTime(new Date());
+						newData.setUpdateTime(new Date());
+						newData.setCreateUser(AuthUtil.getUserId());
+						//保存到集合中
+						saveList.add(newData);
+
+						if(new Integer("6").equals(node.getDeptCategory())){
+							//生成施工日志
+							this.createLedger(newData, saveLedger);
+						}
+					});
+
+				});
+			}
+		}
+		if(saveList.size() > 0){
+			//保存施工日志
+			if(saveLedger.size() > 0){
+				this.constructionLedgerService.saveBatch(saveLedger);
+			}
+
+			//保存节点
+			return R.data(this.wbsTreeContractClient.saveBatch(saveList));
+		}
+
+		return R.data(false);
+	}
+
+	/**
+	 * 生成施工日志记录
+	 */
+	private void createLedger(WbsTreeContract newData, List<ConstructionLedger> saveLedger){
+		//工序,需要新增施工台账
+		ConstructionLedger ledger = new ConstructionLedger();
+		ledger.setSite(newData.getDeptName());
+		ledger.setIsBeton(newData.getIsConcrete());
+		ledger.setWbsId(newData.getPKeyId());
+		ledger.setContractId(Long.parseLong(newData.getContractId()));
+		ledger.setProjectId(Long.parseLong(newData.getProjectId()));
+		ledger.setCreateTime(new Date());
+		ledger.setCreateUser(AuthUtil.getUserId());
+		ledger.setIsDeleted(0);
+		saveLedger.add(ledger);
+	}
+
+	/**
+	 * 循环查询子节点
+	 * @param parentList 父节点集合
+	 * @param childList 保存集合
+	 */
+	private void foreachQueryChildContract(List<WbsTreeContract> parentList, List<WbsTreeContract> childList){
+		parentList.forEach(parent -> {
+			if(!new Integer("6").equals(parent.getDeptCategory())){
+				//查询子节点
+				List<WbsTreeContract> childs = this.wbsTreeContractClient.queryChildByParentId(parent);
+				if(childs != null && childs.size() > 0){
+					//添加入结果集
+					childList.addAll(childs);
+					//还有子级,继续向下
+					this.foreachQueryChildContract(childs, childList);
+				}
+			}
+		});
+	}
+
 	/**
 	 * 导图结构树节点查询
 	 * @return 结果
@@ -216,7 +383,7 @@ public class InformationWriteQueryController extends BladeController {
 	@PostMapping("/saveContractTreeNode")
 	@ApiOperationSupport(order = 10)
 	@ApiOperation(value = "新增节点及其子节点")
-	public R<Boolean> saveContractTreeNode(@RequestBody SaveNodeVO vo){
+	public R<Boolean> saveContractTreeNode(@RequestBody AddContractTreeNodeVO vo){
 		//先获取当前节点的信息
 		WbsTreeContract treeContract = this.wbsTreeContractClient.getContractWbsTreeByPrimaryKeyId(Long.parseLong(vo.getCurrentNodePrimaryKeyId()));
 
@@ -285,6 +452,7 @@ public class InformationWriteQueryController extends BladeController {
 
 		//保存集合
 		List<WbsTreeContract> saveList = new ArrayList<>();
+		List<ConstructionLedger> saveLedger = new ArrayList<>();
 		if(selectedNodeList.size() > 0){
 			//重塑关键信息
 			Map<Long, Long> OldIdToNewIdMap = new HashMap<>();
@@ -310,14 +478,25 @@ public class InformationWriteQueryController extends BladeController {
 				newData.setCreateTime(new Date());
 				//设置到保存集合中
 				saveList.add(newData);
+
+				if(new Integer("6").equals(newData.getDeptCategory())){
+					//生成施工日志
+					this.createLedger(newData, saveLedger);
+				}
+
 			});
 		}
 
 		if(saveList.size() > 0){
-			this.wbsTreeContractClient.saveBatch(saveList);
+			//保存施工日志
+			if(saveLedger.size() > 0){
+				this.constructionLedgerService.saveBatch(saveLedger);
+			}
+			//保存节点
+			return R.data(this.wbsTreeContractClient.saveBatch(saveList));
 		}
 
-		return R.data(true);
+		return R.data(false);
 	}
 
 	/**

+ 0 - 6
blade-service/blade-business/src/main/java/org/springblade/business/controller/TaskController.java

@@ -264,12 +264,6 @@ public class TaskController extends BladeController {
 				approvalVO.setParallelProcessInstanceId(parallelProcessInstanceIdArray[i]);
 				approvalVO.setFlag(batchTaskVO.getFlag());
 				approvalVO.setComment(batchTaskVO.getComment());
-				//查询业务数据
-//				TaskApprovalVO vo = this.queryBusinessData(formDataIds[i]);
-//				if(vo != null){
-//					//设置文件集合
-//					approvalVO.setApprovalFileList(vo.getApprovalFileList());
-//				}
 
 				//批量审批
 				this.taskService.completeApprovalTask(approvalVO);

+ 27 - 17
blade-service/blade-business/src/main/java/org/springblade/business/controller/UserOpinionFlowController.java

@@ -90,23 +90,8 @@ public class UserOpinionFlowController extends BladeController {
 		UserOpinionFlow oldFlow = this.userOpinionFlowService.getById(oldEndFlow);
 		oldFlow.setEvaluation(type);
 
-		//被投诉,新增考核信息
-		AssessmentUser assessmentUser = new AssessmentUser();
-		assessmentUser.setUserOpinionFlowId(Long.parseLong(oldEndFlow));
-		assessmentUser.setAssessmentUser(oldFlow.getManageUser().toString());
-		assessmentUser.setCreateUser(AuthUtil.getUserId());
-		assessmentUser.setCreateTime(new Date());
-		assessmentUser.setAssessmentContent("被投诉");
-		//获取字典
-		List<DictBiz> dictBizList = this.dictBizClient.getList("assessment_type", "notRoot").getData();
-		//找到对应类型
-		for(DictBiz biz : dictBizList){
-			if(biz.getDictValue().contains("被投诉")){
-				assessmentUser.setAssessmentMoney(biz.getDictKey());
-			}
-		}
-
-		this.assessmentUserService.save(assessmentUser);
+		//新增考核信息
+		this.saveAssessment(oldFlow, oldEndFlow);
 
 		return R.data(this.userOpinionFlowService.updateById(this.setUserData(oldFlow, false)));
 	}
@@ -153,6 +138,9 @@ public class UserOpinionFlowController extends BladeController {
 			//问题已解决
 			saveFlowList.add(this.setUserData(new UserOpinionFlow(Long.parseLong(userOpinionId), 0, newNumber, 4, "问题已解决", null, manageTime, manageUser, manageUserName, manegeUserPhone), true));
 
+			//新增考核信息
+			this.saveAssessment(oldFlow, oldEndFlow);
+
 			//修改流程
 			this.userOpinionFlowService.updateById(oldFlow);
 			//新增流程
@@ -164,6 +152,28 @@ public class UserOpinionFlowController extends BladeController {
 		return R.data(false);
 	}
 
+	/**
+	 * 新增考核信息
+	 */
+	private void saveAssessment(UserOpinionFlow oldFlow, String oldEndFlow){
+		//被投诉,新增考核信息
+		AssessmentUser assessmentUser = new AssessmentUser();
+		assessmentUser.setUserOpinionFlowId(Long.parseLong(oldEndFlow));
+		assessmentUser.setAssessmentUser(oldFlow.getManageUser().toString());
+		assessmentUser.setCreateUser(AuthUtil.getUserId());
+		assessmentUser.setCreateTime(new Date());
+		assessmentUser.setAssessmentContent("被投诉");
+		//获取字典
+		List<DictBiz> dictBizList = this.dictBizClient.getList("assessment_type", "notRoot").getData();
+		//找到对应类型
+		for(DictBiz biz : dictBizList){
+			if(biz.getDictValue().contains("被投诉")){
+				assessmentUser.setAssessmentMoney(biz.getDictKey());
+			}
+		}
+		this.assessmentUserService.save(assessmentUser);
+	}
+
 	/**
 	 * 获取当前工单的最新流程
 	 * @param userOpinionId 用户工单ID

+ 1 - 1
blade-service/blade-business/src/main/java/org/springblade/business/mapper/UserOpinionFlowMapper.xml

@@ -90,7 +90,7 @@
               uof.is_deleted = 0 and au.is_deleted = 0 and uo.is_deleted = 0
             and uof.sort = 4
             and uof.is_current = 2
-            and uof.evaluation = 3
+            and uof.evaluation in(2,3)
             <if test="vo.userId != null">
                 and uof.manage_user = #{vo.userId}
             </if>

+ 2 - 1
blade-service/blade-business/src/main/java/org/springblade/business/mapper/UserOpinionMapper.xml

@@ -64,7 +64,8 @@
                     and manage_user = #{currentUser}
                 </if>
                 and sort = 4 order by number DESC
-            ) as uof group by uof.user_opinion_id
+            ) as uof
+            limit 1
         ) as uof on uof.user_opinion_id = uo.id
         where uo.is_deleted = 0 order by uo.create_time DESC
     </select>

+ 5 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/feign/WbsTreeContractClientImpl.java

@@ -27,6 +27,11 @@ public class WbsTreeContractClientImpl implements WbsTreeContractClient {
 
     private final IDictBizClient dictBizClient;
 
+    @Override
+    public List<WbsTreeContract> queryChildByParentId(WbsTreeContract treeNode) {
+        return this.wbsTreeContractService.list(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getParentId, treeNode.getId()).eq(WbsTreeContract::getContractId, treeNode.getContractId()).eq(WbsTreeContract::getWbsType, treeNode.getWbsType()));
+    }
+
     @Override
     public Boolean saveBatch(List<WbsTreeContract> list) {
         return this.wbsTreeContractService.saveBatch(list);

+ 21 - 13
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/SignPfxFileMapper.xml

@@ -68,30 +68,38 @@
     </select>
 
     <select id="countSignPfxFile" resultType="java.lang.Integer">
-        select count(id) from m_sign_pfx_file where is_deleted = 0
+        select count(spf.id) from m_sign_pfx_file AS spf where spf.is_deleted = 0
         <if test="vo.userIds != null">
-            and certificate_user_id in
+            and
+            (
+            spf.certificate_user_id in
             <foreach collection="vo.userIds" item="userId" open="(" separator="," close=")">
                 #{userId}
             </foreach>
+            or spf.id in (select sign_pfx_file_id from m_sign_pfx_deputy where project_id = #{vo.projectId} and is_deleted = 0 )
+            )
         </if>
     </select>
 
     <select id="selectSignPfxFilePage" resultMap="signPfxFileResultMap">
         select
-            id,
-            certificate_user_name,
-            IFNULL(enterprise_unified_code,certificate_id) AS certificate_id,
-            is_register,
-            certificate_type
-        from m_sign_pfx_file where is_deleted = 0
+            spf.id,
+            spf.certificate_user_name,
+            IFNULL(spf.enterprise_unified_code,spf.certificate_id) AS certificate_id,
+            spf.is_register,
+            spf.certificate_type
+        from m_sign_pfx_file AS spf where spf.is_deleted = 0
         <if test="vo.userIds != null">
-            and certificate_user_id in
-            <foreach collection="vo.userIds" item="userId" open="(" separator="," close=")">
-                #{userId}
-            </foreach>
+            and
+            (
+                spf.certificate_user_id in
+                <foreach collection="vo.userIds" item="userId" open="(" separator="," close=")">
+                    #{userId}
+                </foreach>
+                or spf.id in (select sign_pfx_file_id from m_sign_pfx_deputy where project_id = #{vo.projectId} and is_deleted = 0 )
+            )
         </if>
-        order by create_time DESC limit #{current},#{size}
+        order by spf.create_time DESC limit #{current},#{size}
     </select>
 
 </mapper>

+ 2 - 5
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ContractInfoServiceImpl.java

@@ -46,10 +46,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * 合同段信息表 服务实现类
@@ -373,7 +370,7 @@ public class ContractInfoServiceImpl
 
     @Override
     public List<ContractInfo> findContractInProject(String ids) {
-        return baseMapper.selectList(Wrappers.<ContractInfo>query().lambda().eq(ContractInfo::getPId, ids));
+        return baseMapper.selectList(Wrappers.<ContractInfo>query().lambda().in(ContractInfo::getPId, Arrays.asList(ids.split(","))));
     }
 
     @Override