Browse Source

任务,企业标签修改

master
DX 1 month ago
parent
commit
bf36c713be
  1. 25
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterpriseinspections/EnterpriseInspectionsServiceImpl.java
  2. 8
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/taskinfo/TaskInfoServiceImpl.java

25
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterpriseinspections/EnterpriseInspectionsServiceImpl.java

@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.system.service.enterpriseinspections;
import cn.iocoder.yudao.module.system.controller.admin.auth.vo.RoleNameAndSelectTypeVO; import cn.iocoder.yudao.module.system.controller.admin.auth.vo.RoleNameAndSelectTypeVO;
import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO; import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO;
import cn.iocoder.yudao.module.system.dal.dataobject.dict.DictDataDO;
import cn.iocoder.yudao.module.system.dal.dataobject.enterprise.EnterpriseDO; import cn.iocoder.yudao.module.system.dal.dataobject.enterprise.EnterpriseDO;
import cn.iocoder.yudao.module.system.dal.dataobject.inspectionslog.InspectionsLogDO; import cn.iocoder.yudao.module.system.dal.dataobject.inspectionslog.InspectionsLogDO;
import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO; import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO;
@ -23,6 +24,7 @@ import cn.iocoder.yudao.module.system.dal.mysql.tasktag.TaskTagMapper;
import cn.iocoder.yudao.module.system.dal.mysql.user.AdminUserMapper; import cn.iocoder.yudao.module.system.dal.mysql.user.AdminUserMapper;
import cn.iocoder.yudao.module.system.service.auth.AdminAuthService; import cn.iocoder.yudao.module.system.service.auth.AdminAuthService;
import cn.iocoder.yudao.module.system.service.dept.DeptService; import cn.iocoder.yudao.module.system.service.dept.DeptService;
import cn.iocoder.yudao.module.system.service.dict.DictDataService;
import cn.iocoder.yudao.module.system.service.inspectionslog.InspectionsLogService; import cn.iocoder.yudao.module.system.service.inspectionslog.InspectionsLogService;
import cn.iocoder.yudao.module.system.service.taglibrary.TagLibraryService; import cn.iocoder.yudao.module.system.service.taglibrary.TagLibraryService;
import cn.iocoder.yudao.module.system.service.user.AdminUserService; import cn.iocoder.yudao.module.system.service.user.AdminUserService;
@ -85,6 +87,8 @@ public class EnterpriseInspectionsServiceImpl implements EnterpriseInspectionsSe
private SignInLogMapper signInLogMapper; private SignInLogMapper signInLogMapper;
@Resource @Resource
private AdminAuthService authService; private AdminAuthService authService;
@Resource
private DictDataService dictDataService;
@Override @Override
public Long createEnterpriseInspections(EnterpriseInspectionsSaveReqVO createReqVO) { public Long createEnterpriseInspections(EnterpriseInspectionsSaveReqVO createReqVO) {
@ -245,12 +249,23 @@ public class EnterpriseInspectionsServiceImpl implements EnterpriseInspectionsSe
} }
//查询企业标签 //查询企业标签
final TagLibraryDO tagLibrary = tagLibraryService.getTagLibrary(taskInfoDO.getTaskType()); final List<TagLibraryDO> tagLibraryDOS = tagLibraryService.listByEnterpriseId(enterpriseDO.getId());
if (tagLibrary != null) { //添加地址
List<String> list = new ArrayList<>(); final DictDataDO enterprisesArea = dictDataService.getDictData("enterprises_area", enterpriseDO.getRegion());
list.add(tagLibrary.getTagName());
item.setTagList(list); if (tagLibraryDOS != null && tagLibraryDOS.size() > 0) {
final List<String> collect = tagLibraryDOS.stream().map(tagLibraryDO -> tagLibraryDO.getTagName()).collect(Collectors.toList());
if (enterprisesArea != null) {
collect.add(0, enterprisesArea.getLabel());
}
item.setTagList(collect);
} }
item.setEnterpriseName(enterpriseDO.getEnterprisesName()); item.setEnterpriseName(enterpriseDO.getEnterprisesName());
item.setEnterpriseAddress(enterpriseDO.getAddress()); item.setEnterpriseAddress(enterpriseDO.getAddress());

8
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/taskinfo/TaskInfoServiceImpl.java

@ -267,9 +267,11 @@ public class TaskInfoServiceImpl implements TaskInfoService {
if (taskInfoDOPageResult.getList() != null && taskInfoDOPageResult.getList().size() > 0) { if (taskInfoDOPageResult.getList() != null && taskInfoDOPageResult.getList().size() > 0) {
taskInfoDOPageResult.getList().forEach(item->{ taskInfoDOPageResult.getList().forEach(item->{
//获取任务标签 //获取任务标签
final List<TagLibraryDO> tagLibraryDOS1 = tagLibraryService.listByTaskId(item.getId()); final TagLibraryDO tagLibrary = tagLibraryService.getTagLibrary(item.getTaskType());
if (tagLibraryDOS1 != null && tagLibraryDOS1.size() > 0) { if (tagLibrary != null) {
item.setTagList(tagLibraryDOS1.stream().map(TagLibraryDO::getTagName).collect(Collectors.toList())); List<String> list = new ArrayList<>();
list.add(tagLibrary.getTagName());
item.setTagList(list);
} }
//发布的部门 //发布的部门

Loading…
Cancel
Save