81 changed files with 2966 additions and 342 deletions
@ -0,0 +1,49 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanrepaymenthistory; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
/** |
||||
|
* @author Fan |
||||
|
* @description |
||||
|
* @date 2024/1/16 13:43 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RepaymentHistoryVoForBuckle { |
||||
|
private String sid; |
||||
|
@ApiModelProperty("消贷合同编号") |
||||
|
private String loanContractNo; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("资方合同") |
||||
|
private String bankContractNo; |
||||
|
@ApiModelProperty("资方名称") |
||||
|
private String bankName; |
||||
|
@ApiModelProperty("客户") |
||||
|
private String customer; |
||||
|
@ApiModelProperty("期数") |
||||
|
private String period; |
||||
|
@ApiModelProperty("借款人名称") |
||||
|
private String borrowerName; |
||||
|
@ApiModelProperty("应还日期") |
||||
|
private String dueDate; |
||||
|
@ApiModelProperty("应还金额") |
||||
|
private String dueMoney; |
||||
|
@ApiModelProperty("实还日期") |
||||
|
private String actualDate; |
||||
|
@ApiModelProperty("数据日期") |
||||
|
private String dataTime; |
||||
|
@ApiModelProperty("实还金额") |
||||
|
private BigDecimal actualMoney; |
||||
|
@ApiModelProperty("本期未还金额") |
||||
|
private String outstandingMoney; |
||||
|
@ApiModelProperty("划扣状态") |
||||
|
private String buckle; |
||||
|
@ApiModelProperty("还款方式") |
||||
|
private String returnWay; |
||||
|
private String planDetailSid; |
||||
|
private String updateState; //更新状态
|
||||
|
private String updateTime; //更新日期
|
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanrepaymenthistory; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author Fan |
||||
|
* @description |
||||
|
* @date 2024/1/16 14:30 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class TransferRecordVo { |
||||
|
private String spread; //息差
|
||||
|
private String transferPrincipal; //转付本金
|
||||
|
private String defaultInterest; //转付罚息
|
||||
|
private String accountType; //转付账户类型
|
||||
|
private String account; //转付账户
|
||||
|
private String accountNumber; //转付账户账号
|
||||
|
} |
@ -0,0 +1,90 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanrepaymenthistory.utils; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Collections; |
||||
|
import java.util.Set; |
||||
|
import java.util.function.BiConsumer; |
||||
|
import java.util.function.BinaryOperator; |
||||
|
import java.util.function.Function; |
||||
|
import java.util.function.Supplier; |
||||
|
import java.util.stream.Collector; |
||||
|
|
||||
|
public class CollectorsUtil { |
||||
|
static final Set<Collector.Characteristics> CH_NOID = Collections.emptySet(); |
||||
|
|
||||
|
private CollectorsUtil() { |
||||
|
} |
||||
|
|
||||
|
@SuppressWarnings("unchecked") |
||||
|
private static <I, R> Function<I, R> castingIdentity() { |
||||
|
return i -> (R) i; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Simple implementation class for {@code Collector}. |
||||
|
* |
||||
|
* @param <T> |
||||
|
* the type of elements to be collected |
||||
|
* @param <R> |
||||
|
* the type of the result |
||||
|
*/ |
||||
|
static class CollectorImpl<T, A, R> implements Collector<T, A, R> { |
||||
|
private final Supplier<A> supplier; |
||||
|
private final BiConsumer<A, T> accumulator; |
||||
|
private final BinaryOperator<A> combiner; |
||||
|
private final Function<A, R> finisher; |
||||
|
private final Set<Characteristics> characteristics; |
||||
|
|
||||
|
CollectorImpl(Supplier<A> supplier, BiConsumer<A, T> accumulator, BinaryOperator<A> combiner, |
||||
|
Function<A, R> finisher, Set<Characteristics> characteristics) { |
||||
|
this.supplier = supplier; |
||||
|
this.accumulator = accumulator; |
||||
|
this.combiner = combiner; |
||||
|
this.finisher = finisher; |
||||
|
this.characteristics = characteristics; |
||||
|
} |
||||
|
|
||||
|
CollectorImpl(Supplier<A> supplier, BiConsumer<A, T> accumulator, BinaryOperator<A> combiner, |
||||
|
Set<Characteristics> characteristics) { |
||||
|
this(supplier, accumulator, combiner, castingIdentity(), characteristics); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public BiConsumer<A, T> accumulator() { |
||||
|
return accumulator; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Supplier<A> supplier() { |
||||
|
return supplier; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public BinaryOperator<A> combiner() { |
||||
|
return combiner; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Function<A, R> finisher() { |
||||
|
return finisher; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Set<Characteristics> characteristics() { |
||||
|
return characteristics; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static <T> Collector<T, ?, BigDecimal> summingBigDecimal(ToBigDecimalFunction<? super T> mapper) { |
||||
|
return new CollectorImpl<>(() -> new BigDecimal[1], (a, t) -> { |
||||
|
if (a[0] == null) { |
||||
|
a[0] = BigDecimal.ZERO; |
||||
|
} |
||||
|
a[0] = a[0].add(mapper.applyAsBigDecimal(t)); |
||||
|
}, (a, b) -> { |
||||
|
a[0] = a[0].add(b[0]); |
||||
|
return a; |
||||
|
}, a -> a[0], CH_NOID); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanrepaymenthistory.utils; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
@FunctionalInterface |
||||
|
public interface ToBigDecimalFunction<T> { |
||||
|
BigDecimal applyAsBigDecimal(T value); |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundapply; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class InboundVo { |
||||
|
} |
@ -0,0 +1,103 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundapply; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class LoanReturnInboundApply extends BaseEntity { |
||||
|
private static final long serialVersionUID = 3057964075133950895L; |
||||
|
|
||||
|
@ApiModelProperty("申请部门") |
||||
|
private String createDept; |
||||
|
@ApiModelProperty("申请部门sid") |
||||
|
private String createDeptSid; |
||||
|
@ApiModelProperty("申请人") |
||||
|
private String createByName; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("车辆sid") |
||||
|
private String vinSid; |
||||
|
@ApiModelProperty("车牌号") |
||||
|
private String vehMark; |
||||
|
@ApiModelProperty("首次登记日期") |
||||
|
private String firstDate; |
||||
|
@ApiModelProperty("车型名称") |
||||
|
private String modelName; |
||||
|
@ApiModelProperty("车型sid") |
||||
|
private String modelSid; |
||||
|
@ApiModelProperty("配置sid") |
||||
|
private String configSid; |
||||
|
@ApiModelProperty("配置名称") |
||||
|
private String configName; |
||||
|
@ApiModelProperty("是否带挂车") |
||||
|
private String tralier; |
||||
|
@ApiModelProperty("客户名称") |
||||
|
private String customerName; |
||||
|
@ApiModelProperty("客户sid") |
||||
|
private String customerSid; |
||||
|
@ApiModelProperty("贷款人sid") |
||||
|
private String loanSid; |
||||
|
@ApiModelProperty("贷款人") |
||||
|
private String loanName; |
||||
|
@ApiModelProperty("贷款合同编号") |
||||
|
private String loanContractNo; |
||||
|
@ApiModelProperty("资方") |
||||
|
private String bankName; |
||||
|
@ApiModelProperty("资方合同编号") |
||||
|
private String bankContractNo; |
||||
|
@ApiModelProperty("入库价") |
||||
|
private int inboundMoney; |
||||
|
@ApiModelProperty("停放地点") |
||||
|
private String locationName; |
||||
|
@ApiModelProperty("停放地点sid") |
||||
|
private String locationSid; |
||||
|
@ApiModelProperty("停车收费标准") |
||||
|
private BigDecimal parkFees; |
||||
|
@ApiModelProperty("已还金额") |
||||
|
private BigDecimal alRepaidMoney; |
||||
|
@ApiModelProperty("当前逾期金额") |
||||
|
private BigDecimal currentBeMoney; |
||||
|
@ApiModelProperty("其中资金占用费") |
||||
|
private BigDecimal wheFundOccMoney; |
||||
|
@ApiModelProperty("未到期金额") |
||||
|
private BigDecimal unexpiredMoney; |
||||
|
@ApiModelProperty("总期数") |
||||
|
private String nper; |
||||
|
@ApiModelProperty("当前期数") |
||||
|
private String currentPeriod; |
||||
|
@ApiModelProperty("已还金额换算期数") |
||||
|
private String alRepaidMoneyConPeriod; |
||||
|
@ApiModelProperty("逾期金额换算期数") |
||||
|
private String beOverdueMoneyAndPeriod; |
||||
|
@ApiModelProperty("流程状态") |
||||
|
private String nodeState; |
||||
|
@ApiModelProperty("分公司sid") |
||||
|
private String useOrgSid; |
||||
|
@ApiModelProperty("分公司名称") |
||||
|
private String useOrgName; |
||||
|
@ApiModelProperty("办结日期") |
||||
|
private String closeDate; |
||||
|
@ApiModelProperty("实例id") |
||||
|
private String procInstId; |
||||
|
@ApiModelProperty("流程定义id") |
||||
|
private String procDefId; |
||||
|
@ApiModelProperty("任务id") |
||||
|
private String taskId; |
||||
|
@ApiModelProperty("环节id") |
||||
|
private String taskDefKey; |
||||
|
@ApiModelProperty("机构全路径sid") |
||||
|
private String orgSidPath; |
||||
|
|
||||
|
private String files; |
||||
|
|
||||
|
private String busVinSid; |
||||
|
|
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundapply; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class LoanReturnInboundApplyDetailsQuery { |
||||
|
|
||||
|
@ApiModelProperty("sid") |
||||
|
private String sid; |
||||
|
@ApiModelProperty("用户sid") |
||||
|
private String userSid; |
||||
|
@ApiModelProperty("机构全路径sid") |
||||
|
private String orgPath; |
||||
|
@ApiModelProperty("选择的要交回的车辆事前报备申请sid") |
||||
|
private String chooseSid; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,109 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundapply; |
||||
|
|
||||
|
import com.yxt.anrui.riskcenter.api.loanoverduefin.UrlQuery; |
||||
|
import com.yxt.anrui.riskcenter.api.loanreturninboundtrailer.LoanReturnInboundTrailerDto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class LoanReturnInboundApplyDetailsVo { |
||||
|
|
||||
|
private String sid; |
||||
|
@ApiModelProperty("申请部门") |
||||
|
private String createDept; |
||||
|
@ApiModelProperty("申请部门sid") |
||||
|
private String createDeptSid; |
||||
|
@ApiModelProperty("申请人") |
||||
|
private String createByName; |
||||
|
@ApiModelProperty("发起日期") |
||||
|
private String createDate; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("车辆sid") |
||||
|
private String vinSid; |
||||
|
@ApiModelProperty("车牌号") |
||||
|
private String vehMark; |
||||
|
@ApiModelProperty("首次登记日期") |
||||
|
private String firstDate; |
||||
|
@ApiModelProperty("车型名称") |
||||
|
private String modelName; |
||||
|
@ApiModelProperty("车型sid") |
||||
|
private String modelSid; |
||||
|
@ApiModelProperty("配置sid") |
||||
|
private String configSid; |
||||
|
@ApiModelProperty("配置名称") |
||||
|
private String configName; |
||||
|
@ApiModelProperty("是否带挂车") |
||||
|
private String tralier; |
||||
|
@ApiModelProperty("客户名称") |
||||
|
private String customerName; |
||||
|
@ApiModelProperty("客户sid") |
||||
|
private String customerSid; |
||||
|
@ApiModelProperty("贷款人sid") |
||||
|
private String loanSid; |
||||
|
@ApiModelProperty("贷款人") |
||||
|
private String loanName; |
||||
|
@ApiModelProperty("贷款合同编号") |
||||
|
private String loanContractNo; |
||||
|
@ApiModelProperty("资方") |
||||
|
private String bankName; |
||||
|
@ApiModelProperty("资方合同编号") |
||||
|
private String bankContractNo; |
||||
|
@ApiModelProperty("入库价") |
||||
|
private int inboundMoney; |
||||
|
@ApiModelProperty("停放地点") |
||||
|
private String locationName; |
||||
|
@ApiModelProperty("停放地点sid") |
||||
|
private String locationSid; |
||||
|
@ApiModelProperty("停车收费标准") |
||||
|
private String parkFees; |
||||
|
@ApiModelProperty("已还金额") |
||||
|
private String alRepaidMoney; |
||||
|
@ApiModelProperty("当前逾期金额") |
||||
|
private String currentBeMoney; |
||||
|
@ApiModelProperty("其中资金占用费") |
||||
|
private String wheFundOccMoney; |
||||
|
@ApiModelProperty("未到期金额") |
||||
|
private String unexpiredMoney; |
||||
|
@ApiModelProperty("总期数") |
||||
|
private String nper; |
||||
|
@ApiModelProperty("当前期数") |
||||
|
private String currentPeriod; |
||||
|
@ApiModelProperty("已还金额换算期数") |
||||
|
private String alRepaidMoneyConPeriod; |
||||
|
@ApiModelProperty("逾期金额换算期数") |
||||
|
private String beOverdueMoneyAndPeriod; |
||||
|
|
||||
|
private String busVinSid; |
||||
|
|
||||
|
private String remarks; |
||||
|
|
||||
|
private List<UrlQuery> filesList = new ArrayList<>(); |
||||
|
|
||||
|
private LoanReturnInboundTrailerDto loanReturnInboundTrailer = new LoanReturnInboundTrailerDto(); |
||||
|
|
||||
|
private String files; |
||||
|
|
||||
|
private String orgPath; |
||||
|
private String userSid; |
||||
|
private String useOrgSid; |
||||
|
@ApiModelProperty("车型和配置sid") |
||||
|
private String modelConfigSid; |
||||
|
@ApiModelProperty("销售指导价") |
||||
|
private String guildPrice; |
||||
|
|
||||
|
@ApiModelProperty(value = "任务id") |
||||
|
private String taskId; |
||||
|
@ApiModelProperty(value = "流程实例id") |
||||
|
private String procInstId; |
||||
|
|
||||
|
} |
@ -0,0 +1,100 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundapply; |
||||
|
|
||||
|
import com.yxt.anrui.riskcenter.api.loanoverduefin.UrlQuery; |
||||
|
import com.yxt.anrui.riskcenter.api.loanreturninboundtrailer.LoanReturnInboundTrailerDto; |
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class LoanReturnInboundApplyDto implements Dto { |
||||
|
private static final long serialVersionUID = 4255302388803244120L; |
||||
|
|
||||
|
private String sid; |
||||
|
@ApiModelProperty("申请部门") |
||||
|
private String createDept; |
||||
|
@ApiModelProperty("申请部门sid") |
||||
|
private String createDeptSid; |
||||
|
@ApiModelProperty("申请人") |
||||
|
private String createByName; |
||||
|
|
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("车辆sid") |
||||
|
private String vinSid; |
||||
|
@ApiModelProperty("车牌号") |
||||
|
private String vehMark; |
||||
|
@ApiModelProperty("首次登记日期") |
||||
|
private String firstDate; |
||||
|
@ApiModelProperty("车型名称") |
||||
|
private String modelName; |
||||
|
@ApiModelProperty("车型sid") |
||||
|
private String modelSid; |
||||
|
@ApiModelProperty("配置sid") |
||||
|
private String configSid; |
||||
|
@ApiModelProperty("配置名称") |
||||
|
private String configName; |
||||
|
@ApiModelProperty("是否带挂车") |
||||
|
private String tralier; |
||||
|
@ApiModelProperty("客户名称") |
||||
|
private String customerName; |
||||
|
@ApiModelProperty("客户sid") |
||||
|
private String customerSid; |
||||
|
@ApiModelProperty("贷款人sid") |
||||
|
private String loanSid; |
||||
|
@ApiModelProperty("贷款人") |
||||
|
private String loanName; |
||||
|
@ApiModelProperty("贷款合同编号") |
||||
|
private String loanContractNo; |
||||
|
@ApiModelProperty("资方") |
||||
|
private String bankName; |
||||
|
@ApiModelProperty("资方合同编号") |
||||
|
private String bankContractNo; |
||||
|
@ApiModelProperty("入库价") |
||||
|
private int inboundMoney; |
||||
|
@ApiModelProperty("停放地点") |
||||
|
private String locationName; |
||||
|
@ApiModelProperty("停放地点sid") |
||||
|
private String locationSid; |
||||
|
@ApiModelProperty("停车收费标准") |
||||
|
private String parkFees; |
||||
|
@ApiModelProperty("已还金额") |
||||
|
private String alRepaidMoney; |
||||
|
@ApiModelProperty("当前逾期金额") |
||||
|
private String currentBeMoney; |
||||
|
@ApiModelProperty("其中资金占用费") |
||||
|
private String wheFundOccMoney; |
||||
|
@ApiModelProperty("未到期金额") |
||||
|
private String unexpiredMoney; |
||||
|
@ApiModelProperty("总期数") |
||||
|
private String nper; |
||||
|
@ApiModelProperty("当前期数") |
||||
|
private String currentPeriod; |
||||
|
@ApiModelProperty("已还金额换算期数") |
||||
|
private String alRepaidMoneyConPeriod; |
||||
|
@ApiModelProperty("逾期金额换算期数") |
||||
|
private String beOverdueMoneyAndPeriod; |
||||
|
|
||||
|
private String remarks; |
||||
|
@ApiModelProperty("分公司sid") |
||||
|
private String useOrgSid; |
||||
|
@ApiModelProperty("分公司名称") |
||||
|
private String useOrgName; |
||||
|
|
||||
|
private List<UrlQuery> filesList = new ArrayList<>(); |
||||
|
|
||||
|
private LoanReturnInboundTrailerDto loanReturnInboundTrailer; |
||||
|
|
||||
|
private String orgPath; |
||||
|
private String userSid; |
||||
|
} |
||||
|
|
@ -0,0 +1,79 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundapply; |
||||
|
|
||||
|
import com.yxt.anrui.riskcenter.api.loanreturninboundapply.flowable.*; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.cloud.openfeign.SpringQueryMap; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@FeignClient( |
||||
|
contextId = "anrui-riskcenter-LoanReturnInboundApply", |
||||
|
name = "anrui-riskcenter", |
||||
|
path = "v1/LoanReturnInboundApply", |
||||
|
fallback = LoanReturnInboundApplyFeignFallback.class) |
||||
|
public interface LoanReturnInboundApplyFeign { |
||||
|
|
||||
|
@ApiOperation("分页列表") |
||||
|
@PostMapping("/listPage") |
||||
|
ResultBean<PagerVo<LoanReturnInboundApplyVo>> listPage(@RequestBody PagerQuery<LoanReturnInboundApplyQuery> pq); |
||||
|
|
||||
|
@ApiOperation("新增或修改") |
||||
|
@PostMapping("/saveOrUpdate") |
||||
|
ResultBean<String> saveOrUpdate(@RequestBody LoanReturnInboundApplyDto dto); |
||||
|
|
||||
|
@ApiOperation("详情初始化") |
||||
|
@PostMapping("/details") |
||||
|
ResultBean<LoanReturnInboundApplyDetailsVo> details(LoanReturnInboundApplyDetailsQuery query); |
||||
|
|
||||
|
@ApiOperation("可入库交回车辆列表") |
||||
|
@PostMapping("/getInboundList") |
||||
|
ResultBean<PagerVo<ReturnInboundVo>> getInboundList(@RequestBody PagerQuery<LoanReturnQuery> pagerQuery); |
||||
|
|
||||
|
@ApiOperation("删除/批量删除") |
||||
|
@DeleteMapping("/delBySids") |
||||
|
ResultBean delBySids(@RequestBody String[] sids); |
||||
|
|
||||
|
@ApiOperation("提交") |
||||
|
@PostMapping("/submitApply") |
||||
|
public ResultBean submitApply(@Valid @RequestBody SubmitReturnInbondApplyDto dto); |
||||
|
|
||||
|
@ApiOperation(value = "办理(同意)") |
||||
|
@PostMapping("/complete") |
||||
|
public ResultBean complete(@Valid @RequestBody CompleteReturnInboundDto query); |
||||
|
|
||||
|
@ApiOperation(value = "获取上一个环节") |
||||
|
@GetMapping(value = "/getPreviousNodesForReject") |
||||
|
ResultBean<List<ReturnInboundApplyNodeVo>> getPreviousNodesForReject(@Valid @SpringQueryMap ReturnInboundApplyNodeQuery query); |
||||
|
|
||||
|
@ApiOperation(value = "获取下一个环节") |
||||
|
@GetMapping(value = "/getNextNodesForSubmit") |
||||
|
ResultBean<List<ReturnInboundApplyNodeVo>> getNextNodesForSubmit(@Valid @SpringQueryMap ReturnInboundApplyNodeQuery query); |
||||
|
|
||||
|
@ApiOperation(value = "驳回任务") |
||||
|
@PostMapping(value = "/reject") |
||||
|
public ResultBean taskReject(@Valid @RequestBody ReturnInboundApplyTaskQuery query); |
||||
|
|
||||
|
@ApiOperation(value = "撤回流程") |
||||
|
@PostMapping(value = "/revokeProcess") |
||||
|
public ResultBean revokeProcess(@Valid @RequestBody ReturnInboundApplyTaskQuery query); |
||||
|
|
||||
|
@ApiOperation(value = "终止任务") |
||||
|
@PostMapping(value = "/breakProcess") |
||||
|
public ResultBean breakProcess(@Valid @RequestBody ReturnInboundApplyTaskQuery query); |
||||
|
|
||||
|
@ApiOperation(value = "加签") |
||||
|
@PostMapping(value = "/delegate") |
||||
|
public ResultBean delegate(@RequestBody ReturnInboundApplyDelegateQuery query); |
||||
|
|
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundapply; |
||||
|
|
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Component |
||||
|
public class LoanReturnInboundApplyFeignFallback { |
||||
|
} |
@ -0,0 +1,60 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundapply; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class LoanReturnInboundApplyQuery implements Query { |
||||
|
private static final long serialVersionUID = -3762567916510710852L; |
||||
|
|
||||
|
//分公司
|
||||
|
private String useOrgName; |
||||
|
//申请部门
|
||||
|
@ApiModelProperty("申请部门") |
||||
|
private String createDept; |
||||
|
//申请人
|
||||
|
@ApiModelProperty("申请人") |
||||
|
private String createByName; |
||||
|
//办结日期
|
||||
|
@ApiModelProperty("办结日期") |
||||
|
private String closeDateStart; |
||||
|
private String closeDateEnd; |
||||
|
@ApiModelProperty("申请日期") |
||||
|
private String createDateStart; |
||||
|
private String createDateEnd; |
||||
|
//贷款合同编号
|
||||
|
@ApiModelProperty("贷款合同编号") |
||||
|
private String loanContractNo; |
||||
|
//车架号
|
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
//车牌号
|
||||
|
@ApiModelProperty("车牌号") |
||||
|
private String vehMark; |
||||
|
//贷款人
|
||||
|
@ApiModelProperty("贷款人") |
||||
|
private String loanName; |
||||
|
//资方
|
||||
|
@ApiModelProperty("资方") |
||||
|
private String bankName; |
||||
|
//资方合同编号
|
||||
|
@ApiModelProperty("资方合同编号") |
||||
|
private String bankContractNo; |
||||
|
//客户名称
|
||||
|
@ApiModelProperty("客户名称") |
||||
|
private String customerName; |
||||
|
//是否带挂车
|
||||
|
@ApiModelProperty("是否带挂车") |
||||
|
private String tralier; |
||||
|
|
||||
|
private String menuUrl; |
||||
|
private String orgPath; |
||||
|
|
||||
|
private String userSid; |
||||
|
} |
@ -0,0 +1,69 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundapply; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class LoanReturnInboundApplyVo { |
||||
|
|
||||
|
private String sid; |
||||
|
//流程状态
|
||||
|
@ApiModelProperty("流程状态") |
||||
|
private String nodeState; |
||||
|
//分公司
|
||||
|
@ApiModelProperty("分公司名称") |
||||
|
private String useOrgName; |
||||
|
//申请部门
|
||||
|
@ApiModelProperty("申请部门") |
||||
|
private String createDept; |
||||
|
//申请人
|
||||
|
@ApiModelProperty("申请人") |
||||
|
private String createByName; |
||||
|
//申请日期
|
||||
|
@ApiModelProperty("申请日期") |
||||
|
private String createDate; |
||||
|
//办结日期
|
||||
|
@ApiModelProperty("办结日期") |
||||
|
private String closeDate; |
||||
|
//贷款合同编号
|
||||
|
@ApiModelProperty("贷款合同编号") |
||||
|
private String loanContractNo; |
||||
|
//车架号
|
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
//车牌号
|
||||
|
@ApiModelProperty("车牌号") |
||||
|
private String vehMark; |
||||
|
//资方
|
||||
|
@ApiModelProperty("资方") |
||||
|
private String bankName; |
||||
|
//资方合同编号
|
||||
|
@ApiModelProperty("资方合同编号") |
||||
|
private String bankContractNo; |
||||
|
//客户名称
|
||||
|
@ApiModelProperty("客户名称") |
||||
|
private String customerName; |
||||
|
//贷款人
|
||||
|
@ApiModelProperty("贷款人") |
||||
|
private String loanName; |
||||
|
//入库价
|
||||
|
@ApiModelProperty("入库价") |
||||
|
private int inboundMoney; |
||||
|
//是否带挂车
|
||||
|
@ApiModelProperty("是否带挂车") |
||||
|
private String tralier; |
||||
|
@ApiModelProperty("是否允许点击办理,true允许,false不允许") |
||||
|
private boolean allowModify; |
||||
|
private String createBySid; |
||||
|
|
||||
|
@ApiModelProperty("流程定义id") |
||||
|
private String procDefId; |
||||
|
@ApiModelProperty("流程实例id") |
||||
|
private String procInstId; |
||||
|
|
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundapply; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/17 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class LoanReturnQuery implements Query { |
||||
|
private static final long serialVersionUID = 7803623528380694122L; |
||||
|
|
||||
|
private String orgPath; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("车牌号") |
||||
|
private String vehMark; |
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundapply; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class ReturnInboundVo { |
||||
|
|
||||
|
private String sid; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("车牌号") |
||||
|
private String vehMark; |
||||
|
@ApiModelProperty("车型") |
||||
|
private String modelName; |
||||
|
@ApiModelProperty("资方") |
||||
|
private String bankName; |
||||
|
@ApiModelProperty("客户名称") |
||||
|
private String customerName; |
||||
|
@ApiModelProperty("贷款人") |
||||
|
private String loanName; |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundapply.flowable; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class CompleteReturnInboundDto { |
||||
|
|
||||
|
@ApiModelProperty(value = "用户sid") |
||||
|
@NotBlank(message = "参数错误:userSid") |
||||
|
private String userSid; |
||||
|
@ApiModelProperty(value = "用户全路径sid") |
||||
|
private String orgSidPath; |
||||
|
@ApiModelProperty(value = "节点id") |
||||
|
@NotBlank(message = "参数错误:taskDefKey") |
||||
|
private String taskDefKey; |
||||
|
@ApiModelProperty(value = "任务id") |
||||
|
@NotBlank(message = "参数错误:taskId") |
||||
|
private String taskId; |
||||
|
@ApiModelProperty(value = "流程id") |
||||
|
@NotBlank(message = "参数错误:instanceId") |
||||
|
private String instanceId; |
||||
|
@ApiModelProperty(value = "意见") |
||||
|
private String comment; |
||||
|
@ApiModelProperty(value = "业务sid") |
||||
|
@NotBlank(message = "参数错误:businessSid") |
||||
|
private String businessSid; |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundapply.flowable; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class ReturnInboundApplyDelegateQuery { |
||||
|
|
||||
|
@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,18 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundapply.flowable; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class ReturnInboundApplyNodeQuery { |
||||
|
|
||||
|
@ApiModelProperty(value = "环节定义id") |
||||
|
private String taskDefKey; |
||||
|
@ApiModelProperty(value = "业务sid") |
||||
|
private String businessSid; |
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundapply.flowable; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class ReturnInboundApplyNodeVo { |
||||
|
|
||||
|
@ApiModelProperty(value = "节点名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty(value = "节点id") |
||||
|
private String id; |
||||
|
@ApiModelProperty(value = "审批组") |
||||
|
private List<String> candidateGroups; |
||||
|
@ApiModelProperty(value = "是否是最后环节") |
||||
|
private String endTask; |
||||
|
} |
@ -0,0 +1,43 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundapply.flowable; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class ReturnInboundApplyTaskQuery { |
||||
|
|
||||
|
/** |
||||
|
* 终止、驳回、撤回 |
||||
|
*/ |
||||
|
@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") |
||||
|
private String instanceId; |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundapply.flowable; |
||||
|
|
||||
|
import com.yxt.anrui.riskcenter.api.loanreturninboundapply.LoanReturnInboundApplyDto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class SubmitReturnInbondApplyDto extends LoanReturnInboundApplyDto { |
||||
|
|
||||
|
@ApiModelProperty("流程实例id") |
||||
|
private String instanceId; |
||||
|
@ApiModelProperty("任务id") |
||||
|
private String taskId; |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundtrailer; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class LoanReturnInboundTrailer extends BaseEntity { |
||||
|
private static final long serialVersionUID = -368716582343073366L; |
||||
|
|
||||
|
private String mainSid; |
||||
|
@ApiModelProperty("车辆sid") |
||||
|
private String vinSid; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
private String vehMark; |
||||
|
@ApiModelProperty("挂车类型") |
||||
|
private String trailerType; |
||||
|
@ApiModelProperty("挂车类型key") |
||||
|
private String trailerTypeKey; |
||||
|
@ApiModelProperty("入库价") |
||||
|
private int inboundMoney; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturninboundtrailer; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class LoanReturnInboundTrailerDto { |
||||
|
|
||||
|
@ApiModelProperty("车辆sid") |
||||
|
private String vinSid; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
private String vehMark; |
||||
|
@ApiModelProperty("挂车类型") |
||||
|
private String trailerType; |
||||
|
@ApiModelProperty("挂车类型key") |
||||
|
private String trailerTypeKey; |
||||
|
@ApiModelProperty("入库价") |
||||
|
private int inboundMoney; |
||||
|
@ApiModelProperty("备注") |
||||
|
private String remarks; |
||||
|
} |
@ -0,0 +1,76 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanreturnvehledger; |
||||
|
|
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/17 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class LoanReturnVehLedger extends BaseEntity { |
||||
|
private static final long serialVersionUID = -2097285949752704911L; |
||||
|
@ApiModelProperty("车辆sid") |
||||
|
private String vinSid; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("车牌号") |
||||
|
private String vehMark; |
||||
|
@ApiModelProperty("车辆类型") |
||||
|
private String vehType; |
||||
|
@ApiModelProperty("车辆类型key") |
||||
|
private String vehTypeKey; |
||||
|
@ApiModelProperty("车型") |
||||
|
private String vehModel; |
||||
|
@ApiModelProperty("车型sid") |
||||
|
private String vehModelSid; |
||||
|
@ApiModelProperty("配置sid") |
||||
|
private String configSid; |
||||
|
@ApiModelProperty("配置") |
||||
|
private String configName; |
||||
|
@ApiModelProperty("客户名称") |
||||
|
private String customer; |
||||
|
@ApiModelProperty("客户sid") |
||||
|
private String customerSid; |
||||
|
@ApiModelProperty("贷款人") |
||||
|
private String borrowerName; |
||||
|
@ApiModelProperty("贷款人sid") |
||||
|
private String borrowerSid; |
||||
|
@ApiModelProperty("存放地点") |
||||
|
private String location; |
||||
|
@ApiModelProperty("存放地点sid") |
||||
|
private String locationSid; |
||||
|
@ApiModelProperty("处置方式key") |
||||
|
private String disposalKey; |
||||
|
@ApiModelProperty("处置方式") |
||||
|
private String disposal; |
||||
|
@ApiModelProperty("入库价") |
||||
|
private int inboundMoney; |
||||
|
@ApiModelProperty("入库日期") |
||||
|
private Date inboundDate; |
||||
|
@ApiModelProperty("出库日期") |
||||
|
private Date outboundDate; |
||||
|
@ApiModelProperty("分公司sid") |
||||
|
private String useOrgSid; |
||||
|
@ApiModelProperty("分公司名称") |
||||
|
private String useOrgName; |
||||
|
@ApiModelProperty("组织全路径") |
||||
|
private String orgSidPath; |
||||
|
@ApiModelProperty("逾期金额") |
||||
|
private BigDecimal overMoney; |
||||
|
@ApiModelProperty("未到期金额") |
||||
|
private BigDecimal notBecomeDueMoney; |
||||
|
|
||||
|
private String pSid; |
||||
|
@ApiModelProperty("销售订单sid") |
||||
|
private String saleOrderSid; |
||||
|
@ApiModelProperty("销售订单车辆sid") |
||||
|
private String busVinSid; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loanreturninboundapply; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||
|
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder; |
||||
|
import com.yxt.anrui.riskcenter.api.loanreturninboundapply.LoanReturnInboundApply; |
||||
|
import com.yxt.anrui.riskcenter.api.loanreturninboundapply.LoanReturnInboundApplyDetailsVo; |
||||
|
import com.yxt.anrui.riskcenter.api.loanreturninboundapply.LoanReturnInboundApplyVo; |
||||
|
import com.yxt.anrui.riskcenter.api.loanreturninboundapply.ReturnInboundVo; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface LoanReturnInboundApplyMapper extends BaseMapper<LoanReturnInboundApply> { |
||||
|
IPage<LoanReturnInboundApplyVo> selectPageVo(IPage<LoanReturnInboundApply> page, @Param(Constants.WRAPPER) QueryWrapper<LoanReturnInboundApply> qw); |
||||
|
|
||||
|
int selectBySid(String join); |
||||
|
|
||||
|
int updateFlowFiled(Map<String, Object> beanToMap); |
||||
|
|
||||
|
List<String> selectVehInbound(String useOrgSid); |
||||
|
|
||||
|
LoanReturnInboundApplyDetailsVo selectSidOne(String chooseSid); |
||||
|
|
||||
|
LoanReturnInboundApplyDetailsVo selectDetails(String sid); |
||||
|
|
||||
|
IPage<ReturnInboundVo> getInboundList(IPage<LoanReturnInboundApply> page, @Param(Constants.WRAPPER) QueryWrapper<LoanReturnInboundApply> qw, @Param("list") List<String> busVinSid); |
||||
|
|
||||
|
BusSalesOrder selectOrder(String busVinSid); |
||||
|
} |
@ -0,0 +1,158 @@ |
|||||
|
<?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.riskcenter.biz.loanreturninboundapply.LoanReturnInboundApplyMapper"> |
||||
|
<select id="selectPageVo" resultType="com.yxt.anrui.riskcenter.api.loanreturninboundapply.LoanReturnInboundApplyVo"> |
||||
|
select la.sid, |
||||
|
if(length(la.nodeState) > 0, la.nodeState, '待提交') as nodeState, |
||||
|
la.useOrgName, |
||||
|
la.createDept, |
||||
|
la.createByName, |
||||
|
DATE_FORMAT(la.createTime, '%Y-%m-%d') as createDate, |
||||
|
la.closeDate, |
||||
|
la.loanContractNo, |
||||
|
la.vinNo, |
||||
|
la.vehMark, |
||||
|
la.bankName, |
||||
|
la.bankContractNo, |
||||
|
la.customerName, |
||||
|
la.loanName, |
||||
|
la.inboundMoney, |
||||
|
la.tralier, |
||||
|
la.procInstId, |
||||
|
la.procDefId, |
||||
|
la.createBySid |
||||
|
from loan_return_inbound_apply la |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectBySid" resultType="int"> |
||||
|
select count(*) |
||||
|
from loan_return_inbound_apply |
||||
|
where length(nodeState) > 0 |
||||
|
and find_in_set(sid, #{list}) |
||||
|
</select> |
||||
|
|
||||
|
<update id="updateFlowFiled"> |
||||
|
UPDATE loan_return_inbound_apply |
||||
|
SET nodeState=#{nodeState} |
||||
|
<if test="taskDefKey != null and taskDefKey != ''"> |
||||
|
, taskDefKey=#{taskDefKey} |
||||
|
</if> |
||||
|
<if test="procDefId != null and procDefId != ''"> |
||||
|
, procDefId=#{procDefId} |
||||
|
</if> |
||||
|
<if test="procInsId != null and procInsId != ''"> |
||||
|
, procInstId=#{procInsId} |
||||
|
</if> |
||||
|
<if test="taskId != null and taskId != ''"> |
||||
|
, taskId=#{taskId} |
||||
|
</if> |
||||
|
WHERE sid = #{sid} |
||||
|
</update> |
||||
|
|
||||
|
<select id="getInboundList" resultType="com.yxt.anrui.riskcenter.api.loanreturninboundapply.ReturnInboundVo"> |
||||
|
select la.sid, |
||||
|
la.vinNo, |
||||
|
la.carNum vehMark, |
||||
|
bm.modelName, |
||||
|
la.bankName, |
||||
|
la.custName customerName, |
||||
|
la.borrName loanName |
||||
|
from loan_restore_report_apply la |
||||
|
left join anrui_buscenter.bus_sales_order_vehicle bv on bv.sid = la.saleVehSid |
||||
|
left join anrui_buscenter.bus_sales_order_model bm on bm.salesOrderSid = bv.salesOrderSid |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
<if test="list != null and list.size() != 0"> |
||||
|
and la.saleVehSid not in |
||||
|
<foreach collection="list" item="item" index="index" open="(" separator="," close=")"> |
||||
|
#{item} |
||||
|
</foreach> |
||||
|
</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectVehInbound" resultType="java.lang.String"> |
||||
|
select busVinSid |
||||
|
from loan_return_veh_ledger |
||||
|
where useOrgSid = #{useOrgSid} |
||||
|
and vehType = '主车' |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectSidOne" |
||||
|
resultType="com.yxt.anrui.riskcenter.api.loanreturninboundapply.LoanReturnInboundApplyDetailsVo"> |
||||
|
select la.vinNo, |
||||
|
bv.linkSid vinSid, |
||||
|
la.carNum vehMark, |
||||
|
bm.modelName, |
||||
|
bm.modelSid, |
||||
|
bm.modelConfigSid configSid, |
||||
|
bm.config configName, |
||||
|
la.custName customerName, |
||||
|
bo.customerSid, |
||||
|
bv.borrowerSid, |
||||
|
la.borrName loanName, |
||||
|
la.loanContractNo, |
||||
|
la.bankName, |
||||
|
la.bankContractNo, |
||||
|
la.saleVehSid busVinSid |
||||
|
<!--(la.currentBeMoney + la.unexpiredMoney) as inboundMoney--> |
||||
|
from loan_restore_report_apply la |
||||
|
left join anrui_buscenter.bus_sales_order_vehicle bv on bv.sid = la.saleVehSid |
||||
|
left join anrui_buscenter.bus_sales_order_model bm on bm.salesOrderSid = bv.salesOrderSid |
||||
|
left join anrui_buscenter.bus_sales_order bo on bo.sid = bv.salesOrderSid |
||||
|
|
||||
|
where la.sid = #{chooseSid} |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectDetails" |
||||
|
resultType="com.yxt.anrui.riskcenter.api.loanreturninboundapply.LoanReturnInboundApplyDetailsVo"> |
||||
|
select la.sid, |
||||
|
la.createDept, |
||||
|
la.createDeptSid, |
||||
|
la.createByName, |
||||
|
DATE_FORMAT(la.createTime, '%Y-%m-%d') as createDate, |
||||
|
la.vinNo, |
||||
|
la.vinSid, |
||||
|
la.vehMark, |
||||
|
la.firstDate, |
||||
|
la.modelSid, |
||||
|
la.modelName, |
||||
|
la.configName, |
||||
|
la.configSid, |
||||
|
la.tralier, |
||||
|
la.customerSid, |
||||
|
la.customerName, |
||||
|
la.loanSid, |
||||
|
la.loanName, |
||||
|
la.loanContractNo, |
||||
|
la.bankName, |
||||
|
la.bankContractNo, |
||||
|
la.inboundMoney, |
||||
|
la.locationName, |
||||
|
la.locationSid, |
||||
|
la.parkFees, |
||||
|
la.alRepaidMoney, |
||||
|
la.currentBeMoney, |
||||
|
la.wheFundOccMoney, |
||||
|
la.nper, |
||||
|
la.currentPeriod, |
||||
|
la.unexpiredMoney, |
||||
|
la.alRepaidMoneyConPeriod, |
||||
|
la.beOverdueMoneyAndPeriod, |
||||
|
la.busVinSid, |
||||
|
la.files, |
||||
|
la.remarks |
||||
|
from loan_return_inbound_apply la |
||||
|
where sid = #{sid} |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectOrder" resultType="com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder"> |
||||
|
select bo.* |
||||
|
from anrui_buscenter.bus_sales_order bo |
||||
|
left join anrui_buscenter.bus_sales_order_vehicle bv on bv.salesOrderSid = bo.sid |
||||
|
where bv.sid = #{busVinSid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,101 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loanreturninboundapply; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables; |
||||
|
import com.yxt.anrui.riskcenter.api.loanreturninboundapply.*; |
||||
|
import com.yxt.anrui.riskcenter.api.loanreturninboundapply.flowable.*; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import io.swagger.annotations.Api; |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@RestController |
||||
|
@RequestMapping("v1/LoanReturnInboundApply") |
||||
|
@Api(tags = "交回车辆入库申请") |
||||
|
public class LoanReturnInboundApplyRest implements LoanReturnInboundApplyFeign { |
||||
|
|
||||
|
@Autowired |
||||
|
private LoanReturnInboundApplyService loanReturnInboundApplyService; |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<PagerVo<LoanReturnInboundApplyVo>> listPage(PagerQuery<LoanReturnInboundApplyQuery> pq) { |
||||
|
ResultBean<PagerVo<LoanReturnInboundApplyVo>> rb = ResultBean.fireFail(); |
||||
|
PagerVo<LoanReturnInboundApplyVo> pv = loanReturnInboundApplyService.listPageVo(pq); |
||||
|
return rb.success().setData(pv); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<String> saveOrUpdate(LoanReturnInboundApplyDto dto) { |
||||
|
return loanReturnInboundApplyService.saveOrUpdateReturnInbound(dto); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<LoanReturnInboundApplyDetailsVo> details(LoanReturnInboundApplyDetailsQuery query) { |
||||
|
return loanReturnInboundApplyService.details(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<PagerVo<ReturnInboundVo>> getInboundList(PagerQuery<LoanReturnQuery> pq) { |
||||
|
ResultBean<PagerVo<ReturnInboundVo>> rb = ResultBean.fireFail(); |
||||
|
PagerVo<ReturnInboundVo> pv = loanReturnInboundApplyService.getInboundList(pq); |
||||
|
return rb.success().setData(pv); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean delBySids(String[] sids) { |
||||
|
return loanReturnInboundApplyService.delAllBySids(sids); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean submitApply(SubmitReturnInbondApplyDto dto) { |
||||
|
return loanReturnInboundApplyService.submitApply(dto); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean complete(CompleteReturnInboundDto query) { |
||||
|
BusinessVariables bv = new BusinessVariables(); |
||||
|
BeanUtil.copyProperties(query, bv); |
||||
|
bv.setModelId(""); |
||||
|
return loanReturnInboundApplyService.complete(bv); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<List<ReturnInboundApplyNodeVo>> getPreviousNodesForReject(ReturnInboundApplyNodeQuery query) { |
||||
|
return loanReturnInboundApplyService.getPreviousNodesForReject(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<List<ReturnInboundApplyNodeVo>> getNextNodesForSubmit(ReturnInboundApplyNodeQuery query) { |
||||
|
return loanReturnInboundApplyService.getNextNodesForSubmit(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean taskReject(ReturnInboundApplyTaskQuery query) { |
||||
|
return loanReturnInboundApplyService.taskReject(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean revokeProcess(ReturnInboundApplyTaskQuery query) { |
||||
|
return loanReturnInboundApplyService.revokeProcess(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean breakProcess(ReturnInboundApplyTaskQuery query) { |
||||
|
return loanReturnInboundApplyService.breakProcess(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean delegate(ReturnInboundApplyDelegateQuery query) { |
||||
|
return loanReturnInboundApplyService.delegate(query); |
||||
|
} |
||||
|
} |
@ -0,0 +1,721 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loanreturninboundapply; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import cn.hutool.core.date.DateUtil; |
||||
|
import com.alibaba.fastjson.JSON; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.google.common.util.concurrent.ThreadFactoryBuilder; |
||||
|
import com.yxt.anrui.base.api.basevehmodelconfig.BaseVehmodelConfigFeign; |
||||
|
import com.yxt.anrui.base.api.basevehmodelconfig.BaseVehmodelVo; |
||||
|
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder; |
||||
|
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.flowtask.FlowTaskVo; |
||||
|
import com.yxt.anrui.flowable.api.flowtask.LatestTaskVo; |
||||
|
import com.yxt.anrui.flowable.api.utils.ProcDefEnum; |
||||
|
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables; |
||||
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; |
||||
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; |
||||
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
||||
|
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; |
||||
|
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
||||
|
import com.yxt.anrui.portal.api.sysuser.SysUserVo; |
||||
|
import com.yxt.anrui.riskcenter.api.loanoverduefin.UrlQuery; |
||||
|
import com.yxt.anrui.riskcenter.api.loanrestorereportapply.AlrepaidAndArrVo; |
||||
|
import com.yxt.anrui.riskcenter.api.loanreturninboundapply.*; |
||||
|
import com.yxt.anrui.riskcenter.api.loanreturninboundapply.flowable.*; |
||||
|
import com.yxt.anrui.riskcenter.api.loanreturninboundtrailer.LoanReturnInboundTrailer; |
||||
|
import com.yxt.anrui.riskcenter.api.loanreturninboundtrailer.LoanReturnInboundTrailerDto; |
||||
|
import com.yxt.anrui.riskcenter.biz.loanrestorereportapply.LoanRestoreReportApplyService; |
||||
|
import com.yxt.anrui.riskcenter.biz.loanreturninboundtrailer.LoanReturnInboundTrailerService; |
||||
|
import com.yxt.common.base.config.component.FileUploadComponent; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.base.utils.PagerUtil; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import com.yxt.messagecenter.api.message.MessageFeign; |
||||
|
import com.yxt.messagecenter.api.message.MessageFlowVo; |
||||
|
import com.yxt.messagecenter.api.message.MessageFlowableQuery; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.apache.tomcat.util.threads.ThreadPoolExecutor; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.*; |
||||
|
import java.util.concurrent.*; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class LoanReturnInboundApplyService extends MybatisBaseService<LoanReturnInboundApplyMapper, LoanReturnInboundApply> { |
||||
|
|
||||
|
@Autowired |
||||
|
private SysUserFeign sysUserFeign; |
||||
|
@Autowired |
||||
|
private SysStaffOrgFeign sysStaffOrgFeign; |
||||
|
@Autowired |
||||
|
private SysOrganizationFeign sysOrganizationFeign; |
||||
|
@Autowired |
||||
|
private FileUploadComponent fileUploadComponent; |
||||
|
@Autowired |
||||
|
private LoanReturnInboundTrailerService loanReturnInboundTrailerService; |
||||
|
@Autowired |
||||
|
private FlowFeign flowFeign; |
||||
|
@Autowired |
||||
|
private MessageFeign messageFeign; |
||||
|
@Autowired |
||||
|
private FlowTaskFeign flowTaskFeign; |
||||
|
@Autowired |
||||
|
private FlowableFeign flowableFeign; |
||||
|
@Autowired |
||||
|
private LoanRestoreReportApplyService loanRestoreReportApplyService; |
||||
|
@Autowired |
||||
|
private BaseVehmodelConfigFeign baseVehmodelConfigFeign; |
||||
|
|
||||
|
public PagerVo<LoanReturnInboundApplyVo> listPageVo(PagerQuery<LoanReturnInboundApplyQuery> pq) { |
||||
|
LoanReturnInboundApplyQuery query = pq.getParams(); |
||||
|
QueryWrapper<LoanReturnInboundApply> qw = new QueryWrapper<>(); |
||||
|
if (query != null) { |
||||
|
//分公司
|
||||
|
if (StringUtils.isNotBlank(query.getUseOrgName())) { |
||||
|
qw.like("la.useOrgName", query.getUseOrgName()); |
||||
|
} |
||||
|
//申请人
|
||||
|
if (StringUtils.isNotBlank(query.getCreateByName())) { |
||||
|
qw.like("la.createByName", query.getCreateByName()); |
||||
|
} |
||||
|
//申请部门
|
||||
|
if (StringUtils.isNotBlank(query.getCreateDept())) { |
||||
|
qw.like("la.createDept", query.getCreateDept()); |
||||
|
} |
||||
|
//贷款合同编号
|
||||
|
if (StringUtils.isNotBlank(query.getLoanContractNo())) { |
||||
|
qw.like("la.loanContractNo", query.getLoanContractNo()); |
||||
|
} |
||||
|
//车架号
|
||||
|
if (StringUtils.isNotBlank(query.getVinNo())) { |
||||
|
qw.like("la.vinNo", query.getVinNo()); |
||||
|
} |
||||
|
//车牌号
|
||||
|
if (StringUtils.isNotBlank(query.getVehMark())) { |
||||
|
qw.like("la.vehMark", query.getVehMark()); |
||||
|
} |
||||
|
//贷款人
|
||||
|
if (StringUtils.isNotBlank(query.getLoanName())) { |
||||
|
qw.like("la.loanName", query.getLoanName()); |
||||
|
} |
||||
|
//资方
|
||||
|
if (StringUtils.isNotBlank(query.getBankName())) { |
||||
|
qw.like("la.bankName", query.getBankName()); |
||||
|
} |
||||
|
//资方合同编号
|
||||
|
if (StringUtils.isNotBlank(query.getBankContractNo())) { |
||||
|
qw.like("la.bankContractNo", query.getBankContractNo()); |
||||
|
} |
||||
|
//客户名称
|
||||
|
if (StringUtils.isNotBlank(query.getCustomerName())) { |
||||
|
qw.like("la.customerName", query.getCustomerName()); |
||||
|
} |
||||
|
if (StringUtils.isNotBlank(query.getTralier())) { |
||||
|
qw.like("la.tralier", query.getTralier()); |
||||
|
} |
||||
|
//办结日期
|
||||
|
qw.apply(StringUtils.isNotBlank(query.getCloseDateStart()), "date_format (la.closeDate,'%Y-%m-%d') >= date_format('" + query.getCloseDateStart() + "','%Y-%m-%d')"). |
||||
|
apply(StringUtils.isNotBlank(query.getCloseDateEnd()), "date_format (la.closeDate,'%Y-%m-%d') <= date_format('" + query.getCloseDateEnd() + "','%Y-%m-%d')" |
||||
|
); |
||||
|
//申请日期
|
||||
|
qw.apply(StringUtils.isNotBlank(query.getCreateDateStart()), "date_format (la.createTime,'%Y-%m-%d') >= date_format('" + query.getCreateDateStart() + "','%Y-%m-%d')"). |
||||
|
apply(StringUtils.isNotBlank(query.getCreateDateEnd()), "date_format (la.createTime,'%Y-%m-%d') <= date_format('" + query.getCreateDateEnd() + "','%Y-%m-%d')" |
||||
|
); |
||||
|
//========================================数据授权开始
|
||||
|
if (StringUtils.isNotBlank(query.getMenuUrl())) { |
||||
|
//=======================
|
||||
|
PrivilegeQuery privilegeQuery = new PrivilegeQuery(); |
||||
|
privilegeQuery.setOrgPath(query.getOrgPath()); |
||||
|
privilegeQuery.setMenuUrl(query.getMenuUrl()); |
||||
|
privilegeQuery.setUserSid(query.getUserSid()); |
||||
|
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); |
||||
|
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) { |
||||
|
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
|
||||
|
String orgSidPath = query.getOrgPath(); |
||||
|
orgSidPath = orgSidPath + "/"; |
||||
|
int i1 = orgSidPath.indexOf("/"); |
||||
|
int i2 = orgSidPath.indexOf("/", i1 + 1); |
||||
|
int i3 = orgSidPath.indexOf("/", i2 + 1); |
||||
|
int i4 = orgSidPath.indexOf("/", i3 + 1); |
||||
|
String orgLevelKey = defaultIdReltBean.getData(); |
||||
|
if ("1".equals(orgLevelKey)) { |
||||
|
orgSidPath = orgSidPath.substring(0, i1); |
||||
|
qw.like("la.orgSidPath", orgSidPath); |
||||
|
} else if ("2".equals(orgLevelKey)) { |
||||
|
orgSidPath = orgSidPath.substring(0, i2); |
||||
|
qw.like("la.orgSidPath", orgSidPath); |
||||
|
} else if ("3".equals(orgLevelKey)) { |
||||
|
orgSidPath = orgSidPath.substring(0, i3); |
||||
|
qw.like("la.orgSidPath", orgSidPath); |
||||
|
} else if ("4".equals(orgLevelKey)) { |
||||
|
orgSidPath = orgSidPath.substring(0, i4); |
||||
|
qw.like("la.orgSidPath", orgSidPath); |
||||
|
} else if ("5".equals(orgLevelKey)) { |
||||
|
qw.eq("la.createBySid", query.getUserSid()); |
||||
|
} else { |
||||
|
PagerVo<LoanReturnInboundApplyVo> p = new PagerVo<>(); |
||||
|
return p; |
||||
|
} |
||||
|
} else { |
||||
|
PagerVo<LoanReturnInboundApplyVo> p = new PagerVo<>(); |
||||
|
return p; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
qw.orderByDesc("la.createTime"); |
||||
|
IPage<LoanReturnInboundApply> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<LoanReturnInboundApplyVo> pagging = baseMapper.selectPageVo(page, qw); |
||||
|
List<LoanReturnInboundApplyVo> paggingRecords = pagging.getRecords(); |
||||
|
paggingRecords.removeAll(Collections.singleton(null)); |
||||
|
if (!paggingRecords.isEmpty()) { |
||||
|
for (LoanReturnInboundApplyVo record : pagging.getRecords()) { |
||||
|
if (query.getUserSid().equals(record.getCreateBySid())) { |
||||
|
record.setAllowModify(true); |
||||
|
} else { |
||||
|
record.setAllowModify(false); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
PagerVo<LoanReturnInboundApplyVo> p = PagerUtil.pageToVo(pagging, null); |
||||
|
return p; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public ResultBean taskReject(ReturnInboundApplyTaskQuery query) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
String businessSid = query.getBusinessSid(); |
||||
|
LoanReturnInboundApply loanReturnInboundApply = fetchBySid(businessSid); |
||||
|
if (loanReturnInboundApply == null) { |
||||
|
return rb.setMsg("该申请不存在"); |
||||
|
} |
||||
|
String businessTaskId = loanReturnInboundApply.getTaskId(); |
||||
|
if (StringUtils.isNotBlank(businessTaskId)) { |
||||
|
if (businessTaskId.equals(query.getTaskId())) { |
||||
|
if (StringUtils.isBlank(query.getComment())) { |
||||
|
return rb.setMsg("请填写意见"); |
||||
|
} |
||||
|
if (StringUtils.isBlank(query.getUserSid())) { |
||||
|
return rb.setMsg("参数错误:userSid"); |
||||
|
} |
||||
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
||||
|
BeanUtil.copyProperties(query, flowTaskVo); |
||||
|
Map<String, Object> variables = new HashMap<>(); |
||||
|
Map<String, Object> appMap = new HashMap<>(); |
||||
|
appMap.put("sid", businessSid); |
||||
|
variables.put("app", appMap); |
||||
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
UpdateFlowFieldVo ufVo = resultBean.getData(); |
||||
|
Map<String, Object> map = BeanUtil.beanToMap(ufVo); |
||||
|
//更新业务中的流程相关的参数
|
||||
|
updateFlowFiled(map); |
||||
|
//极光推送
|
||||
|
loanReturnInboundApply = fetchBySid(businessSid); |
||||
|
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); |
||||
|
MessageFlowVo messageFlowVo = new MessageFlowVo(); |
||||
|
BeanUtil.copyProperties(ufVo, messageFlowVo); |
||||
|
String procId = loanReturnInboundApply.getProcInstId(); |
||||
|
messageFlowVo.setProcInsId(procId); |
||||
|
messageFlowVo.setProcDefId(loanReturnInboundApply.getProcDefId()); |
||||
|
messageFlowableQuery.setUfVo(messageFlowVo); |
||||
|
messageFlowableQuery.setAppMap(appMap); |
||||
|
messageFlowableQuery.setBusinessSid(businessSid); |
||||
|
messageFlowableQuery.setModuleName("交回车辆入库申请"); |
||||
|
ResultBean<List<LatestTaskVo>> listResultBean = flowTaskFeign.getLatestTasks(procId); |
||||
|
String nextName = listResultBean.getData().get(0).getName_(); |
||||
|
String nextNodeUserSids = listResultBean.getData().get(0).getASSIGNEE_(); |
||||
|
if ("发起申请".equals(nextName)) { |
||||
|
messageFlowableQuery.setMsgContent("您提交的" + messageFlowableQuery.getModuleName() + "已被驳回,请重新提交"); |
||||
|
} else { |
||||
|
messageFlowableQuery.setMsgContent(loanReturnInboundApply.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); |
||||
|
} |
||||
|
|
||||
|
messageFlowableQuery.setMsgTitle("交回车辆入库申请"); |
||||
|
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
} |
||||
|
return rb.setMsg("操作失败!提交的数据不一致!"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public ResultBean<String> saveOrUpdateReturnInbound(LoanReturnInboundApplyDto dto) { |
||||
|
ResultBean<String> rb = ResultBean.fireFail(); |
||||
|
String sid = dto.getSid(); |
||||
|
String orgPath = dto.getOrgPath(); |
||||
|
if (StringUtils.isBlank(sid)) { |
||||
|
LoanReturnInboundApply loanReturnInboundApply = new LoanReturnInboundApply(); |
||||
|
BeanUtil.copyProperties(dto, loanReturnInboundApply, "sid"); |
||||
|
loanReturnInboundApply.setCreateBySid(dto.getUserSid()); |
||||
|
loanReturnInboundApply.setOrgSidPath(dto.getOrgPath()); |
||||
|
String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgPath()).getData(); |
||||
|
loanReturnInboundApply.setUseOrgSid(useOrgSid); |
||||
|
//创建组织使用组织
|
||||
|
ResultBean<SysOrganizationVo> organizationResultBean = sysOrganizationFeign.fetchBySid(useOrgSid); |
||||
|
if (organizationResultBean.getData() != null) { |
||||
|
loanReturnInboundApply.setUseOrgName(organizationResultBean.getData().getName()); |
||||
|
} |
||||
|
//申请部门
|
||||
|
List<String> orgList = Arrays.asList(orgPath.split("/")); |
||||
|
String deptSid = orgList.get(orgList.size() - 1); |
||||
|
ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(deptSid); |
||||
|
if (sysOrganizationVoResultBean.getData() != null) { |
||||
|
loanReturnInboundApply.setCreateDept(sysOrganizationVoResultBean.getData().getName()); |
||||
|
loanReturnInboundApply.setCreateDeptSid(deptSid); |
||||
|
} |
||||
|
//根据用户sid查询人员姓名
|
||||
|
ResultBean<SysUserVo> userVoResultBean = sysUserFeign.fetchBySid(dto.getUserSid()); |
||||
|
if (!userVoResultBean.getSuccess()) { |
||||
|
return rb.setMsg(userVoResultBean.getMsg()); |
||||
|
} |
||||
|
loanReturnInboundApply.setCreateByName(userVoResultBean.getData().getName()); |
||||
|
List<UrlQuery> filss = dto.getFilesList(); |
||||
|
List<String> filesList = filss.stream().map(v -> v.getUrl()).collect(Collectors.toList()); |
||||
|
if (!filesList.isEmpty()) { |
||||
|
String files = String.join(",", filesList).replaceAll(fileUploadComponent.getUrlPrefix(), ""); |
||||
|
loanReturnInboundApply.setFiles(files); |
||||
|
} |
||||
|
if ("是".equals(dto.getTralier())) { |
||||
|
loanReturnInboundTrailerService.saveOrInsert(dto.getLoanReturnInboundTrailer(), loanReturnInboundApply.getSid()); |
||||
|
} |
||||
|
baseMapper.insert(loanReturnInboundApply); |
||||
|
sid = loanReturnInboundApply.getSid(); |
||||
|
} else { |
||||
|
LoanReturnInboundApply loanReturnInboundApply = fetchBySid(sid); |
||||
|
if (loanReturnInboundApply == null) { |
||||
|
return rb.setMsg("该申请不存在"); |
||||
|
} |
||||
|
BeanUtil.copyProperties(dto, loanReturnInboundApply, "sid"); |
||||
|
List<UrlQuery> filss = dto.getFilesList(); |
||||
|
if (!filss.isEmpty()) { |
||||
|
List<String> filesList = filss.stream().map(v -> v.getUrl()).collect(Collectors.toList()); |
||||
|
if (!filesList.isEmpty()) { |
||||
|
String files = String.join(",", filesList).replaceAll(fileUploadComponent.getUrlPrefix(), ""); |
||||
|
loanReturnInboundApply.setFiles(files); |
||||
|
} |
||||
|
} else { |
||||
|
loanReturnInboundApply.setFiles(""); |
||||
|
} |
||||
|
if ("是".equals(dto.getTralier())) { |
||||
|
loanReturnInboundTrailerService.saveOrInsert(dto.getLoanReturnInboundTrailer(), loanReturnInboundApply.getSid()); |
||||
|
} else { |
||||
|
loanReturnInboundTrailerService.deleteByMainSid(sid); |
||||
|
} |
||||
|
baseMapper.updateById(loanReturnInboundApply); |
||||
|
} |
||||
|
return rb.success().setData(sid); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<LoanReturnInboundApplyDetailsVo> details(LoanReturnInboundApplyDetailsQuery query) { |
||||
|
ResultBean<LoanReturnInboundApplyDetailsVo> rb = ResultBean.fireFail(); |
||||
|
LoanReturnInboundApplyDetailsVo loanReturnInboundApplyDetailsVo = new LoanReturnInboundApplyDetailsVo(); |
||||
|
String sid = query.getSid(); |
||||
|
String userSid = query.getUserSid(); |
||||
|
String orgPath = query.getOrgPath(); |
||||
|
String chooseSid = query.getChooseSid(); |
||||
|
if (StringUtils.isBlank(sid)) {//新增初始化
|
||||
|
//根据用户查询发起人、发起部门、发起日期为当前日期
|
||||
|
String deptName = ""; |
||||
|
String deptSid = ""; |
||||
|
String useOrgSid = ""; |
||||
|
if (StringUtils.isNotBlank(orgPath)) { |
||||
|
List<String> split = Arrays.asList(orgPath.split("/")); |
||||
|
if (split.size() > 1) { |
||||
|
//获取本级sid获取本级部门信息
|
||||
|
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(split.get(split.size() - 2)).getData(); |
||||
|
SysOrganizationVo sysOrganization1 = sysOrganizationFeign.fetchBySid(split.get(split.size() - 1)).getData(); |
||||
|
deptName = sysOrganization.getName() + "/" + sysOrganization1.getName(); |
||||
|
deptName = sysOrganization1.getName(); |
||||
|
deptSid = sysOrganization1.getSid(); |
||||
|
} else { |
||||
|
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(split.get(0)).getData(); |
||||
|
deptName = sysOrganization.getName(); |
||||
|
deptName = sysOrganization.getName(); |
||||
|
deptSid = sysOrganization.getSid(); |
||||
|
} |
||||
|
useOrgSid = sysStaffOrgFeign.getOrgSidByPath(orgPath).getData(); |
||||
|
} |
||||
|
//根据用户sid查询人员姓名
|
||||
|
ResultBean<SysUserVo> userVoResultBean = sysUserFeign.fetchBySid(userSid); |
||||
|
if (!userVoResultBean.getSuccess()) { |
||||
|
return rb.setMsg(userVoResultBean.getMsg()); |
||||
|
} |
||||
|
//根据交回车辆事前报备申请sid查询数据
|
||||
|
loanReturnInboundApplyDetailsVo = baseMapper.selectSidOne(chooseSid); |
||||
|
AlrepaidAndArrVo alrepaidAndArrVo = loanRestoreReportApplyService.getAlrepaidAndArr(loanReturnInboundApplyDetailsVo.getBusVinSid()); |
||||
|
if (alrepaidAndArrVo != null) { |
||||
|
BeanUtil.copyProperties(alrepaidAndArrVo, loanReturnInboundApplyDetailsVo); |
||||
|
} |
||||
|
loanReturnInboundApplyDetailsVo.setCreateDept(deptName); |
||||
|
loanReturnInboundApplyDetailsVo.setCreateDeptSid(deptSid); |
||||
|
loanReturnInboundApplyDetailsVo.setCreateByName(userVoResultBean.getData().getName()); |
||||
|
loanReturnInboundApplyDetailsVo.setCreateDate(DateUtil.today()); |
||||
|
loanReturnInboundApplyDetailsVo.setOrgPath(query.getOrgPath()); |
||||
|
loanReturnInboundApplyDetailsVo.setUserSid(query.getUserSid()); |
||||
|
loanReturnInboundApplyDetailsVo.setUseOrgSid(useOrgSid); |
||||
|
ResultBean<BaseVehmodelVo> baseVehmodelVoResultBean = baseVehmodelConfigFeign.selectOne(loanReturnInboundApplyDetailsVo.getModelSid(), loanReturnInboundApplyDetailsVo.getConfigSid(), loanReturnInboundApplyDetailsVo.getUseOrgSid()); |
||||
|
if (baseVehmodelVoResultBean.getSuccess()) { |
||||
|
BaseVehmodelVo baseVehmodelVo = baseVehmodelVoResultBean.getData(); |
||||
|
if (baseVehmodelVo != null) { |
||||
|
loanReturnInboundApplyDetailsVo.setModelConfigSid(baseVehmodelVo.getModelConfigSid()); |
||||
|
BusSalesOrder busSalesOrder = baseMapper.selectOrder(loanReturnInboundApplyDetailsVo.getBusVinSid()); |
||||
|
if (busSalesOrder != null) { |
||||
|
loanReturnInboundApplyDetailsVo.setGuildPrice("2".equals(busSalesOrder.getPayTypeKey()) ? baseVehmodelVo.getManufactorSettlementPrice() : baseVehmodelVo.getGuidedPrice()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} else {//编辑初始化
|
||||
|
LoanReturnInboundApply loanReturnInboundApply = fetchBySid(sid); |
||||
|
if (loanReturnInboundApply == null) { |
||||
|
return rb.setMsg("该申请不存在"); |
||||
|
} |
||||
|
loanReturnInboundApplyDetailsVo = baseMapper.selectDetails(sid); |
||||
|
String files = loanReturnInboundApplyDetailsVo.getFiles(); |
||||
|
List<UrlQuery> list = new ArrayList<>(); |
||||
|
if (StringUtils.isNotBlank(files)) { |
||||
|
List<String> fileList = Arrays.asList(files.split(",")).stream().map(c -> fileUploadComponent.getUrlPrefix() + c).collect(Collectors.toList()); |
||||
|
for (int i = 0; i < fileList.size(); i++) { |
||||
|
UrlQuery urlQuery = new UrlQuery(); |
||||
|
urlQuery.setUrl(fileList.get(i)); |
||||
|
list.add(urlQuery); |
||||
|
} |
||||
|
loanReturnInboundApplyDetailsVo.setFilesList(list); |
||||
|
} |
||||
|
if ("是".equals(loanReturnInboundApplyDetailsVo.getTralier())) { |
||||
|
LoanReturnInboundTrailerDto loanReturnInboundTrailerDto = new LoanReturnInboundTrailerDto(); |
||||
|
LoanReturnInboundTrailer loanReturnInboundTrailer = loanReturnInboundTrailerService.selectByMainSid(sid); |
||||
|
if (loanReturnInboundTrailer != null) { |
||||
|
BeanUtil.copyProperties(loanReturnInboundTrailer, loanReturnInboundTrailerDto); |
||||
|
} |
||||
|
loanReturnInboundApplyDetailsVo.setLoanReturnInboundTrailer(loanReturnInboundTrailerDto); |
||||
|
} |
||||
|
loanReturnInboundApplyDetailsVo.setOrgPath(loanReturnInboundApply.getOrgSidPath()); |
||||
|
loanReturnInboundApplyDetailsVo.setUserSid(loanReturnInboundApply.getCreateBySid()); |
||||
|
ResultBean<BaseVehmodelVo> baseVehmodelVoResultBean = baseVehmodelConfigFeign.selectOne(loanReturnInboundApplyDetailsVo.getModelSid(), loanReturnInboundApplyDetailsVo.getConfigSid(), loanReturnInboundApplyDetailsVo.getUseOrgSid()); |
||||
|
if (baseVehmodelVoResultBean.getSuccess()) { |
||||
|
BaseVehmodelVo baseVehmodelVo = baseVehmodelVoResultBean.getData(); |
||||
|
if (baseVehmodelVo != null) { |
||||
|
loanReturnInboundApplyDetailsVo.setModelConfigSid(baseVehmodelVo.getModelConfigSid()); |
||||
|
BusSalesOrder busSalesOrder = baseMapper.selectOrder(loanReturnInboundApplyDetailsVo.getBusVinSid()); |
||||
|
if (busSalesOrder != null) { |
||||
|
loanReturnInboundApplyDetailsVo.setGuildPrice("2".equals(busSalesOrder.getPayTypeKey()) ? baseVehmodelVo.getManufactorSettlementPrice() : baseVehmodelVo.getGuidedPrice()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
loanReturnInboundApplyDetailsVo.setSid(sid); |
||||
|
loanReturnInboundApplyDetailsVo.setProcInstId(loanReturnInboundApply.getProcInstId()); |
||||
|
loanReturnInboundApplyDetailsVo.setTaskId(loanReturnInboundApply.getTaskId()); |
||||
|
|
||||
|
} |
||||
|
return rb.success().setData(loanReturnInboundApplyDetailsVo); |
||||
|
} |
||||
|
|
||||
|
public ResultBean delAllBySids(String[] sids) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
//查询该sid中是否有流程不是待提交的
|
||||
|
int count = baseMapper.selectBySid(StringUtils.join(sids, ",")); |
||||
|
if (count > 0) { |
||||
|
return rb.setMsg("删除的数据中包含已经提交审批的数据,删除失败"); |
||||
|
} |
||||
|
List<String> sidss = Arrays.asList(sids); |
||||
|
for (int i = 0; i < sidss.size(); i++) { |
||||
|
loanReturnInboundTrailerService.deleteByMainSid(sidss.get(i)); |
||||
|
} |
||||
|
delBySids(sids); |
||||
|
return rb.success().setMsg("删除成功"); |
||||
|
} |
||||
|
|
||||
|
public ResultBean submitApply(SubmitReturnInbondApplyDto dto) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
LoanReturnInboundApply loanReturnInboundApply = fetchBySid(dto.getSid()); |
||||
|
int r = submitBusinessData(dto, loanReturnInboundApply); |
||||
|
if (r == 3) { |
||||
|
return rb.setMsg("该申请不存在"); |
||||
|
} |
||||
|
if (r == 0) { |
||||
|
return rb.setMsg("操作失败!提交的数据不一致"); |
||||
|
} |
||||
|
//根据busVinSid查询车辆是否已入库
|
||||
|
|
||||
|
ResultBean<String> resultBean = saveOrUpdateReturnInbound(dto); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
String businessSid = resultBean.getData(); |
||||
|
loanReturnInboundApply = fetchBySid(businessSid); |
||||
|
//创建BusinessVariables实体对象
|
||||
|
BusinessVariables bv = new BusinessVariables(); |
||||
|
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
|
||||
|
Map<String, Object> variables = new HashMap<>(); |
||||
|
Map<String, Object> appMap = new HashMap<>(); |
||||
|
appMap.put("sid", businessSid); |
||||
|
variables.put("app", appMap); |
||||
|
//用户的部门全路径sid
|
||||
|
bv.setOrgSidPath(loanReturnInboundApply.getOrgSidPath()); |
||||
|
bv.setBusinessSid(businessSid); |
||||
|
bv.setUserSid(dto.getUserSid()); |
||||
|
bv.setFormVariables(variables); |
||||
|
if (r == 1) { |
||||
|
//ToDo:流程定义id
|
||||
|
bv.setModelId(ProcDefEnum.LOANRETUENINBOUNDAPPLY.getProDefId()); |
||||
|
ResultBean<UpdateFlowFieldVo> voResultBean = flowFeign.startProcess(bv); |
||||
|
if (!voResultBean.getSuccess()) { |
||||
|
return rb.setMsg(voResultBean.getMsg()); |
||||
|
} |
||||
|
UpdateFlowFieldVo ufVo = voResultBean.getData(); |
||||
|
updateFlowFiled(BeanUtil.beanToMap(ufVo)); |
||||
|
loanReturnInboundApply = fetchBySid(businessSid); |
||||
|
//==================================添加线程
|
||||
|
try { |
||||
|
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() |
||||
|
.setNameFormat("demo-pool-%d").build(); |
||||
|
ExecutorService pool = new ThreadPoolExecutor(2, 100, |
||||
|
0L, TimeUnit.MILLISECONDS, |
||||
|
new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); |
||||
|
LoanReturnInboundApply finalLoanReturnInboundApply = loanReturnInboundApply; |
||||
|
Future future1 = pool.submit(() -> { |
||||
|
//极光推送
|
||||
|
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); |
||||
|
MessageFlowVo messageFlowVo = new MessageFlowVo(); |
||||
|
BeanUtil.copyProperties(ufVo, messageFlowVo); |
||||
|
messageFlowableQuery.setUfVo(messageFlowVo); |
||||
|
messageFlowableQuery.setAppMap(appMap); |
||||
|
messageFlowableQuery.setBusinessSid(businessSid); |
||||
|
messageFlowableQuery.setModuleName("交回车辆入库申请"); |
||||
|
messageFlowableQuery.setMsgContent(finalLoanReturnInboundApply.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); |
||||
|
messageFlowableQuery.setMsgTitle("交回车辆入库申请"); |
||||
|
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery); |
||||
|
}); |
||||
|
} catch (Exception e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
//==================================添加线程
|
||||
|
return voResultBean; |
||||
|
} |
||||
|
if (r == 2) { |
||||
|
// ToDo:驳回到发起人后再次提交
|
||||
|
if (StringUtils.isBlank(dto.getInstanceId())) { |
||||
|
return rb.setMsg("参数错误:instanceId"); |
||||
|
} |
||||
|
bv.setTaskId(loanReturnInboundApply.getTaskId()); |
||||
|
bv.setTaskDefKey(loanReturnInboundApply.getTaskDefKey()); |
||||
|
bv.setComment("重新提交"); |
||||
|
bv.setInstanceId(dto.getInstanceId()); |
||||
|
return complete(bv); |
||||
|
} |
||||
|
return rb; |
||||
|
} |
||||
|
|
||||
|
public ResultBean complete(BusinessVariables bv) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
String businessSid = bv.getBusinessSid(); |
||||
|
LoanReturnInboundApply loanReturnInboundApply = fetchBySid(businessSid); |
||||
|
Map<String, Object> variables = new HashMap<>(); |
||||
|
Map<String, Object> appMap = new HashMap<>(); |
||||
|
appMap.put("sid", businessSid); |
||||
|
variables.put("app", appMap); |
||||
|
bv.setFormVariables(variables); |
||||
|
bv.setOrgSidPath(loanReturnInboundApply.getOrgSidPath()); |
||||
|
bv.setModelId(loanReturnInboundApply.getProcDefId()); |
||||
|
if (bv.getTaskId().equals(loanReturnInboundApply.getTaskId())) { |
||||
|
ResultBean<UpdateFlowFieldVo> resultBean = flowFeign.handleProsess(bv); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
UpdateFlowFieldVo ufVo = resultBean.getData(); |
||||
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
||||
|
if ("Event_end".equals(resultBean.getData().getTaskDefKey())) { |
||||
|
loanReturnInboundApply = fetchBySid(businessSid); |
||||
|
loanReturnInboundApply.setCloseDate(DateUtil.today()); |
||||
|
baseMapper.updateById(loanReturnInboundApply); |
||||
|
//
|
||||
|
} else { |
||||
|
//极光推送
|
||||
|
loanReturnInboundApply = fetchBySid(businessSid); |
||||
|
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); |
||||
|
MessageFlowVo messageFlowVo = new MessageFlowVo(); |
||||
|
BeanUtil.copyProperties(ufVo, messageFlowVo); |
||||
|
messageFlowVo.setProcDefId(loanReturnInboundApply.getProcDefId()); |
||||
|
messageFlowVo.setProcInsId(loanReturnInboundApply.getProcInstId()); |
||||
|
messageFlowableQuery.setUfVo(messageFlowVo); |
||||
|
messageFlowableQuery.setAppMap(appMap); |
||||
|
messageFlowableQuery.setBusinessSid(businessSid); |
||||
|
messageFlowableQuery.setModuleName("交回车辆入库申请"); |
||||
|
messageFlowableQuery.setMsgContent(loanReturnInboundApply.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); |
||||
|
messageFlowableQuery.setMsgTitle("交回车辆入库申请"); |
||||
|
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery); |
||||
|
} |
||||
|
return rb.success().setData(resultBean.getData()); |
||||
|
} else { |
||||
|
return rb.setMsg("操作失败!提交的数据不一致"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private int submitBusinessData(SubmitReturnInbondApplyDto dto, LoanReturnInboundApply loanReturnInboundApply) { |
||||
|
int r = 0; |
||||
|
if (StringUtils.isBlank(dto.getSid())) { |
||||
|
r = 1; |
||||
|
} else { |
||||
|
if (loanReturnInboundApply != null) { |
||||
|
String businessTaskId = loanReturnInboundApply.getTaskId(); |
||||
|
if (StringUtils.isBlank(businessTaskId) && StringUtils.isBlank(dto.getTaskId())) { |
||||
|
//新提交
|
||||
|
r = 1; |
||||
|
} else if (StringUtils.isNotBlank(businessTaskId) && businessTaskId.equals(dto.getTaskId())) { |
||||
|
//二次提交//只有数据一致的时候才能进行下一步
|
||||
|
r = 2; |
||||
|
} |
||||
|
} else { |
||||
|
r = 3; |
||||
|
} |
||||
|
} |
||||
|
return r; |
||||
|
} |
||||
|
|
||||
|
private int updateFlowFiled(Map<String, Object> beanToMap) { |
||||
|
return baseMapper.updateFlowFiled(beanToMap); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<List<ReturnInboundApplyNodeVo>> getPreviousNodesForReject(ReturnInboundApplyNodeQuery query) { |
||||
|
ResultBean<List<ReturnInboundApplyNodeVo>> rb = ResultBean.fireFail(); |
||||
|
BusinessVariables bv = new BusinessVariables(); |
||||
|
BeanUtil.copyProperties(query, bv); |
||||
|
LoanReturnInboundApply loanReturnInboundApply = fetchBySid(query.getBusinessSid()); |
||||
|
bv.setModelId(loanReturnInboundApply.getProcDefId()); |
||||
|
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv); |
||||
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给TemplateApplyNodeVo
|
||||
|
List<ReturnInboundApplyNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), ReturnInboundApplyNodeVo.class)).collect(Collectors.toList()); |
||||
|
return rb.success().setData(voList); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<List<ReturnInboundApplyNodeVo>> getNextNodesForSubmit(ReturnInboundApplyNodeQuery query) { |
||||
|
ResultBean<List<ReturnInboundApplyNodeVo>> rb = ResultBean.fireFail(); |
||||
|
BusinessVariables bv = new BusinessVariables(); |
||||
|
BeanUtil.copyProperties(query, bv); |
||||
|
LoanReturnInboundApply loanReturnInboundApply = fetchBySid(query.getBusinessSid()); |
||||
|
bv.setModelId(loanReturnInboundApply.getProcDefId()); |
||||
|
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv); |
||||
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给TemplateApplyNodeVo
|
||||
|
List<ReturnInboundApplyNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), ReturnInboundApplyNodeVo.class)).collect(Collectors.toList()); |
||||
|
return rb.success().setData(voList); |
||||
|
} |
||||
|
|
||||
|
public ResultBean revokeProcess(ReturnInboundApplyTaskQuery query) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
if (StringUtils.isBlank(query.getUserSid())) { |
||||
|
return rb.setMsg("参数错误:userSid"); |
||||
|
} |
||||
|
LoanReturnInboundApply loanReturnInboundApply = fetchBySid(query.getBusinessSid()); |
||||
|
String businessTaskId = loanReturnInboundApply.getTaskId(); |
||||
|
if (StringUtils.isNotBlank(businessTaskId)) { |
||||
|
if (businessTaskId.equals(query.getTaskId())) { |
||||
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
||||
|
BeanUtil.copyProperties(query, flowTaskVo); |
||||
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.revokeProcess(flowTaskVo); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
||||
|
return rb.success().setData(resultBean.getData()); |
||||
|
} |
||||
|
} |
||||
|
return rb.setMsg("操作失败,提交的数据不一致!"); |
||||
|
} |
||||
|
|
||||
|
public ResultBean breakProcess(ReturnInboundApplyTaskQuery query) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
if (StringUtils.isBlank(query.getInstanceId())) { |
||||
|
return rb.setMsg("参数错误:instanceId"); |
||||
|
} |
||||
|
if (StringUtils.isBlank(query.getUserSid())) { |
||||
|
return rb.setMsg("参数错误:userSid"); |
||||
|
} |
||||
|
if (StringUtils.isBlank(query.getComment())) { |
||||
|
return rb.setMsg("请填写意见"); |
||||
|
} |
||||
|
LoanReturnInboundApply loanReturnInboundApply = fetchBySid(query.getBusinessSid()); |
||||
|
String businessTaskId = loanReturnInboundApply.getTaskId(); |
||||
|
if (StringUtils.isNotBlank(businessTaskId)) { |
||||
|
if (query.getUserSid().equals(loanReturnInboundApply.getCreateBySid())) { |
||||
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
||||
|
BeanUtil.copyProperties(query, flowTaskVo); |
||||
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData()); |
||||
|
updateFlowFiled(map); |
||||
|
return rb.success().setData(resultBean.getData()); |
||||
|
} else { |
||||
|
if (businessTaskId.equals(query.getTaskId())) { |
||||
|
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
||||
|
BeanUtil.copyProperties(query, flowTaskVo); |
||||
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo); |
||||
|
if (!resultBean.getSuccess()) { |
||||
|
return rb.setMsg(resultBean.getMsg()); |
||||
|
} |
||||
|
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData()); |
||||
|
updateFlowFiled(map); |
||||
|
return rb.success().setData(resultBean.getData()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
return rb.setMsg("操作失败!提交的数据不一致!"); |
||||
|
} |
||||
|
|
||||
|
public ResultBean delegate(ReturnInboundApplyDelegateQuery query) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
FlowDelegateQuery delegateQuery = new FlowDelegateQuery(); |
||||
|
BeanUtil.copyProperties(query, delegateQuery); |
||||
|
flowFeign.delegate(delegateQuery); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
public PagerVo<ReturnInboundVo> getInboundList(PagerQuery<LoanReturnQuery> pq) { |
||||
|
LoanReturnQuery query = pq.getParams(); |
||||
|
QueryWrapper<LoanReturnInboundApply> qw = new QueryWrapper<>(); |
||||
|
List<String> busVinSid = new ArrayList<>(); |
||||
|
if (query != null) { |
||||
|
if (StringUtils.isNotBlank(query.getOrgPath())) { |
||||
|
String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(query.getOrgPath()).getData(); |
||||
|
qw.eq("la.useOrgSid", useOrgSid); |
||||
|
busVinSid = baseMapper.selectVehInbound(useOrgSid); |
||||
|
busVinSid.removeAll(Collections.singleton(null)); |
||||
|
} |
||||
|
qw.eq("la.nodeState", "已办结"); |
||||
|
|
||||
|
} |
||||
|
IPage<LoanReturnInboundApply> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<ReturnInboundVo> pagging = baseMapper.getInboundList(page, qw, busVinSid); |
||||
|
PagerVo<ReturnInboundVo> p = PagerUtil.pageToVo(pagging, null); |
||||
|
return p; |
||||
|
} |
||||
|
|
||||
|
/* public ResultBean<List<ReturnInboundVo>> getInboundList(String useOrgSid) { |
||||
|
ResultBean<List<ReturnInboundVo>> rb = ResultBean.fireFail(); |
||||
|
List<String> busVinSid = baseMapper.selectVehInbound(useOrgSid); |
||||
|
busVinSid.removeAll(Collections.singleton(null)); |
||||
|
List<ReturnInboundVo> list = baseMapper.getInboundList(useOrgSid, busVinSid); |
||||
|
list.removeAll(Collections.singleton(null)); |
||||
|
return rb.success().setData(list); |
||||
|
}*/ |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loanreturninboundtrailer; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.yxt.anrui.riskcenter.api.loanreturninboundtrailer.LoanReturnInboundTrailer; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface LoanReturnInboundTrailerMapper extends BaseMapper<LoanReturnInboundTrailer> { |
||||
|
int deleteByMainSid(String sid); |
||||
|
|
||||
|
LoanReturnInboundTrailer selectByMainSid(String sid); |
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
<?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.riskcenter.biz.loanreturninboundtrailer.LoanReturnInboundTrailerMapper"> |
||||
|
<delete id="deleteByMainSid"> |
||||
|
delete |
||||
|
from loan_return_inbound_trailer |
||||
|
where mainSid = #{sid} |
||||
|
</delete> |
||||
|
|
||||
|
<select id="selectByMainSid" |
||||
|
resultType="com.yxt.anrui.riskcenter.api.loanreturninboundtrailer.LoanReturnInboundTrailer"> |
||||
|
select * |
||||
|
from loan_return_inbound_trailer |
||||
|
where mainSid = #{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,31 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loanreturninboundtrailer; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.anrui.riskcenter.api.loanreturninboundtrailer.LoanReturnInboundTrailer; |
||||
|
import com.yxt.anrui.riskcenter.api.loanreturninboundtrailer.LoanReturnInboundTrailerDto; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/16 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class LoanReturnInboundTrailerService extends MybatisBaseService<LoanReturnInboundTrailerMapper, LoanReturnInboundTrailer> { |
||||
|
public void saveOrInsert(LoanReturnInboundTrailerDto dto, String sid) { |
||||
|
baseMapper.deleteByMainSid(sid); |
||||
|
LoanReturnInboundTrailer loanReturnInboundTrailer = new LoanReturnInboundTrailer(); |
||||
|
BeanUtil.copyProperties(dto, loanReturnInboundTrailer, "sid"); |
||||
|
loanReturnInboundTrailer.setMainSid(sid); |
||||
|
baseMapper.insert(loanReturnInboundTrailer); |
||||
|
} |
||||
|
|
||||
|
public void deleteByMainSid(String sid) { |
||||
|
baseMapper.deleteByMainSid(sid); |
||||
|
} |
||||
|
|
||||
|
public LoanReturnInboundTrailer selectByMainSid(String sid) { |
||||
|
return baseMapper.selectByMainSid(sid); |
||||
|
} |
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.yxt.anrui.terminal.api.risk.overduebank.flowable; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/17 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class BankDelegateQuery { |
||||
|
|
||||
|
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,25 @@ |
|||||
|
package com.yxt.anrui.terminal.api.risk.overduefin.flowable; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2024/1/17 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class FinDelegateQuery { |
||||
|
|
||||
|
private String userSid; |
||||
|
@ApiModelProperty("流程实例id") |
||||
|
@JsonProperty("procInsId") |
||||
|
private String instanceId; |
||||
|
@ApiModelProperty("任务Id") |
||||
|
private String taskId; |
||||
|
@ApiModelProperty("审批人sid") |
||||
|
private String assignee; |
||||
|
@ApiModelProperty("填写意见") |
||||
|
private String views; |
||||
|
} |
Loading…
Reference in new issue