
14 changed files with 839 additions and 8 deletions
@ -0,0 +1,23 @@ |
|||||
|
package com.yxt.anrui.scm.api.scmcollectionrebatewithapply.flow; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/5/11 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class ScmCollectionRebateWithApplyDelegateQuery { |
||||
|
|
||||
|
private String userSid; |
||||
|
@ApiModelProperty("流程实例id") |
||||
|
private String instanceId; |
||||
|
@ApiModelProperty("任务Id") |
||||
|
private String taskId; |
||||
|
@ApiModelProperty("审批人sid") |
||||
|
private String assignee; |
||||
|
@ApiModelProperty("填写意见") |
||||
|
private String views; |
||||
|
} |
@ -0,0 +1,135 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply; |
||||
|
|
||||
|
|
||||
|
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; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-scm(回款返利) <br/> |
||||
|
* File: ScmCollectionRebateVo.java <br/> |
||||
|
* Class: com.yxt.anrui.scm.api.scmcollectionrebate.ScmCollectionRebateVo <br/> |
||||
|
* Description: 回款返利表 视图数据对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2022-09-27 15:14:18 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "回款返利表 视图数据详情", description = "回款返利表 视图数据详情") |
||||
|
public class AppCollectionRebateDetailsVo implements Vo { |
||||
|
|
||||
|
private String sid; // sid
|
||||
|
|
||||
|
@ApiModelProperty("创建人sid") |
||||
|
private String createBySid; |
||||
|
@ApiModelProperty("状态") |
||||
|
private String state; // 状态
|
||||
|
@ApiModelProperty("创建日期") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||
|
private Date createTime; // 创建日期
|
||||
|
@ApiModelProperty("备注") |
||||
|
private String remarks; // 备注
|
||||
|
@ApiModelProperty("采购系统sid") |
||||
|
private String purchaseSystemSid; |
||||
|
@ApiModelProperty("采购系统名称") |
||||
|
private String purchaseSystemName; |
||||
|
@ApiModelProperty("品牌sid") |
||||
|
private String brandSid; // 品牌sid
|
||||
|
@ApiModelProperty("品牌名称") |
||||
|
private String brandName; // 品牌名称
|
||||
|
@ApiModelProperty("款项名称key") |
||||
|
private String costTitleKey; |
||||
|
@ApiModelProperty("款项名称value") |
||||
|
private String costTitleValue; |
||||
|
@ApiModelProperty("回款方式key") |
||||
|
private String collectionTypeKey; // 回款方式key
|
||||
|
@ApiModelProperty("回款方式value") |
||||
|
private String collectionTypeValue; // 回款方式value
|
||||
|
@ApiModelProperty("厂家销售通路key") |
||||
|
private String manufaSaleChannel; // 厂家销售通路key
|
||||
|
@ApiModelProperty("厂家销售通路value") |
||||
|
private String manufaSaleChannelValue; // 厂家销售通路value
|
||||
|
@ApiModelProperty("厂家收款账号") |
||||
|
private String manufaBankAccount; // 厂家收款账号
|
||||
|
@ApiModelProperty("回款金额") |
||||
|
private BigDecimal collectionMoney; // 回款金额
|
||||
|
@ApiModelProperty("运费") |
||||
|
private BigDecimal freight; // 运费
|
||||
|
@ApiModelProperty("回款日期") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||
|
private Date collectionDate; // 回款日期
|
||||
|
@ApiModelProperty("上装金额") |
||||
|
private BigDecimal topAmount; |
||||
|
@ApiModelProperty("返利类型key") |
||||
|
private String rebateTypeKey; // 返利类型key
|
||||
|
@ApiModelProperty("返利类型value") |
||||
|
private String rebateTypeValue; // 返利类型value
|
||||
|
@ApiModelProperty("返利名称") |
||||
|
private String rebateName; |
||||
|
@ApiModelProperty("计算标准") |
||||
|
private String calculationStandard; // 计算标准
|
||||
|
@ApiModelProperty("预计返利") |
||||
|
private BigDecimal estimateRebate; // 预计返利
|
||||
|
@ApiModelProperty("预提日期") |
||||
|
private String withholdingDate; // 预提日期
|
||||
|
@ApiModelProperty("上传日期") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
||||
|
private Date uploadDate; // 上传日期
|
||||
|
@ApiModelProperty("上传金额") |
||||
|
private BigDecimal uploadMoney; // 上传金额
|
||||
|
@ApiModelProperty("调整金额") |
||||
|
private BigDecimal adjustmentMoney; // 调整金额
|
||||
|
@ApiModelProperty("调整说明") |
||||
|
private String adjustmentRemarks; // 调整说明
|
||||
|
@ApiModelProperty("使用组织sid") |
||||
|
private String useOrgSid; // 使用组织sid
|
||||
|
@ApiModelProperty("使用组织名称") |
||||
|
private String useOrgName; // 使用组织名称
|
||||
|
@ApiModelProperty("创建组织sid") |
||||
|
private String createOrgSid; // 创建组织sid
|
||||
|
@ApiModelProperty("创建组织名称") |
||||
|
private String createOrgName; // 创建组织名称
|
||||
|
@ApiModelProperty("是否减运费") |
||||
|
private String isReduceFreight; // 是否减运费
|
||||
|
@ApiModelProperty("是否减上装") |
||||
|
private String isReduceTop; |
||||
|
@ApiModelProperty("组织全路径") |
||||
|
private String orgPath; |
||||
|
@ApiModelProperty("回款返利车辆列表") |
||||
|
private List<AppCollectionRebateVehDetailsVo> scmCollectionRebateVehs; |
||||
|
} |
@ -0,0 +1,76 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply; |
||||
|
|
||||
|
|
||||
|
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.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* Project: anrui-scm(回款返利) <br/> |
||||
|
* File: ScmCollectionRebateWithApplyVo.java <br/> |
||||
|
* Class: com.yxt.anrui.scm.api.scmcollectionrebatewithapply.ScmCollectionRebateWithApplyVo <br/> |
||||
|
* Description: 回款返利预提申请表 视图数据对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2022-09-27 15:14:19 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "回款返利预提申请表 视图数据详情", description = "回款返利预提申请表 视图数据详情") |
||||
|
public class AppCollectionRebateWithApplyDetailsVo implements Vo { |
||||
|
|
||||
|
private String sid; // sid
|
||||
|
|
||||
|
@ApiModelProperty("创建组织名称") |
||||
|
private String createOrgName; |
||||
|
@ApiModelProperty("部门") |
||||
|
private String deptName; |
||||
|
@ApiModelProperty("创建人姓名") |
||||
|
private String createByName; |
||||
|
@ApiModelProperty("备注") |
||||
|
private String remarks; |
||||
|
@ApiModelProperty("回款申请标题") |
||||
|
private String collectionApply; |
||||
|
@ApiModelProperty("流程实例的sid") |
||||
|
private String procInsId; |
||||
|
@ApiModelProperty("taskId") |
||||
|
private String taskId; |
||||
|
@ApiModelProperty("预提返利合计") |
||||
|
private String estimateRebateTotal; |
||||
|
|
||||
|
@ApiModelProperty("回款返利预提列表") |
||||
|
private List<AppCollectionRebateWithDetailsVo> scmCollectionRebateWiths; // 回款返利预提列表
|
||||
|
} |
@ -0,0 +1,73 @@ |
|||||
|
package com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply; |
||||
|
|
||||
|
|
||||
|
import com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply.flowable.AppDelegateQuery; |
||||
|
import com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply.flowable.AppFlowDto; |
||||
|
import com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply.flowable.AppFlowQuery; |
||||
|
import com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply.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-AppCollectionRebateWithApply", |
||||
|
name = "anrui-terminal", |
||||
|
path = "v1/collectionrebatewithapply") |
||||
|
public interface AppCollectionRebateWithApplyFeign { |
||||
|
|
||||
|
@ApiOperation("详情") |
||||
|
@GetMapping("/fetchDetailsBySid/{sid}") |
||||
|
public ResultBean<AppCollectionRebateWithApplyDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid); |
||||
|
|
||||
|
@ApiOperation("明细") |
||||
|
@GetMapping("/vehRebateWithDetails/{sid}") |
||||
|
public ResultBean<List<AppCollectionRebateDetailsVo>> 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<String> 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); |
||||
|
} |
@ -0,0 +1,68 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply; |
||||
|
|
||||
|
|
||||
|
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(回款返利) <br/> |
||||
|
* File: ScmCollectionRebateWithVo.java <br/> |
||||
|
* Class: com.yxt.anrui.scm.api.scmcollectionrebatewith.ScmCollectionRebateWithVo <br/> |
||||
|
* Description: 回款返利预提表 视图数据对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2022-09-27 15:14:18 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "回款返利预提表 视图数据详情", description = "回款返利预提表 视图数据详情") |
||||
|
public class AppCollectionRebateWithDetailsVo implements Vo { |
||||
|
|
||||
|
private String sid; // sid
|
||||
|
|
||||
|
@ApiModelProperty("采购系统名称") |
||||
|
private String purchaseSystemName; |
||||
|
@ApiModelProperty("品牌名称") |
||||
|
private String brandName; |
||||
|
@ApiModelProperty("返利类型value") |
||||
|
private String rebateTypeValue; |
||||
|
@ApiModelProperty("返利名称") |
||||
|
private String rebateName; |
||||
|
@ApiModelProperty("预计返利") |
||||
|
private BigDecimal estimateRebate; |
||||
|
@ApiModelProperty("回款返利sid") |
||||
|
private String collectionRebateSid; |
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply.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; |
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply.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; |
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
package com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply.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; |
||||
|
} |
@ -0,0 +1,47 @@ |
|||||
|
package com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply.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; |
||||
|
} |
@ -0,0 +1,90 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.terminal.biz.supplychain.collectionrebatewithapply; |
||||
|
|
||||
|
import com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply.AppCollectionRebateDetailsVo; |
||||
|
import com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply.AppCollectionRebateWithApplyDetailsVo; |
||||
|
import com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply.AppCollectionRebateWithApplyFeign; |
||||
|
import com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply.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/collectionrebatewithapply") |
||||
|
public class AppCollectionRebateWithApplyRest implements AppCollectionRebateWithApplyFeign { |
||||
|
|
||||
|
@Autowired |
||||
|
private AppCollectionRebateWithApplyService appCollectionRebateWithApplyService; |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<AppCollectionRebateWithApplyDetailsVo> fetchDetailsBySid(String sid) { |
||||
|
return appCollectionRebateWithApplyService.fetchDetailsBySid(sid); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<List<AppCollectionRebateDetailsVo>> vehRebateWithDetails(String sid) { |
||||
|
return appCollectionRebateWithApplyService.vehRebateWithDetails(sid); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean agreeCreditInfo(AppFlowDto dto) { |
||||
|
return appCollectionRebateWithApplyService.agreeCreditInfo(dto); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean rejectCreditInfo(AppFlowTaskQuery query) { |
||||
|
return appCollectionRebateWithApplyService.rejectCreditInfo(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean recallCreditInfo(AppFlowTaskQuery query) { |
||||
|
return appCollectionRebateWithApplyService.recallCreditInfo(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean stopCreditInfo(AppFlowTaskQuery query) { |
||||
|
return appCollectionRebateWithApplyService.stopCreditInfo(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<String> getFlowOperateTitle(AppFlowQuery query) { |
||||
|
return appCollectionRebateWithApplyService.getFlowOperateTitle(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean delegate(AppDelegateQuery delegateQuery) { |
||||
|
return appCollectionRebateWithApplyService.delegate(delegateQuery); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean assignTask(AppDelegateQuery delegateQuery) { |
||||
|
return appCollectionRebateWithApplyService.assignTask(delegateQuery); |
||||
|
} |
||||
|
} |
@ -0,0 +1,197 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.terminal.biz.supplychain.collectionrebatewithapply; |
||||
|
|
||||
|
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.scmcollectionrebate.ScmCollectionRebateDetailsVo; |
||||
|
import com.yxt.anrui.scm.api.scmcollectionrebatewith.ScmCollectionRebateWithFeign; |
||||
|
import com.yxt.anrui.scm.api.scmcollectionrebatewithapply.ScmCollectionRebateWithApplyDetailsVo; |
||||
|
import com.yxt.anrui.scm.api.scmcollectionrebatewithapply.ScmCollectionRebateWithApplyFeign; |
||||
|
import com.yxt.anrui.scm.api.scmcollectionrebatewithapply.flow.GetNodeQuery; |
||||
|
import com.yxt.anrui.scm.api.scmcollectionrebatewithapply.flow.GetNodeVo; |
||||
|
import com.yxt.anrui.scm.api.scmcollectionrebatewithapply.flow.ScmCollectionRebateWithApplyCompleteDto; |
||||
|
import com.yxt.anrui.scm.api.scmcollectionrebatewithapply.flow.ScmCollectionRebateWithApplyDelegateQuery; |
||||
|
import com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply.AppCollectionRebateDetailsVo; |
||||
|
import com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply.AppCollectionRebateWithApplyDetailsVo; |
||||
|
import com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply.AppCollectionRebateWithDetailsVo; |
||||
|
import com.yxt.anrui.terminal.api.supplychain.collectionrebatewithapply.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 AppCollectionRebateWithApplyService { |
||||
|
|
||||
|
@Resource |
||||
|
private ScmCollectionRebateWithApplyFeign scmCollectionRebateWithApplyFeign; |
||||
|
@Resource |
||||
|
private ScmCollectionRebateWithFeign scmCollectionRebateWithFeign; |
||||
|
@Autowired |
||||
|
private SysStaffOrgFeign sysStaffOrgFeign; |
||||
|
@Autowired |
||||
|
private SysUserFeign sysUserFeign; |
||||
|
|
||||
|
public ResultBean<AppCollectionRebateWithApplyDetailsVo> fetchDetailsBySid(String sid) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
ScmCollectionRebateWithApplyDetailsVo data = scmCollectionRebateWithApplyFeign.fetchDetailsBySid(sid).getData(); |
||||
|
AppCollectionRebateWithApplyDetailsVo appCollectionRebateWithApplyDetailsVo = new AppCollectionRebateWithApplyDetailsVo(); |
||||
|
appCollectionRebateWithApplyDetailsVo.setProcInsId(data.getProcInstId()); |
||||
|
BeanUtil.copyProperties(data,appCollectionRebateWithApplyDetailsVo); |
||||
|
List<AppCollectionRebateWithDetailsVo> scmCollectionRebateWiths = appCollectionRebateWithApplyDetailsVo.getScmCollectionRebateWiths(); |
||||
|
for (AppCollectionRebateWithDetailsVo appCollectionRebateWithDetailsVo : scmCollectionRebateWiths) { |
||||
|
appCollectionRebateWithDetailsVo.setSid(appCollectionRebateWithDetailsVo.getCollectionRebateSid()); |
||||
|
} |
||||
|
appCollectionRebateWithApplyDetailsVo.setEstimateRebateTotal(scmCollectionRebateWiths.stream().map(AppCollectionRebateWithDetailsVo::getEstimateRebate).reduce(BigDecimal.ZERO,BigDecimal::add).toString()); |
||||
|
return rb.success().setData(appCollectionRebateWithApplyDetailsVo); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<List<AppCollectionRebateDetailsVo>> vehRebateWithDetails(String sid) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
List<AppCollectionRebateDetailsVo> appCollectionRebateDetailsVos = new ArrayList<>(); |
||||
|
List<ScmCollectionRebateDetailsVo> data = scmCollectionRebateWithFeign.collectionRebateWithDetails(sid).getData(); |
||||
|
for (ScmCollectionRebateDetailsVo datum : data) { |
||||
|
AppCollectionRebateDetailsVo appCollectionRebateDetailsVo = new AppCollectionRebateDetailsVo(); |
||||
|
BeanUtil.copyProperties(datum,appCollectionRebateDetailsVo); |
||||
|
appCollectionRebateDetailsVos.add(appCollectionRebateDetailsVo); |
||||
|
} |
||||
|
return rb.success().setData(appCollectionRebateDetailsVos); |
||||
|
} |
||||
|
|
||||
|
public ResultBean agreeCreditInfo(AppFlowDto dto) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
//根据用户sid获取staffSid
|
||||
|
ResultBean<SysUserVo> userVoResultBean = sysUserFeign.fetchBySid(dto.getUserSid()); |
||||
|
if (!userVoResultBean.getSuccess()) { |
||||
|
return rb.setMsg(userVoResultBean.getMsg()); |
||||
|
} |
||||
|
//根据staffSid获取用户的组织全路径
|
||||
|
ResultBean<SysStaffOrg> staffOrgResultBean = sysStaffOrgFeign.getOrgByStaffSid(userVoResultBean.getData().getStaffSid()); |
||||
|
if (!staffOrgResultBean.getSuccess()) { |
||||
|
return rb.setMsg(staffOrgResultBean.getMsg()); |
||||
|
} |
||||
|
//用户的组织全路径
|
||||
|
String orgSidPath = staffOrgResultBean.getData().getOrgSidPath(); |
||||
|
ScmCollectionRebateWithApplyCompleteDto scmCollectionRebateWithApplyCompleteDto = new ScmCollectionRebateWithApplyCompleteDto(); |
||||
|
BeanUtil.copyProperties(dto, scmCollectionRebateWithApplyCompleteDto); |
||||
|
scmCollectionRebateWithApplyCompleteDto.setOrgSidPath(orgSidPath); |
||||
|
ResultBean resultBean = scmCollectionRebateWithApplyFeign.complete(scmCollectionRebateWithApplyCompleteDto); |
||||
|
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 = scmCollectionRebateWithApplyFeign.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 = scmCollectionRebateWithApplyFeign.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 = scmCollectionRebateWithApplyFeign.breakProcess(flowTaskVo); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
return rb.success().setData(resultBean.getData()); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<String> getFlowOperateTitle(AppFlowQuery query) { |
||||
|
ResultBean<String> rb = ResultBean.fireFail(); |
||||
|
//0 上一环节 1下一环节
|
||||
|
int next = query.getNext(); |
||||
|
GetNodeQuery getNodeQuery = new GetNodeQuery(); |
||||
|
BeanUtil.copyProperties(query, getNodeQuery); |
||||
|
String data = ""; |
||||
|
if (next == 0) { |
||||
|
ResultBean<List<GetNodeVo>> getPreviousNodesForReject = scmCollectionRebateWithApplyFeign.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 = scmCollectionRebateWithApplyFeign.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(); |
||||
|
ScmCollectionRebateWithApplyDelegateQuery delegateQuery1 = new |
||||
|
ScmCollectionRebateWithApplyDelegateQuery(); |
||||
|
BeanUtil.copyProperties(delegateQuery, delegateQuery1); |
||||
|
scmCollectionRebateWithApplyFeign.delegate(delegateQuery1); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
public ResultBean assignTask(AppDelegateQuery delegateQuery) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
ScmCollectionRebateWithApplyDelegateQuery delegateQuery1 = new |
||||
|
ScmCollectionRebateWithApplyDelegateQuery(); |
||||
|
BeanUtil.copyProperties(delegateQuery, delegateQuery1); |
||||
|
scmCollectionRebateWithApplyFeign.assignTask(delegateQuery1); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue