Răsfoiți Sursa

资料查询批次

qianxb 2 ani în urmă
părinte
comite
b80d474ff4

+ 2 - 1
blade-service/blade-business/src/main/java/org/springblade/business/controller/TaskController.java

@@ -345,10 +345,11 @@ public class TaskController extends BladeController {
 			@ApiImplicitParam(name = "contractId", value = "合同段ID", required = true)
 	})
 	public R<List<String>> queryBatchListTwo(String projectId, String contractId,String type){
-		//如果type为1内页台账不需要去查询首件批次,type为2只查标记为首件的,type为3只查首件
 		if (StringUtils.isBlank(type)) {
+			//为空,以information为主表查询填报资料批次
 			return R.data(this.taskService.queryBatchListTwo(projectId, contractId));
 		}else{
+			//如果type为1内页台账不需要去查询首件批次,type为2只查标记为首件的,type为3只查首件
 			return R.data(this.taskService.queryBatchListThree(projectId, contractId,type));
 		}
 	}

+ 4 - 2
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TaskMapper.xml

@@ -51,10 +51,12 @@
         group by batch
     </select>
     <select id="queryBatchListTwo" resultType="java.lang.String">
-        select DISTINCT batch from u_task where is_deleted = 0 and status in (1,2) and project_id = #{projectId} and approval_type = 1
+        select DISTINCT batch from u_task
+        where is_deleted = 0 and status in (1,2) and project_id = #{projectId} and approval_type = 1 and form_data_id in
+        (SELECT id from u_information_query WHERE type=1 and `status` in (1,2)
         <if test="contractId != null and contractId != ''">
             and contract_id = #{contractId}
-        </if>
+        </if>)
         order by batch
     </select>
     <select id="queryBatchListThree" resultType="java.lang.String">