Bläddra i källkod

Merge remote-tracking branch 'origin/master'

master
qiubh 2 månader sedan
förälder
incheckning
310c9ba94e

+ 2
- 1
gly-base-core/src/main/java/cn/com/taiji/core/repo/jpa/managew/KnowledgeFileInfoRepo.java Visa fil

@@ -2,6 +2,7 @@ package cn.com.taiji.core.repo.jpa.managew;

import java.util.List;

import cn.com.taiji.core.entity.dict.KnowlegdeType;
import cn.com.taiji.core.entity.managew.KnowledgeFileInfo;
import org.springframework.data.jpa.repository.Query;

@@ -9,5 +10,5 @@ import cn.com.taiji.common.repo.jpa.AbstractJpaRepo;

public interface KnowledgeFileInfoRepo extends AbstractJpaRepo<KnowledgeFileInfo, String> {
@Query("from KnowledgeFileInfo where knowledgeId = ?1 and knowledgeType = ?2 order by insertTime desc ")
List<KnowledgeFileInfo> findByKnowledgeIdAndKnowledgeType(String knowledgeId ,Integer knowledgeType);
List<KnowledgeFileInfo> findByKnowledgeIdAndKnowledgeType(String knowledgeId , KnowlegdeType knowledgeType);
}

+ 9
- 9
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/manager/knowledgeBase/KnowledgeBaseManagerImpl.java Visa fil

@@ -75,7 +75,7 @@ public class KnowledgeBaseManagerImpl extends AbstractCommManager implements Kno
throw new ManagerException("没找到该条知识库信息");
}
res.setWorkOrderProcess(orderProcess);
res.setFilms(fileInfoRepo.findByKnowledgeIdAndKnowledgeType(orderProcess.getId(), KnowlegdeType.WORK_ORDER_PROCESS.getCode()));
res.setFilms(fileInfoRepo.findByKnowledgeIdAndKnowledgeType(orderProcess.getId(), KnowlegdeType.WORK_ORDER_PROCESS));
return res;
}

