Commit 4e19484e by fudahua

fix:保存任务信息

parent a437b217
...@@ -88,5 +88,12 @@ public interface PendingTaskService { ...@@ -88,5 +88,12 @@ public interface PendingTaskService {
*/ */
public boolean updateFinish(String relationId); public boolean updateFinish(String relationId);
/**
* 完成
* @param task
* @return
*/
public boolean changeByRelationId(PendingTaskBO task);
} }
...@@ -3,6 +3,7 @@ package com.gic.haoban.manage.service.service.notify.impl; ...@@ -3,6 +3,7 @@ package com.gic.haoban.manage.service.service.notify.impl;
import com.gic.api.base.commons.BasePageInfo; import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.commons.util.PageHelperUtils; import com.gic.commons.util.PageHelperUtils;
import com.gic.commons.util.StringUtil;
import com.gic.haoban.common.utils.EntityUtil; import com.gic.haoban.common.utils.EntityUtil;
import com.gic.haoban.manage.service.dao.mapper.PendingTaskMapper; import com.gic.haoban.manage.service.dao.mapper.PendingTaskMapper;
import com.gic.haoban.manage.service.entity.TabPendingTask; import com.gic.haoban.manage.service.entity.TabPendingTask;
...@@ -10,6 +11,7 @@ import com.gic.haoban.manage.service.pojo.bo.PendingTaskBO; ...@@ -10,6 +11,7 @@ import com.gic.haoban.manage.service.pojo.bo.PendingTaskBO;
import com.gic.haoban.manage.service.service.notify.PendingTaskService; import com.gic.haoban.manage.service.service.notify.PendingTaskService;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -124,4 +126,20 @@ public class PendingTaskServiceImpl implements PendingTaskService { ...@@ -124,4 +126,20 @@ public class PendingTaskServiceImpl implements PendingTaskService {
pendingTaskMapper.updateByPrimaryKeySelective(pendingTask); pendingTaskMapper.updateByPrimaryKeySelective(pendingTask);
return true; return true;
} }
@Override
public boolean changeByRelationId(PendingTaskBO task) {
if (StringUtils.isBlank(task.getRelationId())) {
return false;
}
TabPendingTask pendingTask = pendingTaskMapper.getByRelationId(task.getRelationId());
if (null == pendingTask) {
return true;
}
TabPendingTask tabPendingTask = EntityUtil.changeEntityByJSON(TabPendingTask.class, task);
tabPendingTask.setId(pendingTask.getId());
tabPendingTask.setUpdateTime(new Date());
pendingTaskMapper.updateByPrimaryKeySelective(tabPendingTask);
return true;
}
} }
...@@ -137,7 +137,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService { ...@@ -137,7 +137,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
PendingTaskBO pendingTaskBO = new PendingTaskBO(); PendingTaskBO pendingTaskBO = new PendingTaskBO();
pendingTaskBO.setRelationId(relationId); pendingTaskBO.setRelationId(relationId);
pendingTaskBO.setClerkId(newExeutiveClerkId); pendingTaskBO.setClerkId(newExeutiveClerkId);
boolean b = pendingTaskService.addOrUpdatePendingTask(pendingTaskBO); boolean b = pendingTaskService.changeByRelationId(pendingTaskBO);
return ServiceResponse.success(b); return ServiceResponse.success(b);
} }
...@@ -147,7 +147,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService { ...@@ -147,7 +147,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
pendingTaskBO.setRelationId(relationId); pendingTaskBO.setRelationId(relationId);
pendingTaskBO.setClerkId(newExeutiveClerkId); pendingTaskBO.setClerkId(newExeutiveClerkId);
pendingTaskBO.setFinishFlag(1); pendingTaskBO.setFinishFlag(1);
boolean b = pendingTaskService.addOrUpdatePendingTask(pendingTaskBO); boolean b = pendingTaskService.changeByRelationId(pendingTaskBO);
return ServiceResponse.success(b); return ServiceResponse.success(b);
} }
...@@ -179,7 +179,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService { ...@@ -179,7 +179,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
PendingTaskBO pendingTaskBO = new PendingTaskBO(); PendingTaskBO pendingTaskBO = new PendingTaskBO();
pendingTaskBO.setRelationId(relationId); pendingTaskBO.setRelationId(relationId);
pendingTaskBO.setInvalidTime(endTime); pendingTaskBO.setInvalidTime(endTime);
boolean b = pendingTaskService.addOrUpdatePendingTask(pendingTaskBO); boolean b = pendingTaskService.changeByRelationId(pendingTaskBO);
return ServiceResponse.success(b); return ServiceResponse.success(b);
} }
......
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