|
|
|
@ -1,5 +1,6 @@ |
|
|
|
|
package org.jeecg.modules.demo.project.controller; |
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
@ -15,6 +16,7 @@ import org.jeecg.common.exception.JeecgBootException; |
|
|
|
|
import org.jeecg.common.system.base.controller.JeecgController; |
|
|
|
|
import org.jeecg.common.system.query.QueryGenerator; |
|
|
|
|
import org.jeecg.common.system.query.QueryRuleEnum; |
|
|
|
|
import org.jeecg.common.system.vo.DictModel; |
|
|
|
|
import org.jeecg.modules.demo.departext.entity.DepartExt; |
|
|
|
|
import org.jeecg.modules.demo.departext.service.IDepartExtService; |
|
|
|
|
import org.jeecg.modules.demo.project.dto.BasicInfoDto; |
|
|
|
@ -30,6 +32,7 @@ import org.jeecg.modules.system.entity.SysDepart; |
|
|
|
|
import org.jeecg.modules.system.entity.SysUser; |
|
|
|
|
import org.jeecg.modules.system.service.ISysDepartService; |
|
|
|
|
import org.jeecg.modules.system.service.ISysUserService; |
|
|
|
|
import org.jeecg.modules.system.service.impl.SysBaseApiImpl; |
|
|
|
|
import org.jeewx.api.core.util.DateUtils; |
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@ -40,6 +43,7 @@ import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -71,6 +75,9 @@ public class ProjectController extends JeecgController<Project, IProjectService> |
|
|
|
|
@Autowired |
|
|
|
|
private IProjectTypeService iProjectTypeService; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private SysBaseApiImpl sysBaseApi; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
|
* |
|
|
|
@ -188,6 +195,22 @@ public class ProjectController extends JeecgController<Project, IProjectService> |
|
|
|
|
BeanUtils.copyProperties(departExt, dto); |
|
|
|
|
ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); |
|
|
|
|
dto.setAnnualName(projectType.getAnnualName()); |
|
|
|
|
List<DictModel> dictModels = sysBaseApi.queryDictItemsByCode("depart_type"); |
|
|
|
|
if(ObjectUtil.isNotEmpty(dictModels)){ |
|
|
|
|
dictModels.forEach(e->{ |
|
|
|
|
if(e.getValue().equals(dto.getType())){ |
|
|
|
|
dto.setType(e.getText()); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
List<DictModel> dictModels2 = sysBaseApi.queryDictItemsByCode("depart_category"); |
|
|
|
|
if(ObjectUtil.isNotEmpty(dictModels2)){ |
|
|
|
|
dictModels2.forEach(e->{ |
|
|
|
|
if(e.getValue().equals(dto.getOrgCategory())){ |
|
|
|
|
dto.setOrgCategory(e.getText()); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
return Result.OK(dto); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|