成本科目权限修改bug修改
This commit is contained in:
parent
29d84ef8fe
commit
d9011266a0
@ -95,13 +95,14 @@ public class CostBudgetController {
|
||||
@PostMapping(value = "/tree")
|
||||
public Result<List<CostBudgetDto>> tree(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
String projectSn = MapUtils.getString(map, "projectSn");
|
||||
String version = MapUtils.getString(map, "version");
|
||||
map.put("sn", projectSn);
|
||||
// ProjectInfoExtVo projectInfoBySn = projectService.getProjectInfoBySn(projectSn);
|
||||
// Company company = companyService.getOne(Wrappers.<Company>lambdaQuery().eq(Company::getCompanySn, projectInfoBySn.getCompanySn()));
|
||||
// map.put("companySn", company.getHeadquartersSn());
|
||||
QueryWrapper<CostSubject> queryWrapper = QueryGenerator.initPageQueryWrapper(CostSubject.class, map);
|
||||
// queryWrapper.lambda().eq(CostSubject::getType, projectInfoBySn.getProjectLx());
|
||||
List<CostBudgetDto> list = costBudgetService.tree(queryWrapper, projectSn);
|
||||
List<CostBudgetDto> list = costBudgetService.tree(queryWrapper, projectSn, version);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@ -414,10 +415,10 @@ public class CostBudgetController {
|
||||
String basePath = fileStorageProperties.getLocal().get(0).getBasePath();
|
||||
MultipartFile multipartFile = FileUtil.getMulFileByPath(basePath + fileName);
|
||||
ProjectInfoExtVo projectInfoBySn = projectService.getProjectInfoBySn(projectSn);
|
||||
Company company = companyService.getOne(Wrappers.<Company>lambdaQuery().eq(Company::getCompanySn, projectInfoBySn.getCompanySn()));
|
||||
// Company company = companyService.getOne(Wrappers.<Company>lambdaQuery().eq(Company::getCompanySn, projectInfoBySn.getCompanySn()));
|
||||
LambdaQueryWrapper<CostSubject> wrapper = Wrappers.<CostSubject>lambdaQuery()
|
||||
.eq(CostSubject::getSn, company.getHeadquartersSn())
|
||||
.eq(CostSubject::getType, projectInfoBySn.getProjectLx());
|
||||
.eq(CostSubject::getSn, projectSn)
|
||||
.eq(CostSubject::getLevelType, 3);
|
||||
List<CostSubject> subjectList = costSubjectService.list(wrapper);
|
||||
ImportParams params = new ImportParams();
|
||||
params.setTitleRows(2);
|
||||
|
||||
@ -18,7 +18,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface ICostBudgetService extends IService<CostBudget> {
|
||||
|
||||
List<CostBudgetDto> tree(QueryWrapper<CostSubject> wrapper, String projectSn);
|
||||
List<CostBudgetDto> tree(QueryWrapper<CostSubject> wrapper, String projectSn, String version);
|
||||
|
||||
List<CostBudgetDto> exportList(QueryWrapper<CostSubject> wrapper, ProjectInfoExtVo projectInfoBySn, boolean flag, String level);
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ public class CostBudgetServiceImpl extends ServiceImpl<CostBudgetMapper, CostBud
|
||||
private ICostContractPayService costContractPayService;
|
||||
|
||||
@Override
|
||||
public List<CostBudgetDto> tree(QueryWrapper<CostSubject> wrapper, String projectSn) {
|
||||
public List<CostBudgetDto> tree(QueryWrapper<CostSubject> wrapper, String projectSn, String version) {
|
||||
wrapper.lambda().eq(CostSubject::getParentId, 0);
|
||||
List<CostSubject> list = costSubjectService.list(wrapper);
|
||||
List<CostSubject> filter = list.stream().filter(l -> StringUtils.isNotBlank(l.getName())).collect(Collectors.toList());
|
||||
@ -56,7 +56,8 @@ public class CostBudgetServiceImpl extends ServiceImpl<CostBudgetMapper, CostBud
|
||||
List<CostSubject> allList = costSubjectService.list();
|
||||
List<CostBudgetDto> allDtoList = convert(allList);
|
||||
List<CostBudget> budgetList = this.list(Wrappers.<CostBudget>lambdaQuery()
|
||||
.eq(CostBudget::getProjectSn, projectSn));
|
||||
.eq(CostBudget::getProjectSn, projectSn)
|
||||
.eq(CostBudget::getVersion, version));
|
||||
List<CostContract> contractList = costContractService.list(Wrappers.<CostContract>lambdaQuery()
|
||||
.eq(CostContract::getProjectSn, projectSn));
|
||||
List<CostContractPay> costContractPayList = new ArrayList<>();
|
||||
|
||||
@ -68,7 +68,7 @@ public class CostSubjectServiceImpl extends ServiceImpl<CostSubjectMapper, CostS
|
||||
List<CostSubjectToOrganizationJob> toOrganizationJobs = toOrganizationJobService.list(new LambdaQueryWrapper<CostSubjectToOrganizationJob>().eq(CostSubjectToOrganizationJob::getOrganizationJobId, jobId));
|
||||
Set<Long> hasSubjectIds = toOrganizationJobs.stream().map(CostSubjectToOrganizationJob::getCostSubjectId).collect(Collectors.toSet());
|
||||
List<CostSubject> records = pageList.getRecords();
|
||||
Map<String, String> typeMap = dictionaryItemService.getDictList("project_lx", projectSn).stream().collect(Collectors.toMap(DictionaryItem::getData, DictionaryItem::getName, (s, s2) -> s));
|
||||
Map<String, String> typeMap = dictionaryItemService.getDictList("cost_subject_type", projectSn).stream().collect(Collectors.toMap(DictionaryItem::getData, DictionaryItem::getName, (s, s2) -> s));
|
||||
Map<String, String> subjectAttributionMap = dictionaryItemService.getDictList("cost_subject_attribution", projectSn).stream().collect(Collectors.toMap(DictionaryItem::getData, DictionaryItem::getName, (s, s2) -> s));
|
||||
Map<String, String> subjectConcreteCategoryMap = dictionaryItemService.getDictList("cost_subject_concrete_category", projectSn).stream().collect(Collectors.toMap(DictionaryItem::getData, DictionaryItem::getName, (s, s2) -> s));
|
||||
getChildren(records, allList, hasSubjectIds, typeMap, subjectAttributionMap, subjectConcreteCategoryMap);
|
||||
@ -152,8 +152,8 @@ public class CostSubjectServiceImpl extends ServiceImpl<CostSubjectMapper, CostS
|
||||
}
|
||||
costSubject.setHasPermission(hasPermission);
|
||||
costSubject.setTypeName(typeMap.get(costSubject.getType() + ""));
|
||||
costSubject.setSubjectAttributionName(typeMap.get(costSubject.getSubjectAttribution()));
|
||||
costSubject.setSubjectConcreteCategoryName(typeMap.get(costSubject.getSubjectConcreteCategory()));
|
||||
costSubject.setSubjectAttributionName(subjectAttributionMap.get(costSubject.getSubjectAttribution()));
|
||||
costSubject.setSubjectConcreteCategoryName(subjectConcreteCategoryMap.get(costSubject.getSubjectConcreteCategory()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user