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