Commit 30c17c8f authored by neo's avatar neo

[dev] add transactional fro approval

parent 192f049b
...@@ -9,6 +9,7 @@ import org.activiti.engine.task.Task; ...@@ -9,6 +9,7 @@ import org.activiti.engine.task.Task;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import pwc.taxtech.atms.common.util.MyAsserts; import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.constant.Constant; import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.dto.approval.ApprovalDto; import pwc.taxtech.atms.dto.approval.ApprovalDto;
...@@ -35,6 +36,7 @@ public class ApprovalService { ...@@ -35,6 +36,7 @@ public class ApprovalService {
@Autowired @Autowired
PeriodReportMapper reportMapper; PeriodReportMapper reportMapper;
@Transactional
public void startInstanceAndAssignee(ApprovalDto dto) { public void startInstanceAndAssignee(ApprovalDto dto) {
PeriodReportExample pre = new PeriodReportExample(); PeriodReportExample pre = new PeriodReportExample();
pre.createCriteria().andProjectIdEqualTo(dto.getProjectId()).andPeriodEqualTo(dto.getPeriod()); pre.createCriteria().andProjectIdEqualTo(dto.getProjectId()).andPeriodEqualTo(dto.getPeriod());
...@@ -99,7 +101,7 @@ public class ApprovalService { ...@@ -99,7 +101,7 @@ public class ApprovalService {
return list; return list;
} }
@Transactional
public void checkTask(String taskId, String decide) { public void checkTask(String taskId, String decide) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
PeriodApprove pa = new PeriodApprove(); PeriodApprove pa = new PeriodApprove();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment