update 标准法规通用更新sql
This commit is contained in:
+14
@@ -15,6 +15,20 @@ public interface IProcessHandleService {
|
|||||||
**/
|
**/
|
||||||
void startProcess(ProcessInfoVO processInfoVO);
|
void startProcess(ProcessInfoVO processInfoVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: liao
|
||||||
|
* @Date: 2023/11/6 11:56
|
||||||
|
* @Description: 审批
|
||||||
|
**/
|
||||||
|
void approveTask(ProcessInfoVO processInfoVO, boolean pass);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: liao
|
||||||
|
* @Date: 2023/11/6 11:59
|
||||||
|
* @Description: 判断是否存在任务
|
||||||
|
**/
|
||||||
|
void isTaskExist(String taskId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: liao
|
* @Author: liao
|
||||||
* @Date: 2023/11/3 10:45
|
* @Date: 2023/11/3 10:45
|
||||||
|
|||||||
+5
@@ -65,6 +65,11 @@ public class ProcessFbEntryChangeServiceImpl extends ServiceImpl<ProcessFbEntryC
|
|||||||
updateById(processFbEntryChange);
|
updateById(processFbEntryChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: liao
|
||||||
|
* @Date: 2023/11/6 11:35
|
||||||
|
* @Description: 设置标准编号
|
||||||
|
**/
|
||||||
private void setStandardNumber(ProcessFbEntryChange processFbEntryChange) {
|
private void setStandardNumber(ProcessFbEntryChange processFbEntryChange) {
|
||||||
Map<String, Object> parameterMap = new HashMap<>();
|
Map<String, Object> parameterMap = new HashMap<>();
|
||||||
parameterMap.put(FieldCommon.STANDARD_CLASS, processFbEntryChange.getStandardClass());
|
parameterMap.put(FieldCommon.STANDARD_CLASS, processFbEntryChange.getStandardClass());
|
||||||
|
|||||||
+29
@@ -9,6 +9,7 @@ import com.jero.modules.activiti.process.fb.vo.ProcessInfoVO;
|
|||||||
import com.jero.modules.activiti.service.ProcessAllService;
|
import com.jero.modules.activiti.service.ProcessAllService;
|
||||||
import com.jero.modules.activiti.service.ProcessApprovalRecordService;
|
import com.jero.modules.activiti.service.ProcessApprovalRecordService;
|
||||||
import com.jero.modules.activiti.service.ProcessNodeLinkService;
|
import com.jero.modules.activiti.service.ProcessNodeLinkService;
|
||||||
|
import com.jero.modules.laws.common.constant.ResultCommon;
|
||||||
import com.jero.modules.laws.common.util.CurrentUserUtil;
|
import com.jero.modules.laws.common.util.CurrentUserUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.activiti.engine.RepositoryService;
|
import org.activiti.engine.RepositoryService;
|
||||||
@@ -17,6 +18,7 @@ import org.activiti.engine.TaskService;
|
|||||||
import org.activiti.engine.repository.ProcessDefinition;
|
import org.activiti.engine.repository.ProcessDefinition;
|
||||||
import org.activiti.engine.runtime.ProcessInstance;
|
import org.activiti.engine.runtime.ProcessInstance;
|
||||||
import org.activiti.engine.task.Task;
|
import org.activiti.engine.task.Task;
|
||||||
|
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;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -24,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: liao
|
* @Author: liao
|
||||||
@@ -84,6 +87,32 @@ public class ProcessHandleServiceImpl implements IProcessHandleService {
|
|||||||
taskService.complete(taskId);
|
taskService.complete(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: liao
|
||||||
|
* @Date: 2023/11/6 11:56
|
||||||
|
* @Description: 审批
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void approveTask(ProcessInfoVO processInfoVO, boolean pass) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: liao
|
||||||
|
* @Date: 2023/11/6 12:00
|
||||||
|
* @Description: 判断是否存在任务
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void isTaskExist(String taskId) {
|
||||||
|
if (StringUtils.isBlank(taskId)) {
|
||||||
|
throw new JeroBootException(ResultCommon.EMPTY_COMMON, "taskId");
|
||||||
|
}
|
||||||
|
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||||
|
if (Objects.isNull(task)) {
|
||||||
|
throw new JeroBootException(ResultCommon.NO_CORRESPONDING_DATA_FOUND);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: liao
|
* @Author: liao
|
||||||
* @Date: 2023/11/3 10:46
|
* @Date: 2023/11/3 10:46
|
||||||
|
|||||||
+2
-4
@@ -745,10 +745,8 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
// 添加更新记录
|
// 添加更新记录
|
||||||
addUpdateRecord(fieldList, oldDataMap, recordBuffer, key, value);
|
addUpdateRecord(fieldList, oldDataMap, recordBuffer, key, value);
|
||||||
|
|
||||||
// 如果value不为null和"",则拼接sql语句
|
// 拼接更新sql语句
|
||||||
if (StringUtils.isNotBlank(value)) {
|
jointUpdateFieldAndValue(fieldList, updateBuilder, key, value, id, standardNumber);
|
||||||
jointUpdateFieldAndValue(fieldList, updateBuilder, key, value, id, standardNumber);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 操作数据库进行更新数据
|
// 操作数据库进行更新数据
|
||||||
lawsCommonMapper.commonEdit(tableName, updateBuilder.toString(), id);
|
lawsCommonMapper.commonEdit(tableName, updateBuilder.toString(), id);
|
||||||
|
|||||||
Reference in New Issue
Block a user