|
@@ -6,6 +6,7 @@ import com.qmth.distributed.print.business.enums.TaskResultEnum;
|
|
|
import com.qmth.distributed.print.business.enums.TaskStatusEnum;
|
|
|
import com.qmth.distributed.print.business.templete.create.AsyncCreateTaskTemplete;
|
|
|
import com.qmth.distributed.print.business.templete.service.TaskLogicService;
|
|
|
+import com.qmth.distributed.print.common.contant.SpringContextHolder;
|
|
|
import com.qmth.distributed.print.common.contant.SystemConstant;
|
|
|
import com.qmth.distributed.print.common.util.Result;
|
|
|
import com.qmth.distributed.print.common.util.ResultUtil;
|
|
@@ -13,7 +14,6 @@ import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import javax.annotation.Resource;
|
|
|
import java.io.IOException;
|
|
|
import java.text.MessageFormat;
|
|
|
import java.util.Map;
|
|
@@ -32,8 +32,8 @@ public class AsyncCreatePdfTempleteService extends AsyncCreateTaskTemplete {
|
|
|
|
|
|
static final String OBJ_TITLE = "pdf数据";
|
|
|
|
|
|
- @Resource
|
|
|
- TaskLogicService taskLogicService;
|
|
|
+// @Resource
|
|
|
+// TaskLogicService taskLogicService;
|
|
|
|
|
|
/**
|
|
|
* 创建pdf
|
|
@@ -48,6 +48,7 @@ public class AsyncCreatePdfTempleteService extends AsyncCreateTaskTemplete {
|
|
|
StringJoiner stringJoinerSummary = new StringJoiner("\n").add(MessageFormat.format("{0}{1}{2}", FORMAT_TIME, BEGIN_TITLE, OBJ_TITLE));
|
|
|
tbTask.setStatus(TaskStatusEnum.RUNNING);
|
|
|
try {
|
|
|
+ TaskLogicService taskLogicService = SpringContextHolder.getBean(TaskLogicService.class);
|
|
|
taskLogicService.executeCreatePdfLogic(map);
|
|
|
stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", FORMAT_TIME, FINISH_TITLE, map.get("size"), FINISH_SIZE));
|
|
|
tbTask.setResult(TaskResultEnum.SUCCESS);
|