|
@@ -613,10 +613,10 @@ public class ReportExportController {
|
|
*/
|
|
*/
|
|
@GetMapping("/new-nba-export")
|
|
@GetMapping("/new-nba-export")
|
|
public R<?> newNbaExport(WmScorePackage wmScorePackage) {
|
|
public R<?> newNbaExport(WmScorePackage wmScorePackage) {
|
|
- WmScorePackage scorePackage = scorePackageMapper.selectById(wmScorePackage.getId());
|
|
|
|
// 查询是否配置了模板
|
|
// 查询是否配置了模板
|
|
|
|
+ Integer deptId = SecurityUtils.getUser().getDeptId();
|
|
int count = reportHandlerDeptRelationMapper.selectCount(Wrappers.<ReportHandlerDeptRelation>lambdaQuery()
|
|
int count = reportHandlerDeptRelationMapper.selectCount(Wrappers.<ReportHandlerDeptRelation>lambdaQuery()
|
|
- .eq(ReportHandlerDeptRelation::getDetpId, scorePackage.getDeptId())
|
|
|
|
|
|
+ .eq(ReportHandlerDeptRelation::getDetpId, deptId)
|
|
.eq(ReportHandlerDeptRelation::getReportType, ReportTypeEnum.NEW_NBA.getType()));
|
|
.eq(ReportHandlerDeptRelation::getReportType, ReportTypeEnum.NEW_NBA.getType()));
|
|
if (count <= 0) {
|
|
if (count <= 0) {
|
|
return R.failed("该企业尚未配置新模版,请联系客服人员进行模版配置");
|
|
return R.failed("该企业尚未配置新模版,请联系客服人员进行模版配置");
|
|
@@ -651,10 +651,10 @@ public class ReportExportController {
|
|
*/
|
|
*/
|
|
@GetMapping("/new-excel-export")
|
|
@GetMapping("/new-excel-export")
|
|
public R<?> newExcelExport(WmScorePackage wmScorePackage) {
|
|
public R<?> newExcelExport(WmScorePackage wmScorePackage) {
|
|
- WmScorePackage scorePackage = scorePackageMapper.selectById(wmScorePackage.getId());
|
|
|
|
// 查询是否配置了模板
|
|
// 查询是否配置了模板
|
|
|
|
+ Integer deptId = SecurityUtils.getUser().getDeptId();
|
|
int count = reportHandlerDeptRelationMapper.selectCount(Wrappers.<ReportHandlerDeptRelation>lambdaQuery()
|
|
int count = reportHandlerDeptRelationMapper.selectCount(Wrappers.<ReportHandlerDeptRelation>lambdaQuery()
|
|
- .eq(ReportHandlerDeptRelation::getDetpId, scorePackage.getDeptId())
|
|
|
|
|
|
+ .eq(ReportHandlerDeptRelation::getDetpId, deptId)
|
|
.eq(ReportHandlerDeptRelation::getReportType, ReportTypeEnum.NEW_EXCEL_NBA.getType()));
|
|
.eq(ReportHandlerDeptRelation::getReportType, ReportTypeEnum.NEW_EXCEL_NBA.getType()));
|
|
if (count <= 0) {
|
|
if (count <= 0) {
|
|
return R.failed("该企业尚未配置新模版,请联系客服人员进行模版配置");
|
|
return R.failed("该企业尚未配置新模版,请联系客服人员进行模版配置");
|