From 9348b34d5cba1e9a2f744795dc761497fce16b61 Mon Sep 17 00:00:00 2001 From: ligaode Date: Tue, 3 Dec 2024 17:51:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ScmVehRebateWithApply.java | 4 + .../ScmVehRebateWithApplyDetailsVo.java | 4 + .../ScmVehRebateWithApplyDto.java | 4 + .../ScmVehRebateWithApplyFeign.java | 16 +- .../ScmVehRebateWithApplyFeignFallback.java | 15 +- .../ScmVehRebateWithApplyDelegateQuery.java | 23 ++ .../ScmVehRebateWithApplyRest.java | 15 +- .../ScmVehRebateWithApplyService.java | 18 ++ .../api/oa/leaveapply/AppLeaveApplyDto.java | 2 + .../AppVehRebateDetailsVo.java | 174 +++++++++++++++ .../AppVehRebateWithApplyDetailsVo.java | 77 +++++++ .../AppVehRebateWithApplyFeign.java | 75 +++++++ .../AppVehRebateWithDetailsVo.java | 68 ++++++ .../flowable/AppDelegateQuery.java | 25 +++ .../flowable/AppFlowDto.java | 37 ++++ .../flowable/AppFlowQuery.java | 28 +++ .../flowable/AppFlowTaskQuery.java | 47 +++++ .../AppVehRebateWithApplyRest.java | 90 ++++++++ .../AppVehRebateWithApplyService.java | 199 ++++++++++++++++++ .../oaleaveapply/OaLeaveApplyDetailsVo.java | 4 + .../fegin/oaleaveapply/OaLeaveApplyDto.java | 4 +- .../oaleaveapply/OaLeaveApplyDetailsVo.java | 4 + .../oa/biz/oaleaveapply/OaLeaveApplyDto.java | 4 +- .../biz/oaleaveapply/OaLeaveApplyService.java | 23 +- 24 files changed, 937 insertions(+), 23 deletions(-) create mode 100644 anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/flow/ScmVehRebateWithApplyDelegateQuery.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateDetailsVo.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithApplyDetailsVo.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithApplyFeign.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithDetailsVo.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/flowable/AppDelegateQuery.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/flowable/AppFlowDto.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/flowable/AppFlowQuery.java create mode 100644 anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/flowable/AppFlowTaskQuery.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/vehrebatewithapply/AppVehRebateWithApplyRest.java create mode 100644 anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/vehrebatewithapply/AppVehRebateWithApplyService.java diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApply.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApply.java index c961c39883..80b0b60072 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApply.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApply.java @@ -50,6 +50,10 @@ import lombok.Data; public class ScmVehRebateWithApply extends BaseEntity { private static final long serialVersionUID = 1L; + @ApiModelProperty("部门sid") + private String deptSid; + @ApiModelProperty("部门") + private String deptName; @ApiModelProperty("品牌sid") private String brandSid; // 品牌sid @ApiModelProperty("品牌名称") diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDetailsVo.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDetailsVo.java index c609f41966..808b0023b4 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDetailsVo.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDetailsVo.java @@ -59,6 +59,10 @@ public class ScmVehRebateWithApplyDetailsVo implements Vo { private String createBySid; // 申请人sid @ApiModelProperty("备注") private String remarks; // 备注 + @ApiModelProperty("部门sid") + private String deptSid; + @ApiModelProperty("部门") + private String deptName; @ApiModelProperty("品牌sid") private String brandSid; // 品牌sid @ApiModelProperty("品牌名称") diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDto.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDto.java index 490657e67e..93c5ff4bc3 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDto.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyDto.java @@ -56,6 +56,10 @@ public class ScmVehRebateWithApplyDto implements Dto { @ApiModelProperty("备注") private String remarks; // 备注 + @ApiModelProperty("部门sid") + private String deptSid; + @ApiModelProperty("部门") + private String deptName; @ApiModelProperty("品牌sid") private String brandSid; // 品牌sid @ApiModelProperty("品牌名称") diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyFeign.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyFeign.java index 0ff89b0e1b..fbcdcfb770 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyFeign.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyFeign.java @@ -26,10 +26,8 @@ package com.yxt.anrui.scm.api.scmvehrebatewithapply; import com.yxt.anrui.scm.api.flow.FlowTaskVo; -import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.GetNodeQuery; -import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.GetNodeVo; -import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.ScmVehRebateWithApplyCompleteDto; -import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.SubmitScmVehRebateWithApplyDto; +import com.yxt.anrui.scm.api.scmspecialrebatewithapply.flow.ScmSpecialRebateWithApplyDelegateQuery; +import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import com.yxt.common.core.query.PagerQuery; @@ -117,4 +115,14 @@ public interface ScmVehRebateWithApplyFeign { @ApiOperation(value = "获取上一个环节") @GetMapping(value = "/getPreviousNodesForReject") ResultBean> getPreviousNodesForReject(@Valid @SpringQueryMap GetNodeQuery query); + + @ApiOperation(value = "加签") + @PutMapping(value = "/delegate") + @ResponseBody + public ResultBean delegate(@RequestBody ScmVehRebateWithApplyDelegateQuery delegateQuery); + + @ApiOperation(value = "转办") + @PutMapping(value = "/assignTask") + @ResponseBody + public ResultBean assignTask(@RequestBody ScmVehRebateWithApplyDelegateQuery delegateQuery); } \ No newline at end of file diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyFeignFallback.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyFeignFallback.java index 47c9d2f99c..ecc4470c68 100644 --- a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyFeignFallback.java +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/ScmVehRebateWithApplyFeignFallback.java @@ -26,10 +26,7 @@ package com.yxt.anrui.scm.api.scmvehrebatewithapply; import com.yxt.anrui.scm.api.flow.FlowTaskVo; -import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.GetNodeQuery; -import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.GetNodeVo; -import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.ScmVehRebateWithApplyCompleteDto; -import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.SubmitScmVehRebateWithApplyDto; +import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.*; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; @@ -114,4 +111,14 @@ public class ScmVehRebateWithApplyFeignFallback implements ScmVehRebateWithApply public ResultBean> getPreviousNodesForReject(GetNodeQuery query) { return null; } + + @Override + public ResultBean delegate(ScmVehRebateWithApplyDelegateQuery delegateQuery) { + return null; + } + + @Override + public ResultBean assignTask(ScmVehRebateWithApplyDelegateQuery delegateQuery) { + return null; + } } \ No newline at end of file diff --git a/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/flow/ScmVehRebateWithApplyDelegateQuery.java b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/flow/ScmVehRebateWithApplyDelegateQuery.java new file mode 100644 index 0000000000..a9d76d3953 --- /dev/null +++ b/anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehrebatewithapply/flow/ScmVehRebateWithApplyDelegateQuery.java @@ -0,0 +1,23 @@ +package com.yxt.anrui.scm.api.scmvehrebatewithapply.flow; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/5/11 + **/ +@Data +public class ScmVehRebateWithApplyDelegateQuery { + + private String userSid; + @ApiModelProperty("流程实例id") + private String instanceId; + @ApiModelProperty("任务Id") + private String taskId; + @ApiModelProperty("审批人sid") + private String assignee; + @ApiModelProperty("填写意见") + private String views; +} diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyRest.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyRest.java index bd68b528c5..77f0cbe1c2 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyRest.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyRest.java @@ -29,10 +29,7 @@ import cn.hutool.core.bean.BeanUtil; import com.yxt.anrui.flowable.api.utils.ProcDefEnum; import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables; import com.yxt.anrui.scm.api.flow.FlowTaskVo; -import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.GetNodeQuery; -import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.GetNodeVo; -import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.ScmVehRebateWithApplyCompleteDto; -import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.SubmitScmVehRebateWithApplyDto; +import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.*; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; @@ -143,4 +140,14 @@ public class ScmVehRebateWithApplyRest implements ScmVehRebateWithApplyFeign { public ResultBean> getPreviousNodesForReject(GetNodeQuery query) { return scmVehRebateWithApplyService.getPreviousNodesForReject(query); } + + @Override + public ResultBean delegate(ScmVehRebateWithApplyDelegateQuery query) { + return scmVehRebateWithApplyService.delegate(query); + } + + @Override + public ResultBean assignTask(ScmVehRebateWithApplyDelegateQuery query) { + return scmVehRebateWithApplyService.assignTask(query); + } } diff --git a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java index f193868a1d..0fa3a943af 100644 --- a/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java +++ b/anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehrebatewithapply/ScmVehRebateWithApplyService.java @@ -31,6 +31,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.yxt.anrui.flowable.api.flow.FlowableFeign; import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo; +import com.yxt.anrui.flowable.api.flow2.FlowDelegateQuery; import com.yxt.anrui.flowable.api.flow2.FlowFeign; import com.yxt.anrui.flowable.api.flowtask.FlowTaskFeign; import com.yxt.anrui.flowable.api.utils.ProcDefEnum; @@ -49,6 +50,7 @@ import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDetailsVo; import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithDto; import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.GetNodeQuery; import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.GetNodeVo; +import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.ScmVehRebateWithApplyDelegateQuery; import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.SubmitScmVehRebateWithApplyDto; import com.yxt.anrui.scm.biz.scmvehrebate.ScmVehRebateService; import com.yxt.anrui.scm.biz.scmvehrebatewith.ScmVehRebateWithService; @@ -518,4 +520,20 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService voList = resultBean.getData().stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList()); return rb.success().setData(voList); } + + public ResultBean delegate(ScmVehRebateWithApplyDelegateQuery query) { + ResultBean rb = ResultBean.fireFail(); + FlowDelegateQuery delegateQuery = new FlowDelegateQuery(); + BeanUtil.copyProperties(query, delegateQuery); + flowFeign.delegate(delegateQuery); + return rb.success(); + } + + public ResultBean assignTask(ScmVehRebateWithApplyDelegateQuery query) { + ResultBean rb = ResultBean.fireFail(); + FlowDelegateQuery delegateQuery = new FlowDelegateQuery(); + BeanUtil.copyProperties(query, delegateQuery); + flowFeign.assignTask(delegateQuery); + return rb.success(); + } } \ No newline at end of file diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/oa/leaveapply/AppLeaveApplyDto.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/oa/leaveapply/AppLeaveApplyDto.java index 7c99bf42ea..764b0f4997 100644 --- a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/oa/leaveapply/AppLeaveApplyDto.java +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/oa/leaveapply/AppLeaveApplyDto.java @@ -57,6 +57,8 @@ public class AppLeaveApplyDto implements Dto { private String userSid; private String orgPath; + @ApiModelProperty("请假事由") + private String remarks; @ApiModelProperty("单据编号") private String billNo; // 单据编号 @ApiModelProperty("申请人") diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateDetailsVo.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateDetailsVo.java new file mode 100644 index 0000000000..d218cd00cb --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateDetailsVo.java @@ -0,0 +1,174 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * Project: anrui-scm(单车返利)
+ * File: ScmVehRebateVo.java
+ * Class: com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateVo
+ * Description: 单车返利表 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-24 09:01:54
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "单车返利表 视图数据详情", description = "单车返利表 视图数据详情") +public class AppVehRebateDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("状态") + private String state; + @ApiModelProperty("创建人sid") + private String createBySid; + @ApiModelProperty("创建日期") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date createTime; // 创建日期 + @ApiModelProperty("备注") + private String remarks; // 备注 + @ApiModelProperty("品牌sid") + private String brandSid; // 品牌sid + @ApiModelProperty("品牌名称") + private String brandName; // 品牌名称 + @ApiModelProperty("车型sid") + private String vehModelSid; // 车型sid + @ApiModelProperty("车型名称") + private String vehModelName; // 车型名称 + @ApiModelProperty("车辆sid") + private String vehSid; // 车辆sid + @ApiModelProperty("车架号") + private String vinNo; // 车架号 + @ApiModelProperty("厂家结算价") + private String manufactorSettlementPrice; // 厂家结算价 + @ApiModelProperty("运费") + private String freight; // 运费 + @ApiModelProperty("返利类型key") + private String rebateTypeKey; // 返利类型key + @ApiModelProperty("返利类型value") + private String rebateTypeValue; // 返利类型value + @ApiModelProperty("返利名称") + private String rebateName; // 返利名称 + @ApiModelProperty("计算标准") + private String calculationStandard; // 计算标准 + @ApiModelProperty("预计返利") + private String estimateRebate; // 预计返利 + @ApiModelProperty("所属年月") + private String palceGenDate; // 所属年月 + @ApiModelProperty("预提日期") + private String withholdingDate; // 预提日期 + @ApiModelProperty("上传日期") + private String uploadDate; // 上传日期 + @ApiModelProperty("上传金额") + private String uploadMoney; // 上传金额 + @ApiModelProperty("二次上传日期") + private String secondaryUploadDate; // 二次上传日期 + @ApiModelProperty("二次上传金额") + private String secondaryUploadMoney; // 二次上传金额 + @ApiModelProperty("待确定金额(动态)") + private String stayDetermineMoney; + @ApiModelProperty("待确定金额(常量)") + private String stayDetermineMoneyNew; + @ApiModelProperty("费用") + private String money; // 费用 + @ApiModelProperty("是否调整") + private String isAdjustment; // 是否调整 + @ApiModelProperty("调整金额") + private String adjustmentMoney; // 调整金额 + @ApiModelProperty("调整说明") + private String adjustmentRemarks; // 调整说明 + @ApiModelProperty("计算方式key") + private String calculationModeKey; // 计算方式key + @ApiModelProperty("计算方式Value") + private String calculationModeValue; // 计算方式Value + @ApiModelProperty("调整状态") + private Integer adjustmentState; + + @ApiModelProperty("一次核对状态") + private Integer onceCheckState; + @ApiModelProperty("其中预计费用") + private BigDecimal expectCost; + @ApiModelProperty("其中预提费用") + private BigDecimal withholdCost; + @ApiModelProperty("差异金额") + private BigDecimal diffAmount; + @ApiModelProperty("预计待支付费用") + private BigDecimal expectTreatCost; + @ApiModelProperty("预计抵顶费用") + private BigDecimal expectSuppCost; + @ApiModelProperty("预计抵顶费用说明") + private String expectSuppRemark; + @ApiModelProperty("上装金额") + private BigDecimal topAmount; + + @ApiModelProperty("一次待支付费用") + private BigDecimal onceTreatCost; + @ApiModelProperty("一次抵顶费用") + private BigDecimal onceSuppCost; + @ApiModelProperty("一次抵顶费用说明") + private String onceSuppRemark; + @ApiModelProperty("临时待支付费用") + private BigDecimal tempTreatCost; + @ApiModelProperty("临时抵顶费用") + private BigDecimal tempSuppCost; + @ApiModelProperty("二次待支付费用") + private BigDecimal secondTreatCost; + @ApiModelProperty("二次抵顶费用") + private BigDecimal secondSuppCost; + @ApiModelProperty("二次抵顶费用说明") + private String secondSuppRemark; + + @ApiModelProperty("待支付费用调整金额") + private BigDecimal treatAdjustmentMoney; + @ApiModelProperty("抵顶费用调整金额") + private BigDecimal suppAdjustmentMoney; + + @ApiModelProperty("使用组织sid") + private String useOrgSid; // 使用组织sid + @ApiModelProperty("使用组织名称") + private String useOrgName; // 使用组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("组织全路径") + private String orgPath; + + private String vehRebateSid; +} \ No newline at end of file diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithApplyDetailsVo.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithApplyDetailsVo.java new file mode 100644 index 0000000000..88711629b3 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithApplyDetailsVo.java @@ -0,0 +1,77 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * Project: anrui-scm(单车返利预提申请)
+ * File: ScmVehRebateWithApplyVo.java
+ * Class: com.yxt.anrui.scm.api.scmvehrebatewithapply.ScmVehRebateWithApplyVo
+ * Description: 单车返利预提申请表 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-25 09:04:39
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "单车返利预提申请表 视图数据详情", description = "单车返利预提申请表 视图数据详情") +public class AppVehRebateWithApplyDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("部门") + private String deptName; + @ApiModelProperty("创建组织名称") + private String createOrgName; + @ApiModelProperty("创建人姓名") + private String createByName; + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("预提申请") + private String withApply; + @ApiModelProperty("流程实例的sid") + private String procInsId; + @ApiModelProperty("任务id") + private String taskId; + @ApiModelProperty("预提返利合计") + private String withRebateTotal; + @ApiModelProperty("其中待支付费用合计") + private String expectTreatCostTotal; + @ApiModelProperty("其中抵顶费用合计") + private String expectSuppCostTotal; + @ApiModelProperty("单车返利预提列表") + private List scmVehRebateWiths; // 单车返利预提列表 +} \ No newline at end of file diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithApplyFeign.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithApplyFeign.java new file mode 100644 index 0000000000..a67315f312 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithApplyFeign.java @@ -0,0 +1,75 @@ +package com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply; + + +import com.yxt.anrui.terminal.api.supplychain.specialrebatecheckapply.AppSpecialRebateDetailsVo; +import com.yxt.anrui.terminal.api.supplychain.specialrebatecheckapply.AppSpecialrebateCheckapplyDetailsVo; +import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.flowable.AppDelegateQuery; +import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.flowable.AppFlowDto; +import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.flowable.AppFlowQuery; +import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.flowable.AppFlowTaskQuery; +import com.yxt.common.core.result.ResultBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.cloud.openfeign.SpringQueryMap; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Author + * @Date + * @Description + */ +@Api(tags = "售后盘盈入库") +@FeignClient( + contextId = "terminal-AppVehRebateWithApply", + name = "anrui-terminal", + path = "v1/vehrebatewithapply") +public interface AppVehRebateWithApplyFeign { + + @ApiOperation("详情") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid); + + @ApiOperation("明细") + @GetMapping("/vehRebateWithDetails/{sid}") + public ResultBean> vehRebateWithDetails(@PathVariable("sid") String sid); + + /**********************************************流程********************************************/ + + @ApiOperation("办理") + @PutMapping("/agreeCreditInfo") + @ResponseBody + ResultBean agreeCreditInfo(@RequestBody AppFlowDto dto); + + @ApiOperation("驳回") + @PutMapping("/rejectCreditInfo") + @ResponseBody + ResultBean rejectCreditInfo(@RequestBody AppFlowTaskQuery query); + + @ApiOperation("撤回") + @PutMapping("/recallCreditInfo") + @ResponseBody + ResultBean recallCreditInfo(@RequestBody AppFlowTaskQuery query); + + @ApiOperation("终止") + @PutMapping("/stopCreditInfo") + @ResponseBody + ResultBean stopCreditInfo(@RequestBody AppFlowTaskQuery query); + + @ApiOperation("获取流程操作标题") + @GetMapping("/getFlowOperateTitle") + @ResponseBody + ResultBean getFlowOperateTitle(@SpringQueryMap AppFlowQuery query); + + @ApiOperation(value = "加签") + @PutMapping(value = "/delegate") + @ResponseBody + public ResultBean delegate(@RequestBody AppDelegateQuery delegateQuery); + + @ApiOperation(value = "转办") + @PutMapping(value = "/assignTask") + @ResponseBody + public ResultBean assignTask(@RequestBody AppDelegateQuery delegateQuery); +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithDetailsVo.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithDetailsVo.java new file mode 100644 index 0000000000..e5c8e036a3 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/AppVehRebateWithDetailsVo.java @@ -0,0 +1,68 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply; + + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * Project: anrui-scm(单车返利预提申请)
+ * File: ScmVehRebateWithVo.java
+ * Class: com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithVo
+ * Description: 单车返利预提表 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2022-08-25 09:04:39
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "单车返利预提表 视图数据详情", description = "单车返利预提表 视图数据详情") +public class AppVehRebateWithDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("返利类型value") + private String rebateTypeValue; + @ApiModelProperty("台数") + private String num; + @ApiModelProperty("预提返利") + private BigDecimal withRebate; + @ApiModelProperty("其中待支付费用") + private BigDecimal expectTreatCost; + @ApiModelProperty("其中抵顶费用") + private BigDecimal expectSuppCost; + @ApiModelProperty("单车返利sid") + private String vehRebateSid; +} \ No newline at end of file diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/flowable/AppDelegateQuery.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/flowable/AppDelegateQuery.java new file mode 100644 index 0000000000..88decaa9c4 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/flowable/AppDelegateQuery.java @@ -0,0 +1,25 @@ +package com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.flowable; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Administrator + * @description + * @date 2023/9/28 10:16 + */ +@Data +public class AppDelegateQuery { + @ApiModelProperty + private String userSid; + @ApiModelProperty("流程实例id") + @JsonProperty("procInsId") + private String instanceId; + @ApiModelProperty("任务Id") + private String taskId; + @ApiModelProperty("审批人sid") + private String assignee; + @ApiModelProperty("填写意见") + private String views; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/flowable/AppFlowDto.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/flowable/AppFlowDto.java new file mode 100644 index 0000000000..d2b23f0ee4 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/flowable/AppFlowDto.java @@ -0,0 +1,37 @@ +package com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.flowable; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @Author dimengzhe + * @Date 2022/8/9 14:09 + * @Description + */ +@Data +public class AppFlowDto implements Dto { + private static final long serialVersionUID = 3626473483180150495L; + + @ApiModelProperty(value = "任务id") + @NotBlank(message = "参数错误:taskId") + private String taskId; + @ApiModelProperty(value = "流程id") + @NotBlank(message = "参数错误:procInsId") + @JsonProperty("procInsId") + private String instanceId; + @ApiModelProperty(value = "意见") + private String comment; + @ApiModelProperty(value = "业务sid") + @NotBlank(message = "参数错误:businessSid") + private String businessSid; + @ApiModelProperty(value = "用户sid") + @NotBlank(message = "参数错误:userSid") + private String userSid; + @ApiModelProperty(value = "节点id") + @NotBlank(message = "参数错误:taskDefKey") + private String taskDefKey; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/flowable/AppFlowQuery.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/flowable/AppFlowQuery.java new file mode 100644 index 0000000000..faef4ea6d6 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/flowable/AppFlowQuery.java @@ -0,0 +1,28 @@ +package com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.flowable; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; + +/** + * @Author dimengzhe + * @Date 2022/8/9 14:15 + * @Description + */ +@Data +public class AppFlowQuery implements Query { + private static final long serialVersionUID = 5514095179438249641L; + + @ApiModelProperty(value = "节点key") + private String taskDefKey; + @ApiModelProperty(value = "业务sid") + private String businessSid; + @ApiModelProperty(value = "0 上一环节 1下一环节") + @NotNull(message = "参数错误:next") + private Integer next; + + @ApiModelProperty("组织机构全路径") + private String orgPath; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/flowable/AppFlowTaskQuery.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/flowable/AppFlowTaskQuery.java new file mode 100644 index 0000000000..4b74abfd41 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/vehrebatewithapply/flowable/AppFlowTaskQuery.java @@ -0,0 +1,47 @@ +package com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.flowable; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @Author dimengzhe + * @Date 2022/8/9 14:11 + * @Description + */ +@Data +public class AppFlowTaskQuery implements Query { + private static final long serialVersionUID = -7082170710942810289L; + + /** + * 终止、驳回、撤回 + */ + @ApiModelProperty("任务Id") + @NotBlank(message = "参数错误:taskId") + private String taskId; + /** + * 终止、驳回、撤回 + */ + @ApiModelProperty("业务sid") + @NotBlank(message = "参数错误:businessSid") + private String businessSid; + /** + * 终止、驳回 + */ + @ApiModelProperty("任务意见") + private String comment; + /** + * 终止、撤回、驳回 + */ + @ApiModelProperty("用户Sid") + private String userSid; + /** + * 终止 + */ + @ApiModelProperty("流程实例Id") + @JsonProperty("procInsId") + private String instanceId; +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/vehrebatewithapply/AppVehRebateWithApplyRest.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/vehrebatewithapply/AppVehRebateWithApplyRest.java new file mode 100644 index 0000000000..50fd79674a --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/vehrebatewithapply/AppVehRebateWithApplyRest.java @@ -0,0 +1,90 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.biz.supplychain.vehrebatewithapply; + +import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.AppVehRebateDetailsVo; +import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.AppVehRebateWithApplyDetailsVo; +import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.AppVehRebateWithApplyFeign; +import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.flowable.*; +import com.yxt.common.core.result.ResultBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@RestController +@RequestMapping("v1/vehrebatewithapply") +public class AppVehRebateWithApplyRest implements AppVehRebateWithApplyFeign { + + @Autowired + private AppVehRebateWithApplyService appVehRebateWithApplyService; + + @Override + public ResultBean fetchDetailsBySid(String sid) { + return appVehRebateWithApplyService.fetchDetailsBySid(sid); + } + + @Override + public ResultBean> vehRebateWithDetails(String sid) { + return appVehRebateWithApplyService.specialRebateWithDetails(sid); + } + + @Override + public ResultBean agreeCreditInfo(AppFlowDto dto) { + return appVehRebateWithApplyService.agreeCreditInfo(dto); + } + + @Override + public ResultBean rejectCreditInfo(AppFlowTaskQuery query) { + return appVehRebateWithApplyService.rejectCreditInfo(query); + } + + @Override + public ResultBean recallCreditInfo(AppFlowTaskQuery query) { + return appVehRebateWithApplyService.recallCreditInfo(query); + } + + @Override + public ResultBean stopCreditInfo(AppFlowTaskQuery query) { + return appVehRebateWithApplyService.stopCreditInfo(query); + } + + @Override + public ResultBean getFlowOperateTitle(AppFlowQuery query) { + return appVehRebateWithApplyService.getFlowOperateTitle(query); + } + + @Override + public ResultBean delegate(AppDelegateQuery delegateQuery) { + return appVehRebateWithApplyService.delegate(delegateQuery); + } + + @Override + public ResultBean assignTask(AppDelegateQuery delegateQuery) { + return appVehRebateWithApplyService.assignTask(delegateQuery); + } +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/vehrebatewithapply/AppVehRebateWithApplyService.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/vehrebatewithapply/AppVehRebateWithApplyService.java new file mode 100644 index 0000000000..6ccdb15ba4 --- /dev/null +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/vehrebatewithapply/AppVehRebateWithApplyService.java @@ -0,0 +1,199 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.terminal.biz.supplychain.vehrebatewithapply; + +import cn.hutool.core.bean.BeanUtil; +import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg; +import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; +import com.yxt.anrui.portal.api.sysuser.SysUserFeign; +import com.yxt.anrui.portal.api.sysuser.SysUserVo; +import com.yxt.anrui.scm.api.flow.FlowTaskVo; +import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.GetNodeQuery; +import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.GetNodeVo; +import com.yxt.anrui.scm.api.scmvehrebate.ScmVehRebateDetailsVo; +import com.yxt.anrui.scm.api.scmvehrebatewith.ScmVehRebateWithFeign; +import com.yxt.anrui.scm.api.scmvehrebatewithapply.ScmVehRebateWithApplyDetailsVo; +import com.yxt.anrui.scm.api.scmvehrebatewithapply.ScmVehRebateWithApplyFeign; +import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.ScmVehRebateWithApplyCompleteDto; +import com.yxt.anrui.scm.api.scmvehrebatewithapply.flow.ScmVehRebateWithApplyDelegateQuery; +import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.AppVehRebateDetailsVo; +import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.AppVehRebateWithApplyDetailsVo; +import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.AppVehRebateWithDetailsVo; +import com.yxt.anrui.terminal.api.supplychain.vehrebatewithapply.flowable.*; +import com.yxt.common.core.result.ResultBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +@Service +public class AppVehRebateWithApplyService { + + @Resource + private ScmVehRebateWithApplyFeign scmVehRebateWithApplyFeign; + @Resource + private ScmVehRebateWithFeign scmVehRebateWithFeign; + @Autowired + private SysStaffOrgFeign sysStaffOrgFeign; + @Autowired + private SysUserFeign sysUserFeign; + + public ResultBean fetchDetailsBySid(String sid) { + ResultBean rb = ResultBean.fireFail(); + ScmVehRebateWithApplyDetailsVo data = scmVehRebateWithApplyFeign.fetchDetailsBySid(sid).getData(); + AppVehRebateWithApplyDetailsVo appVehRebateWithApplyDetailsVo = new AppVehRebateWithApplyDetailsVo(); + appVehRebateWithApplyDetailsVo.setProcInsId(data.getProcInstId()); + BeanUtil.copyProperties(data,appVehRebateWithApplyDetailsVo); + List scmVehRebateWiths = appVehRebateWithApplyDetailsVo.getScmVehRebateWiths(); + for (AppVehRebateWithDetailsVo appVehRebateWithDetailsVo : scmVehRebateWiths) { + appVehRebateWithDetailsVo.setSid(appVehRebateWithDetailsVo.getVehRebateSid()); + } + appVehRebateWithApplyDetailsVo.setWithRebateTotal(scmVehRebateWiths.stream().map(AppVehRebateWithDetailsVo::getWithRebate).reduce(BigDecimal.ZERO,BigDecimal::add).toString()); + appVehRebateWithApplyDetailsVo.setExpectTreatCostTotal(scmVehRebateWiths.stream().map(AppVehRebateWithDetailsVo::getExpectTreatCost).reduce(BigDecimal.ZERO,BigDecimal::add).toString()); + appVehRebateWithApplyDetailsVo.setExpectSuppCostTotal(scmVehRebateWiths.stream().map(AppVehRebateWithDetailsVo::getExpectSuppCost).reduce(BigDecimal.ZERO,BigDecimal::add).toString()); + return rb.success().setData(appVehRebateWithApplyDetailsVo); + } + + public ResultBean> specialRebateWithDetails(String sid) { + ResultBean rb = ResultBean.fireFail(); + List appVehRebateDetailsVos = new ArrayList<>(); + List data = scmVehRebateWithFeign.vehRebateWithDetails(sid).getData(); + for (ScmVehRebateDetailsVo datum : data) { + AppVehRebateDetailsVo appVehRebateDetailsVo = new AppVehRebateDetailsVo(); + BeanUtil.copyProperties(datum,appVehRebateDetailsVo); + appVehRebateDetailsVos.add(appVehRebateDetailsVo); + } + return rb.success().setData(appVehRebateDetailsVos); + } + + public ResultBean agreeCreditInfo(AppFlowDto dto) { + ResultBean rb = ResultBean.fireFail(); + //根据用户sid获取staffSid + ResultBean userVoResultBean = sysUserFeign.fetchBySid(dto.getUserSid()); + if (!userVoResultBean.getSuccess()) { + return rb.setMsg(userVoResultBean.getMsg()); + } + //根据staffSid获取用户的组织全路径 + ResultBean staffOrgResultBean = sysStaffOrgFeign.getOrgByStaffSid(userVoResultBean.getData().getStaffSid()); + if (!staffOrgResultBean.getSuccess()) { + return rb.setMsg(staffOrgResultBean.getMsg()); + } + //用户的组织全路径 + String orgSidPath = staffOrgResultBean.getData().getOrgSidPath(); + ScmVehRebateWithApplyCompleteDto scmVehRebateWithApplyCompleteDto = new ScmVehRebateWithApplyCompleteDto(); + BeanUtil.copyProperties(dto, scmVehRebateWithApplyCompleteDto); + scmVehRebateWithApplyCompleteDto.setOrgSidPath(orgSidPath); + ResultBean resultBean = scmVehRebateWithApplyFeign.complete(scmVehRebateWithApplyCompleteDto); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); + } + + public ResultBean rejectCreditInfo(AppFlowTaskQuery query) { + ResultBean rb = ResultBean.fireFail(); + FlowTaskVo flowTaskVo = new FlowTaskVo(); + BeanUtil.copyProperties(query, flowTaskVo); + ResultBean resultBean = scmVehRebateWithApplyFeign.taskReject(flowTaskVo); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); + } + + public ResultBean recallCreditInfo(AppFlowTaskQuery query) { + ResultBean rb = ResultBean.fireFail(); + FlowTaskVo flowTaskVo = new FlowTaskVo(); + BeanUtil.copyProperties(query, flowTaskVo); + ResultBean resultBean = scmVehRebateWithApplyFeign.revokeProcess(flowTaskVo); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); + } + + public ResultBean stopCreditInfo(AppFlowTaskQuery query) { + ResultBean rb = ResultBean.fireFail(); + FlowTaskVo flowTaskVo = new FlowTaskVo(); + BeanUtil.copyProperties(query, flowTaskVo); + ResultBean resultBean = scmVehRebateWithApplyFeign.breakProcess(flowTaskVo); + if (!resultBean.getSuccess()) { + return rb.setMsg(resultBean.getMsg()); + } + return rb.success().setData(resultBean.getData()); + } + + public ResultBean getFlowOperateTitle(AppFlowQuery query) { + ResultBean rb = ResultBean.fireFail(); + //0 上一环节 1下一环节 + int next = query.getNext(); + GetNodeQuery getNodeQuery = new GetNodeQuery(); + BeanUtil.copyProperties(query, getNodeQuery); + String data = ""; + if (next == 0) { + ResultBean> getPreviousNodesForReject = scmVehRebateWithApplyFeign.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> getNextNodesForSubmit = scmVehRebateWithApplyFeign.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); + } + + public ResultBean delegate(AppDelegateQuery delegateQuery) { + ResultBean rb = ResultBean.fireFail(); + ScmVehRebateWithApplyDelegateQuery delegateQuery1 = new + ScmVehRebateWithApplyDelegateQuery(); + BeanUtil.copyProperties(delegateQuery, delegateQuery1); + scmVehRebateWithApplyFeign.delegate(delegateQuery1); + return rb.success(); + } + + public ResultBean assignTask(AppDelegateQuery delegateQuery) { + ResultBean rb = ResultBean.fireFail(); + ScmVehRebateWithApplyDelegateQuery delegateQuery1 = new + ScmVehRebateWithApplyDelegateQuery(); + BeanUtil.copyProperties(delegateQuery, delegateQuery1); + scmVehRebateWithApplyFeign.assignTask(delegateQuery1); + return rb.success(); + } +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/oaleaveapply/OaLeaveApplyDetailsVo.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/oaleaveapply/OaLeaveApplyDetailsVo.java index ec7140c8fe..4baf0758e9 100644 --- a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/oaleaveapply/OaLeaveApplyDetailsVo.java +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/oaleaveapply/OaLeaveApplyDetailsVo.java @@ -55,6 +55,10 @@ public class OaLeaveApplyDetailsVo implements Vo { private String sid; // sid + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date createTime; + @ApiModelProperty("请假事由") + private String remarks; @ApiModelProperty("单据编号") private String billNo; // 单据编号 @ApiModelProperty("申请人") diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/oaleaveapply/OaLeaveApplyDto.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/oaleaveapply/OaLeaveApplyDto.java index 628fe42a08..9744582593 100644 --- a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/oaleaveapply/OaLeaveApplyDto.java +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/fegin/oaleaveapply/OaLeaveApplyDto.java @@ -57,8 +57,8 @@ public class OaLeaveApplyDto implements Dto { private String userSid; private String orgPath; - @ApiModelProperty("请假类型") - private List types; + @ApiModelProperty("请假事由") + private String remarks; @ApiModelProperty("单据编号") private String billNo; // 单据编号 @ApiModelProperty("申请人") diff --git a/yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaleaveapply/OaLeaveApplyDetailsVo.java b/yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaleaveapply/OaLeaveApplyDetailsVo.java index b633e6d464..aa6689c409 100644 --- a/yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaleaveapply/OaLeaveApplyDetailsVo.java +++ b/yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaleaveapply/OaLeaveApplyDetailsVo.java @@ -57,6 +57,10 @@ public class OaLeaveApplyDetailsVo implements Vo { private String sid; // sid + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date createTime; + @ApiModelProperty("请假事由") + private String remarks; @ApiModelProperty("单据编号") private String billNo; // 单据编号 @ApiModelProperty("申请人") diff --git a/yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaleaveapply/OaLeaveApplyDto.java b/yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaleaveapply/OaLeaveApplyDto.java index 93f78eda5d..370e06f272 100644 --- a/yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaleaveapply/OaLeaveApplyDto.java +++ b/yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaleaveapply/OaLeaveApplyDto.java @@ -59,8 +59,8 @@ public class OaLeaveApplyDto implements Dto { private String userSid; private String orgPath; - @ApiModelProperty("请假类型") - private List types; + @ApiModelProperty("请假事由") + private String remarks; @ApiModelProperty("单据编号") private String billNo; // 单据编号 @ApiModelProperty("申请人") diff --git a/yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaleaveapply/OaLeaveApplyService.java b/yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaleaveapply/OaLeaveApplyService.java index 8f9568dd07..6b3a57af60 100644 --- a/yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaleaveapply/OaLeaveApplyService.java +++ b/yxt-oa/src/main/java/com/yxt/anrui/oa/biz/oaleaveapply/OaLeaveApplyService.java @@ -55,6 +55,7 @@ import com.yxt.anrui.oa.feign.portal.sysorganization.SysOrganizationVo; import com.yxt.anrui.oa.feign.portal.sysstafforg.SysStaffOrgFeign; import com.yxt.anrui.oa.feign.portal.sysuserrole.SysUserRoleFeign; import com.yxt.anrui.oa.feign.sysuser.SysUserFeign; +import com.yxt.anrui.oa.feign.sysuser.SysUserVo; import com.yxt.common.base.config.component.FileUploadComponent; import org.apache.commons.lang3.StringUtils; import com.yxt.common.base.service.MybatisBaseService; @@ -148,7 +149,7 @@ public class OaLeaveApplyService extends MybatisBaseService 1 && days <= 7); //请假天数>1且财务人员发起 - variables.put("cwfq", days > 1 && oaLeaveApply.getIsCw().equals("是")); + //variables.put("cwfq", days > 1 && oaLeaveApply.getIsCw().equals("是")); + variables.put("cwfq", true); //流程定义id bv.setModelId(ProcDefEnum.OALEAVEAPPLY.getProDefId()); bv.setNextNodeUserSids(organizationVo.getManagerSid()); @@ -323,15 +328,16 @@ public class OaLeaveApplyService extends MybatisBaseService 1 && days <= 7); //请假天数>1且财务人员发起 - variables.put("cwfq", days > 1 && oaLeaveApply.getIsCw().equals("是")); + //variables.put("cwfq", days > 1 && oaLeaveApply.getIsCw().equals("是")); + variables.put("cwfq", true); Map appMap = new HashMap<>(); appMap.put("sid", businessSid); variables.put("app", appMap); //======================================= - bv.setNextNodeUserSids(organizationVo.getManagerSid()); bv.setFormVariables(variables); SysOrganizationVo deptVo = sysOrganizationFeign.fetchBySid(oaLeaveApply.getDeptSid()).getData(); bv.setOrgSidPath(deptVo.getOrgSidPath()); + bv.setModelId(oaLeaveApply.getProcDefId()); if (bv.getTaskId().equals(oaLeaveApply.getTaskId())) { ResultBean resultBean = flowFeign.handleProsess(bv); if (!resultBean.getSuccess()) { @@ -396,7 +402,8 @@ public class OaLeaveApplyService extends MybatisBaseService 1 && days <= 7); //请假天数>1且财务人员发起 - variables.put("cwfq", days > 1 && oaLeaveApply.getIsCw().equals("是")); + //variables.put("cwfq", days > 1 && oaLeaveApply.getIsCw().equals("是")); + variables.put("cwfq", true); bv.setModelId(oaLeaveApply.getProcDefId()); bv.setFormVariables(variables); //======================================= @@ -424,7 +431,8 @@ public class OaLeaveApplyService extends MybatisBaseService 1 && days <= 7); //请假天数>1且财务人员发起 - variables.put("cwfq", days > 1 && oaLeaveApply.getIsCw().equals("是")); + //variables.put("cwfq", days > 1 && oaLeaveApply.getIsCw().equals("是")); + variables.put("cwfq", true); bv.setModelId(oaLeaveApply.getProcDefId()); bv.setFormVariables(variables); //======================================= @@ -466,7 +474,8 @@ public class OaLeaveApplyService extends MybatisBaseService 1 && days <= 7); //请假天数>1且财务人员发起 - variables.put("cwfq", days > 1 && oaLeaveApply.getIsCw().equals("是")); + //variables.put("cwfq", days > 1 && oaLeaveApply.getIsCw().equals("是")); + variables.put("cwfq", true); flowTaskVo.setValues(variables); ResultBean resultBean = flowableFeign.taskReject(flowTaskVo); if (!resultBean.getSuccess()) {