Commit e27bb50d authored by limei's avatar limei

标准规则库

parent c374e4c5
......@@ -38,22 +38,26 @@ public class SuperviseRuleServiceImpl extends BaseService<SuperviseRuleDto,Super
Long superviseDeptId = superviseRule.getSuperviseDeptId();
Long inspectionUnitId = superviseRule.getInspectionUnitId();
LambdaQueryWrapper<SuperviseRule> wrapper = new LambdaQueryWrapper<>();
if(!ValidationUtil.isEmpty(adminRegionCode)){
wrapper.eq(SuperviseRule::getAdminRegionCode,adminRegionCode);
if(ValidationUtil.isEmpty(adminRegionCode)){
return null;
}else {
// if(!ValidationUtil.isEmpty(adminRegionCode)){
// wrapper.eq(SuperviseRule::getAdminRegionCode, adminRegionCode);
// }
wrapper.eq(SuperviseRule::getAdminRegionCode, adminRegionCode);
}
if(!ValidationUtil.isEmpty(superviseDeptId)){
wrapper.like(SuperviseRule::getSuperviseDeptId,superviseDeptId);
if (!ValidationUtil.isEmpty(superviseDeptId)) {
wrapper.like(SuperviseRule::getSuperviseDeptId, superviseDeptId);
}
if(!ValidationUtil.isEmpty(inspectionUnitId)){
wrapper.like(SuperviseRule::getInspectionUnitId,inspectionUnitId);
if (!ValidationUtil.isEmpty(inspectionUnitId)) {
wrapper.like(SuperviseRule::getInspectionUnitId, inspectionUnitId);
}
page = this.page(page,wrapper);
page = this.page(page, wrapper);
List<SuperviseRule> superviseRuleList = page.getRecords();
List<SuperviseRuleDto> superviseRuleDtoList = new ArrayList<>();
for(SuperviseRule rule: superviseRuleList){
for (SuperviseRule rule : superviseRuleList) {
SuperviseRuleDto superviseRuleDto = new SuperviseRuleDto();
BeanUtils.copyProperties(rule,superviseRuleDto);
BeanUtils.copyProperties(rule, superviseRuleDto);
superviseRuleDto.setSuperviseDept(orgServiceImpl.getOrgUsrById(String.valueOf(rule.getSuperviseDeptId())).getBizOrgName());
superviseRuleDto.setInspectionUnit(orgServiceImpl.getOrgUsrById(String.valueOf(rule.getInspectionUnitId())).getBizOrgName());
superviseRuleDto.setCreateUnit(orgServiceImpl.getOrgUsrById(String.valueOf(rule.getCreateUnitId())).getBizOrgName());
......@@ -61,6 +65,7 @@ public class SuperviseRuleServiceImpl extends BaseService<SuperviseRuleDto,Super
}
page.setRecords(superviseRuleDtoList);
return page;
}
/**
......
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