|
|
@ -16,6 +16,7 @@ import com.shuili.common.core.domain.SearchParam; |
|
|
|
import com.shuili.common.core.domain.entity.SysDept; |
|
|
|
import com.shuili.common.core.domain.entity.SysUser; |
|
|
|
import com.shuili.common.enums.BusinessType; |
|
|
|
import com.shuili.common.utils.StringUtils; |
|
|
|
import com.shuili.common.utils.poi.ExcelUtil; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
@ -59,67 +60,26 @@ public class BsSgcDfBzbpController extends BaseController |
|
|
|
{ |
|
|
|
|
|
|
|
BsSgcDfBzbp projectInfo = sp.getData(); |
|
|
|
String adcd = null; |
|
|
|
if (projectInfo != null) { |
|
|
|
adcd = projectInfo.getAdcd(); |
|
|
|
} |
|
|
|
|
|
|
|
SysUser sysUser = UserUtils.getUser(); |
|
|
|
if (sysUser.getUserName().equals("admin")) { |
|
|
|
if (projectInfo != null && projectInfo.getAdcd() != null) { |
|
|
|
String infoAdcd = projectInfo.getAdcd(); |
|
|
|
QueryWrapper<SysXzqh> sysXzqhQueryWrapper = new QueryWrapper<>(); |
|
|
|
sysXzqhQueryWrapper.eq("XZQHDM", infoAdcd); |
|
|
|
SysXzqh xzqh = sysXzqhService.getOne(sysXzqhQueryWrapper); |
|
|
|
if (xzqh.getLayer()==5) { |
|
|
|
infoAdcd = xzqh.getXzqhdm().substring(0, 2); |
|
|
|
|
|
|
|
} else if (xzqh.getLayer()==4) { |
|
|
|
infoAdcd = xzqh.getXzqhdm().substring(0, 4); |
|
|
|
|
|
|
|
}else { |
|
|
|
infoAdcd = xzqh.getXzqhdm(); |
|
|
|
} |
|
|
|
return bsSgcDfBzbpService.selectPage(sp,infoAdcd); |
|
|
|
}else { |
|
|
|
return bsSgcDfBzbpService.selectPage(sp,null); |
|
|
|
} |
|
|
|
|
|
|
|
}else if (adcd == null) { |
|
|
|
SysUser user = UserUtils.getUser(); |
|
|
|
String deptId = user.getDeptId(); |
|
|
|
SysDept sysDept = sysDeptService.get(deptId); |
|
|
|
String xzqhId = sysDept.getXzqhId(); |
|
|
|
SysXzqh xzqh = sysXzqhService.getById(xzqhId); |
|
|
|
String substring = ""; |
|
|
|
if (xzqh.getLayer()==5) { |
|
|
|
substring = xzqh.getXzqhdm().substring(0, 2); |
|
|
|
|
|
|
|
} else if (xzqh.getLayer()==4) { |
|
|
|
substring = xzqh.getXzqhdm().substring(0, 4); |
|
|
|
|
|
|
|
}else { |
|
|
|
substring = xzqh.getXzqhdm(); |
|
|
|
} |
|
|
|
|
|
|
|
return bsSgcDfBzbpService.selectPage(sp,substring); |
|
|
|
}else { |
|
|
|
String infoAdcd = null; |
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(projectInfo.getAdcd())) { |
|
|
|
QueryWrapper<SysXzqh> sysXzqhQueryWrapper = new QueryWrapper<>(); |
|
|
|
sysXzqhQueryWrapper.eq("XZQHDM", adcd); |
|
|
|
|
|
|
|
sysXzqhQueryWrapper.eq("XZQHDM", infoAdcd); |
|
|
|
SysXzqh xzqh = sysXzqhService.getOne(sysXzqhQueryWrapper); |
|
|
|
if (xzqh.getLayer()==5) { |
|
|
|
adcd = xzqh.getXzqhdm().substring(0, 2); |
|
|
|
if (xzqh.getLayer() == 5) { |
|
|
|
infoAdcd = xzqh.getXzqhdm().substring(0, 2); |
|
|
|
|
|
|
|
} else if (xzqh.getLayer()==4) { |
|
|
|
adcd = xzqh.getXzqhdm().substring(0, 4); |
|
|
|
} else if (xzqh.getLayer() == 4) { |
|
|
|
infoAdcd = xzqh.getXzqhdm().substring(0, 4); |
|
|
|
|
|
|
|
}else { |
|
|
|
adcd = xzqh.getXzqhdm(); |
|
|
|
} else { |
|
|
|
infoAdcd = xzqh.getXzqhdm(); |
|
|
|
} |
|
|
|
return bsSgcDfBzbpService.selectPage(sp, adcd); |
|
|
|
return bsSgcDfBzbpService.selectPage(sp, infoAdcd); |
|
|
|
}else { |
|
|
|
return bsSgcDfBzbpService.selectPage(sp, projectInfo.getAdcdQx()); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|