|
@@ -612,12 +612,12 @@ public class ReportExportController {
|
|
|
* @return 结果
|
|
|
*/
|
|
|
@GetMapping("/new-nba-export")
|
|
|
- public R<?> newNbaExport(WmScorePackage wmScorePackage) {
|
|
|
+ public R<?> newDrugEntExport(WmScorePackage wmScorePackage) {
|
|
|
// 查询是否配置了模板
|
|
|
Integer deptId = SecurityUtils.getUser().getDeptId();
|
|
|
int count = reportHandlerDeptRelationMapper.selectCount(Wrappers.<ReportHandlerDeptRelation>lambdaQuery()
|
|
|
.eq(ReportHandlerDeptRelation::getDetpId, deptId)
|
|
|
- .eq(ReportHandlerDeptRelation::getReportType, ReportTypeEnum.NEW_NBA.getType()));
|
|
|
+ .eq(ReportHandlerDeptRelation::getReportType, ReportTypeEnum.NEW_DRUG_ENT.getType()));
|
|
|
if (count <= 0) {
|
|
|
return R.failed("该企业尚未配置新模版,请联系客服人员进行模版配置");
|
|
|
}
|
|
@@ -643,6 +643,44 @@ public class ReportExportController {
|
|
|
return R.ok("开始导出,请耐心等待");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 新版个人承接任务-按积分值,个人承接任务-按任务量,个人承接任务-通用,个人报告管理-个人报告导出的导出
|
|
|
+ *
|
|
|
+ * @param wmScorePackage 积分包
|
|
|
+ * @return 结果
|
|
|
+ */
|
|
|
+ @GetMapping("/new-personal-export")
|
|
|
+ public R<?> newPersonalExport(WmScorePackage wmScorePackage) {
|
|
|
+ // 查询是否配置了模板
|
|
|
+ Integer deptId = SecurityUtils.getUser().getDeptId();
|
|
|
+ int count = reportHandlerDeptRelationMapper.selectCount(Wrappers.<ReportHandlerDeptRelation>lambdaQuery()
|
|
|
+ .eq(ReportHandlerDeptRelation::getDetpId, deptId)
|
|
|
+ .eq(ReportHandlerDeptRelation::getReportType, ReportTypeEnum.NEW_PERSONAL.getType()));
|
|
|
+ if (count <= 0) {
|
|
|
+ return R.failed("该企业尚未配置新模版,请联系客服人员进行模版配置");
|
|
|
+ }
|
|
|
+
|
|
|
+ String key = String.format(CacheConstants.NEW_PERSONAL_REPORT_CACHE, wmScorePackage.getId());
|
|
|
+
|
|
|
+ String o = redisTemplate.opsForValue().get(key);
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(o) && WmReportOpt.WmReportOptStatus.GENERATING.name().equals(o)){
|
|
|
+
|
|
|
+ return R.failed("已有在途生成记录,能耐心等待");
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ BaseMap map = new BaseMap();
|
|
|
+ map.put("requestBody", JSONUtil.toJsonStr(wmScorePackage));
|
|
|
+
|
|
|
+ rabbitMqClient.sendMessage(MqConstants.DIRECT_MODE_NEW_PERSONAL_REPORT_EXPORT_QUEUE, map);
|
|
|
+
|
|
|
+ redisTemplate.opsForValue().set(key, WmReportOpt.WmReportOptStatus.GENERATING.name(),
|
|
|
+ CacheConstants.DEF_REPORT_CREATING_TTL , TimeUnit.MILLISECONDS);
|
|
|
+
|
|
|
+ return R.ok("开始导出,请耐心等待");
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 新版excel版的导出 TODO 报告部分下个版本实现
|
|
|
*
|
|
@@ -673,7 +711,7 @@ public class ReportExportController {
|
|
|
BaseMap map = new BaseMap();
|
|
|
map.put("requestBody", JSONUtil.toJsonStr(wmScorePackage));
|
|
|
|
|
|
- rabbitMqClient.sendMessage(MqConstants.DIRECT_MODE_NEW_EXCEL_NBA_REPORT_EXPORT_QUEUE, map);
|
|
|
+ rabbitMqClient.sendMessage(MqConstants.DIRECT_MODE_NEW_EXCEL_DRUG_ENT_REPORT_EXPORT_QUEUE, map);
|
|
|
|
|
|
redisTemplate.opsForValue().set(key, WmReportOpt.WmReportOptStatus.GENERATING.name(),
|
|
|
CacheConstants.DEF_REPORT_CREATING_TTL , TimeUnit.MILLISECONDS);
|