|
|
@ -5,11 +5,18 @@ import com.yxt.anrui.base.api.baseinternalpurchase.AppCompanyShuntingVo; |
|
|
|
import com.yxt.anrui.base.api.baseinternalpurchase.BaseInternalPurchaseFeign; |
|
|
|
import com.yxt.anrui.base.api.baseinternalpurchase.flow.BaseInterNalPurchaseCompleteDto; |
|
|
|
import com.yxt.anrui.base.api.baseinternalpurchase.flow.BaseInterNalPurchaseTaskQuery; |
|
|
|
import com.yxt.anrui.terminal.api.supplychain.companyShunting.*; |
|
|
|
import com.yxt.anrui.base.api.baseinternalpurchase.flow.GetNodeVo; |
|
|
|
import com.yxt.anrui.base.api.baseoutsourcingapplication.GetNextNodeDto; |
|
|
|
import com.yxt.anrui.terminal.api.supplychain.companyShunting.CompanyShuntingList; |
|
|
|
import com.yxt.anrui.terminal.api.supplychain.companyShunting.CompanyShuntingVo; |
|
|
|
import com.yxt.anrui.terminal.api.supplychain.companyShunting.flowable.CompanyShuntingDto; |
|
|
|
import com.yxt.anrui.terminal.api.supplychain.companyShunting.flowable.CompanyShuntingQuery; |
|
|
|
import com.yxt.anrui.terminal.api.supplychain.companyShunting.flowable.CompanyShuntingTaskQuery; |
|
|
|
import com.yxt.common.core.result.ResultBean; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.util.Collections; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
@ -129,6 +136,31 @@ public class CompanyShuntingService { |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean<String> getFlowOperateTitle(CompanyShuntingQuery query) { |
|
|
|
return null; |
|
|
|
ResultBean<String> rb = ResultBean.fireFail(); |
|
|
|
//0 上一环节 1下一环节
|
|
|
|
int next = query.getNext(); |
|
|
|
GetNextNodeDto getNodeQuery = new GetNextNodeDto(); |
|
|
|
BeanUtil.copyProperties(query, getNodeQuery); |
|
|
|
String data = ""; |
|
|
|
if (next == 0) { |
|
|
|
ResultBean<List<GetNodeVo>> getPreviousNodesForReject = baseInternalPurchaseFeign.getPreviousNodesForReject(getNodeQuery); |
|
|
|
if (getPreviousNodesForReject.getSuccess()) { |
|
|
|
getPreviousNodesForReject.getData().removeAll(Collections.singleton(null)); |
|
|
|
data = getPreviousNodesForReject.getData().get(0).getName(); |
|
|
|
} else { |
|
|
|
return rb.setMsg(getPreviousNodesForReject.getMsg()); |
|
|
|
} |
|
|
|
} else if (next == 1) { |
|
|
|
ResultBean<List<GetNodeVo>> getNextNodesForSubmit = baseInternalPurchaseFeign.getNextNodesForSubmit(getNodeQuery); |
|
|
|
if (getNextNodesForSubmit.getSuccess()) { |
|
|
|
getNextNodesForSubmit.getData().removeAll(Collections.singleton(null)); |
|
|
|
data = getNextNodesForSubmit.getData().get(0).getName(); |
|
|
|
} else { |
|
|
|
return rb.setMsg(getNextNodesForSubmit.getMsg()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
return rb.setMsg("参数错误:next"); |
|
|
|
} |
|
|
|
return rb.success().setData(data); |
|
|
|
} |
|
|
|
} |
|
|
|