Commit f2edd7f9 authored by 蔡镇泽's avatar 蔡镇泽

查询拒绝原因

parent 03792232
......@@ -92,6 +92,7 @@ public class DisableServiceImpl implements DisableService {
@Override
public void addDisable(ChDisableApply chDisableApply) {
chDisableApply.setEffTime(new Date());
disableApplyMapper.insert(chDisableApply);
}
......
......@@ -262,16 +262,18 @@ public class TaskController {
*
* @param groupNumber 组号
* @param status 分组状态 未分配(拒绝(重新分配)):0;已分配:1;已接受:2;已完成:3;拒绝(中止):4,拒绝(终止):5
* @param refuseReason 拒绝原因id
* @param refuseRemark 拒绝备注
*/
@RequestMapping("/taskGroupByGroup")
public Result taskGroupByGroup(String groupNumber, Integer status) {
public Result taskGroupByGroup(String groupNumber, Integer status, Integer refuseReason, String refuseRemark) {
if (StringUtils.isBlank(groupNumber)) {
return Result.failed("组号不能为空!");
}
if (status == null || status < 0 || status > 5) {
return Result.failed("状态异常!");
}
Result<Object> objectResult = taskService.taskGroupByGroup(groupNumber, status);
Result<Object> objectResult = taskService.taskGroupByGroup(groupNumber, status, refuseReason, refuseRemark);
if (!ResultCode.SUCCESS.getCode().equals(objectResult.getCode())) {
//失败
return Result.failed(objectResult.getMsg());
......
......@@ -68,7 +68,7 @@ public interface TaskService {
List<TaskGroupInfoVO> taskGroupInfoList(String groupNumber);
Result<Object> taskGroupByGroup(String groupNumber, Integer status);
Result<Object> taskGroupByGroup(String groupNumber, Integer status, Integer refuseReason, String refuseRemark);
TaskGroupInfoListInfoVO taskGroupInfoListInfo(String pushId);
......
......@@ -237,7 +237,7 @@ public class TaskServiceImpl implements TaskService {
}
@Override
public Result<Object> taskGroupByGroup(String groupNumber, Integer status) {
public Result<Object> taskGroupByGroup(String groupNumber, Integer status, Integer refuseReason, String refuseRemark) {
List<ChAprTaskPush> pushList = taskPushMapper.selectList(new QueryWrapper<ChAprTaskPush>().eq("group_number", groupNumber));
if (pushList == null || pushList.size() <= 0) {
return Result.failed("不存在的组!");
......@@ -251,6 +251,10 @@ public class TaskServiceImpl implements TaskService {
for (ChAprTaskPush push : pushList) {
//更新任务组状态
push.setStatus(status.shortValue());
if (status == 4 || status == 5 || status == 0) {
push.setRefuseReason(refuseReason.shortValue());
push.setRefuseRemark(refuseRemark);
}
taskPushMapper.updateById(push);
//更新评定任务状态
ChAprTask chAprTask = taskMapper.selectById(push.getTaskId());
......
......@@ -45,7 +45,7 @@
task.accept_time acceptTime,
task.finish_time finishTime,
task.task_status taskStatus,
push.refuse_reason refuseReason,
reason.refuse_reason refuseReason,
push.refuse_remark refuseRemark
from CH_APR_TASK task
left join ch_apr_organ organ on task.apr_organ_id = organ.apr_organ_id
......@@ -54,6 +54,7 @@
left join ch_apr_task_push push on task.task_id = push.task_id
left join ch_apr_task_emp cate on task.task_id = cate.task_id
left join ch_apr_report report on report.TASK_ID = task.TASK_ID
left join ch_refuse_reason reason on push.refuse_reason = reason.refuse_reason_id
<where>
<if test="organIds != null">
and task.apr_organ_id in
......@@ -253,13 +254,14 @@
emp.real_name empRealName,
emp.certi_code empCertiCode,
push.status status,
push.Refuse_reason refuseReason,/*拒绝原因*/
reason.Refuse_reason refuseReason,/*拒绝原因*/
push.Refuse_remark remark/*备注*/
from ch_apr_task_push push
left join ch_apr_task task on push.task_id = task.task_id
left join CH_FND_ORGAN organ on organ.organ_id = task.organ_id
left join ch_disable_info disable on task.disable_info_id = disable.disab_info_id
left join ch_apr_emp emp on emp.emp_id = push.emp_id
left join ch_refuse_reason reason on push.refuse_reason = reason.refuse_reason_id
where push.group_number = #{groupNumber}
</select>
......
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