Commit a20cc3be authored by dahai's avatar dahai

修改更改任务单状态API

parent 6f53b218
...@@ -18,7 +18,7 @@ public interface TaskListService { ...@@ -18,7 +18,7 @@ public interface TaskListService {
public boolean createTaskList(List<TaskListEntity> resultMap); public boolean createTaskList(List<TaskListEntity> resultMap);
public boolean updateState(String taskId,String process,String name); public boolean updateState(List<String> list,String process,String name);
public List<Object> selectByCountyAtACCU(String date); public List<Object> selectByCountyAtACCU(String date);
......
...@@ -12,6 +12,7 @@ import com.yxproject.start.service.TaskListService; ...@@ -12,6 +12,7 @@ import com.yxproject.start.service.TaskListService;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.jws.Oneway; import javax.jws.Oneway;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -52,31 +53,35 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -52,31 +53,35 @@ public class TaskListServiceImpl implements TaskListService {
} }
@Override @Override
public boolean updateState(String taskId,String process,String name) { @Transactional(rollbackFor = Exception.class)
switch (process){ public boolean updateState(List<String> list,String process,String name) {
case "1": for (String taskId: list) {
taskListMapper.updateState1(taskId,process,name); switch (process){
break; case "1":
case "2": taskListMapper.updateState1(taskId,process,name);
taskListMapper.updateState2(taskId,process,name); break;
break; case "2":
case "3": taskListMapper.updateState2(taskId,process,name);
taskListMapper.updateState3(taskId,process,name); break;
break; case "3":
case "4": taskListMapper.updateState3(taskId,process,name);
taskListMapper.updateState4(taskId,process,name); break;
break; case "4":
case "5": taskListMapper.updateState4(taskId,process,name);
taskListMapper.updateState5(taskId,process,name); break;
break; case "5":
case "6": taskListMapper.updateState5(taskId,process,name);
taskListMapper.updateState6(taskId,process,name); break;
break; case "6":
case "7": taskListMapper.updateState6(taskId,process,name);
taskListMapper.updateState7(taskId,process,name); break;
break; case "7":
default: taskListMapper.updateState7(taskId,process,name);
break; break;
default:
break;
}
} }
return true; return true;
} }
...@@ -209,6 +214,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -209,6 +214,7 @@ public class TaskListServiceImpl implements TaskListService {
* @return * @return
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public List<Object> selectByCountyAtAuxiliary(long process) { public List<Object> selectByCountyAtAuxiliary(long process) {
//查询普通组号列表 在辅助库中 //查询普通组号列表 在辅助库中
List<Map<String, Object>> mapList_common = taskListMapper.selectByCountyAtAuxiliary_common(process); List<Map<String, Object>> mapList_common = taskListMapper.selectByCountyAtAuxiliary_common(process);
...@@ -258,6 +264,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -258,6 +264,7 @@ public class TaskListServiceImpl implements TaskListService {
* @return * @return
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public boolean saveTask(TaskEntity taskEntity) { public boolean saveTask(TaskEntity taskEntity) {
return taskListMapper.saveTask(taskEntity); return taskListMapper.saveTask(taskEntity);
} }
...@@ -268,6 +275,7 @@ public class TaskListServiceImpl implements TaskListService { ...@@ -268,6 +275,7 @@ public class TaskListServiceImpl implements TaskListService {
* @return * @return
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public boolean saveTask(List<Object> list,String submitName,String process) { public boolean saveTask(List<Object> list,String submitName,String process) {
Map<String,Object> stringObjectMap =(Map<String,Object>)list.get(0); Map<String,Object> stringObjectMap =(Map<String,Object>)list.get(0);
TaskEntity taskEntity = new TaskEntity(); TaskEntity taskEntity = new TaskEntity();
......
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