package com.huigou.bpm.engine.controller;

import com.huigou.bpm.engine.application.BizTaskApplication;
import com.huigou.bpm.engine.domain.model.BizTask;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.SDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * @author yonghuan
 */
@ControllerMapping("/bpm/bizTask")
@Controller
public class BizTaskController extends CommonController {

    @Autowired
    private BizTaskApplication bizTaskApplication;

    public String queryByActivityCode(SDO sdo) {
        BizTask task = bizTaskApplication.findByServiceCode(sdo.getString("procInstId"), sdo.getString("serviceCode"));
        return toResult(task);
    }

}
