31 changed files with 872 additions and 7 deletions
@ -0,0 +1,58 @@ |
|||||
|
package com.yxt.anrui.fin.api.finpaymentapply; |
||||
|
|
||||
|
import com.yxt.anrui.fin.api.finpaymentapplydetails.AppFinPaymentapplyDetailVo; |
||||
|
import com.yxt.anrui.fin.api.finpaymentapplyvehicle.AppFinPaymentapplyVehicleVo; |
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/10/6 10:35 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class AppFinPaymentApplyVo implements Vo { |
||||
|
private static final long serialVersionUID = -7421450588161214608L; |
||||
|
|
||||
|
@ApiModelProperty("款项名称") |
||||
|
private String costTitleValue; |
||||
|
//创建时间
|
||||
|
private String createTime; |
||||
|
//申请人
|
||||
|
private String name; |
||||
|
//款项类别
|
||||
|
private String costTypeValue; |
||||
|
//业务编号
|
||||
|
private String busSid; |
||||
|
//金额
|
||||
|
private String cost; |
||||
|
//付款单位名称
|
||||
|
private String payCompany; |
||||
|
//收款单位名称
|
||||
|
private String receiveCompany; |
||||
|
//付款备注
|
||||
|
private String remarks; |
||||
|
//是否涉及车辆
|
||||
|
private String isVeh; |
||||
|
private String isVehValue; |
||||
|
//付款明细List
|
||||
|
private List<AppFinPaymentapplyDetailVo> paymentList = new ArrayList<>(); |
||||
|
@ApiModelProperty("付款明细合计") |
||||
|
private String paymentTotal; |
||||
|
|
||||
|
//车辆列表
|
||||
|
private List<AppFinPaymentapplyVehicleVo> carList = new ArrayList<>(); |
||||
|
@ApiModelProperty("车辆金额合计") |
||||
|
private String carTotal; |
||||
|
|
||||
|
private String createBySid; |
||||
|
private String taskId; |
||||
|
private String procInstId; |
||||
|
|
||||
|
private String sid; |
||||
|
|
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.yxt.anrui.fin.api.finpaymentapplydetails; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/10/6 14:41 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class AppFinPaymentapplyDetailVo implements Vo { |
||||
|
private static final long serialVersionUID = -5474423439043642156L; |
||||
|
@ApiModelProperty("厂家销售通路") |
||||
|
private String actualPay; |
||||
|
@ApiModelProperty("付款方式") |
||||
|
private String paymentType; |
||||
|
@ApiModelProperty("开户行") |
||||
|
private String bank; |
||||
|
@ApiModelProperty("收款银行账号") |
||||
|
private String receivingAccount; |
||||
|
@ApiModelProperty("付款金额") |
||||
|
private String payAccount; |
||||
|
@ApiModelProperty("备注") |
||||
|
private String remarks; |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
package com.yxt.anrui.fin.api.finpaymentapplydetails; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/10/6 14:11 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class FinPaymentapplyDetails extends BaseEntity { |
||||
|
private static final long serialVersionUID = -4576193401443241659L; |
||||
|
|
||||
|
private String applySid; |
||||
|
@ApiModelProperty("付款方式key") |
||||
|
private String paymentTypeKey; |
||||
|
@ApiModelProperty("付款方式") |
||||
|
private String paymentType; |
||||
|
@ApiModelProperty("厂家销售通路") |
||||
|
private String actualPay; |
||||
|
@ApiModelProperty("开户行") |
||||
|
private String bank; |
||||
|
|
||||
|
@ApiModelProperty("收款银行账号") |
||||
|
private String receivingAccount; |
||||
|
@ApiModelProperty("付款金额") |
||||
|
private BigDecimal payAccount; |
||||
|
|
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.yxt.anrui.fin.api.finpaymentapplyvehicle; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/10/6 14:56 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class AppFinPaymentapplyVehicleVo implements Vo { |
||||
|
private static final long serialVersionUID = -3232965325256220009L; |
||||
|
@ApiModelProperty("车型") |
||||
|
private String modelName; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("厂家结算价") |
||||
|
private String money; |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
package com.yxt.anrui.fin.api.finpaymentapplyvehicle; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/10/6 14:23 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class FinPaymentapplyVehicle extends BaseEntity { |
||||
|
private static final long serialVersionUID = 6931224151880251447L; |
||||
|
|
||||
|
@ApiModelProperty("付款申请") |
||||
|
private String applySid; |
||||
|
@ApiModelProperty("车型名称") |
||||
|
private String modelName; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("车辆sid") |
||||
|
private String vehiSid; |
||||
|
@ApiModelProperty("车型sid") |
||||
|
private String modelSid; |
||||
|
@ApiModelProperty("配置sid") |
||||
|
private String configSid; |
||||
|
@ApiModelProperty("厂家结算价") |
||||
|
private BigDecimal money; |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.yxt.anrui.fin.biz.finpaymentapplydetails; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.yxt.anrui.fin.api.finpaymentapplydetails.AppFinPaymentapplyDetailVo; |
||||
|
import com.yxt.anrui.fin.api.finpaymentapplydetails.FinPaymentapplyDetails; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/10/6 15:16 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface FinPaymentapplyDetailsMapper extends BaseMapper<FinPaymentapplyDetails> { |
||||
|
List<AppFinPaymentapplyDetailVo> getDetailsList(String sid); |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||
|
<mapper namespace="com.yxt.anrui.fin.biz.finpaymentapplydetails.FinPaymentapplyDetailsMapper"> |
||||
|
<select id="getDetailsList" resultType="com.yxt.anrui.fin.api.finpaymentapplydetails.AppFinPaymentapplyDetailVo"> |
||||
|
select fd.actualPay, |
||||
|
fd.paymentType, |
||||
|
fd.bank, |
||||
|
fd.receivingAccount, |
||||
|
fd.payAccount, |
||||
|
fd.remarks |
||||
|
from fin_paymentapply_details fd |
||||
|
where fd.applySid = #{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,20 @@ |
|||||
|
package com.yxt.anrui.fin.biz.finpaymentapplydetails; |
||||
|
|
||||
|
import com.yxt.anrui.fin.api.finpaymentapplydetails.AppFinPaymentapplyDetailVo; |
||||
|
import com.yxt.anrui.fin.api.finpaymentapplydetails.FinPaymentapplyDetails; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/10/6 15:16 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Service |
||||
|
public class FinPaymentapplyDetailsService extends MybatisBaseService<FinPaymentapplyDetailsMapper, FinPaymentapplyDetails> { |
||||
|
public List<AppFinPaymentapplyDetailVo> getDetailsList(String sid) { |
||||
|
return baseMapper.getDetailsList(sid); |
||||
|
} |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.yxt.anrui.fin.biz.finpaymentapplyvehicle; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.yxt.anrui.fin.api.finpaymentapplyvehicle.AppFinPaymentapplyVehicleVo; |
||||
|
import com.yxt.anrui.fin.api.finpaymentapplyvehicle.FinPaymentapplyVehicle; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/10/6 15:18 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface FinPaymentapplyVehicleMapper extends BaseMapper<FinPaymentapplyVehicle> { |
||||
|
List<AppFinPaymentapplyVehicleVo> getCarList(String sid); |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||
|
<mapper namespace="com.yxt.anrui.fin.biz.finpaymentapplyvehicle.FinPaymentapplyVehicleMapper"> |
||||
|
<select id="getCarList" resultType="com.yxt.anrui.fin.api.finpaymentapplyvehicle.AppFinPaymentapplyVehicleVo"> |
||||
|
select fv.modelName, |
||||
|
fv.vinNo, |
||||
|
fv.money |
||||
|
from fin_paymentapply_vehicle fv |
||||
|
where applySid = #{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,20 @@ |
|||||
|
package com.yxt.anrui.fin.biz.finpaymentapplyvehicle; |
||||
|
|
||||
|
import com.yxt.anrui.fin.api.finpaymentapplyvehicle.AppFinPaymentapplyVehicleVo; |
||||
|
import com.yxt.anrui.fin.api.finpaymentapplyvehicle.FinPaymentapplyVehicle; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/10/6 15:18 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Service |
||||
|
public class FinPaymentapplyVehicleService extends MybatisBaseService<FinPaymentapplyVehicleMapper, FinPaymentapplyVehicle> { |
||||
|
public List<AppFinPaymentapplyVehicleVo> getCarList(String sid) { |
||||
|
return baseMapper.getCarList(sid); |
||||
|
} |
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
package com.yxt.anrui.terminal.api.finance.paymentapply; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/10/6 15:52 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PaymentApplyDetailsVo implements Vo { |
||||
|
private static final long serialVersionUID = -3182165897761808808L; |
||||
|
|
||||
|
@ApiModelProperty("厂家销售通路") |
||||
|
private String actualPay; |
||||
|
@ApiModelProperty("付款方式") |
||||
|
private String paymentType; |
||||
|
@ApiModelProperty("开户行") |
||||
|
private String bank; |
||||
|
@ApiModelProperty("收款银行账号") |
||||
|
private String receivingAccount; |
||||
|
@ApiModelProperty("付款金额") |
||||
|
private String payAccount; |
||||
|
@ApiModelProperty("备注") |
||||
|
private String remarks; |
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
package com.yxt.anrui.terminal.api.finance.paymentapply; |
||||
|
|
||||
|
import com.yxt.anrui.terminal.api.finance.paymentapply.flowable.PaymentApplyDto; |
||||
|
import com.yxt.anrui.terminal.api.finance.paymentapply.flowable.PaymentApplyQuery; |
||||
|
import com.yxt.anrui.terminal.api.finance.paymentapply.flowable.PaymentApplyTaskQuery; |
||||
|
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.*; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/10/6 9:57 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Api(tags = "付款申请") |
||||
|
@FeignClient( |
||||
|
contextId = "terminal-PaymentApply", |
||||
|
name = "anrui-terminal", |
||||
|
path = "/finance/v1/paymentApply", |
||||
|
fallback = PaymentApplyFeignFallback.class) |
||||
|
public interface PaymentApplyFeign { |
||||
|
|
||||
|
@ApiOperation("办理") |
||||
|
@GetMapping("/getPaymentApply/{sid}") |
||||
|
@ResponseBody |
||||
|
ResultBean<PaymentApplyVo> getPaymentApply(@PathVariable("sid") String sid); |
||||
|
|
||||
|
|
||||
|
@ApiOperation("办理") |
||||
|
@PutMapping("/agreePaymentApplyInfo") |
||||
|
@ResponseBody |
||||
|
ResultBean agreePayApplyInfo(@RequestBody PaymentApplyDto dto); |
||||
|
|
||||
|
@ApiOperation("驳回") |
||||
|
@PutMapping("/rejectPaymentApplyInfo") |
||||
|
@ResponseBody |
||||
|
ResultBean rejectPayApplyInfo(@RequestBody PaymentApplyTaskQuery query); |
||||
|
|
||||
|
@ApiOperation("撤回") |
||||
|
@PutMapping("/recallPaymentApplyInfo") |
||||
|
@ResponseBody |
||||
|
ResultBean recallPayApplyInfo(@RequestBody PaymentApplyTaskQuery query); |
||||
|
|
||||
|
@ApiOperation("终止") |
||||
|
@PutMapping("/stopPaymentApplyInfo") |
||||
|
@ResponseBody |
||||
|
ResultBean stopPayApplyInfo(@RequestBody PaymentApplyTaskQuery query); |
||||
|
|
||||
|
@ApiOperation("获取流程操作标题") |
||||
|
@GetMapping("/getFlowOperateTitle") |
||||
|
@ResponseBody |
||||
|
ResultBean<String> getFlowOperateTitle(@SpringQueryMap PaymentApplyQuery query); |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
package com.yxt.anrui.terminal.api.finance.paymentapply; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/10/6 9:58 |
||||
|
* @Description |
||||
|
*/ |
||||
|
public class PaymentApplyFeignFallback { |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
package com.yxt.anrui.terminal.api.finance.paymentapply; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/10/6 15:53 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PaymentApplyVehicleVo implements Vo { |
||||
|
private static final long serialVersionUID = -8919822312166380804L; |
||||
|
|
||||
|
@ApiModelProperty("车型") |
||||
|
private String modelName; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("厂家结算价") |
||||
|
private String money; |
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
package com.yxt.anrui.terminal.api.finance.paymentapply; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/10/6 9:59 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PaymentApplyVo implements Vo { |
||||
|
private static final long serialVersionUID = 1191604961683000023L; |
||||
|
|
||||
|
@ApiModelProperty("款项名称") |
||||
|
private String costTitleValue; |
||||
|
//创建时间
|
||||
|
private String createTime; |
||||
|
//申请人
|
||||
|
private String name; |
||||
|
//款项类别
|
||||
|
private String costTypeValue; |
||||
|
//业务编号
|
||||
|
private String busSid; |
||||
|
//金额
|
||||
|
private String cost; |
||||
|
//付款单位名称
|
||||
|
private String payCompany; |
||||
|
//收款单位名称
|
||||
|
private String receiveCompany; |
||||
|
//付款备注
|
||||
|
private String remarks; |
||||
|
//是否涉及车辆
|
||||
|
private String isVeh; |
||||
|
private String isVehValue; |
||||
|
//付款明细List
|
||||
|
private List<PaymentApplyDetailsVo> paymentList = new ArrayList<>(); |
||||
|
@ApiModelProperty("付款明细合计") |
||||
|
private String paymentTotal; |
||||
|
|
||||
|
//车辆列表
|
||||
|
private List<PaymentApplyVehicleVo> carList = new ArrayList<>(); |
||||
|
@ApiModelProperty("车辆金额合计") |
||||
|
private String carTotal; |
||||
|
|
||||
|
private String createBySid; |
||||
|
private String taskId; |
||||
|
private String procInstId; |
||||
|
|
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.yxt.anrui.terminal.api.finance.paymentapply.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/10/6 9:59 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PaymentApplyDto implements Dto { |
||||
|
private static final long serialVersionUID = 7798653263828204569L; |
||||
|
|
||||
|
@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,25 @@ |
|||||
|
package com.yxt.anrui.terminal.api.finance.paymentapply.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/10/6 10:00 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PaymentApplyQuery implements Query { |
||||
|
private static final long serialVersionUID = 6112966480482869923L; |
||||
|
|
||||
|
@ApiModelProperty(value = "节点key") |
||||
|
private String taskDefKey; |
||||
|
@ApiModelProperty(value = "业务sid") |
||||
|
private String businessSid; |
||||
|
@ApiModelProperty(value = "0 上一环节 1下一环节") |
||||
|
@NotNull(message = "参数错误:next") |
||||
|
private Integer next; |
||||
|
} |
@ -0,0 +1,47 @@ |
|||||
|
package com.yxt.anrui.terminal.api.finance.paymentapply.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/10/6 10:00 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PaymentApplyTaskQuery implements Query { |
||||
|
|
||||
|
private static final long serialVersionUID = 4492173829846824226L; |
||||
|
/** |
||||
|
* 终止、驳回、撤回 |
||||
|
*/ |
||||
|
@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,54 @@ |
|||||
|
package com.yxt.anrui.terminal.biz.finance.paymentapply; |
||||
|
|
||||
|
import com.yxt.anrui.terminal.api.finance.paymentapply.PaymentApplyFeign; |
||||
|
import com.yxt.anrui.terminal.api.finance.paymentapply.PaymentApplyVo; |
||||
|
import com.yxt.anrui.terminal.api.finance.paymentapply.flowable.PaymentApplyDto; |
||||
|
import com.yxt.anrui.terminal.api.finance.paymentapply.flowable.PaymentApplyQuery; |
||||
|
import com.yxt.anrui.terminal.api.finance.paymentapply.flowable.PaymentApplyTaskQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Controller; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/10/6 10:15 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Controller |
||||
|
@RequestMapping("/finance/v1/paymentApply") |
||||
|
public class PaymentApplyRest implements PaymentApplyFeign { |
||||
|
|
||||
|
@Autowired |
||||
|
private PaymentApplyService paymentApplyService; |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<PaymentApplyVo> getPaymentApply(String sid) { |
||||
|
return paymentApplyService.getPaymentApply(sid); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean agreePayApplyInfo(PaymentApplyDto dto) { |
||||
|
return paymentApplyService.agreePayApplyInfo(dto); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean rejectPayApplyInfo(PaymentApplyTaskQuery query) { |
||||
|
return paymentApplyService.rejectPayApplyInfo(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean recallPayApplyInfo(PaymentApplyTaskQuery query) { |
||||
|
return paymentApplyService.recallPayApplyInfo(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean stopPayApplyInfo(PaymentApplyTaskQuery query) { |
||||
|
return paymentApplyService.stopPayApplyInfo(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<String> getFlowOperateTitle(PaymentApplyQuery query) { |
||||
|
return paymentApplyService.getFlowOperateTitle(query); |
||||
|
} |
||||
|
} |
@ -0,0 +1,137 @@ |
|||||
|
package com.yxt.anrui.terminal.biz.finance.paymentapply; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.anrui.fin.api.fincostapply.flow.FinCostGetNodeVo; |
||||
|
import com.yxt.anrui.fin.api.finpaymentapply.AppFinPaymentApplyVo; |
||||
|
import com.yxt.anrui.fin.api.finpaymentapply.FinPaymentapplyFeign; |
||||
|
import com.yxt.anrui.fin.api.finpaymentapply.flow.FinPayCompleteDto; |
||||
|
import com.yxt.anrui.fin.api.finpaymentapply.flow.FinPayGetNodeQuery; |
||||
|
import com.yxt.anrui.fin.api.finpaymentapply.flow.FinPayGetNodeVo; |
||||
|
import com.yxt.anrui.fin.api.finpaymentapply.flow.FinPayTaskQuery; |
||||
|
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.terminal.api.finance.paymentapply.PaymentApplyVo; |
||||
|
import com.yxt.anrui.terminal.api.finance.paymentapply.flowable.PaymentApplyDto; |
||||
|
import com.yxt.anrui.terminal.api.finance.paymentapply.flowable.PaymentApplyQuery; |
||||
|
import com.yxt.anrui.terminal.api.finance.paymentapply.flowable.PaymentApplyTaskQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/10/6 10:16 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Service |
||||
|
public class PaymentApplyService { |
||||
|
|
||||
|
@Autowired |
||||
|
private FinPaymentapplyFeign finPaymentapplyFeign; |
||||
|
@Autowired |
||||
|
private SysUserFeign sysUserFeign; |
||||
|
@Autowired |
||||
|
private SysStaffOrgFeign sysStaffOrgFeign; |
||||
|
|
||||
|
public ResultBean<PaymentApplyVo> getPaymentApply(String sid) { |
||||
|
ResultBean<PaymentApplyVo> rb = ResultBean.fireFail(); |
||||
|
PaymentApplyVo vo = new PaymentApplyVo(); |
||||
|
ResultBean<AppFinPaymentApplyVo> resultBean = finPaymentapplyFeign.getPaymentApply(sid); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
BeanUtil.copyProperties(resultBean.getData(), vo); |
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
|
||||
|
public ResultBean agreePayApplyInfo(PaymentApplyDto 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(); |
||||
|
FinPayCompleteDto finPayCompleteDto = new FinPayCompleteDto(); |
||||
|
BeanUtil.copyProperties(dto, finPayCompleteDto); |
||||
|
finPayCompleteDto.setOrgSidPath(orgSidPath); |
||||
|
ResultBean resultBean = finPaymentapplyFeign.complete(finPayCompleteDto); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
return rb.success().setData(resultBean.getData()); |
||||
|
} |
||||
|
|
||||
|
public ResultBean rejectPayApplyInfo(PaymentApplyTaskQuery query) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
FinPayTaskQuery finPayTaskQuery = new FinPayTaskQuery(); |
||||
|
BeanUtil.copyProperties(query, finPayTaskQuery); |
||||
|
ResultBean resultBean = finPaymentapplyFeign.taskReject(finPayTaskQuery); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
return rb.success().setData(resultBean.getData()); |
||||
|
} |
||||
|
|
||||
|
public ResultBean recallPayApplyInfo(PaymentApplyTaskQuery query) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
FinPayTaskQuery finPayTaskQuery = new FinPayTaskQuery(); |
||||
|
BeanUtil.copyProperties(query, finPayTaskQuery); |
||||
|
ResultBean resultBean = finPaymentapplyFeign.revokeProcess(finPayTaskQuery); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
return rb.success().setData(resultBean.getData()); |
||||
|
} |
||||
|
|
||||
|
public ResultBean stopPayApplyInfo(PaymentApplyTaskQuery query) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
FinPayTaskQuery finPayTaskQuery = new FinPayTaskQuery(); |
||||
|
BeanUtil.copyProperties(query, finPayTaskQuery); |
||||
|
ResultBean resultBean = finPaymentapplyFeign.breakProcess(finPayTaskQuery); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
return rb.success().setData(resultBean.getData()); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<String> getFlowOperateTitle(PaymentApplyQuery query) { |
||||
|
ResultBean<String> rb = ResultBean.fireFail(); |
||||
|
//0 上一环节 1下一环节
|
||||
|
int next = query.getNext(); |
||||
|
FinPayGetNodeQuery getNodeQuery = new FinPayGetNodeQuery(); |
||||
|
BeanUtil.copyProperties(query, getNodeQuery); |
||||
|
String data = ""; |
||||
|
if (next == 0) { |
||||
|
ResultBean<List<FinPayGetNodeVo>> getPreviousNodesForReject = finPaymentapplyFeign.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<FinPayGetNodeVo>> getNextNodesForSubmit = finPaymentapplyFeign.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); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue