| | |
| | | import com.ycl.common.enums.business.TaskStatusEnum; |
| | | import com.ycl.common.exception.CustomException; |
| | | import com.ycl.common.utils.SecurityUtils; |
| | | import com.ycl.constant.ProjectConstant; |
| | | import com.ycl.domain.dto.FlowCommentDto; |
| | | import com.ycl.domain.dto.FlowNextDto; |
| | | import com.ycl.domain.dto.FlowTaskDto; |
| | |
| | | import org.flowable.task.api.history.HistoricTaskInstance; |
| | | import org.flowable.task.api.history.HistoricTaskInstanceQuery; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.ApplicationEventPublisher; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private final ProcessLogService processLogService; |
| | | private final ApplicationEventPublisher publisher; |
| | | private final ProjectProcessMapper projectProcessMapper; |
| | | |
| | | @Value("${targetIp}") |
| | | private String targetIp; |
| | | |
| | | /** |
| | | * 完成审核任务 |
| | |
| | | for (JSONObject oldField : oldFields) { |
| | | JSONObject options = oldField.getJSONObject("options"); |
| | | options.put("disabled", true); |
| | | // 处理文件上传ip问题 |
| | | if ("file-upload".equals(oldField.get("type"))) { |
| | | options.put("uploadURL", String.format("http://%s:10076/common/upload", this.targetIp)); |
| | | } |
| | | } |
| | | formJson.put(ProcessConstants.WIDGET_LIST, oldFields); |
| | | newP.put(ProcessConstants.TASK_FORM_KEY, formJson); |
| | | newP.remove(formDetailVO.getBeforeNodeDefId() + "&" + ProcessConstants.TASK_FORM_KEY); |
| | | // 处理已经上传的文件的ip地址 |
| | | for (String s : newP.keySet()) { |
| | | if (ProcessConstants.TASK_FORM_KEY.equals(s)) { |
| | | continue; |
| | | } |
| | | if (s.startsWith("fileupload")) { |
| | | List files = (List) newP.get(s); |
| | | for (Object file : files) { |
| | | LinkedHashMap<String, String> fileMap = (LinkedHashMap<String, String>) file; |
| | | String url = fileMap.get("url"); |
| | | fileMap.put("url", url.replace("42.193.1.25", this.targetIp)); |
| | | } |
| | | } |
| | | } |
| | | formDetailVO.setFormJsonObj(newP); |
| | | } |
| | | // TODO 暂时只处理用户任务上的表单 |