
51 changed files with 2468 additions and 6 deletions
@ -0,0 +1,80 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@ApiModel(value = "交回车辆出库申请", description = "交回车辆出库申请") |
||||
|
@TableName("loan_out_bound_apply") |
||||
|
@Data |
||||
|
public class LoanOutboundApply extends BaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty("申请人Sid") |
||||
|
private String applyUserSid; // 申请人
|
||||
|
@ApiModelProperty("申请人") |
||||
|
private String applyName; // 申请人
|
||||
|
@ApiModelProperty("申请日期") |
||||
|
private Date applyDate; // 申请日期
|
||||
|
@ApiModelProperty("申请部门") |
||||
|
private String dept; |
||||
|
@ApiModelProperty("申请部门sid") |
||||
|
private String deptSid; |
||||
|
@ApiModelProperty("流程定义的id") |
||||
|
private String procDefId; // 流程定义的id
|
||||
|
@ApiModelProperty("环节定义的sid") |
||||
|
private String nodeSid; // 环节定义的sid
|
||||
|
@ApiModelProperty("流程实例的sid") |
||||
|
private String procInstId; // 流程实例的sid
|
||||
|
@ApiModelProperty("流程状态") |
||||
|
private String nodeState; // 流程状态
|
||||
|
@ApiModelProperty("taskId") |
||||
|
private String taskId; // taskId
|
||||
|
@ApiModelProperty("使用组织sid") |
||||
|
private String useOrgSid; // 使用组织sid
|
||||
|
@ApiModelProperty("使用组织名称") |
||||
|
private String useOrgName; // 使用组织名称
|
||||
|
@ApiModelProperty("申请人组织路径") |
||||
|
private String orgSidPath; // 申请人组织路径
|
||||
|
@ApiModelProperty("办结日期") |
||||
|
private Date closingDate; |
||||
|
@ApiModelProperty("消贷合同号") |
||||
|
private String loanContractNo; |
||||
|
@ApiModelProperty("资方") |
||||
|
private String bankName; |
||||
|
@ApiModelProperty("资方合同号") |
||||
|
private String bankContractNo; |
||||
|
private String customerSid; |
||||
|
private String borrowerSid; |
||||
|
@ApiModelProperty("客户名称") |
||||
|
private String customer; |
||||
|
@ApiModelProperty("贷款人") |
||||
|
private String borrowerName; |
||||
|
@ApiModelProperty("出库价格") |
||||
|
private BigDecimal amount; |
||||
|
@ApiModelProperty("处置方式(未处置/客户赎回/二次销售/二次转租)") |
||||
|
private String disposal; |
||||
|
@ApiModelProperty("处置方式key") |
||||
|
private String disposalKey; |
||||
|
@ApiModelProperty("新车主名称") |
||||
|
private String newCustomer; |
||||
|
@ApiModelProperty("新客户sid") |
||||
|
private String newCustomerSid; |
||||
|
@ApiModelProperty("处置申请sid") |
||||
|
private String applySid; |
||||
|
@ApiModelProperty("联系电话") |
||||
|
private String phoneNum; |
||||
|
@ApiModelProperty("出库日期") |
||||
|
private Date outboundDate; |
||||
|
|
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply; |
||||
|
|
||||
|
import com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinList; |
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author Administrator |
||||
|
* @description |
||||
|
* @date 2023/11/13 14:11 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LoanOutboundApplyDto implements Dto { |
||||
|
private String createBySid; |
||||
|
@ApiModelProperty("使用组织sid") |
||||
|
private String useOrgSid; // 使用组织sid
|
||||
|
@ApiModelProperty("使用组织名称") |
||||
|
private String useOrgName; // 使用组织名称
|
||||
|
@ApiModelProperty("组织全路径") |
||||
|
private String orgSidPath; // 申请人组织路径
|
||||
|
@ApiModelProperty("消贷合同号") |
||||
|
private String loanContractNo; |
||||
|
@ApiModelProperty("资方") |
||||
|
private String bankName; |
||||
|
@ApiModelProperty("资方合同号") |
||||
|
private String bankContractNo; |
||||
|
@ApiModelProperty("原客户sid") |
||||
|
private String customerSid; |
||||
|
@ApiModelProperty("原贷款人sid") |
||||
|
private String borrowerSid; |
||||
|
@ApiModelProperty("原客户名称") |
||||
|
private String customer; |
||||
|
@ApiModelProperty("原贷款人") |
||||
|
private String borrowerName; |
||||
|
@ApiModelProperty("处置方式key") |
||||
|
private String disposalKey; |
||||
|
@ApiModelProperty("处置方式") |
||||
|
private String disposal; |
||||
|
@ApiModelProperty("处置申请sid") |
||||
|
private String applySid; |
||||
|
@ApiModelProperty("新车主名称") |
||||
|
private String newCustomer; |
||||
|
@ApiModelProperty("新客户sid") |
||||
|
private String newCustomerSid; |
||||
|
@ApiModelProperty("新客户联系电话") |
||||
|
private String phoneNum; |
||||
|
@ApiModelProperty("处置车辆列表") |
||||
|
private List<OutboundVinListDto> vinList = new ArrayList<>(); |
||||
|
} |
@ -0,0 +1,101 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply; |
||||
|
|
||||
|
import com.yxt.anrui.riskcenter.api.loanoutboundapply.app.AppOutboundDetailsVo; |
||||
|
import com.yxt.anrui.riskcenter.api.loanoutboundapply.flow.*; |
||||
|
import com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinListQuery; |
||||
|
import com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinListVo; |
||||
|
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 io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
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; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Api(tags = "交回车辆出库申请") |
||||
|
@FeignClient( |
||||
|
contextId = "anrui-riskcenter-LoanOutboundApply", |
||||
|
name = "anrui-riskcenter", |
||||
|
path = "v1/loanoutboundapply", |
||||
|
fallback = LoanOutboundFeignFallback.class) |
||||
|
public interface LoanOutboundApplyFeign { |
||||
|
|
||||
|
|
||||
|
@ApiOperation("根据条件分页查询数据的列表") |
||||
|
@PostMapping("/listPage") |
||||
|
public ResultBean<PagerVo<LoanOutboundApplyVo>> listPage(@RequestBody PagerQuery<LoanOutboundApplyQuery> pq); |
||||
|
|
||||
|
@ApiOperation("保存") |
||||
|
@PostMapping("/saveOutbound") |
||||
|
@ResponseBody |
||||
|
public ResultBean<String> saveOutbound(@RequestBody LoanOutboundApplyDto dto); |
||||
|
|
||||
|
@ApiOperation("修改") |
||||
|
@PostMapping("/updateOutbound") |
||||
|
@ResponseBody |
||||
|
public ResultBean<String> updateOutbound(@RequestBody LoanUpdateApplyDto dto); |
||||
|
|
||||
|
|
||||
|
@ApiOperation("详情查看") |
||||
|
@GetMapping("outboundDetails") |
||||
|
@ResponseBody |
||||
|
public ResultBean<LoanOutboundApplyInit> outboundDetails(@RequestParam("sid") String sid); |
||||
|
|
||||
|
|
||||
|
//------------------------------流程接口----------------------------------------------
|
||||
|
|
||||
|
@ApiOperation("提交") |
||||
|
@PostMapping("/submit") |
||||
|
public ResultBean submitRecordApplication(@RequestBody @Valid SubmitOutboundDto dto); |
||||
|
|
||||
|
@ApiOperation(value = "办理(同意)") |
||||
|
@PostMapping("/complete") |
||||
|
public ResultBean complete(@Valid @RequestBody OutboundCompleteDto dto); |
||||
|
|
||||
|
@ApiOperation(value = "撤回流程") |
||||
|
@PostMapping(value = "/revokeProcess") |
||||
|
public ResultBean revokeProcess(@ApiParam(value = "工作流任务相关--请求参数") @RequestBody OutboundTaskQuery query); |
||||
|
|
||||
|
@ApiOperation(value = "驳回任务") |
||||
|
@PostMapping(value = "/reject") |
||||
|
public ResultBean taskReject(@ApiParam(value = "工作流任务相关--请求参数") @RequestBody OutboundTaskQuery query); |
||||
|
|
||||
|
@ApiOperation(value = "终止任务") |
||||
|
@PostMapping(value = "/breakProcess") |
||||
|
public ResultBean breakProcess(@RequestBody OutboundTaskQuery query); |
||||
|
|
||||
|
@ApiOperation(value = "流程历史流转记录") |
||||
|
@GetMapping(value = "/task/flowRecord/{procInsId}/{deployId}") |
||||
|
public ResultBean flowRecord(@ApiParam(value = "流程实例id") @PathVariable(value = "procInsId") String procInsId); |
||||
|
|
||||
|
@ApiOperation(value = "获取下一个环节") |
||||
|
@GetMapping(value = "/getNextNodesForSubmit") |
||||
|
ResultBean<List<OutboundGetNodeVo>> getNextNodesForSubmit(@Valid @SpringQueryMap OutboundGetNodeQuery query); |
||||
|
|
||||
|
@ApiOperation(value = "获取上一个环节") |
||||
|
@GetMapping(value = "/getPreviousNodesForReject") |
||||
|
ResultBean<List<OutboundGetNodeVo>> getPreviousNodesForReject(@Valid @SpringQueryMap OutboundGetNodeQuery query); |
||||
|
|
||||
|
@ApiOperation(value = "加签") |
||||
|
@PostMapping(value = "/delegate") |
||||
|
public ResultBean delegate(@RequestBody OutboundDelegateQuery query); |
||||
|
|
||||
|
//-------------------------app------------------------
|
||||
|
@ApiOperation("详情查看") |
||||
|
@GetMapping("/appDetails") |
||||
|
@ResponseBody |
||||
|
public ResultBean<AppOutboundDetailsVo> appDetail(@RequestParam("sid") String sid); |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author Administrator |
||||
|
* @description |
||||
|
* @date 2023/11/17 9:18 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LoanOutboundApplyFile { |
||||
|
private String filePath; |
||||
|
private String name; |
||||
|
private String size; |
||||
|
private String status; |
||||
|
private String uid; |
||||
|
private String url; |
||||
|
} |
@ -0,0 +1,69 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply; |
||||
|
|
||||
|
import com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinList; |
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author Administrator |
||||
|
* @description |
||||
|
* @date 2023/11/13 13:43 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LoanOutboundApplyInit implements Vo { |
||||
|
|
||||
|
private String sid; |
||||
|
private String userSid; |
||||
|
private String dept; |
||||
|
private String deptSid; |
||||
|
private String applyName; |
||||
|
private String applyDate; |
||||
|
private String orgPath; |
||||
|
@ApiModelProperty("任务id") |
||||
|
private String taskId; |
||||
|
@ApiModelProperty("实例id") |
||||
|
private String instanceId; |
||||
|
@ApiModelProperty("消贷合同号") |
||||
|
private String loanContractNo; |
||||
|
@ApiModelProperty("资方") |
||||
|
private String bankName; |
||||
|
@ApiModelProperty("资方合同号") |
||||
|
private String bankContractNo; |
||||
|
@ApiModelProperty("客户名称") |
||||
|
private String customer; |
||||
|
@ApiModelProperty("贷款人") |
||||
|
private String borrowerName; |
||||
|
@ApiModelProperty("二次转租价格") |
||||
|
private String amount; |
||||
|
@ApiModelProperty("转租方案说明") |
||||
|
private String plan; |
||||
|
@ApiModelProperty("原车主是否同意") |
||||
|
private String agree; |
||||
|
@ApiModelProperty("新车主名称") |
||||
|
private String vinOwner; |
||||
|
@ApiModelProperty("客户类型key") |
||||
|
private String customerTypeKey; |
||||
|
@ApiModelProperty("客户类型") |
||||
|
private String customerType; |
||||
|
@ApiModelProperty("联系电话") |
||||
|
private String phoneNum; |
||||
|
@ApiModelProperty("证件地址") |
||||
|
private String cardAddress; |
||||
|
@ApiModelProperty("有效期") |
||||
|
private String endDate; |
||||
|
@ApiModelProperty("证件号码") |
||||
|
private String idNumber; |
||||
|
@ApiModelProperty("证件类型key") |
||||
|
private String certificateTypeKey; |
||||
|
@ApiModelProperty("证件类型(个人为身份证/企业为营业执照)") |
||||
|
private String certificateType; |
||||
|
@ApiModelProperty("新车主客户sid") |
||||
|
private String newCustomerSid; |
||||
|
private List<LoanOutboundApplyFile> files = new ArrayList<>(); |
||||
|
private List<OutboundVinList> vinList = new ArrayList<>(); |
||||
|
|
||||
|
} |
@ -0,0 +1,49 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author Administrator |
||||
|
* @description |
||||
|
* @date 2023/11/13 13:32 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LoanOutboundApplyQuery implements Query { |
||||
|
|
||||
|
@ApiModelProperty("组织全路径") |
||||
|
private String orgPath; |
||||
|
@ApiModelProperty("菜单sid") |
||||
|
private String menuSid; |
||||
|
@ApiModelProperty("菜单url") |
||||
|
private String menuUrl; |
||||
|
@ApiModelProperty("用户sid") |
||||
|
private String userSid; |
||||
|
@ApiModelProperty("分公司") |
||||
|
private String company; // 使用组织名称
|
||||
|
@ApiModelProperty("申请人") |
||||
|
private String applyName; // 申请人
|
||||
|
private String applyStartDate; |
||||
|
private String applyEndDate; |
||||
|
private String closingStartDate; |
||||
|
private String closingEndDate; |
||||
|
@ApiModelProperty("消贷合同号") |
||||
|
private String loanContractNo; |
||||
|
@ApiModelProperty("资方") |
||||
|
private String bankName; |
||||
|
@ApiModelProperty("资方合同号") |
||||
|
private String bankContractNo; |
||||
|
@ApiModelProperty("客户名称") |
||||
|
private String customer; |
||||
|
@ApiModelProperty("贷款人") |
||||
|
private String borrowerName; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("车牌号") |
||||
|
private String vehMark; |
||||
|
@ApiModelProperty("申请部门") |
||||
|
private String dept; |
||||
|
@ApiModelProperty("原车主是否同意0是1否") |
||||
|
private String agree; |
||||
|
} |
@ -0,0 +1,50 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author Administrator |
||||
|
* @description |
||||
|
* @date 2023/11/13 13:32 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LoanOutboundApplyVo implements Vo { |
||||
|
|
||||
|
private String sid; |
||||
|
@ApiModelProperty("流程状态") |
||||
|
private String nodeState; // 流程状态
|
||||
|
@ApiModelProperty("分公司") |
||||
|
private String company; // 使用组织名称
|
||||
|
@ApiModelProperty("申请人") |
||||
|
private String applyName; // 申请人
|
||||
|
@ApiModelProperty("申请部门") |
||||
|
private String dept; |
||||
|
@ApiModelProperty("申请日期") |
||||
|
private String applyDate; // 申请日期
|
||||
|
@ApiModelProperty("办结日期") |
||||
|
private String closingDate; |
||||
|
@ApiModelProperty("流程定义的id") |
||||
|
private String procDefId; // 流程定义的id
|
||||
|
@ApiModelProperty("流程实例的sid") |
||||
|
private String procInstId; // 流程实例的sid
|
||||
|
@ApiModelProperty("消贷合同号") |
||||
|
private String loanContractNo; |
||||
|
@ApiModelProperty("资方") |
||||
|
private String bankName; |
||||
|
@ApiModelProperty("资方合同号") |
||||
|
private String bankContractNo; |
||||
|
@ApiModelProperty("客户名称") |
||||
|
private String customer; |
||||
|
@ApiModelProperty("贷款人") |
||||
|
private String borrowerName; |
||||
|
@ApiModelProperty("二次转租价格") |
||||
|
private String amount; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("车牌号") |
||||
|
private String vehMark; |
||||
|
@ApiModelProperty("原车主是否同意0是1否") |
||||
|
private String agree; |
||||
|
} |
@ -0,0 +1,87 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply; |
||||
|
|
||||
|
|
||||
|
import com.yxt.anrui.riskcenter.api.loanoutboundapply.app.AppOutboundDetailsVo; |
||||
|
import com.yxt.anrui.riskcenter.api.loanoutboundapply.flow.*; |
||||
|
import com.yxt.common.core.query.PagerQuery; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
@Component |
||||
|
public class LoanOutboundFeignFallback implements LoanOutboundApplyFeign { |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<PagerVo<LoanOutboundApplyVo>> listPage(PagerQuery<LoanOutboundApplyQuery> pq) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<String> saveOutbound(LoanOutboundApplyDto dto) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<String> updateOutbound(LoanUpdateApplyDto dto) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<LoanOutboundApplyInit> outboundDetails(String sid) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean submitRecordApplication(SubmitOutboundDto dto) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean complete(OutboundCompleteDto dto) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean revokeProcess(OutboundTaskQuery query) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean taskReject(OutboundTaskQuery query) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean breakProcess(OutboundTaskQuery query) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean flowRecord(String procInsId) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<List<OutboundGetNodeVo>> getNextNodesForSubmit(OutboundGetNodeQuery query) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<List<OutboundGetNodeVo>> getPreviousNodesForReject(OutboundGetNodeQuery query) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean delegate(OutboundDelegateQuery query) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<AppOutboundDetailsVo> appDetail(String sid) { |
||||
|
return null; |
||||
|
} |
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author Fan |
||||
|
* @description |
||||
|
* @date 2024/1/19 9:55 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LoanUpdateApplyDto implements Dto { |
||||
|
|
||||
|
private String sid; |
||||
|
|
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author Fan |
||||
|
* @description |
||||
|
* @date 2024/1/19 9:42 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OutboundVinList { |
||||
|
private String ledgerSid; |
||||
|
private String vinSid; |
||||
|
private String vinNo; |
||||
|
private String vehMark; |
||||
|
private String vehType; |
||||
|
private String vehModel; |
||||
|
private String busVinSid; |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author Fan |
||||
|
* @description |
||||
|
* @date 2024/1/19 10:02 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OutboundVinListDto { |
||||
|
private String ledgerSid; //交回车辆台账sid
|
||||
|
private String vinSid; //车辆sid
|
||||
|
private String vinNo; //车架号
|
||||
|
private String vehMark; //车牌号
|
||||
|
private String vehType; // 车辆类型(主车/挂车)
|
||||
|
private String vehModel; //车型
|
||||
|
private String busVinSid; //销售订单车辆sid
|
||||
|
private String location; //存放地点
|
||||
|
} |
@ -0,0 +1,72 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply.app; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author Fan |
||||
|
* @description |
||||
|
* @date 2024/1/11 17:22 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class AppOutboundDetailsVo { |
||||
|
private String sid; |
||||
|
private String publishInfo; |
||||
|
private String time; //申请日期
|
||||
|
private List<String> files = new ArrayList<>(); |
||||
|
private String taskId; |
||||
|
private String procInsId; |
||||
|
/** |
||||
|
* 本次转租金额 |
||||
|
*/ |
||||
|
private String amount; |
||||
|
/** |
||||
|
* 资方合同号 |
||||
|
*/ |
||||
|
private String bankContractNo; |
||||
|
/** |
||||
|
* 资方 |
||||
|
*/ |
||||
|
private String bankName; |
||||
|
/** |
||||
|
* 贷款人 |
||||
|
*/ |
||||
|
private String borrName; |
||||
|
/** |
||||
|
* 原车主是否同意 0是 1否 |
||||
|
*/ |
||||
|
private String agree; |
||||
|
/** |
||||
|
* 客户名称 |
||||
|
*/ |
||||
|
private String custName; |
||||
|
/** |
||||
|
* 贷款合同号 |
||||
|
*/ |
||||
|
private String loanContractNo; |
||||
|
/** |
||||
|
* 转租方案说明 |
||||
|
*/ |
||||
|
private String plan; |
||||
|
/** |
||||
|
* 车辆列表 |
||||
|
*/ |
||||
|
private List<AppOutboundVinListVo> vinList = new ArrayList<>(); |
||||
|
@ApiModelProperty("新车主名称") |
||||
|
private String vinOwner; |
||||
|
@ApiModelProperty("客户类型") |
||||
|
private String customerType; |
||||
|
@ApiModelProperty("联系电话") |
||||
|
private String phoneNum; |
||||
|
@ApiModelProperty("证件地址") |
||||
|
private String cardAddress; |
||||
|
@ApiModelProperty("有效期") |
||||
|
private String endDate; |
||||
|
@ApiModelProperty("证件号码") |
||||
|
private String idNumber; |
||||
|
@ApiModelProperty("证件类型(个人为身份证/企业为营业执照)") |
||||
|
private String certificateType; |
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply.app; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author Fan |
||||
|
* @description |
||||
|
* @date 2024/1/11 17:35 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class AppOutboundVinListVo { |
||||
|
/** |
||||
|
* 车型 |
||||
|
*/ |
||||
|
private String model; |
||||
|
/** |
||||
|
* 车牌号 |
||||
|
*/ |
||||
|
private String vehMark; |
||||
|
/** |
||||
|
* 车辆类型 |
||||
|
*/ |
||||
|
private String vehType; |
||||
|
/** |
||||
|
* 车架号 |
||||
|
*/ |
||||
|
private String vinNo; |
||||
|
} |
@ -0,0 +1,41 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply.flow; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/6/28 9:01 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OutboundCompleteDto implements Dto { |
||||
|
private static final long serialVersionUID = 3240453987322803352L; |
||||
|
@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 = "意见") |
||||
|
@NotBlank(message = "参数错误:comment") |
||||
|
private String comment; |
||||
|
@ApiModelProperty(value = "业务sid") |
||||
|
@NotBlank(message = "参数错误:businessSid") |
||||
|
private String businessSid; |
||||
|
@ApiModelProperty(value = "分支字段及业务字段") |
||||
|
private Map<String, Object> formVariables; |
||||
|
|
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply.flow; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author Administrator |
||||
|
* @description |
||||
|
* @date 2023/9/28 9:28 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OutboundDelegateQuery { |
||||
|
@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,26 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply.flow; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/6/28 10:42 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OutboundGetNodeQuery implements Query { |
||||
|
private static final long serialVersionUID = -5674867230708197611L; |
||||
|
|
||||
|
@ApiModelProperty(value = "环节定义id") |
||||
|
private String taskDefKey; |
||||
|
@ApiModelProperty(value = "业务sid") |
||||
|
private String businessSid; |
||||
|
|
||||
|
@ApiModelProperty(value = "分支字段及业务字段") |
||||
|
private Map<String, Object> formVariables; |
||||
|
|
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply.flow; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/6/28 11:09 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OutboundGetNodeVo implements Vo { |
||||
|
private static final long serialVersionUID = 8802774014747063504L; |
||||
|
@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,56 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply.flow; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/6/28 17:29 |
||||
|
* @Description 终止、撤回、驳回查询参数 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OutboundTaskQuery implements Query { |
||||
|
private static final long serialVersionUID = -4006020771892400451L; |
||||
|
/** |
||||
|
* 终止、驳回、撤回 |
||||
|
*/ |
||||
|
@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; |
||||
|
/*@ApiModelProperty("用户Id") |
||||
|
private String userId; |
||||
|
@ApiModelProperty("节点") |
||||
|
private String targetKey; |
||||
|
@ApiModelProperty("流程变量信息") |
||||
|
private Map<String, Object> values = new HashMap<>(); |
||||
|
@ApiModelProperty("审批人") |
||||
|
private String assignee; |
||||
|
@ApiModelProperty("候选人") |
||||
|
private List<String> candidateUsers = new ArrayList<>(); |
||||
|
@ApiModelProperty("审批组") |
||||
|
private List<String> candidateGroups = new ArrayList<>();*/ |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundapply.flow; |
||||
|
|
||||
|
import com.yxt.anrui.riskcenter.api.loanoutboundapply.LoanOutboundApplyDto; |
||||
|
import com.yxt.anrui.riskcenter.api.loanoutboundapply.LoanUpdateApplyDto; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @Author dimengzhe |
||||
|
* @Date 2022/6/27 13:38 |
||||
|
* @Description |
||||
|
*/ |
||||
|
@Data |
||||
|
public class SubmitOutboundDto extends LoanUpdateApplyDto { |
||||
|
private static final long serialVersionUID = 378585162071125756L; |
||||
|
@ApiModelProperty("流程实例id") |
||||
|
private String instanceId; |
||||
|
@ApiModelProperty("任务id") |
||||
|
private String taskId; |
||||
|
|
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundveh; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@ApiModel(value = "车辆二次转租车辆列表", description = "车辆二次转租车辆列表") |
||||
|
@TableName("loan_sublet_veh") |
||||
|
@Data |
||||
|
public class LoanOutboundVeh extends BaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty("申请表sid") |
||||
|
private String mainSid; |
||||
|
@ApiModelProperty("车架号") |
||||
|
private String vinNo; |
||||
|
@ApiModelProperty("车牌号") |
||||
|
private String vehMark; |
||||
|
@ApiModelProperty("车辆订单业务sid") |
||||
|
private String busVinSid; |
||||
|
@ApiModelProperty("车辆sid") |
||||
|
private String vinSid; |
||||
|
@ApiModelProperty("主车/挂车") |
||||
|
private String vehType; |
||||
|
@ApiModelProperty("车型") |
||||
|
private String vehModel; |
||||
|
@ApiModelProperty("交回车辆台账sid") |
||||
|
private String ledgerSid; |
||||
|
|
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundveh; |
||||
|
|
||||
|
import io.swagger.annotations.Api; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Api(tags = "交车车辆出库车辆列表") |
||||
|
@FeignClient( |
||||
|
contextId = "anrui-riskcenter-LoanOutboundVeh", |
||||
|
name = "anrui-riskcenter", |
||||
|
path = "v1/loanoutboundveh", |
||||
|
fallback = LoanOutboundVehFeignFallback.class) |
||||
|
public interface LoanOutboundVehFeign { |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanoutboundveh; |
||||
|
|
||||
|
|
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
|
||||
|
@Component |
||||
|
public class LoanOutboundVehFeignFallback implements LoanOutboundVehFeign { |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loanrepaymentschedule; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author Fan |
||||
|
* @description |
||||
|
* @date 2024/1/19 15:18 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OtherPolicyVo { |
||||
|
private String otherBankName; |
||||
|
private String otherPolicyName; |
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
package com.yxt.anrui.riskcenter.api.loansubletapply; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author Fan |
||||
|
* @description |
||||
|
* @date 2024/1/19 10:46 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CustomerListVo { |
||||
|
|
||||
|
@ApiModelProperty("名称") |
||||
|
private String vinOwner; |
||||
|
@ApiModelProperty("客户类型key") |
||||
|
private String customerTypeKey; |
||||
|
@ApiModelProperty("客户类型") |
||||
|
private String customerType; |
||||
|
@ApiModelProperty("联系电话") |
||||
|
private String phoneNum; |
||||
|
@ApiModelProperty("证件地址") |
||||
|
private String cardAddress; |
||||
|
@ApiModelProperty("有效期") |
||||
|
private String endDate; |
||||
|
@ApiModelProperty("证件号码") |
||||
|
private String idNumber; |
||||
|
@ApiModelProperty("证件类型key") |
||||
|
private String certificateTypeKey; |
||||
|
@ApiModelProperty("证件类型(个人为身份证/企业为营业执照)") |
||||
|
private String certificateType; |
||||
|
@ApiModelProperty("新车主客户sid") |
||||
|
private String newCustomerSid; |
||||
|
} |
@ -0,0 +1,43 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loanoutboundapply; |
||||
|
|
||||
|
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.riskcenter.api.loanoutboundapply.LoanOutboundApply; |
||||
|
import com.yxt.anrui.riskcenter.api.loanredemptionapply.RedemptionInitVo; |
||||
|
import com.yxt.anrui.riskcenter.api.loanredemptionapply.RedemptionVinList; |
||||
|
import com.yxt.anrui.riskcenter.api.loansubletapply.*; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
@Mapper |
||||
|
public interface LoanOutboundApplyMapper extends BaseMapper<LoanOutboundApply> { |
||||
|
|
||||
|
IPage<LoanSubletApplyVo> listPage(IPage<LoanSubletApply> page, @Param(Constants.WRAPPER) QueryWrapper<LoanSubletApply> qw); |
||||
|
|
||||
|
IPage<SubletVinListVo> getVinList(IPage<SubletVinListVo> page, @Param(Constants.WRAPPER) QueryWrapper<SubletVinListQuery> qw); |
||||
|
|
||||
|
RedemptionInitVo redemptionInit(@Param("ledgerSid") String ledgerSid); |
||||
|
|
||||
|
RedemptionVinList selTrailerByLedgerSid(@Param("ledgerSid") String ledgerSid); |
||||
|
|
||||
|
int updateFlowFiled(Map<String, Object> map); |
||||
|
|
||||
|
SubletInitVo selReturnLegerBySid(@Param("ledgerSid") String ledgerSid); |
||||
|
|
||||
|
SubletInitVo selLoanInfoByMainVeh(@Param("busVinSid") String busVinSid); |
||||
|
|
||||
|
SubletVinList selReturnVinLegerBySid(@Param("ledgerSid") String ledgerSid); |
||||
|
|
||||
|
SubletVinList selReturnTrVinLegerByPSid(@Param("ledgerSid")String ledgerSid); |
||||
|
|
||||
|
SubletInitVo selLoanInfoByTrVeh(@Param("ledgerSid")String ledgerSid); |
||||
|
|
||||
|
SubletVinList selReturnTrVinLegerBySid(@Param("ledgerSid")String ledgerSid); |
||||
|
|
||||
|
VehDisposal selVehDisposal(@Param("ledgerSid") String ledgerSid); |
||||
|
} |
@ -0,0 +1,187 @@ |
|||||
|
<?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.loanoutboundapply.LoanOutboundApplyMapper"> |
||||
|
<update id="updateFlowFiled"> |
||||
|
UPDATE loan_out_bound_apply |
||||
|
SET nodeState=#{nodeState} |
||||
|
, nodeSid=#{taskDefKey} |
||||
|
<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="listPage" resultType="com.yxt.anrui.riskcenter.api.loansubletapply.LoanSubletApplyVo"> |
||||
|
SELECT |
||||
|
* |
||||
|
FROM |
||||
|
( |
||||
|
SELECT |
||||
|
sa.sid, |
||||
|
sa.isDelete, |
||||
|
sa.nodeState, |
||||
|
sa.agree, |
||||
|
sa.useOrgSid, |
||||
|
sa.createBySid, |
||||
|
sa.orgSidPath, |
||||
|
sa.useOrgName AS company, |
||||
|
sa.dept, |
||||
|
sa.applyName, |
||||
|
date_format( sa.applyDate, '%Y-%m-%d' ) AS applyDate, |
||||
|
sa.procDefId, |
||||
|
sa.procInstId, |
||||
|
date_format( sa.closingDate, '%Y-%m-%d' ) AS closingDate, |
||||
|
sa.loanContractNo, |
||||
|
sa.bankName, |
||||
|
sa.bankContractNo, |
||||
|
sa.borrowerName, |
||||
|
sa.customer, |
||||
|
sa.amount, |
||||
|
( SELECT count(*) FROM loan_sublet_veh h WHERE mainSid = sa.sid ) AS `count`, |
||||
|
v.vehType, |
||||
|
v.vinNo, |
||||
|
v.vehMark |
||||
|
FROM |
||||
|
loan_sublet_apply AS sa |
||||
|
LEFT JOIN loan_sublet_veh AS v ON sa.sid = v.mainSid |
||||
|
) a |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="getVinList" resultType="com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinListVo"> |
||||
|
SELECT |
||||
|
v.sid ledgerSid, |
||||
|
v.vinNo, |
||||
|
v.vehMark, |
||||
|
v.vehModel, |
||||
|
v.customer, |
||||
|
v.borrowerName, |
||||
|
v.vehType, |
||||
|
l.bankName |
||||
|
FROM |
||||
|
loan_return_veh_ledger AS v |
||||
|
LEFT JOIN anrui_buscenter.bus_sales_order_vehicle as b ON v.busVinSid = b.sid |
||||
|
LEFT JOIN anrui_buscenter.bus_sales_order_loancontract as l ON b.loanContractSid = l.sid |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
<select id="redemptionInit" resultType="com.yxt.anrui.riskcenter.api.loanredemptionapply.RedemptionInitVo"> |
||||
|
SELECT a.*, |
||||
|
c.bankName, |
||||
|
c.bankContractNo, |
||||
|
c.loanContractNo |
||||
|
FROM (SELECT v.sid ledgerSid, |
||||
|
v.vinNo, |
||||
|
v.vinSid, |
||||
|
v.vehMark, |
||||
|
v.vehModel, |
||||
|
v.customer, |
||||
|
v.vehType, |
||||
|
v.location, |
||||
|
v.borrowerName, |
||||
|
(SELECT b.sid |
||||
|
FROM anrui_buscenter.bus_sales_order_vehicle as b |
||||
|
WHERE b.linkSid = v.vinSid |
||||
|
and b.borrowerSid = v.borrowerSid) as busVinSid, |
||||
|
(SELECT b.loanContractSid |
||||
|
FROM anrui_buscenter.bus_sales_order_vehicle as b |
||||
|
WHERE b.linkSid = v.vinSid |
||||
|
and b.borrowerSid = v.borrowerSid) as loanContractSid |
||||
|
FROM loan_return_veh_ledger as v) a |
||||
|
LEFT JOIN anrui_buscenter.bus_sales_order_loancontract as c ON c.sid = a.loanContractSid |
||||
|
WHERE a.ledgerSid = #{ledgerSid} |
||||
|
</select> |
||||
|
<select id="selTrailerByLedgerSid" |
||||
|
resultType="com.yxt.anrui.riskcenter.api.loanredemptionapply.RedemptionVinList"> |
||||
|
SELECT vinSid, |
||||
|
vinNo, |
||||
|
vehMark, |
||||
|
vehType, |
||||
|
vehModel |
||||
|
FROM loan_return_trailer_ledger as t |
||||
|
WHERE t.mainSid = #{ledgerSid} |
||||
|
</select> |
||||
|
<select id="selReturnLegerBySid" resultType="com.yxt.anrui.riskcenter.api.loansubletapply.SubletInitVo"> |
||||
|
SELECT sid legerSid, |
||||
|
customer, |
||||
|
borrowerName, |
||||
|
busVinSid, |
||||
|
vehType, |
||||
|
pSid |
||||
|
FROM loan_return_veh_ledger |
||||
|
WHERE sid = #{ledgerSid} |
||||
|
</select> |
||||
|
<select id="selLoanInfoByMainVeh" resultType="com.yxt.anrui.riskcenter.api.loansubletapply.SubletInitVo"> |
||||
|
SELECT l.bankName, |
||||
|
l.bankContractNo, |
||||
|
l.loanContractNo |
||||
|
FROM anrui_buscenter.bus_sales_order_loancontract as l |
||||
|
LEFT JOIN anrui_buscenter.bus_sales_order_vehicle as b |
||||
|
ON l.sid = b.loanContractSid |
||||
|
WHERE b.sid = #{busVinSid} |
||||
|
</select> |
||||
|
<select id="selReturnVinLegerBySid" |
||||
|
resultType="com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinList"> |
||||
|
SELECT sid ledgerSid, |
||||
|
vinSid, |
||||
|
vinNo, |
||||
|
vehMark, |
||||
|
vehType, |
||||
|
vehModel, |
||||
|
busVinSid |
||||
|
FROM loan_return_veh_ledger |
||||
|
WHERE sid = #{ledgerSid} |
||||
|
</select> |
||||
|
<select id="selReturnTrVinLegerByPSid" |
||||
|
resultType="com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinList"> |
||||
|
SELECT sid ledgerSid, |
||||
|
vinSid, |
||||
|
vinNo, |
||||
|
vehMark, |
||||
|
vehType, |
||||
|
vehModel, |
||||
|
busVinSid |
||||
|
FROM loan_return_veh_ledger |
||||
|
WHERE pSid = #{ledgerSid} |
||||
|
and disposal = '未处置' |
||||
|
and stockState = '库存' |
||||
|
</select> |
||||
|
<select id="selLoanInfoByTrVeh" resultType="com.yxt.anrui.riskcenter.api.loansubletapply.SubletInitVo"> |
||||
|
SELECT l.bankName, |
||||
|
l.bankContractNo, |
||||
|
l.loanContractNo |
||||
|
FROM anrui_buscenter.bus_sales_order_loancontract as l |
||||
|
LEFT JOIN anrui_buscenter.bus_sales_order_vehicle as b |
||||
|
ON l.sid = b.loanContractSid |
||||
|
WHERE b.sid = (SELECT busVinSid |
||||
|
FROM loan_return_veh_ledger |
||||
|
WHERE sid = (SELECT pSid FROM loan_return_veh_ledger WHERE sid = #{ledgerSid})) |
||||
|
</select> |
||||
|
<select id="selReturnTrVinLegerBySid" |
||||
|
resultType="com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinList"> |
||||
|
SELECT sid ledgerSid, |
||||
|
vinSid, |
||||
|
vinNo, |
||||
|
vehMark, |
||||
|
vehType, |
||||
|
vehModel, |
||||
|
busVinSid |
||||
|
FROM loan_return_veh_ledger |
||||
|
WHERE sid = #{ledgerSid} |
||||
|
</select> |
||||
|
<select id="selVehDisposal" resultType="com.yxt.anrui.riskcenter.api.loansubletapply.VehDisposal"> |
||||
|
SELECT sid, |
||||
|
disposalKey, |
||||
|
disposal |
||||
|
FROM loan_return_veh_ledger |
||||
|
WHERE sid = #{ledgerSid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,107 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loanoutboundapply; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.anrui.flowable.api.utils.ProcDefEnum; |
||||
|
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables; |
||||
|
import com.yxt.anrui.riskcenter.api.loanoutboundapply.*; |
||||
|
import com.yxt.anrui.riskcenter.api.loanoutboundapply.app.AppOutboundDetailsVo; |
||||
|
import com.yxt.anrui.riskcenter.api.loanoutboundapply.flow.*; |
||||
|
import com.yxt.anrui.riskcenter.api.loansubletapply.*; |
||||
|
import com.yxt.anrui.riskcenter.api.loansubletapply.app.AppSubletDetailsVo; |
||||
|
import com.yxt.anrui.riskcenter.api.loansubletapply.flow.*; |
||||
|
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; |
||||
|
|
||||
|
|
||||
|
@Api(tags = "交回车辆出库申请") |
||||
|
@RestController |
||||
|
@RequestMapping("v1/loanoutboundapply") |
||||
|
public class LoanOutboundApplyRest implements LoanOutboundApplyFeign { |
||||
|
|
||||
|
@Autowired |
||||
|
private LoanOutboundApplyService loanOutboundApplyService; |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<PagerVo<LoanOutboundApplyVo>> listPage(PagerQuery<LoanOutboundApplyQuery> pq) { |
||||
|
ResultBean<PagerVo<LoanOutboundApplyVo>> rb = ResultBean.fireFail(); |
||||
|
PagerVo<LoanOutboundApplyVo> pv = loanOutboundApplyService.listPage(pq); |
||||
|
return rb.success().setData(pv); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<String> saveOutbound(LoanOutboundApplyDto dto) { |
||||
|
return loanOutboundApplyService.saveOutbound(dto); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<String> updateOutbound(LoanUpdateApplyDto dto) { |
||||
|
return loanOutboundApplyService.updateOutbound(dto); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<LoanOutboundApplyInit> outboundDetails(String sid) { |
||||
|
return loanOutboundApplyService.outboundDetails(sid); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean submitRecordApplication(SubmitOutboundDto dto) { |
||||
|
return loanOutboundApplyService.submitRecordApplication(dto); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean complete(OutboundCompleteDto dto) { |
||||
|
BusinessVariables bv = new BusinessVariables(); |
||||
|
BeanUtil.copyProperties(dto, bv); |
||||
|
bv.setModelId(ProcDefEnum.LOANOUTBOUNDVEHAPPLY.getProDefId()); |
||||
|
return loanOutboundApplyService.complete(bv); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean revokeProcess(OutboundTaskQuery query) { |
||||
|
return loanOutboundApplyService.revokeProcess(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean taskReject(OutboundTaskQuery query) { |
||||
|
return loanOutboundApplyService.taskReject(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean breakProcess(OutboundTaskQuery query) { |
||||
|
return loanOutboundApplyService.breakProcess(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean flowRecord(String procInsId) { |
||||
|
return loanOutboundApplyService.flowRecord(procInsId); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<List<OutboundGetNodeVo>> getNextNodesForSubmit(OutboundGetNodeQuery query) { |
||||
|
return loanOutboundApplyService.getNextNodesForSubmit(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<List<OutboundGetNodeVo>> getPreviousNodesForReject(OutboundGetNodeQuery query) { |
||||
|
return loanOutboundApplyService.getPreviousNodesForReject(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean delegate(OutboundDelegateQuery query) { |
||||
|
return loanOutboundApplyService.delegate(query); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<AppOutboundDetailsVo> appDetail(String sid) { |
||||
|
return loanOutboundApplyService.appDetail(sid); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,969 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loanoutboundapply; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import cn.hutool.core.date.DateTime; |
||||
|
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.basepurchasesystem.BasePurchaseSystemFeign; |
||||
|
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderFeign; |
||||
|
import com.yxt.anrui.buscenter.api.bussalesorderborrower.BusSalesOrderBorrowerFeign; |
||||
|
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign; |
||||
|
import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign; |
||||
|
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.SysStaffOrg; |
||||
|
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.loanfile.LoanFile; |
||||
|
import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum; |
||||
|
import com.yxt.anrui.riskcenter.api.loanoutboundapply.*; |
||||
|
import com.yxt.anrui.riskcenter.api.loanoutboundapply.app.AppOutboundDetailsVo; |
||||
|
import com.yxt.anrui.riskcenter.api.loanoutboundapply.flow.*; |
||||
|
import com.yxt.anrui.riskcenter.api.loanoutboundveh.LoanOutboundVeh; |
||||
|
import com.yxt.anrui.riskcenter.api.loansubletapply.*; |
||||
|
import com.yxt.anrui.riskcenter.api.loansubletapply.app.AppSubletDetailsVo; |
||||
|
import com.yxt.anrui.riskcenter.api.loansubletapply.app.AppSubletVinListVo; |
||||
|
import com.yxt.anrui.riskcenter.api.loansubletapply.flow.*; |
||||
|
import com.yxt.anrui.riskcenter.api.loansubletveh.LoanSubletVeh; |
||||
|
import com.yxt.anrui.riskcenter.biz.loanbuckleapplyrecord.LoanBuckleApplyRecordService; |
||||
|
import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService; |
||||
|
import com.yxt.anrui.riskcenter.biz.loanoutboundveh.LoanOutboundVehService; |
||||
|
import com.yxt.anrui.riskcenter.biz.loanredemptionapply.LoanRedemptionApplyService; |
||||
|
import com.yxt.anrui.riskcenter.biz.loanrepaymenthistory.LoanRepaymentHistoryService; |
||||
|
import com.yxt.anrui.riskcenter.biz.loanrepaymentplandetails.LoanRepaymentPlanDetailsService; |
||||
|
import com.yxt.anrui.riskcenter.biz.loansubletveh.LoanSubletVehService; |
||||
|
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.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.text.SimpleDateFormat; |
||||
|
import java.util.*; |
||||
|
import java.util.concurrent.*; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: fzz |
||||
|
* @date: 2023/7/6 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class LoanOutboundApplyService extends MybatisBaseService<LoanOutboundApplyMapper, LoanOutboundApply> { |
||||
|
|
||||
|
@Autowired |
||||
|
private MessageFeign messageFeign; |
||||
|
@Autowired |
||||
|
private SysUserFeign sysUserFeign; |
||||
|
@Autowired |
||||
|
private LoanRepaymentHistoryService loanRepaymentHistoryService; |
||||
|
@Autowired |
||||
|
private SysStaffOrgFeign sysStaffOrgFeign; |
||||
|
@Autowired |
||||
|
private SysOrganizationFeign sysOrganizationFeign; |
||||
|
@Autowired |
||||
|
private LoanBuckleApplyRecordService loanBuckleApplyRecordService; |
||||
|
@Autowired |
||||
|
private LoanFileService loanFileService; |
||||
|
@Autowired |
||||
|
private FileUploadComponent fileUploadComponent; |
||||
|
@Autowired |
||||
|
private FlowFeign flowFeign; |
||||
|
@Autowired |
||||
|
private FlowTaskFeign flowTaskFeign; |
||||
|
@Autowired |
||||
|
private FlowableFeign flowableFeign; |
||||
|
@Autowired |
||||
|
private LoanRepaymentPlanDetailsService loanRepaymentPlanDetailsService; |
||||
|
@Autowired |
||||
|
private BusSalesOrderVehicleFeign busSalesOrderVehicleFeign; |
||||
|
@Autowired |
||||
|
private FinKingDeeFeign finKingDeeFeign; |
||||
|
@Autowired |
||||
|
private BusSalesOrderBorrowerFeign busSalesOrderBorrowerFeign; |
||||
|
@Autowired |
||||
|
private BusSalesOrderFeign busSalesOrderFeign; |
||||
|
@Autowired |
||||
|
private BasePurchaseSystemFeign basePurchaseSystemFeign; |
||||
|
@Autowired |
||||
|
private LoanRedemptionApplyService loanRedemptionApplyService; |
||||
|
@Autowired |
||||
|
private LoanSubletVehService loanSubletVehService; |
||||
|
@Autowired |
||||
|
private LoanOutboundVehService loanOutboundVehService; |
||||
|
|
||||
|
public PagerVo<LoanOutboundApplyVo> listPage(PagerQuery<LoanOutboundApplyQuery> pq) { |
||||
|
return null; |
||||
|
// IPage<LoanSubletApply> page = PagerUtil.queryToPage(pq);
|
||||
|
// LoanSubletApplyQuery pagerQuery = pq.getParams();
|
||||
|
// QueryWrapper<LoanSubletApply> qw = new QueryWrapper<>();
|
||||
|
// //=======================
|
||||
|
// PrivilegeQuery privilegeQuery = new PrivilegeQuery();
|
||||
|
// privilegeQuery.setOrgPath(pagerQuery.getOrgPath());
|
||||
|
// privilegeQuery.setMenuSid(pagerQuery.getMenuSid());
|
||||
|
// privilegeQuery.setMenuUrl(pagerQuery.getMenuUrl());
|
||||
|
// privilegeQuery.setUserSid(pagerQuery.getUserSid());
|
||||
|
// ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery);
|
||||
|
// if (StringUtils.isNotBlank(defaultIdReltBean.getData())) {
|
||||
|
// //数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
|
||||
|
// String orgSidPath = pagerQuery.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("a.orgSidPath", orgSidPath);
|
||||
|
// } else if ("2".equals(orgLevelKey)) {
|
||||
|
// orgSidPath = orgSidPath.substring(0, i2);
|
||||
|
// qw.like("a.orgSidPath", orgSidPath);
|
||||
|
// } else if ("3".equals(orgLevelKey)) {
|
||||
|
// orgSidPath = orgSidPath.substring(0, i3);
|
||||
|
// qw.like("a.orgSidPath", orgSidPath);
|
||||
|
// } else if ("4".equals(orgLevelKey)) {
|
||||
|
// orgSidPath = orgSidPath.substring(0, i4);
|
||||
|
// qw.like("a.orgSidPath", orgSidPath);
|
||||
|
// } else if ("5".equals(orgLevelKey)) {
|
||||
|
// qw.eq("a.createBySid", pagerQuery.getUserSid());
|
||||
|
// } else {
|
||||
|
// PagerVo<LoanSubletApplyVo> p = new PagerVo<>();
|
||||
|
// return p;
|
||||
|
// }
|
||||
|
// } else {
|
||||
|
// PagerVo<LoanSubletApplyVo> p = new PagerVo<>();
|
||||
|
// return p;
|
||||
|
// }
|
||||
|
// //=======================
|
||||
|
// //分公司
|
||||
|
// if (StringUtils.isNotBlank(pagerQuery.getCompany())) {
|
||||
|
// qw.like("a.company", pagerQuery.getCompany());
|
||||
|
// }
|
||||
|
// //申请人
|
||||
|
// if (StringUtils.isNotBlank(pagerQuery.getApplyName())) {
|
||||
|
// qw.like("a.applyName", pagerQuery.getApplyName());
|
||||
|
// }
|
||||
|
// //申请部门
|
||||
|
// if (StringUtils.isNotBlank(pagerQuery.getDept())) {
|
||||
|
// qw.like("a.dept", pagerQuery.getDept());
|
||||
|
// }
|
||||
|
// //消贷合同号
|
||||
|
// if (StringUtils.isNotBlank(pagerQuery.getLoanContractNo())) {
|
||||
|
// qw.like("a.loanContractNo", pagerQuery.getLoanContractNo());
|
||||
|
// }
|
||||
|
// //资方
|
||||
|
// if (StringUtils.isNotBlank(pagerQuery.getBankName())) {
|
||||
|
// qw.like("a.bankName", pagerQuery.getBankName());
|
||||
|
// }
|
||||
|
// //资方合同号
|
||||
|
// if (StringUtils.isNotBlank(pagerQuery.getBankContractNo())) {
|
||||
|
// qw.like("a.bankContractNo", pagerQuery.getBankContractNo());
|
||||
|
// }
|
||||
|
// //客户名称
|
||||
|
// if (StringUtils.isNotBlank(pagerQuery.getCustomer())) {
|
||||
|
// qw.like("a.customer", pagerQuery.getCustomer());
|
||||
|
// }
|
||||
|
// //贷款人
|
||||
|
// if (StringUtils.isNotBlank(pagerQuery.getBorrowerName())) {
|
||||
|
// qw.like("a.borrowerName", pagerQuery.getBorrowerName());
|
||||
|
// }
|
||||
|
// //车架号
|
||||
|
// if (StringUtils.isNotBlank(pagerQuery.getVinNo())) {
|
||||
|
// qw.like("a.vinNo", pagerQuery.getVinNo());
|
||||
|
// }
|
||||
|
// //车牌号
|
||||
|
// if (StringUtils.isNotBlank(pagerQuery.getVehMark())) {
|
||||
|
// qw.like("a.vehMark", pagerQuery.getVehMark());
|
||||
|
// }
|
||||
|
// //车架号
|
||||
|
// if (StringUtils.isNotBlank(pagerQuery.getAgree())) {
|
||||
|
// qw.like("a.agree", pagerQuery.getAgree());
|
||||
|
// }
|
||||
|
// String applyStartTime = pagerQuery.getApplyStartDate();
|
||||
|
// String applyEndTime = pagerQuery.getApplyEndDate();
|
||||
|
// qw.apply(StringUtils.isNotEmpty(applyStartTime), "date_format (a.applyDate,'%Y-%m-%d') >= date_format('" + applyStartTime + "','%Y-%m-%d')").
|
||||
|
// apply(StringUtils.isNotEmpty(applyEndTime), "date_format (a.applyDate,'%Y-%m-%d') <= date_format('" + applyEndTime + "','%Y-%m-%d')"
|
||||
|
// );
|
||||
|
// String closingStartDate = pagerQuery.getClosingStartDate();
|
||||
|
// String closingEndDate = pagerQuery.getClosingEndDate();
|
||||
|
// qw.apply(StringUtils.isNotEmpty(closingStartDate), "date_format (a.closingDate,'%Y-%m-%d') >= date_format('" + closingStartDate + "','%Y-%m-%d')").
|
||||
|
// apply(StringUtils.isNotEmpty(closingEndDate), "date_format (a.closingDate,'%Y-%m-%d') <= date_format('" + closingEndDate + "','%Y-%m-%d')"
|
||||
|
// );
|
||||
|
// qw.eq("a.isDelete", 0);
|
||||
|
// qw.orderByDesc("a.applyDate");
|
||||
|
// qw.apply("(a.count > 1 AND a.vehType = '主车' ) OR (a.count = 1)");
|
||||
|
// IPage<LoanSubletApplyVo> pagging = baseMapper.listPage(page, qw);
|
||||
|
// PagerVo<LoanSubletApplyVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
|
// return p;
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public ResultBean<String> saveOutbound(LoanOutboundApplyDto dto) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
LoanOutboundApply entity = new LoanOutboundApply(); |
||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
||||
|
List<OutboundVinListDto> vinList = dto.getVinList(); |
||||
|
if (!vinList.isEmpty()) { |
||||
|
vinList.stream().forEach(v -> { |
||||
|
LoanOutboundVeh loanOutboundVeh = new LoanOutboundVeh(); |
||||
|
BeanUtil.copyProperties(v, loanOutboundVeh, "id", "sid"); |
||||
|
loanOutboundVeh.setMainSid(entity.getSid()); |
||||
|
loanOutboundVehService.insert(loanOutboundVeh); |
||||
|
}); |
||||
|
} |
||||
|
return rb.success().setData(entity.getSid()); |
||||
|
} |
||||
|
|
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public ResultBean<String> updateOutbound(LoanUpdateApplyDto dto) { |
||||
|
ResultBean<String> rb = ResultBean.fireFail(); |
||||
|
String sid = ""; |
||||
|
// if (StringUtils.isNotBlank(dto.getSid())) {
|
||||
|
// sid = dto.getSid();
|
||||
|
// LoanSubletApply updateEntity = fetchBySid(sid);
|
||||
|
// if (null != updateEntity) {
|
||||
|
// BeanUtil.copyProperties(dto, updateEntity, "id", "sid");
|
||||
|
// baseMapper.updateById(updateEntity);
|
||||
|
// loanSubletVehService.deleteByMainSid(sid);
|
||||
|
// //删除附件表中关于该linkSid的文件
|
||||
|
// loanFileService.deleteByLinkSid(sid);
|
||||
|
// List<LoanSubletApplyFile> filess = dto.getFiles();
|
||||
|
// if (!filess.isEmpty()) {
|
||||
|
// List<String> files = new ArrayList<>();
|
||||
|
// for (LoanSubletApplyFile file : filess) {
|
||||
|
// files.add(file.getUrl());
|
||||
|
// }
|
||||
|
// loanFileService.saveAll(sid, files, LoanFileEnum.SUBLETAPPLY.getAttachType());
|
||||
|
// }
|
||||
|
// List<SubletVinList> vinList = dto.getVinList();
|
||||
|
// if (!vinList.isEmpty()) {
|
||||
|
// for (SubletVinList record : vinList) {
|
||||
|
// LoanSubletVeh subletVeh = new LoanSubletVeh();
|
||||
|
// BeanUtil.copyProperties(record, subletVeh, "id", "sid");
|
||||
|
// subletVeh.setMainSid(sid);
|
||||
|
// loanSubletVehService.insert(subletVeh);
|
||||
|
// }
|
||||
|
// }
|
||||
|
// }
|
||||
|
// } else {
|
||||
|
// LoanSubletApply apply = new LoanSubletApply();
|
||||
|
// sid = apply.getSid();
|
||||
|
// BeanUtil.copyProperties(dto, apply, "id", "sid");
|
||||
|
// apply.setCreateBySid(dto.getUserSid());
|
||||
|
// apply.setOrgSidPath(dto.getOrgPath());
|
||||
|
// ResultBean<String> orgSidByPath = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgPath());
|
||||
|
// if (orgSidByPath.getSuccess()) {
|
||||
|
// String userOrgSid = orgSidByPath.getData();
|
||||
|
// apply.setUseOrgSid(userOrgSid);
|
||||
|
// ResultBean<SysOrganizationVo> organizationVo = sysOrganizationFeign.fetchBySid(userOrgSid);
|
||||
|
// if (organizationVo.getSuccess()) {
|
||||
|
// SysOrganizationVo organizationVoData = organizationVo.getData();
|
||||
|
// if (null != organizationVoData) {
|
||||
|
// apply.setUseOrgName(organizationVoData.getName());
|
||||
|
// }
|
||||
|
// }
|
||||
|
// }
|
||||
|
// apply.setNodeState("待提交");
|
||||
|
// baseMapper.insert(apply);
|
||||
|
// List<SubletVinList> vinList = dto.getVinList();
|
||||
|
// if (!vinList.isEmpty()) {
|
||||
|
// for (SubletVinList record : vinList) {
|
||||
|
// LoanSubletVeh subletVeh = new LoanSubletVeh();
|
||||
|
// BeanUtil.copyProperties(record, subletVeh, "id", "sid");
|
||||
|
// subletVeh.setMainSid(sid);
|
||||
|
// loanSubletVehService.insert(subletVeh);
|
||||
|
// }
|
||||
|
// }
|
||||
|
// //删除附件表中关于该linkSid的文件
|
||||
|
// loanFileService.deleteByLinkSid(sid);
|
||||
|
// List<LoanSubletApplyFile> filess = dto.getFiles();
|
||||
|
// if (!filess.isEmpty()) {
|
||||
|
// List<String> files = new ArrayList<>();
|
||||
|
// for (LoanSubletApplyFile file : filess) {
|
||||
|
// files.add(file.getUrl());
|
||||
|
// }
|
||||
|
// loanFileService.saveAll(sid, files, LoanFileEnum.SUBLETAPPLY.getAttachType());
|
||||
|
// }
|
||||
|
// }
|
||||
|
return rb.success().setData(sid); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<LoanOutboundApplyInit> outboundDetails(String sid) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
LoanOutboundApplyInit vo = new LoanOutboundApplyInit(); |
||||
|
// LoanSubletApply entity = fetchBySid(sid);
|
||||
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
// if (null != entity) {
|
||||
|
// BeanUtil.copyProperties(entity, vo);
|
||||
|
// if (null != entity.getApplyDate()) {
|
||||
|
// vo.setApplyDate(sdf.format(entity.getApplyDate()));
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(entity.getProcInstId())) {
|
||||
|
// vo.setInstanceId(entity.getProcInstId());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(entity.getCreateBySid())) {
|
||||
|
// vo.setUserSid(entity.getCreateBySid());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(entity.getOrgSidPath())) {
|
||||
|
// vo.setOrgPath(entity.getOrgSidPath());
|
||||
|
// }
|
||||
|
// List<SubletVinList> vinLists = loanSubletVehService.selByMainSid(sid);
|
||||
|
// if (!vinLists.isEmpty()) {
|
||||
|
// vo.setVinList(vinLists);
|
||||
|
// }
|
||||
|
// List<LoanFile> fileList = loanFileService.selectByLinkSid(sid, LoanFileEnum.SUBLETAPPLY.getAttachType());
|
||||
|
// fileList.removeAll(Collections.singleton(null));
|
||||
|
// if (!fileList.isEmpty()) {
|
||||
|
// List<String> files = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).
|
||||
|
// collect(Collectors.toList());
|
||||
|
// List<LoanSubletApplyFile> applyFiles = new ArrayList<>();
|
||||
|
// for (String file : files) {
|
||||
|
// LoanSubletApplyFile applyFile = new LoanSubletApplyFile();
|
||||
|
// applyFile.setUrl(file);
|
||||
|
// applyFiles.add(applyFile);
|
||||
|
// }
|
||||
|
// vo.setFiles(applyFiles);
|
||||
|
// }
|
||||
|
// }
|
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
//-------------------------------------流程------------------------------------------------/
|
||||
|
|
||||
|
/** |
||||
|
* 判断提交的流程是否被允许 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return |
||||
|
*/ |
||||
|
private synchronized int submitBusinessData(SubmitOutboundDto dto, LoanOutboundApply loanOutboundApply) { |
||||
|
int r = 0; |
||||
|
if (StringUtils.isBlank(dto.getSid())) { |
||||
|
r = 1; |
||||
|
} else { |
||||
|
if (loanOutboundApply != null) { |
||||
|
String businessTaskId = loanOutboundApply.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; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 更新流程相关的状态 |
||||
|
* |
||||
|
* @param map |
||||
|
* @return |
||||
|
*/ |
||||
|
private int updateFlowFiled(Map<String, Object> map) { |
||||
|
return baseMapper.updateFlowFiled(map); |
||||
|
} |
||||
|
|
||||
|
public ResultBean submitRecordApplication(SubmitOutboundDto dto) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
// LoanSubletApply loanSubletApply = fetchBySid(dto.getSid());
|
||||
|
// int r = submitBusinessData(dto, loanSubletApply);
|
||||
|
// if (r == 3) {
|
||||
|
// return rb.setMsg("该申请不存在");
|
||||
|
// }
|
||||
|
// if (r == 0) {
|
||||
|
// return rb.setMsg("操作失败!提交的数据不一致");
|
||||
|
// }
|
||||
|
// List<SubletVinList> dtoVinList = dto.getVinList();
|
||||
|
// if (!dtoVinList.isEmpty()) {
|
||||
|
// for (SubletVinList v : dtoVinList) {
|
||||
|
// VehDisposal vehDisposal = baseMapper.selVehDisposal(v.getLedgerSid());
|
||||
|
// if (null != vehDisposal) {
|
||||
|
// if (!vehDisposal.getDisposal().equals("未处置")) {
|
||||
|
// return rb.setMsg("当前所选车辆不是未处置状态,无法提交!");
|
||||
|
// }
|
||||
|
// }
|
||||
|
// }
|
||||
|
// }
|
||||
|
// String businessSid = "";
|
||||
|
// //新增修改保存
|
||||
|
// ResultBean<String> resultBean = saveSublet(dto);
|
||||
|
// if (resultBean.getSuccess()) {
|
||||
|
// businessSid = resultBean.getData();
|
||||
|
// } else {
|
||||
|
// return rb.setMsg(resultBean.getMsg());
|
||||
|
// }
|
||||
|
// //提交之后修改车辆台账
|
||||
|
// List<SubletVinList> vinLists1 = loanSubletVehService.selByMainSid(businessSid);
|
||||
|
// if (!vinLists1.isEmpty()) {
|
||||
|
// vinLists1.stream().forEach(v -> {
|
||||
|
// loanRedemptionApplyService.updateVehLedgerDisposal(v.getLedgerSid(), "04", "二次转租");
|
||||
|
// });
|
||||
|
// }
|
||||
|
// LoanSubletApply entity = fetchBySid(businessSid);
|
||||
|
// String orgSidPath = "";
|
||||
|
// if (StringUtils.isNotBlank(entity.getOrgSidPath())) {
|
||||
|
// orgSidPath = entity.getOrgSidPath();
|
||||
|
// } else {
|
||||
|
// SysUserVo data = sysUserFeign.fetchBySid(entity.getCreateBySid()).getData();
|
||||
|
// if (null != data) {
|
||||
|
// //根据staffSid获取用户的组织全路径
|
||||
|
// ResultBean<SysStaffOrg> staffOrgResultBean = sysStaffOrgFeign.getOrgByStaffSid(data.getStaffSid());
|
||||
|
// if (!staffOrgResultBean.getSuccess()) {
|
||||
|
// return rb.setMsg(staffOrgResultBean.getMsg());
|
||||
|
// }
|
||||
|
// //用户的组织全路径
|
||||
|
// orgSidPath = staffOrgResultBean.getData().getOrgSidPath();
|
||||
|
// }
|
||||
|
// }
|
||||
|
// List<String> orgPathList = Arrays.asList(orgSidPath.split("/"));
|
||||
|
// SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(orgPathList.get(orgPathList.size() - 1)).getData();
|
||||
|
// if (sysOrganization == null) {
|
||||
|
// return rb.setMsg("当前所在的组织机构不存在");
|
||||
|
// }
|
||||
|
// if (StringUtils.isBlank(sysOrganization.getManagerSid())) {
|
||||
|
//// return rb.setMsg("当前所在的组织机构未设置主管人员");
|
||||
|
// sysOrganization.setManagerSid(ProcDefEnum.DEFAUL_TADMIN_SID.getProDefId());
|
||||
|
// }
|
||||
|
// //创建BusinessVariables实体对象
|
||||
|
// BusinessVariables bv = new BusinessVariables();
|
||||
|
// //流程中的参数赋值
|
||||
|
// Map<String, Object> variables = BeanUtil.beanToMap(dto);
|
||||
|
// Map<String, Object> appMap = new HashMap<>();
|
||||
|
// //若有网关,则赋值网关中判断的字段。
|
||||
|
//// boolean isTure = true;
|
||||
|
//// //去查询是否同意
|
||||
|
//// if (StringUtils.isNotBlank(entity.getSalesUserSid())) {
|
||||
|
//// if (!entity.getCreateBySid().equals(entity.getSalesUserSid())) {
|
||||
|
//// isTure = false;
|
||||
|
//// }
|
||||
|
//// }
|
||||
|
//// variables.put("isTure", isTure);
|
||||
|
// variables.put("businessSid", businessSid);
|
||||
|
// appMap.put("sid", businessSid);
|
||||
|
// variables.put("app", appMap);
|
||||
|
//// String orderNames = "<" + entity.getCustomer() + ">" + "欠款客户备案";
|
||||
|
//// variables.put("orderNames", orderNames);
|
||||
|
// LoanSubletApply loanSubletApply1 = fetchBySid(businessSid);
|
||||
|
// String msgBusinessSid = loanSubletApply1.getSid();
|
||||
|
// //用户的部门全路径sid
|
||||
|
// bv.setOrgSidPath(loanSubletApply1.getOrgSidPath());
|
||||
|
// //业务sid
|
||||
|
// bv.setBusinessSid(businessSid);
|
||||
|
// //用户sid
|
||||
|
// bv.setUserSid(dto.getUserSid());
|
||||
|
// bv.setFormVariables(variables);
|
||||
|
// String nextNodeUserSids_ = sysOrganization.getManagerSid();
|
||||
|
// bv.setNextNodeUserSids(nextNodeUserSids_);
|
||||
|
//// if (isTure) {
|
||||
|
//// bv.setNextNodeUserSids(nextNodeUserSids_);
|
||||
|
//// } else {
|
||||
|
//// bv.setNextNodeUserSids(entity.getSalesUserSid());
|
||||
|
//// }
|
||||
|
// //流程定义id
|
||||
|
// bv.setModelId(ProcDefEnum.LOANSUBLETAPPLY.getProDefId());
|
||||
|
// if (r == 1) {
|
||||
|
// //流程定义id
|
||||
|
// bv.setModelId(ProcDefEnum.LOANSUBLETAPPLY.getProDefId());
|
||||
|
// ResultBean<UpdateFlowFieldVo> voResultBean = flowFeign.startProcess(bv);
|
||||
|
// if (!voResultBean.getSuccess()) {
|
||||
|
// return rb.setMsg(voResultBean.getMsg());
|
||||
|
// }
|
||||
|
// UpdateFlowFieldVo ufVo = voResultBean.getData();
|
||||
|
// int i = updateFlowFiled(BeanUtil.beanToMap(ufVo));
|
||||
|
// //==================================添加线程
|
||||
|
// 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());
|
||||
|
// Future future1 = pool.submit(() -> {
|
||||
|
// //极光推送
|
||||
|
// MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery();
|
||||
|
// MessageFlowVo messageFlowVo = new MessageFlowVo();
|
||||
|
// BeanUtil.copyProperties(ufVo, messageFlowVo);
|
||||
|
// messageFlowableQuery.setUfVo(messageFlowVo);
|
||||
|
// messageFlowableQuery.setAppMap(appMap);
|
||||
|
// messageFlowableQuery.setBusinessSid(msgBusinessSid);
|
||||
|
// messageFlowableQuery.setModuleName("交回车辆二次转租申请");
|
||||
|
// SysUserVo userVo = sysUserFeign.fetchBySid(loanSubletApply1.getCreateBySid()).getData();
|
||||
|
// if (userVo != null) {
|
||||
|
// if (StringUtils.isNotBlank(userVo.getName())) {
|
||||
|
// messageFlowableQuery.setMsgContent(userVo.getName() + "提交的" + 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");
|
||||
|
// }
|
||||
|
// LoanSubletApply loanSubletApply2 = fetchBySid(dto.getSid());
|
||||
|
// bv.setTaskId(dto.getTaskId());
|
||||
|
// bv.setTaskDefKey(loanSubletApply2.getNodeSid());
|
||||
|
// bv.setComment("重新提交");
|
||||
|
// bv.setInstanceId(dto.getInstanceId());
|
||||
|
// return complete(bv);
|
||||
|
// }
|
||||
|
return rb; |
||||
|
} |
||||
|
|
||||
|
public ResultBean complete(BusinessVariables bv) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
return null; |
||||
|
// String businessSid = bv.getBusinessSid();
|
||||
|
// LoanSubletApply loanSubletApply = this.fetchBySid(businessSid);
|
||||
|
// if (bv.getTaskId().equals(loanSubletApply.getTaskId())) {
|
||||
|
// bv.setOrgSidPath(loanSubletApply.getOrgSidPath());
|
||||
|
// //流程中的参数赋值
|
||||
|
// Map<String, Object> variables = new HashMap<>();
|
||||
|
// Map<String, Object> appMap = new HashMap<>();
|
||||
|
// //若有网关,则赋值网关中判断的字段。
|
||||
|
//// boolean isTure = true;
|
||||
|
//// //去查询是否同意
|
||||
|
//// if (StringUtils.isNotBlank(loanCustomerRecord.getSalesUserSid())) {
|
||||
|
//// if (!loanCustomerRecord.getCreateBySid().equals(loanCustomerRecord.getSalesUserSid())) {
|
||||
|
//// isTure = false;
|
||||
|
//// }
|
||||
|
//// }
|
||||
|
//// variables.put("isTure", isTure);
|
||||
|
//// if (bv.getTaskDefKey().equals("Activity_1078xxs")) {
|
||||
|
//// if (StringUtils.isNotBlank(loanCustomerRecord.getManageSid())) {
|
||||
|
//// bv.setNextNodeUserSids(loanCustomerRecord.getManageSid());
|
||||
|
//// } else {
|
||||
|
//// bv.setNextNodeUserSids(ProcDefEnum.DEFAUL_TADMIN_SID.getProDefId());
|
||||
|
//// }
|
||||
|
//// }
|
||||
|
// variables.put("businessSid", businessSid);
|
||||
|
// appMap.put("sid", businessSid);
|
||||
|
// variables.put("app", appMap);
|
||||
|
// bv.setFormVariables(variables);
|
||||
|
// ResultBean<UpdateFlowFieldVo> resultBean = flowFeign.handleProsess(bv);
|
||||
|
// if (!resultBean.getSuccess()) {
|
||||
|
// return rb.setMsg(resultBean.getMsg());
|
||||
|
// }
|
||||
|
// UpdateFlowFieldVo ufVo = resultBean.getData();
|
||||
|
// int i = updateFlowFiled(BeanUtil.beanToMap(resultBean.getData()));
|
||||
|
// if ("Event_end".equals(resultBean.getData().getTaskDefKey())) {
|
||||
|
// LoanSubletApply subletApply = fetchBySid(businessSid);
|
||||
|
// subletApply.setClosingDate(new DateTime());
|
||||
|
// baseMapper.updateById(subletApply);
|
||||
|
// //todo 修改交车车辆台账状态
|
||||
|
// } else {
|
||||
|
// //极光推送
|
||||
|
// loanSubletApply = fetchBySid(businessSid);
|
||||
|
// MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery();
|
||||
|
// MessageFlowVo messageFlowVo = new MessageFlowVo();
|
||||
|
// BeanUtil.copyProperties(ufVo, messageFlowVo);
|
||||
|
// messageFlowVo.setProcDefId(loanSubletApply.getProcDefId());
|
||||
|
// messageFlowVo.setProcInsId(loanSubletApply.getProcInstId());
|
||||
|
// messageFlowableQuery.setUfVo(messageFlowVo);
|
||||
|
// messageFlowableQuery.setAppMap(appMap);
|
||||
|
// messageFlowableQuery.setBusinessSid(businessSid);
|
||||
|
// messageFlowableQuery.setModuleName("交回车辆二次转租申请");
|
||||
|
// messageFlowableQuery.setMsgContent(loanSubletApply.getApplyName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批");
|
||||
|
// messageFlowableQuery.setMsgTitle("交回车辆二次转租申请");
|
||||
|
// ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery);
|
||||
|
// }
|
||||
|
// return rb.success().setData(resultBean.getData());
|
||||
|
// } else {
|
||||
|
// return rb.setMsg("操作失败!提交的数据不一致");
|
||||
|
// }
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 撤回 |
||||
|
* |
||||
|
* @param query |
||||
|
* @return |
||||
|
*/ |
||||
|
public ResultBean revokeProcess(OutboundTaskQuery query) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
// if (StringUtils.isBlank(query.getUserSid())) {
|
||||
|
// return rb.setMsg("参数错误:userSid");
|
||||
|
// }
|
||||
|
// LoanSubletApply loanSubletApply = fetchBySid(query.getBusinessSid());
|
||||
|
// String businessTaskId = loanSubletApply.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()));
|
||||
|
// loanSubletApply = fetchBySid(query.getBusinessSid());
|
||||
|
// String procId = loanSubletApply.getProcInstId();
|
||||
|
// ResultBean<List<LatestTaskVo>> listResultBean = flowTaskFeign.getLatestTasks(procId);
|
||||
|
// String nextNodeUserSids = listResultBean.getData().get(0).getASSIGNEE_();
|
||||
|
// String nextName = listResultBean.getData().get(0).getName_();
|
||||
|
// List<String> receiveSidList = Arrays.asList(nextNodeUserSids.split(","));
|
||||
|
// if ("发起申请".equals(nextName)) {
|
||||
|
// //退回车辆处置状态
|
||||
|
// List<SubletVinList> vinLists1 = loanSubletVehService.selByMainSid(query.getBusinessSid());
|
||||
|
// if (!vinLists1.isEmpty()) {
|
||||
|
// vinLists1.stream().forEach(v -> {
|
||||
|
// loanRedemptionApplyService.updateVehLedgerDisposal(v.getLedgerSid(), "01", "未处置");
|
||||
|
// });
|
||||
|
// }
|
||||
|
// }
|
||||
|
// return rb.success().setData(resultBean.getData());
|
||||
|
// }
|
||||
|
// }
|
||||
|
return rb.setMsg("操作失败,提交的数据不一致!"); |
||||
|
} |
||||
|
|
||||
|
public ResultBean taskReject(OutboundTaskQuery query) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
// String businessSid = query.getBusinessSid();
|
||||
|
// LoanSubletApply loanSubletApply = fetchBySid(businessSid);
|
||||
|
// if (loanSubletApply == null) {
|
||||
|
// return rb.setMsg("该申请不存在");
|
||||
|
// }
|
||||
|
// String businessTaskId = loanSubletApply.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);
|
||||
|
// //若有网关,则赋值网关中判断的字段。
|
||||
|
//// boolean isTure = true;
|
||||
|
//// //去查询是否同意
|
||||
|
//// if (StringUtils.isNotBlank(loanCustomerRecord.getSalesUserSid())) {
|
||||
|
//// if (!loanCustomerRecord.getCreateBySid().equals(loanCustomerRecord.getSalesUserSid())) {
|
||||
|
//// isTure = false;
|
||||
|
//// }
|
||||
|
//// }
|
||||
|
//// variables.put("isTure", isTure);
|
||||
|
// flowTaskVo.setValues(variables);
|
||||
|
// 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);
|
||||
|
// //极光推送
|
||||
|
// loanSubletApply = fetchBySid(businessSid);
|
||||
|
// MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery();
|
||||
|
// MessageFlowVo messageFlowVo = new MessageFlowVo();
|
||||
|
// BeanUtil.copyProperties(ufVo, messageFlowVo);
|
||||
|
// String procId = loanSubletApply.getProcInstId();
|
||||
|
// messageFlowVo.setProcInsId(procId);
|
||||
|
// messageFlowVo.setProcDefId(loanSubletApply.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_();
|
||||
|
// List<String> receiveSidList = Arrays.asList(nextNodeUserSids.split(","));
|
||||
|
//// if (receiveSidList.size() == 1 && receiveSidList.get(0).equals(busVehicleApply.getCreateBySid())) {
|
||||
|
// if ("发起申请".equals(nextName)) {
|
||||
|
// messageFlowableQuery.setMsgContent("您提交的" + messageFlowableQuery.getModuleName() + "已被驳回,请重新提交");
|
||||
|
// //退回车辆处置状态
|
||||
|
// List<SubletVinList> vinLists1 = loanSubletVehService.selByMainSid(businessSid);
|
||||
|
// if (!vinLists1.isEmpty()) {
|
||||
|
// vinLists1.stream().forEach(v -> {
|
||||
|
// loanRedemptionApplyService.updateVehLedgerDisposal(v.getLedgerSid(), "01", "未处置");
|
||||
|
// });
|
||||
|
// }
|
||||
|
// } else {
|
||||
|
// SysUserVo userVo = sysUserFeign.fetchBySid(loanSubletApply.getCreateBySid()).getData();
|
||||
|
// if (userVo != null) {
|
||||
|
// if (StringUtils.isNotBlank(userVo.getName())) {
|
||||
|
// messageFlowableQuery.setMsgContent(userVo.getName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批");
|
||||
|
// }
|
||||
|
// }
|
||||
|
// }
|
||||
|
// messageFlowableQuery.setMsgTitle("交回车辆二次转租申请");
|
||||
|
// ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery);
|
||||
|
// return rb.success();
|
||||
|
// }
|
||||
|
// }
|
||||
|
return rb.setMsg("操作失败!提交的数据不一致!"); |
||||
|
} |
||||
|
|
||||
|
public ResultBean breakProcess(OutboundTaskQuery 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("请填写意见"); |
||||
|
} |
||||
|
// LoanSubletApply loanSubletApply = fetchBySid(query.getBusinessSid());
|
||||
|
// String businessTaskId = loanSubletApply.getTaskId();
|
||||
|
// if (StringUtils.isNotBlank(businessTaskId)) {
|
||||
|
// if (query.getUserSid().equals(loanSubletApply.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);
|
||||
|
// //终止任务后操作
|
||||
|
// LoanSubletApply entity = fetchBySid(query.getBusinessSid());
|
||||
|
// if (entity.getNodeState().equals("终止")) {
|
||||
|
// // 修改交回车辆台账状态
|
||||
|
// List<SubletVinList> vinLists = loanSubletVehService.selByMainSid(query.getBusinessSid());
|
||||
|
// if (!vinLists.isEmpty()) {
|
||||
|
// vinLists.stream().forEach(v -> {
|
||||
|
// loanRedemptionApplyService.updateVehLedgerDisposal(v.getLedgerSid(), "01", "未处置");
|
||||
|
// });
|
||||
|
// }
|
||||
|
//
|
||||
|
// }
|
||||
|
// 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);
|
||||
|
// //终止任务后操作
|
||||
|
// LoanSubletApply entity = fetchBySid(query.getBusinessSid());
|
||||
|
// if (entity.getNodeState().equals("终止")) {
|
||||
|
// // 修改交回车辆台账状态
|
||||
|
// List<SubletVinList> vinLists = loanSubletVehService.selByMainSid(query.getBusinessSid());
|
||||
|
// if (!vinLists.isEmpty()) {
|
||||
|
// vinLists.stream().forEach(v -> {
|
||||
|
// loanRedemptionApplyService.updateVehLedgerDisposal(v.getLedgerSid(), "01", "未处置");
|
||||
|
// });
|
||||
|
// }
|
||||
|
// }
|
||||
|
// return rb.success().setData(resultBean.getData());
|
||||
|
// }
|
||||
|
// }
|
||||
|
//
|
||||
|
// }
|
||||
|
return rb.setMsg("操作失败!提交的数据不一致!"); |
||||
|
} |
||||
|
|
||||
|
public ResultBean flowRecord(String procInsId) { |
||||
|
return flowTaskFeign.businessFlowRecord(procInsId); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<List<OutboundGetNodeVo>> getNextNodesForSubmit(OutboundGetNodeQuery query) { |
||||
|
// ResultBean<List<OutboundGetNodeVo>> rb = ResultBean.fireFail();
|
||||
|
// BusinessVariables bv = new BusinessVariables();
|
||||
|
// BeanUtil.copyProperties(query, bv);
|
||||
|
// //流程中的参数赋值、若有网关,则赋值网关中判断的字段。
|
||||
|
// Map<String, Object> variables = new HashMap<>();
|
||||
|
//
|
||||
|
// //根据业务sid查询排产信息
|
||||
|
// LoanSubletApply loanSubletApply = fetchBySid(query.getBusinessSid());
|
||||
|
// //若有网关,则赋值网关中判断的字段。
|
||||
|
//// boolean isTure = true;
|
||||
|
//// //去查询是否同意
|
||||
|
//// if (StringUtils.isNotBlank(loanCustomerRecord.getSalesUserSid())) {
|
||||
|
//// if (!loanCustomerRecord.getCreateBySid().equals(loanCustomerRecord.getSalesUserSid())) {
|
||||
|
//// isTure = false;
|
||||
|
//// }
|
||||
|
//// }
|
||||
|
//// variables.put("isTure", isTure);
|
||||
|
// bv.setFormVariables(variables);
|
||||
|
// bv.setModelId(loanSubletApply.getProcDefId());
|
||||
|
// ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv);
|
||||
|
// //判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
||||
|
// List<OutboundGetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), OutboundGetNodeVo.class)).collect(Collectors.toList());
|
||||
|
// return rb.success().setData(voList);
|
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
public ResultBean<List<OutboundGetNodeVo>> getPreviousNodesForReject(OutboundGetNodeQuery query) { |
||||
|
return null; |
||||
|
// ResultBean<List<SubletGetNodeVo>> rb = ResultBean.fireFail();
|
||||
|
// BusinessVariables bv = new BusinessVariables();
|
||||
|
// BeanUtil.copyProperties(query, bv);
|
||||
|
// //流程中的参数赋值、若有网关,则赋值网关中判断的字段。
|
||||
|
// Map<String, Object> variables = new HashMap<>();
|
||||
|
// //根据业务sid查询排产信息
|
||||
|
// LoanSubletApply loanSubletApply = fetchBySid(query.getBusinessSid());
|
||||
|
//// //若有网关,则赋值网关中判断的字段。
|
||||
|
//// boolean isTure = true;
|
||||
|
//// //去查询是否同意
|
||||
|
//// if (StringUtils.isNotBlank(loanCustomerRecord.getSalesUserSid())) {
|
||||
|
//// if (!loanCustomerRecord.getCreateBySid().equals(loanCustomerRecord.getSalesUserSid())) {
|
||||
|
//// isTure = false;
|
||||
|
//// }
|
||||
|
//// }
|
||||
|
//// variables.put("isTure", isTure);
|
||||
|
// bv.setFormVariables(variables);
|
||||
|
// bv.setModelId(loanSubletApply.getProcDefId());
|
||||
|
// ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv);
|
||||
|
// //判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
||||
|
// List<SubletGetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), SubletGetNodeVo.class)).collect(Collectors.toList());
|
||||
|
// return rb.success().setData(voList);
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
public ResultBean delegate(OutboundDelegateQuery query) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
FlowDelegateQuery delegateQuery = new FlowDelegateQuery(); |
||||
|
BeanUtil.copyProperties(query, delegateQuery); |
||||
|
flowFeign.delegate(delegateQuery); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public ResultBean<AppOutboundDetailsVo> appDetail(String sid) { |
||||
|
ResultBean<AppOutboundDetailsVo> rb = ResultBean.fireFail(); |
||||
|
AppOutboundDetailsVo vo = new AppOutboundDetailsVo(); |
||||
|
// LoanSubletApply entity = fetchBySid(sid);
|
||||
|
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
// if (null != entity) {
|
||||
|
// vo.setSid(sid);
|
||||
|
// String dept = "";
|
||||
|
// String applyName = "";
|
||||
|
// //----------------------------------------------------
|
||||
|
// if (StringUtils.isNotBlank(entity.getBorrowerName())) {
|
||||
|
// vo.setBorrName(entity.getBorrowerName());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(entity.getCustomer())) {
|
||||
|
// vo.setCustName(entity.getCustomer());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(entity.getVinOwner())) {
|
||||
|
// vo.setVinOwner(entity.getVinOwner());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(entity.getCustomerType())) {
|
||||
|
// vo.setCustomerType(entity.getCustomerType());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(entity.getPhoneNum())) {
|
||||
|
// vo.setPhoneNum(entity.getPhoneNum());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(entity.getCertificateType())) {
|
||||
|
// vo.setCertificateType(entity.getCertificateType());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(entity.getEndDate())) {
|
||||
|
// vo.setEndDate(entity.getEndDate());
|
||||
|
// }
|
||||
|
// if (null != entity.getAgree()) {
|
||||
|
// vo.setAgree(entity.getAgree().toString());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(entity.getIdNumber())) {
|
||||
|
// vo.setIdNumber(entity.getIdNumber());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(entity.getCardAddress())) {
|
||||
|
// vo.setCardAddress(entity.getCardAddress());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(entity.getBankName())) {
|
||||
|
// vo.setBankName(entity.getBankName());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(entity.getBankContractNo())) {
|
||||
|
// vo.setBankContractNo(entity.getBankContractNo());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(entity.getPlan())) {
|
||||
|
// vo.setPlan(entity.getPlan());
|
||||
|
// }
|
||||
|
// if (null != entity.getAmount()) {
|
||||
|
// vo.setAmount(entity.getAmount().toString());
|
||||
|
// }
|
||||
|
// //----------------------------------------------------
|
||||
|
// if (StringUtils.isNotBlank(entity.getProcInstId())) {
|
||||
|
// vo.setProcInsId(entity.getProcInstId());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(entity.getTaskId())) {
|
||||
|
// vo.setTaskId(entity.getTaskId());
|
||||
|
// }
|
||||
|
// if (null != entity.getApplyDate()) {
|
||||
|
// vo.setTime(sdf.format(entity.getApplyDate()));
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(entity.getDept())) {
|
||||
|
// dept = entity.getDept();
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(entity.getApplyName())) {
|
||||
|
// applyName = entity.getApplyName();
|
||||
|
// }
|
||||
|
// vo.setPublishInfo(dept + "-" + applyName);
|
||||
|
// List<LoanFile> fileList = loanFileService.selectByLinkSid(sid, LoanFileEnum.SUBLETAPPLY.getAttachType());
|
||||
|
// fileList.removeAll(Collections.singleton(null));
|
||||
|
// if (!fileList.isEmpty()) {
|
||||
|
// List<String> files = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).
|
||||
|
// collect(Collectors.toList());
|
||||
|
// vo.setFiles(files);
|
||||
|
// }
|
||||
|
// List<AppSubletVinListVo> vinList = new ArrayList<>();
|
||||
|
// List<SubletVinList> vinLists = loanSubletVehService.selByMainSid(sid);
|
||||
|
// if (!vinLists.isEmpty()) {
|
||||
|
// vinLists.stream().forEach(v -> {
|
||||
|
// AppSubletVinListVo appVinListVo = new AppSubletVinListVo();
|
||||
|
// if (StringUtils.isNotBlank(v.getVinNo())) {
|
||||
|
// appVinListVo.setVinNo(v.getVinNo());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(v.getVehModel())) {
|
||||
|
// appVinListVo.setModel(v.getVehModel());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(v.getVehType())) {
|
||||
|
// appVinListVo.setVehType(v.getVehType());
|
||||
|
// }
|
||||
|
// if (StringUtils.isNotBlank(v.getVehMark())) {
|
||||
|
// appVinListVo.setVehMark(v.getVehMark());
|
||||
|
// }
|
||||
|
// vinList.add(appVinListVo);
|
||||
|
// });
|
||||
|
// vo.setVinList(vinList);
|
||||
|
// }
|
||||
|
// }
|
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loanoutboundveh; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.yxt.anrui.riskcenter.api.loanoutboundveh.LoanOutboundVeh; |
||||
|
import com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinList; |
||||
|
import com.yxt.anrui.riskcenter.api.loansubletveh.LoanSubletVeh; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
@Mapper |
||||
|
public interface LoanOutboundVehMapper extends BaseMapper<LoanOutboundVeh> { |
||||
|
|
||||
|
int deleteByMainSid(@Param("mainSid") String mainSid); |
||||
|
|
||||
|
List<SubletVinList> selByMainSid(@Param("mainSid") String mainSid); |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
<?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.loanoutboundveh.LoanOutboundVehMapper"> |
||||
|
|
||||
|
<delete id="deleteByMainSid"> |
||||
|
DELETE |
||||
|
FROM loan_sublet_veh |
||||
|
WHERE mainSid = #{mainSid} |
||||
|
</delete> |
||||
|
<select id="selByMainSid" |
||||
|
resultType="com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinList"> |
||||
|
select vinSid, |
||||
|
vinNo, |
||||
|
vehMark, |
||||
|
vehModel, |
||||
|
busVinSid, |
||||
|
vehType, |
||||
|
ledgerSid |
||||
|
FROM loan_sublet_veh |
||||
|
WHERE mainSid = #{mainSid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,16 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loanoutboundveh; |
||||
|
|
||||
|
import com.yxt.anrui.riskcenter.api.loanoutboundveh.LoanOutboundVehFeign; |
||||
|
import com.yxt.anrui.riskcenter.api.loansubletveh.LoanSubletVehFeign; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
|
||||
|
@Api(tags = "交回车辆出库车辆列表") |
||||
|
@RestController |
||||
|
@RequestMapping("v1/loanoutboundveh") |
||||
|
public class LoanOutboundVehRest implements LoanOutboundVehFeign { |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.yxt.anrui.riskcenter.biz.loanoutboundveh; |
||||
|
|
||||
|
import com.yxt.anrui.riskcenter.api.loanoutboundveh.LoanOutboundVeh; |
||||
|
import com.yxt.anrui.riskcenter.api.loansubletapply.SubletVinList; |
||||
|
import com.yxt.anrui.riskcenter.api.loansubletveh.LoanSubletVeh; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: fzz |
||||
|
* @date: 2023/7/6 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class LoanOutboundVehService extends MybatisBaseService<LoanOutboundVehMapper, LoanOutboundVeh> { |
||||
|
|
||||
|
public int deleteByMainSid(String mainSid) { |
||||
|
return baseMapper.deleteByMainSid(mainSid); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public List<SubletVinList> selByMainSid(String sid) { |
||||
|
return baseMapper.selByMainSid(sid); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue