|
|
@ -86,6 +86,7 @@ import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailed.FinUncollectedRec |
|
|
|
import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailed.ReceiveInvoiceVo; |
|
|
|
import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailed.ReceiveSeleteVo; |
|
|
|
import com.yxt.anrui.fin.api.finvehicleinvoice.InvoiceVo; |
|
|
|
import com.yxt.anrui.flowable.api.flow.FlowProcessMapQuery; |
|
|
|
import com.yxt.anrui.flowable.api.flow.FlowableFeign; |
|
|
|
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo; |
|
|
|
import com.yxt.anrui.flowable.api.flowtask.FlowTaskFeign; |
|
|
@ -472,7 +473,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
* @param busDeExamineQuery 条件 |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public ResultBean examine(BusDeExamineQuery busDeExamineQuery) { |
|
|
|
/* public ResultBean examine(BusDeExamineQuery busDeExamineQuery) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
int state = busDeExamineQuery.getState(); |
|
|
|
if (state == 4) { |
|
|
@ -498,9 +499,9 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
baseMapper.updateState(busDeExamineQuery.getSid(), state); |
|
|
|
} |
|
|
|
return rb.success().setMsg("审核操作成功"); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
|
|
|
|
public ResultBean checkingApply(CheckingApplyQuery query) { |
|
|
|
/* public ResultBean checkingApply(CheckingApplyQuery query) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
//待出库车辆点击出库申请
|
|
|
|
BusDeliveredApplyDetailVo busDeliveredApplyDetailVo = query.getDetailVo(); |
|
|
@ -516,7 +517,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
return rb.setMsg("选择的必须为同一合同编号的车辆"); |
|
|
|
} |
|
|
|
return rb.success(); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
|
|
|
|
/** |
|
|
|
* 提交审批流程 |
|
|
@ -524,7 +525,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
* @param dto |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public ResultBean submitDeliveredApply(SubmitDeliveredApplyDto dto) { |
|
|
|
/* public ResultBean submitDeliveredApply(SubmitDeliveredApplyDto dto) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
String orgSidPath = dto.getOrgPath(); |
|
|
|
BusDeliveredApply busDeliveredApply = fetchBySid(dto.getSid()); |
|
|
@ -541,6 +542,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
return rb.setMsg(resultBean.getMsg()); |
|
|
|
} |
|
|
|
String sid = resultBean.getData(); |
|
|
|
busDeliveredApply = fetchBySid(sid); |
|
|
|
String businessSid = resultBean.getData(); |
|
|
|
//创建BusinessVariables实体对象
|
|
|
|
BusinessVariables bv = new BusinessVariables(); |
|
|
@ -554,9 +556,14 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
bv.setBusinessSid(businessSid); |
|
|
|
//用户sid
|
|
|
|
bv.setUserSid(dto.getUserSid()); |
|
|
|
bv.setFormVariables(variables); |
|
|
|
//流程定义id
|
|
|
|
bv.setModelId(ProcDefEnum.BUSDELIVEREDAPPLY.getProDefId()); |
|
|
|
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery(); |
|
|
|
flowProcessMapQuery.setProDefKey(bv.getModelId()); |
|
|
|
flowProcessMapQuery.setVariables(variables); |
|
|
|
flowProcessMapQuery.setContractNo(busDeliveredApply.getContractNo()); |
|
|
|
variables = flowableFeign.getMap(flowProcessMapQuery).getData(); |
|
|
|
bv.setFormVariables(variables); |
|
|
|
if (r == 1) { |
|
|
|
ResultBean<UpdateFlowFieldVo> voResultBean = flowableFeign.startProcess(bv); |
|
|
|
if (!voResultBean.getSuccess()) { |
|
|
@ -587,7 +594,7 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
return complete(bv); |
|
|
|
} |
|
|
|
return rb; |
|
|
|
} |
|
|
|
}*/ |
|
|
|
|
|
|
|
/** |
|
|
|
* 更新流程相关的状态 |
|
|
@ -637,6 +644,21 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
BusDeliveredApply busDeliveredApply = fetchBySid(bv.getBusinessSid()); |
|
|
|
bv.setOrgSidPath(busDeliveredApply.getOrgSidPath()); |
|
|
|
Map<String,Object> variables = new HashMap<>(); |
|
|
|
//若app移动端有此功能,则传递appMap参数
|
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
//需和移动端沟通业务sid保存的属性具体值:appMap中sid不是固定的。移动端提供具体字段。
|
|
|
|
appMap.put("outboundSid", bv.getBusinessSid()); |
|
|
|
appMap.put("contractId", busDeliveredApply.getContractNo()); |
|
|
|
appMap.put("contract_id", busDeliveredApply.getContractNo()); |
|
|
|
variables.put("app", appMap); |
|
|
|
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery(); |
|
|
|
flowProcessMapQuery.setProDefKey(bv.getModelId()); |
|
|
|
flowProcessMapQuery.setVariables(variables); |
|
|
|
flowProcessMapQuery.setContractNo(busDeliveredApply.getContractNo()); |
|
|
|
variables = flowableFeign.getMap(flowProcessMapQuery).getData(); |
|
|
|
bv.setFormVariables(variables); |
|
|
|
bv.setModelId(busDeliveredApply.getProcDefId()); |
|
|
|
if (bv.getTaskId().equals(busDeliveredApply.getTaskId())) { |
|
|
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.handleProsess(bv); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
@ -1036,7 +1058,12 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
ResultBean<List<GetNodeVo>> rb = new ResultBean<>(); |
|
|
|
BusinessVariables bv = new BusinessVariables(); |
|
|
|
BeanUtil.copyProperties(query, bv); |
|
|
|
bv.setModelId(ProcDefEnum.BUSDELIVEREDAPPLY.getProDefId()); |
|
|
|
if(StringUtils.isNotBlank(query.getBusinessSid())){ |
|
|
|
BusDeliveredApply busDeliveredApply = fetchBySid(query.getBusinessSid()); |
|
|
|
bv.setModelId(busDeliveredApply.getProcDefId()); |
|
|
|
}else{ |
|
|
|
bv.setModelId(ProcDefEnum.BUSDELIVEREDAPPLY.getProDefId()); |
|
|
|
} |
|
|
|
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv); |
|
|
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
|
|
|
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList()); |
|
|
@ -1053,7 +1080,12 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail(); |
|
|
|
BusinessVariables bv = new BusinessVariables(); |
|
|
|
BeanUtil.copyProperties(query, bv); |
|
|
|
bv.setModelId(ProcDefEnum.BUSDELIVEREDAPPLY.getProDefId()); |
|
|
|
if(StringUtils.isNotBlank(query.getBusinessSid())){ |
|
|
|
BusDeliveredApply busDeliveredApply = fetchBySid(query.getBusinessSid()); |
|
|
|
bv.setModelId(busDeliveredApply.getProcDefId()); |
|
|
|
}else{ |
|
|
|
bv.setModelId(ProcDefEnum.BUSDELIVEREDAPPLY.getProDefId()); |
|
|
|
} |
|
|
|
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv); |
|
|
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
|
|
|
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList()); |
|
|
@ -1085,6 +1117,11 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
appMap.put("contractId", busDeliveredApply.getContractNo()); |
|
|
|
appMap.put("contract_id", busDeliveredApply.getContractNo()); |
|
|
|
variables.put("app", appMap); |
|
|
|
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery(); |
|
|
|
flowProcessMapQuery.setProDefKey(busDeliveredApply.getProcDefId()); |
|
|
|
flowProcessMapQuery.setVariables(variables); |
|
|
|
flowProcessMapQuery.setContractNo(busDeliveredApply.getContractNo()); |
|
|
|
variables = flowableFeign.getMap(flowProcessMapQuery).getData(); |
|
|
|
flowTaskVo.setValues(variables); |
|
|
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
@ -1732,7 +1769,8 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
bv.setBusinessSid(businessSid); |
|
|
|
//用户sid
|
|
|
|
bv.setUserSid(dto.getUserSid()); |
|
|
|
bv.setFormVariables(variables); |
|
|
|
//流程定义id
|
|
|
|
bv.setModelId(ProcDefEnum.BUSDELIVEREDAPPLY.getProDefId()); |
|
|
|
//若app移动端有此功能,则传递appMap参数
|
|
|
|
Map<String, Object> appMap = new HashMap<>(); |
|
|
|
//需和移动端沟通业务sid保存的属性具体值:appMap中sid不是固定的。移动端提供具体字段。
|
|
|
@ -1740,8 +1778,12 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
appMap.put("contractId", busDeliveredApply.getContractNo()); |
|
|
|
appMap.put("contract_id", busDeliveredApply.getContractNo()); |
|
|
|
variables.put("app", appMap); |
|
|
|
//流程定义id
|
|
|
|
bv.setModelId(ProcDefEnum.BUSDELIVEREDAPPLY.getProDefId()); |
|
|
|
FlowProcessMapQuery flowProcessMapQuery = new FlowProcessMapQuery(); |
|
|
|
flowProcessMapQuery.setProDefKey(bv.getModelId()); |
|
|
|
flowProcessMapQuery.setVariables(variables); |
|
|
|
flowProcessMapQuery.setContractNo(busDeliveredApply.getContractNo()); |
|
|
|
variables = flowableFeign.getMap(flowProcessMapQuery).getData(); |
|
|
|
bv.setFormVariables(variables); |
|
|
|
if (r == 1) { |
|
|
|
ResultBean<UpdateFlowFieldVo> voResultBean = flowableFeign.startProcess(bv); |
|
|
|
if (!voResultBean.getSuccess()) { |
|
|
|