Commit a20cc3be authored by dahai's avatar dahai

修改更改任务单状态API

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