Commit 2aa0e465 by zhangkb

Merge branch 'hy-tobacco' of ssh://132.232.112.242:7022/zhangkb/indicators into hy-tobacco

parents 778d9da8 0010162c
......@@ -56,6 +56,9 @@ public class DataEnterCtrl {
@ApiOperation("获取需要在线填报的数据项(填报任务点击)")
@GetMapping("findToEdit")
public List<TaskIndValue> findToEdit(@RequestParam("taskId") String taskId) throws Exception {
List<TaskIndValue> list = new ArrayList<>();
Task task = taskService.getById(taskId, true, false);
List<TaskIndicator> taskIndicators = task.getIndicators();
......@@ -100,7 +103,11 @@ public class DataEnterCtrl {
}
}
}
}
taskService.updateTaskStatusById(taskId,Constants.APPLY_STATE_DRAFT);
return list;
}
......
......@@ -57,6 +57,13 @@ public class Constants {
*/
public static final String Y = "Y";
/**
* 任务已下发
*
*/
public static final int APPLY_STATE_ISSUE = 5;
/**
* 申请状态-草稿
*/
......@@ -84,6 +91,7 @@ public class Constants {
/**
* 正常
*/
......
......@@ -78,5 +78,5 @@ public interface TaskMapper extends BaseMapper<Task> {
* **/
Integer selectAuDateOrEnDateCounts( QueryTaskParam param);
Integer updateTaskStatusById(@Param("taskId") String taskId,@Param("status") Integer status);
}
......@@ -203,4 +203,6 @@ public interface TaskService {
* 填报超时的数目
* **/
TaskAnalysisResult stateCounts(QueryTaskParam param);
void updateTaskStatusById(String taskId, Integer applyStateIssue);
}
......@@ -671,7 +671,7 @@ public class TaskServiceImpl implements TaskService {
task.setCreator(user);
task.setUpdateTime(now);
task.setUpdater(user);
task.setStatus(Constants.APPLY_STATE_DRAFT);
task.setStatus(Constants.APPLY_STATE_ISSUE);
task.setState(Constants.DATA_STATE_A);
task.setIndicators(tis);
task.setNeedSelfEnter(false);
......@@ -774,6 +774,11 @@ public class TaskServiceImpl implements TaskService {
return taskStateCounts;
}
@Override
public void updateTaskStatusById(String taskId, Integer status) {
taskMapper.updateTaskStatusById(taskId,status);
}
/**
* 获取关联的数据项和子数据项
* @param ruleId
......
......@@ -148,6 +148,11 @@
</if>
</select>
<update id="updateTaskStatusById" >
UPDATE data_enter_task
SET
`status`=#{status}
WHERE state = 1 and id= #{taskId}
</update>
</mapper>
\ No newline at end of file
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