jiazx0107
2026-01-17 cf3b3fe3f9d46e28ac84f1aa61a3d9754aabf421
fzzy-igdss-core/src/main/java/com/fzzy/work/service/BizWorkService.java
@@ -12,6 +12,7 @@
import com.fzzy.work.domain.WorkOrderConf;
import com.fzzy.work.domain.WorkOrderProcess;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -168,10 +169,20 @@
     */
    public BaseResp todoByProcess(WorkOrderProcess process) {
        String action = process.getAction();
        if (StringUtils.isEmpty(action)) {
            return BaseResp.error("没有识别到处理动作,请重新尝试");
        }
        log.info("-----工单处理-----{}", process);
        //获取工单
        WorkOrder work = orderService.selectById(process.getOrderId());
        if (null == work) return BaseResp.error("当前工单已不存在");
        if (work.getStatus().equals(WorkStatus.STATUS_50.getCode())
                || work.getStatus().equals(WorkStatus.STATUS_60.getCode())) {
            return BaseResp.error("当前工单已处理,请刷新页面重试!!");
        }
        String curNode = process.getNode();
        //获取处理人
@@ -183,8 +194,6 @@
        WorkOrderConf conf = confService.selectById(work.getConfId());
        if (null == conf) return BaseResp.error("当前工单未配置流程");
        String action = process.getAction();
        //添加记录
        process.setId(ContextUtil.UUID());
        process.setCreateTime(new Date());
@@ -202,8 +211,12 @@
            process.setNode(node.getCode());
            //结束判断,如果是结束节点,则结束工单
            if(WorkNode.NODE_END.getCode().equals(process.getNode())){
            if (WorkNode.NODE_END.getCode().equals(process.getNode())) {
                work.setStatus(WorkStatus.STATUS_50.getCode());
                work.setAssigneeName(process.getAssigneeName());
                work.setAssigneeId(process.getAssigneeId());
                orderService.complete(work);
            }
        }