| | |
| | | /** 主管部门(对应审批部门id) */ |
| | | private String competentDepartment; |
| | | |
| | | // @TableField("competent_department_person") |
| | | // /** 主管部门联系人 */ |
| | | // private Long competentDepartmentPerson; |
| | | // |
| | | // @TableField("competent_department_phone") |
| | | // /** 主管部门联系方式 */ |
| | | // private String competentDepartmentPhone; |
| | | @TableField("competent_department_person") |
| | | /** 主管部门联系人 */ |
| | | private String competentDepartmentPerson; |
| | | |
| | | @TableField("competent_department_phone") |
| | | /** 主管部门联系方式 */ |
| | | private String competentDepartmentPhone; |
| | | |
| | | @TableField("area") |
| | | /** 行政区域 */ |
| | |
| | | |
| | | @TableField("industry_competent_department_person") |
| | | /** 行业主管部门联系人 */ |
| | | private Long industryCompetentDepartmentPerson; |
| | | private String industryCompetentDepartmentPerson; |
| | | |
| | | @TableField("department_person_phone") |
| | | /** 行业主管部门联系方式 */ |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | private String tag; |
| | | |
| | | @ApiModelProperty("主管部门(对应审批部门id)") |
| | | private List<Long> competentDepartmentList; |
| | | private String competentDepartment; |
| | | |
| | | @ApiModelProperty("主管部门联系人") |
| | | /** 主管部门联系人 */ |
| | | private String competentDepartmentPerson; |
| | | |
| | | @ApiModelProperty("主管部门联系方式") |
| | | /** 主管部门联系方式 */ |
| | | private String competentDepartmentPhone; |
| | | |
| | | @ApiModelProperty("行政区域") |
| | | private String area; |
| | |
| | | @ApiModelProperty("行业主管部门") |
| | | private Long industryCompetentDepartment; |
| | | @ApiModelProperty("行业主管部门联系人") |
| | | private Long industryCompetentDepartmentPerson; |
| | | private String industryCompetentDepartmentPerson; |
| | | @ApiModelProperty("行业主管部门联系方式") |
| | | private String departmentPersonPhone; |
| | | |
| | |
| | | entity = new ProjectInfo(); |
| | | } |
| | | BeanUtils.copyProperties(form, entity); |
| | | //审核部门转换 |
| | | List<Long> competentDepartmentList = form.getCompetentDepartmentList(); |
| | | if(!CollectionUtils.isEmpty(competentDepartmentList)){ |
| | | entity.setCompetentDepartment(StringUtils.join(competentDepartmentList, ",")); |
| | | } else { |
| | | entity.setCompetentDepartment(""); |
| | | } |
| | | //资金类型转换 |
| | | List<String> fundTypeList = form.getFundTypeList(); |
| | | if(!CollectionUtils.isEmpty(fundTypeList)){ |
| | |
| | | |
| | | /** 主管部门(对应审批部门id) */ |
| | | @ApiModelProperty("主管部门(对应审批部门id)") |
| | | private List<Long> competentDepartmentList; |
| | | |
| | | |
| | | |
| | | |
| | | private String competentDepartment; |
| | | |
| | | @ApiModelProperty("主管部门联系人") |
| | | /** 主管部门联系人 */ |
| | | private String competentDepartmentPerson; |
| | | |
| | | @ApiModelProperty("主管部门联系方式") |
| | | /** 主管部门联系方式 */ |
| | | private String competentDepartmentPhone; |
| | | |
| | | /** 行政区域 */ |
| | | @ApiModelProperty("行政区域") |
| | | private String area; |
| | |
| | | @ApiModelProperty("行业主管部门") |
| | | private Long industryCompetentDepartment; |
| | | @ApiModelProperty("行业主管部门联系人") |
| | | private Long industryCompetentDepartmentPerson; |
| | | private String industryCompetentDepartmentPerson; |
| | | @ApiModelProperty("行业主管部门联系方式") |
| | | private String departmentPersonPhone; |
| | | |
| | |
| | | } |
| | | |
| | | BeanUtils.copyProperties(entity, vo); |
| | | //主管部门转成list |
| | | String competentDepartment = entity.getCompetentDepartment(); |
| | | if(!StringUtils.isBlank(competentDepartment)){ |
| | | List<Long> list = Arrays.stream(competentDepartment.split(",")) |
| | | .map(Long::parseLong) |
| | | .collect(Collectors.toList()); |
| | | vo.setCompetentDepartmentList(list); |
| | | } |
| | | |
| | | //管理归口转换 |
| | | String managementCentralization = entity.getManagementCentralization(); |
| | | if(!StringUtils.isBlank(managementCentralization)){ |
| | |
| | | } |
| | | //转换字符串集合字段 |
| | | public static void transform(@NonNull ProjectInfoVO vo) { |
| | | //主管部门转成list |
| | | String competentDepartment = vo.getCompetentDepartment(); |
| | | if(!StringUtils.isBlank(competentDepartment)){ |
| | | List<Long> list = Arrays.stream(competentDepartment.split(",")) |
| | | .map(Long::parseLong) |
| | | .collect(Collectors.toList()); |
| | | vo.setCompetentDepartmentList(list); |
| | | } |
| | | //管理归口转换 |
| | | String managementCentralization = vo.getManagementCentralization(); |
| | | if(!StringUtils.isBlank(managementCentralization)){ |
| | |
| | | } |
| | | |
| | | //分类类型转换 |
| | | |
| | | String importanceType = vo.getImportanceType(); |
| | | if (!StringUtils.isBlank(importanceType)) { |
| | | vo.setImportanceTypeList(Arrays.asList(importanceType.split(","))); |
| | |
| | | ProjectInfoVO.transform(vo); |
| | | ProjectVO projectVO = new ProjectVO(); |
| | | copyToProjectVO(vo, projectVO); |
| | | List<Long> departmentList = vo.getCompetentDepartmentList(); |
| | | projectVO.setAuditRole(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || (!CollectionUtils.isEmpty(departmentList) && departmentList.contains(SecurityUtils.getDeptId()))); |
| | | String competentDepartment = vo.getCompetentDepartment(); |
| | | projectVO.setAuditRole(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || (StringUtils.isNotEmpty(competentDepartment) && competentDepartment.equals(SecurityUtils.getDeptId()))); |
| | | // 翻译项目阶段 |
| | | String phase = ProjectCategoryEnum.getPhaseByProjectStatus(projectVO.getProjectPhase()); |
| | | projectVO.setProjectPhase(phase); |
| | |
| | | ProjectInfo entity = baseMapper.getById(id); |
| | | Assert.notNull(entity, "记录不存在"); |
| | | ProjectInfoVO vo = ProjectInfoVO.getVoByEntity(entity, null); |
| | | List<Long> departmentList = vo.getCompetentDepartmentList(); |
| | | vo.setAuditRole(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || (!CollectionUtils.isEmpty(departmentList) && departmentList.contains(SecurityUtils.getDeptId()))); |
| | | String competentDepartment = vo.getCompetentDepartment(); |
| | | vo.setAuditRole(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || (StringUtils.isNotEmpty(competentDepartment) && competentDepartment.equals(SecurityUtils.getDeptId()))); |
| | | QueryWrapper<File> fileQueryWrapper = new QueryWrapper<>(); |
| | | fileQueryWrapper.eq("type", FileTypeEnum.PROJECT_INFO.getType()); |
| | | fileQueryWrapper.eq("bus_id", vo.getId()); |
| | |
| | | TPI.project_phase, |
| | | TPI.tag, |
| | | TPI.competent_department, |
| | | TPI.competent_department_phone, |
| | | TPI.competent_department_person, |
| | | TPI.area, |
| | | TPI.management_centralization, |
| | | TPI.project_approval_type, |
| | |
| | | <select id="selectProjectDetailByIds" resultType="com.ycl.domain.vo.ProjectVO"> |
| | | select |
| | | TPI.id as id,TPI.project_name,TPI.project_code,TPI.attract_investment,TPI.content,TPI.construction_nature,TPI.project_type,TPI.project_sub_type,TPI.project_status,TPI.fund_type,TPI.invest_type,TPI.project_phase, |
| | | TPI.tag,TPI.competent_department,TPI.area,TPI.management_centralization,TPI.project_approval_type,TPI.importance_type,TPI.year,TPI.year_invest_amount,TPI.create_project_time,TPI.plan_start_time, |
| | | TPI.tag,TPI.competent_department, TPI.competent_department_person, TPI.competent_department_phone, |
| | | TPI.area,TPI.management_centralization,TPI.project_approval_type,TPI.importance_type,TPI.year,TPI.year_invest_amount,TPI.create_project_time,TPI.plan_start_time, |
| | | TPI.plan_complete_time,TPI.win_unit,TPI.win_amount,TPI.win_time,TPI.project_address,TPI.longitude,TPI.latitude, |
| | | TPI.project_owner_unit,TPI.project_contact_person,TPI.contact,TPI.gmt_create,TPI.gmt_update,TPI.update_by,TPI.create_by, |
| | | TPIF.id,TPIF.project_id,TPIF.total_investment,TPIF.principal,TPIF.government_investment_total,TPIF.central_investment_total,TPIF.central_budget_investment,TPIF.central_fiscal_investment,TPIF.central_special_bond_investment, |
| | |
| | | public Result approvalList() { |
| | | SysDept dept = new SysDept(); |
| | | dept.setParentId(approvalPortId); |
| | | return deptService.all(dept); |
| | | return Result.ok().data(deptService.selectDeptListNoAuth(dept)); |
| | | } |
| | | } |
| | |
| | | */ |
| | | public List<SysDept> selectDeptList(SysDept dept); |
| | | |
| | | public List<SysDept> selectDeptListNoAuth(SysDept dept); |
| | | |
| | | /** |
| | | * 根据角色ID查询部门树信息 |
| | | * |
| | |
| | | public List<SysDept> selectDeptList(SysDept dept); |
| | | |
| | | /** |
| | | * 查询部门管理数据-无数据权限 |
| | | * |
| | | * @param dept |
| | | * @return |
| | | */ |
| | | public List<SysDept> selectDeptListNoAuth(SysDept dept); |
| | | |
| | | /** |
| | | * 查询部门树结构信息 |
| | | * |
| | | * @param dept 部门信息 |
| | |
| | | return deptMapper.selectDeptList(dept); |
| | | } |
| | | |
| | | @Override |
| | | public List<SysDept> selectDeptListNoAuth(SysDept dept) { |
| | | return deptMapper.selectDeptListNoAuth(dept); |
| | | } |
| | | |
| | | /** |
| | | * 查询部门树结构信息 |
| | | * |
| | |
| | | order by d.parent_id, d.order_num |
| | | </select> |
| | | |
| | | <select id="selectDeptListNoAuth" parameterType="SysDept" resultMap="SysDeptResult"> |
| | | <include refid="selectDeptVo"/> |
| | | where d.del_flag = '0' |
| | | <if test="parentId != null"> |
| | | AND FIND_IN_SET(#{parentId}, ancestors) > 0 |
| | | </if> |
| | | <if test="deptName != null and deptName != ''"> |
| | | AND dept_name like concat('%', #{deptName}, '%') |
| | | </if> |
| | | order by d.parent_id, d.order_num |
| | | </select> |
| | | |
| | | <select id="selectDeptListByRoleId" resultType="Long"> |
| | | select d.dept_id |
| | | from sys_dept d |