Commit a502f7c6 authored by 赵啸非's avatar 赵啸非

添加水印图片

parent 472acef9
...@@ -50,4 +50,13 @@ public interface CertificateIndustryService extends ICRUDService<CertificateIndu ...@@ -50,4 +50,13 @@ public interface CertificateIndustryService extends ICRUDService<CertificateIndu
* @return * @return
*/ */
List<CertificateIndustryTreeSelect> getListByParentId(Long parentId, Context context); List<CertificateIndustryTreeSelect> getListByParentId(Long parentId, Context context);
/**
* 根据父id获取所有子节点id
* @param parentId
* @param context
* @return
*/
List<Long> getAllListByParentId(Long parentId, Context context);
} }
\ No newline at end of file
...@@ -110,14 +110,16 @@ public class CertificateIndustryServiceImpl extends AbstractCRUDServiceImpl<Cert ...@@ -110,14 +110,16 @@ public class CertificateIndustryServiceImpl extends AbstractCRUDServiceImpl<Cert
List<CertificateIndustryEntity> returnList = new ArrayList<>(); List<CertificateIndustryEntity> returnList = new ArrayList<>();
List<Long> tempList = list.stream().map(CertificateIndustryEntity::getId).collect(Collectors.toList()); List<Long> tempList = list.stream().map(CertificateIndustryEntity::getId).collect(Collectors.toList());
for (Iterator<CertificateIndustryEntity> iterator = list.iterator(); iterator.hasNext(); ) { Iterator<CertificateIndustryEntity> iterator = list.iterator();
while (iterator.hasNext()) {
CertificateIndustryEntity certificateIndustryEntity = iterator.next(); CertificateIndustryEntity certificateIndustryEntity = iterator.next();
if (!tempList.contains(certificateIndustryEntity.getParentId())) { if (!tempList.contains(certificateIndustryEntity.getParentId())) {
recursionFn(list, certificateIndustryEntity); recursionFn(list, certificateIndustryEntity);
returnList.add(certificateIndustryEntity); returnList.add(certificateIndustryEntity);
} }
} }
if (returnList.isEmpty()) { if (returnList.isEmpty()) {
returnList = list; returnList = list;
} }
...@@ -164,13 +166,23 @@ public class CertificateIndustryServiceImpl extends AbstractCRUDServiceImpl<Cert ...@@ -164,13 +166,23 @@ public class CertificateIndustryServiceImpl extends AbstractCRUDServiceImpl<Cert
if (ObjectUtils.isEmpty(parentId)) { if (ObjectUtils.isEmpty(parentId)) {
parentId = -1L; parentId = -1L;
} }
//只做一层
List<CertificateIndustryTreeSelect> collect = this.find(new CertificateIndustryQuery().parentId(parentId), context).stream().map(item -> new CertificateIndustryTreeSelect(item) List<CertificateIndustryTreeSelect> collect = this.find(new CertificateIndustryQuery().parentId(parentId), context)
).collect(Collectors.toList()); .stream().map(item -> new CertificateIndustryTreeSelect(item))
if (parentId==-1L) { .collect(Collectors.toList());
if (parentId == -1L) {
return collect; return collect;
} }
return collect; return collect;
} }
@Override
public List<Long> getAllListByParentId(Long parentId, Context context) {
List<CertificateIndustryEntity> list = this.find(new CertificateIndustryQuery().parentId(parentId));
return null;
}
} }
\ No newline at end of file
...@@ -98,6 +98,31 @@ public class CertificateIndustryController extends BaseCRUDJsonBodyMappingContro ...@@ -98,6 +98,31 @@ public class CertificateIndustryController extends BaseCRUDJsonBodyMappingContro
} }
@PostMapping("list/exclude")
public String excludeList(CertificateIndustryEntity query) {
Map<String, Object> model = new HashMap<>();
JSONObject ret = new JSONObject();
String busiDesc = "查询" + this.getModuleDesc();
Long id = query.getId();
int code=VALUE_RESULT_SUCCESS;
try {
Set<Long> idSet = new HashSet<>();
idSet.add(query.getId());
List<CertificateIndustryEntity> collect = this.service.find(new CertificateIndustryQuery()).stream().map(item -> {
if(idSet.contains(item.getId())) return null;
return item;
}).filter(f -> f != null).collect(Collectors.toList());
model.put("result", collect);
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
code = VALUE_RESULT_FAILURE;
this.doException(request, busiDesc, model, e);
}
ret.put(KEY_RESULT_DATA, model);
ret.put(KEY_RESULT_CODE, code);
return ret.toJSONString();
}
/** /**
* 获取站点下拉树列表 * 获取站点下拉树列表
......
...@@ -32,4 +32,10 @@ public class ApplyLogVo extends BaseEntityLong { ...@@ -32,4 +32,10 @@ public class ApplyLogVo extends BaseEntityLong {
private List<CertificateDocumentPdu> childCertificate; private List<CertificateDocumentPdu> childCertificate;
/**
* 行业id
*/
private Long industryId;
} }
\ No newline at end of file
...@@ -88,6 +88,20 @@ public class ApplyLogController extends BaseCRUDJsonBodyMappingController<ApplyL ...@@ -88,6 +88,20 @@ public class ApplyLogController extends BaseCRUDJsonBodyMappingController<ApplyL
super.init(model, context); super.init(model, context);
} }
@Override
protected void doListBefore(ApplyLogEntity query, Map<String, Object> model, Context context) throws AppException {
if(!ObjectUtils.isEmpty(query.getIndustryId())){
//获取行业与子行业
//获取对阴目录idlist;
}
super.doListBefore(query, model, context);
}
/** /**
* 预览正本 * 预览正本
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment