|
|
@@ -16,6 +16,7 @@ import javax.annotation.Resource;
|
|
|
import javax.imageio.ImageIO;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
+import com.common.workflow.service.activiti.supplierAnnualListener.AnnualApprovalRefuseTaskService;
|
|
|
import com.common.workflow.service.dto.ActiHistoricTaskDTO;
|
|
|
import com.common.workflow.service.dto.ActiMyTaskDTO;
|
|
|
import com.common.workflow.service.dto.ActiPageResultDTO;
|
|
|
@@ -39,12 +40,14 @@ import org.activiti.engine.task.TaskQuery;
|
|
|
import org.activiti.image.ProcessDiagramGenerator;
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@Service
|
|
|
public class ActivitiService {
|
|
|
-
|
|
|
+ private static final Logger logger = LoggerFactory.getLogger(AnnualApprovalRefuseTaskService.class);
|
|
|
@Autowired
|
|
|
private RuntimeService runtimeService;
|
|
|
@Autowired
|
|
|
@@ -70,7 +73,7 @@ public class ActivitiService {
|
|
|
variables.put("result", result);
|
|
|
|
|
|
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processKey, variables);
|
|
|
- System.out.println("流程启动成功,流程id:"+processInstance.getId());
|
|
|
+ logger.info("流程启动成功,流程id:" + processInstance.getId() + " 业务ID: " + businessKey);
|
|
|
return processInstance.getProcessInstanceId();
|
|
|
}
|
|
|
|
|
|
@@ -88,7 +91,7 @@ public class ActivitiService {
|
|
|
variables.put("supplierName", supplierName);
|
|
|
|
|
|
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processKey, variables);
|
|
|
- System.out.println("流程启动成功,流程id:"+processInstance.getId());
|
|
|
+ logger.info("流程启动成功,流程id:" + processInstance.getId() + " 业务ID: " + businessKey);
|
|
|
return processInstance.getProcessInstanceId();
|
|
|
}
|
|
|
|
|
|
@@ -120,12 +123,12 @@ public class ActivitiService {
|
|
|
.list();*/
|
|
|
|
|
|
//获取流程实例
|
|
|
- System.out.println("创建的myTask: " + myTask.toString());
|
|
|
- System.out.println("工作流参数 processKey:" + processKey);
|
|
|
- System.out.println("工作流参数 businessKey:" + businessKey);
|
|
|
- System.out.println("工作流参数 userId:" + userId);
|
|
|
- System.out.println("工作流参数 result:" + result);
|
|
|
- System.out.println("工作流参数 callbackUrl:" + callbackUrl);
|
|
|
+ logger.info("创建的myTask: " + myTask.toString());
|
|
|
+ logger.info("工作流参数 processKey:" + processKey);
|
|
|
+ logger.info("工作流参数 businessKey:" + businessKey);
|
|
|
+ logger.info("工作流参数 userId:" + userId);
|
|
|
+ logger.info("工作流参数 result:" + result);
|
|
|
+ logger.info("工作流参数 callbackUrl:" + callbackUrl);
|
|
|
taskService.claim(myTask.getId(), userId);
|
|
|
|
|
|
Map<String,Object> vars = new HashMap<String,Object>();
|
|
|
@@ -586,7 +589,7 @@ public class ActivitiService {
|
|
|
/*public void updateBizStatus(DelegateExecution execution,String status) {
|
|
|
String bizId = execution.getProcessBusinessKey();
|
|
|
//根据业务id自行处理业务表
|
|
|
- System.out.println("业务表["+bizId+"]状态更改成功,状态更改为:"+status);
|
|
|
+ logger.info("业务表["+bizId+"]状态更改成功,状态更改为:"+status);
|
|
|
}*/
|
|
|
|
|
|
|
|
|
@@ -622,11 +625,11 @@ public class ActivitiService {
|
|
|
ImageIO.write(bi, "png", fos);
|
|
|
fos.close();
|
|
|
is.close();
|
|
|
- System.out.println("图片生成成功");
|
|
|
+ logger.info("图片生成成功");
|
|
|
|
|
|
List<Task> tasks = taskService.createTaskQuery().taskCandidateUser("userId").list();
|
|
|
for(Task t : tasks) {
|
|
|
- System.out.println(t.getName());
|
|
|
+ logger.info(t.getName());
|
|
|
}
|
|
|
}*/
|
|
|
|
|
|
@@ -694,7 +697,7 @@ public class ActivitiService {
|
|
|
}
|
|
|
//logger.info("[完成]-获取流程图图像");
|
|
|
} catch (Exception e) {
|
|
|
- System.out.println(e.getMessage());
|
|
|
+ logger.info(e.getMessage());
|
|
|
//logger.error("【异常】-获取流程图失败!" + e.getMessage());
|
|
|
//throw new BusinessException("获取流程图失败!" + e.getMessage());
|
|
|
}
|