@@ -113,7 +113,7 @@ public class KnowledgeBaseManagerImpl extends AbstractCommManager implements Kno
orderProcess.setApplicablePerson(null);
workOrderProcessRepo.merge(orderProcess);
// 处理附件
List<KnowledgeFileInfo> list = fileInfoRepo.findByKnowledgeIdAndKnowledgeType(orderProcess.getId(), KnowlegdeType.WORK_ORDER_PROCESS.getCode());
List<KnowledgeFileInfo> list = fileInfoRepo.findByKnowledgeIdAndKnowledgeType(orderProcess.getId(), KnowlegdeType.WORK_ORDER_PROCESS);
if (!list.isEmpty()){
for (KnowledgeFileInfo info : list){
fileInfoRepo.delete(info);
@@ -171,7 +171,7 @@ public class KnowledgeBaseManagerImpl extends AbstractCommManager implements Kno
throw new ManagerException("没找到该条知识库信息");
}
workOrderProcessRepo.delete(orderProcess);
List<KnowledgeFileInfo> list = fileInfoRepo.findByKnowledgeIdAndKnowledgeType(orderProcess.getId(), KnowlegdeType.WORK_ORDER_PROCESS.getCode());
List<KnowledgeFileInfo> list = fileInfoRepo.findByKnowledgeIdAndKnowledgeType(orderProcess.getId(), KnowlegdeType.WORK_ORDER_PROCESS);
if (!list.isEmpty()){
for (KnowledgeFileInfo info : list){
fileInfoRepo.delete(info);
@@ -197,7 +197,7 @@ public class KnowledgeBaseManagerImpl extends AbstractCommManager implements Kno
throw new ManagerException("没找到该条知识库信息");
}
res.setBusinessInfo(orderProcess);
res.setFilms(fileInfoRepo.findByKnowledgeIdAndKnowledgeType(orderProcess.getId(), KnowlegdeType.BUSINESS_INFO.getCode()));
res.setFilms(fileInfoRepo.findByKnowledgeIdAndKnowledgeType(orderProcess.getId(), KnowlegdeType.BUSINESS_INFO));
return res;
}

@@ -235,7 +235,7 @@ public class KnowledgeBaseManagerImpl extends AbstractCommManager implements Kno
businessInfo.setApplicablePerson(null);
businessInfoRepo.merge(businessInfo);
// 处理附件
List<KnowledgeFileInfo> list = fileInfoRepo.findByKnowledgeIdAndKnowledgeType(businessInfo.getId(), KnowlegdeType.BUSINESS_INFO.getCode());
List<KnowledgeFileInfo> list = fileInfoRepo.findByKnowledgeIdAndKnowledgeType(businessInfo.getId(), KnowlegdeType.BUSINESS_INFO);
if (!list.isEmpty()){
for (KnowledgeFileInfo info : list){
fileInfoRepo.delete(info);
@@ -293,7 +293,7 @@ public class KnowledgeBaseManagerImpl extends AbstractCommManager implements Kno
throw new ManagerException("没找到该条知识库信息");
}
businessInfoRepo.delete(orderProcess);
List<KnowledgeFileInfo> list = fileInfoRepo.findByKnowledgeIdAndKnowledgeType(orderProcess.getId(), KnowlegdeType.BUSINESS_INFO.getCode());
List<KnowledgeFileInfo> list = fileInfoRepo.findByKnowledgeIdAndKnowledgeType(orderProcess.getId(), KnowlegdeType.BUSINESS_INFO);
if (!list.isEmpty()){
for (KnowledgeFileInfo info : list){
fileInfoRepo.delete(info);
@@ -319,7 +319,7 @@ public class KnowledgeBaseManagerImpl extends AbstractCommManager implements Kno
throw new ManagerException("没找到该条知识库信息");
}
res.setAfterSaleAudit(orderProcess);
res.setFilms(fileInfoRepo.findByKnowledgeIdAndKnowledgeType(orderProcess.getId(), KnowlegdeType.AFTER_SALES_AUDIT.getCode()));
res.setFilms(fileInfoRepo.findByKnowledgeIdAndKnowledgeType(orderProcess.getId(), KnowlegdeType.AFTER_SALES_AUDIT));
return res;
}

@@ -358,7 +358,7 @@ public class KnowledgeBaseManagerImpl extends AbstractCommManager implements Kno
afterSaleAudit.setApplicablePerson(null);
afterSaleAuditRepo.merge(afterSaleAudit);
// 处理附件
List<KnowledgeFileInfo> list = fileInfoRepo.findByKnowledgeIdAndKnowledgeType(afterSaleAudit.getId(), KnowlegdeType.AFTER_SALES_AUDIT.getCode());
List<KnowledgeFileInfo> list = fileInfoRepo.findByKnowledgeIdAndKnowledgeType(afterSaleAudit.getId(), KnowlegdeType.AFTER_SALES_AUDIT);
if (!list.isEmpty()){
for (KnowledgeFileInfo info : list){
fileInfoRepo.delete(info);
@@ -417,7 +417,7 @@ public class KnowledgeBaseManagerImpl extends AbstractCommManager implements Kno
throw new ManagerException("没找到该条知识库信息");
}
afterSaleAuditRepo.delete(orderProcess);
List<KnowledgeFileInfo> list = fileInfoRepo.findByKnowledgeIdAndKnowledgeType(orderProcess.getId(), KnowlegdeType.AFTER_SALES_AUDIT.getCode());
List<KnowledgeFileInfo> list = fileInfoRepo.findByKnowledgeIdAndKnowledgeType(orderProcess.getId(), KnowlegdeType.AFTER_SALES_AUDIT);
if (!list.isEmpty()){
for (KnowledgeFileInfo info : list){
fileInfoRepo.delete(info);

Laddar…
Avbryt
Spara