Ver Fonte

德飞试验对接添加contractId

cr há 1 dia atrás
pai
commit
a3e106de91

+ 2 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialClassificationTreeDTO.java

@@ -44,6 +44,8 @@ public class TrialClassificationTreeDTO {
 
 	private Long projectId;
 
+	private Long contractId;
+
 	/**
 	 * 分类名称
 	 */

+ 2 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialSystemDockingDTO.java

@@ -36,6 +36,8 @@ public class TrialSystemDockingDTO {
 	 */
 	@NotNull(message = "projectId 不能为空")
 	private Long projectId;
+
+	private Long contractId;
 	/**
 	 * 报告文件名称
 	 */

+ 2 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialClassificationTree.java

@@ -42,6 +42,8 @@ public class TrialClassificationTree extends BaseEntity {
 
 
 	private Long projectId;
+
+	private Long contractId;
 	/**
 	* 父级ID
 	*/

+ 2 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/TrialSystemDocking.java

@@ -43,6 +43,8 @@ public class TrialSystemDocking extends BaseEntity {
 	 */
 	private Long projectId;
 
+	private Long contractId;
+
 	private String classificationAncestors;
 	/**
 	* 报告文件名称

+ 2 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TrialSystemDockingVO.java

@@ -38,6 +38,8 @@ public class TrialSystemDockingVO {
 	 * 项目Id
 	 */
 	private Long projectId;
+
+	private Long contractId;
 	/**
 	 * 报告文件名称
 	 */

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

@@ -79,11 +79,11 @@ public class TrialClassificationTreeController extends BladeController {
 	@GetMapping("/list")
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "查询当前节点的子节点", notes = "传入trialClassificationTree")
-	public R<List<TrialClassificationTreeVO>> list(Long id,Long projectId) {
+	public R<List<TrialClassificationTreeVO>> list(Long id,Long projectId,Long contractId) {
 		if(projectId==null){
 			throw new ServiceException("请选择项目");
 		}
-		List<TrialClassificationTreeVO> list = trialClassificationTreeService.selectAllNode(id,projectId);
+		List<TrialClassificationTreeVO> list = trialClassificationTreeService.selectAllNode(id,projectId,contractId);
 		return R.data(list);
 	}
 

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

@@ -44,7 +44,7 @@ public interface TrialClassificationTreeMapper extends BaseMapper<TrialClassific
 
 	Long selectAncestors(Long parentId);
 
-    List<TrialClassificationTreeVO> selectAllNode(@Param("id") Long id, @Param("projectId") Long projectId);
+    List<TrialClassificationTreeVO> selectAllNode(@Param("id") Long id, @Param("projectId") Long projectId,@Param("contractId")Long contractId);
 
 	void deleteByGroupType(@Param("groupType") Integer groupType);
 }

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

@@ -24,7 +24,7 @@
         select parent_id from u_trial_classification_tree where id = #{parentId} and is_deleted = 0
     </select>
     <select id="selectAllNode" resultType="org.springblade.business.vo.TrialClassificationTreeVO">
-        select tree.id,tree.parent_id,tree.project_id,tree.classification_name,(
+        select tree.id,tree.parent_id,tree.project_id,tree.contract_id,tree.classification_name,(
             SELECT
                 CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
             FROM
@@ -33,7 +33,7 @@
                 parent_id = tree.id and is_deleted = 0
         ) AS "has_children"
         from u_trial_classification_tree tree
-        where tree.is_deleted = 0 and tree.project_id = #{projectId}
+        where tree.is_deleted = 0 and tree.project_id = #{projectId} and tree.contract_id = #{contractId}
         <if test="id!=null and id!=''">
             and tree.parent_id = #{id}
         </if>

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

@@ -19,7 +19,7 @@
 
 
     <select id="selectTrialSystemDockingPage" resultMap="trialSystemDockingResultMap">
-        select id,project_id,report_name,report_number,unit_name,classification_id,specification,report_type,purpose_location,report_date,file_url,person_in_charge from u_trial_system_docking where is_deleted = 0 and project_id=#{vo.projectId}
+        select id,project_id,report_name,report_number,unit_name,classification_id,specification,report_type,purpose_location,report_date,file_url,person_in_charge from u_trial_system_docking where is_deleted = 0 and project_id=#{vo.projectId} and contract_id=#{vo.contractId}
         <if test="vo.reportName != null and vo.reportName != ''">
             and report_name like concat('%',#{vo.reportName},'%')
         </if>

+ 1 - 1
blade-service/blade-business/src/main/java/org/springblade/business/service/ITrialClassificationTreeService.java

@@ -48,7 +48,7 @@ public interface ITrialClassificationTreeService extends BaseService<TrialClassi
     boolean deleteById(Long id);
 
 
-    List<TrialClassificationTreeVO> selectAllNode(Long id, Long projectId);
+    List<TrialClassificationTreeVO> selectAllNode(Long id, Long projectId,Long contractId);
 
 	void deleteByGroupType(Integer groupType);
 }

+ 2 - 2
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialClassificationTreeServiceImpl.java

@@ -57,8 +57,8 @@ public class TrialClassificationTreeServiceImpl extends BaseServiceImpl<TrialCla
 	}
 
 	@Override
-	public List<TrialClassificationTreeVO> selectAllNode(Long id, Long projectId) {
-		return baseMapper.selectAllNode(id,projectId);
+	public List<TrialClassificationTreeVO> selectAllNode(Long id, Long projectId,Long contractId) {
+		return baseMapper.selectAllNode(id,projectId,contractId);
 	}
 
 	@Override