
51 changed files with 2735 additions and 26 deletions
@ -0,0 +1,38 @@ |
|||
package com.yxt.anrui.portal.api.sysparameter; |
|||
|
|||
/** |
|||
* @Author fan |
|||
* @Date 2022/11/14 22:46 |
|||
* @Description |
|||
*/ |
|||
public enum SysParameterEnum { |
|||
|
|||
JXSBAYXQ("001", "JXSBAYXQ"), |
|||
QKKHBAYXQ("002", "QKKHBAYXQ"), |
|||
; |
|||
|
|||
|
|||
/** |
|||
* 参数类型 |
|||
*/ |
|||
private final String parameterKey; |
|||
|
|||
/** |
|||
* 参数值 |
|||
*/ |
|||
private final String parameterValue; |
|||
|
|||
SysParameterEnum(String parameterKey, String parameterValue) { |
|||
this.parameterKey = parameterKey; |
|||
this.parameterValue = parameterValue; |
|||
} |
|||
|
|||
|
|||
public String getParameterKey() { |
|||
return parameterKey; |
|||
} |
|||
|
|||
public String getParameterValue() { |
|||
return parameterValue; |
|||
} |
|||
} |
@ -0,0 +1,89 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecord; |
|||
|
|||
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.util.Date; |
|||
|
|||
/** |
|||
* File: LoanCustomerRecord.java <br/> |
|||
* Description: 欠款客户备案. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-09-10 11:31:46 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "欠款客户备案", description = "欠款客户备案") |
|||
@TableName("loan_customer_record") |
|||
@Data |
|||
public class LoanCustomerRecord extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("申请人") |
|||
private String applyName; // 申请人
|
|||
@ApiModelProperty("销售专员sid") |
|||
private String salesmanSid; // 销售专员sid
|
|||
@ApiModelProperty("销售专员") |
|||
private String salesman; // 销售专员
|
|||
@ApiModelProperty("申请日期") |
|||
private Date applyDate; // 申请日期
|
|||
@ApiModelProperty("申请部门") |
|||
private String dept; |
|||
@ApiModelProperty("申请部门sid") |
|||
private String deptSid; |
|||
@ApiModelProperty("销售部门") |
|||
private String salesDept; |
|||
@ApiModelProperty("销售部门sid") |
|||
private String salesDeptSid; |
|||
@ApiModelProperty("销售经理主管") |
|||
private String manage; |
|||
@ApiModelProperty("销售经理主管sid") |
|||
private String manageSid; |
|||
@ApiModelProperty("有效期") |
|||
private String effectiveDate; |
|||
@ApiModelProperty("是否挂靠运输公司1是0否") |
|||
private String isAnchored; // 台数
|
|||
@ApiModelProperty("客户sid") |
|||
private String customerSid; |
|||
@ApiModelProperty("客户") |
|||
private String customer; |
|||
@ApiModelProperty("客户类型key") |
|||
private String customerTypeKey; |
|||
@ApiModelProperty("客户类型") |
|||
private String customerType; |
|||
@ApiModelProperty("挂靠公司企业名称") |
|||
private String businessName; // 台数
|
|||
@ApiModelProperty("统一社会信用代码") |
|||
private String taxpayerNo; |
|||
@ApiModelProperty("挂靠公司地址") |
|||
private String address; |
|||
@ApiModelProperty("挂靠公司电话") |
|||
private String phone; // 台数
|
|||
@ApiModelProperty("负责人") |
|||
private String leader; |
|||
@ApiModelProperty("法定代表人") |
|||
private String legal; |
|||
@ApiModelProperty("使用组织sid") |
|||
private String useOrgSid; // 使用组织sid
|
|||
@ApiModelProperty("使用组织名称") |
|||
private String useOrgName; // 使用组织名称
|
|||
@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("申请人组织路径") |
|||
private String orgSidPath; // 申请人组织路径
|
|||
|
|||
} |
@ -0,0 +1,95 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecord; |
|||
|
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecordstaff.LoanCustomerRecordStaffVo; |
|||
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/10/10 17:22 |
|||
*/ |
|||
@Data |
|||
public class LoanCustomerRecordDetailsVo implements Vo { |
|||
|
|||
private String sid; |
|||
@ApiModelProperty("登录用户sid") |
|||
private String userSid; // 登录用户sid
|
|||
@ApiModelProperty("申请人") |
|||
private String applyName; // 申请人
|
|||
@ApiModelProperty("申请日期") |
|||
private String applyDate; |
|||
@ApiModelProperty("销售专员sid") |
|||
private String salesmanSid; // 销售专员sid
|
|||
@ApiModelProperty("销售专员") |
|||
private String salesman; // 销售专员
|
|||
@ApiModelProperty("申请部门") |
|||
private String dept; |
|||
@ApiModelProperty("申请部门sid") |
|||
private String deptSid; |
|||
@ApiModelProperty("销售部门") |
|||
private String salesDept; |
|||
@ApiModelProperty("销售部门sid") |
|||
private String salesDeptSid; |
|||
@ApiModelProperty("销售经理主管") |
|||
private String manage; |
|||
@ApiModelProperty("销售经理主管sid") |
|||
private String manageSid; |
|||
@ApiModelProperty("是否挂靠运输公司1是0否") |
|||
private String isAnchored; // 是否挂靠运输公司1是0否
|
|||
@ApiModelProperty("客户sid") |
|||
private String customerSid; |
|||
@ApiModelProperty("客户") |
|||
private String customer; |
|||
@ApiModelProperty("客户类型key") |
|||
private String customerTypeKey; |
|||
@ApiModelProperty("客户类型") |
|||
private String customerType; |
|||
@ApiModelProperty("客户联系电话") |
|||
private String clientPhone; |
|||
@ApiModelProperty("客户证件号") |
|||
private String clientNo; |
|||
@ApiModelProperty("客户证件类型") |
|||
private String documents; |
|||
@ApiModelProperty("客户证件有效期") |
|||
private String documentsDate; |
|||
@ApiModelProperty("客户地址") |
|||
private String clientAddress; |
|||
@ApiModelProperty("挂靠公司企业名称") |
|||
private String businessName; // 台数
|
|||
@ApiModelProperty("统一社会信用代码") |
|||
private String taxpayerNo; |
|||
@ApiModelProperty("挂靠公司地址") |
|||
private String address; |
|||
@ApiModelProperty("挂靠公司电话") |
|||
private String phone; // 台数
|
|||
@ApiModelProperty("负责人") |
|||
private String leader; |
|||
@ApiModelProperty("法定代表人") |
|||
private String legal; |
|||
@ApiModelProperty("申请人组织路径") |
|||
private String orgPath; // 申请人组织路径
|
|||
@ApiModelProperty("企业开票人员信息") |
|||
private List<LoanCustomerRecordStaffVo> staffs = new ArrayList<>(); |
|||
@ApiModelProperty("营业执照") |
|||
private List<String> license = new ArrayList<>(); |
|||
@ApiModelProperty("法人和实际控制人身份证") |
|||
private List<String> idCard = new ArrayList<>(); |
|||
@ApiModelProperty("信息查询授权书") |
|||
private List<String> infoLetter = new ArrayList<>(); |
|||
@ApiModelProperty("车队挂靠协议") |
|||
private List<String> agreement = new ArrayList<>(); |
|||
@ApiModelProperty("其他资料") |
|||
private List<String> otherInfo = new ArrayList<>(); |
|||
@ApiModelProperty("任务id") |
|||
private String taskId; |
|||
@ApiModelProperty("实例id") |
|||
private String instanceId; |
|||
@ApiModelProperty("备注") |
|||
private String remarks; // 备注
|
|||
|
|||
} |
@ -0,0 +1,95 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecord; |
|||
|
|||
|
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecordstaff.LoanCustomerRecordStaffDto; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecordstaff.LoanCustomerRecordStaffVo; |
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui-base(安瑞基础信息模块) <br/> |
|||
* File: BaseFinBankDto.java <br/> |
|||
* Class: com.yxt.anrui.base.api.basefinbank.BaseFinBankDto <br/> |
|||
* Description: 资方信息表 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-09-10 11:31:46 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "资方信息表 数据传输对象", description = "资方信息表 数据传输对象") |
|||
@Data |
|||
public class LoanCustomerRecordDto implements Dto { |
|||
|
|||
private String sid; |
|||
@ApiModelProperty("登录用户sid") |
|||
private String userSid; // 申请人
|
|||
@ApiModelProperty("申请人") |
|||
private String applyName; // 申请人
|
|||
@ApiModelProperty("申请日期") |
|||
private String applyDate; |
|||
@ApiModelProperty("销售专员sid") |
|||
private String salesmanSid; // 销售专员sid
|
|||
@ApiModelProperty("销售专员") |
|||
private String salesman; // 销售专员
|
|||
@ApiModelProperty("申请部门") |
|||
private String dept; |
|||
@ApiModelProperty("申请部门sid") |
|||
private String deptSid; |
|||
@ApiModelProperty("销售部门") |
|||
private String salesDept; |
|||
@ApiModelProperty("销售部门sid") |
|||
private String salesDeptSid; |
|||
@ApiModelProperty("销售经理主管") |
|||
private String manage; |
|||
@ApiModelProperty("销售经理主管sid") |
|||
private String manageSid; |
|||
@ApiModelProperty("是否挂靠运输公司1是0否") |
|||
private String isAnchored; // 台数
|
|||
@ApiModelProperty("客户sid") |
|||
private String customerSid; |
|||
@ApiModelProperty("客户") |
|||
private String customer; |
|||
@ApiModelProperty("客户类型key") |
|||
private String customerTypeKey; |
|||
@ApiModelProperty("客户类型") |
|||
private String customerType; |
|||
@ApiModelProperty("挂靠公司企业名称") |
|||
private String businessName; // 台数
|
|||
@ApiModelProperty("统一社会信用代码") |
|||
private String taxpayerNo; |
|||
@ApiModelProperty("挂靠公司地址") |
|||
private String address; |
|||
@ApiModelProperty("挂靠公司电话") |
|||
private String phone; // 台数
|
|||
@ApiModelProperty("负责人") |
|||
private String leader; |
|||
@ApiModelProperty("法定代表人") |
|||
private String legal; |
|||
@ApiModelProperty("申请人组织路径") |
|||
private String orgPath; // 申请人组织路径
|
|||
@ApiModelProperty("企业开票人员信息") |
|||
private List<LoanCustomerRecordStaffDto> staffs = new ArrayList<>(); |
|||
@ApiModelProperty("营业执照") |
|||
private List<String> license = new ArrayList<>(); |
|||
@ApiModelProperty("法人和实际控制人身份证") |
|||
private List<String> idCard = new ArrayList<>(); |
|||
@ApiModelProperty("信息查询授权书") |
|||
private List<String> infoLetter = new ArrayList<>(); |
|||
@ApiModelProperty("车队挂靠协议") |
|||
private List<String> agreement = new ArrayList<>(); |
|||
@ApiModelProperty("其他资料") |
|||
private List<String> otherInfo = new ArrayList<>(); |
|||
@ApiModelProperty("备注") |
|||
private String remarks; // 备注
|
|||
|
|||
|
|||
} |
@ -0,0 +1,133 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecord; |
|||
|
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.app.AppCustomerRecordQuery; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.app.AppCustomerRecordVo; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.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 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; |
|||
|
|||
|
|||
/** |
|||
* File: BaseFinBankFeign.java <br/> |
|||
* Class: com.yxt.anrui.base.api.basefinbank.BaseFinBankFeign <br/> |
|||
* Description: 欠款客户备案. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-09-10 11:31:46 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "欠款客户备案") |
|||
@FeignClient( |
|||
contextId = "anrui-riskcenter-LoanCustomerRecord", |
|||
name = "anrui-riskcenter", |
|||
path = "v1/loancustomerrecord", |
|||
fallback = LoanCustomerRecordFeignFallback.class) |
|||
public interface LoanCustomerRecordFeign { |
|||
|
|||
/** |
|||
* 根据条件分页查询数据的列表(已测试) |
|||
* |
|||
* @param pq |
|||
*/ |
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<LoanCustomerRecordVo>> listPage(@RequestBody PagerQuery<LoanCustomerRecordQuery> pq); |
|||
|
|||
/** |
|||
* 编辑回显、详情查看 |
|||
* |
|||
* @param |
|||
*/ |
|||
@ApiOperation("编辑回显、详情查看") |
|||
@GetMapping("/detail/{sid}") |
|||
@ResponseBody |
|||
public ResultBean<LoanCustomerRecordDetailsVo> detail(@PathVariable("sid") String sid); |
|||
|
|||
/** |
|||
* 保存修改 |
|||
* @param |
|||
*/ |
|||
@ApiOperation("保存修改") |
|||
@PostMapping("/saveRecord") |
|||
@ResponseBody |
|||
public ResultBean<String> saveRecord(@RequestBody LoanCustomerRecordDto dto); |
|||
|
|||
/** |
|||
* 查询挂靠公司 |
|||
* @param |
|||
*/ |
|||
@ApiOperation("查询挂靠公司") |
|||
@GetMapping("/selectInvoingByOrgPath") |
|||
@ResponseBody |
|||
public ResultBean<List<LoanFinCompanyInvoicingVo>> selectInvoingByOrgPath(@RequestParam("orgPath") String orgPath); |
|||
|
|||
/** |
|||
* 批量删除(已测试) |
|||
* |
|||
* @param sids |
|||
*/ |
|||
@ApiOperation("批量删除") |
|||
@DeleteMapping("/deleteBySids") |
|||
@ResponseBody |
|||
public ResultBean deleteBySids(@RequestBody String[] sids); |
|||
|
|||
//------------------------------流程接口----------------------------------------------
|
|||
|
|||
@ApiOperation("欠款客户备案提交") |
|||
@PostMapping("/submit") |
|||
public ResultBean submitRecordApplication(@RequestBody @Valid SubmitCustomerRecordDto dto); |
|||
|
|||
@ApiOperation(value = "办理(同意)") |
|||
@PostMapping("/complete") |
|||
public ResultBean complete(@Valid @RequestBody CustomerRecordCompleteDto dto); |
|||
|
|||
@ApiOperation(value = "撤回流程") |
|||
@PostMapping(value = "/revokeProcess") |
|||
public ResultBean revokeProcess(@ApiParam(value = "工作流任务相关--请求参数") @RequestBody CustomerRecordTaskQuery query); |
|||
|
|||
@ApiOperation(value = "驳回任务") |
|||
@PostMapping(value = "/reject") |
|||
public ResultBean taskReject(@ApiParam(value = "工作流任务相关--请求参数") @RequestBody CustomerRecordTaskQuery query); |
|||
|
|||
@ApiOperation(value = "终止任务") |
|||
@PostMapping(value = "/breakProcess") |
|||
public ResultBean breakProcess(@RequestBody CustomerRecordTaskQuery 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<GetNodeVo>> getNextNodesForSubmit(@Valid @SpringQueryMap GetNodeQuery query); |
|||
|
|||
@ApiOperation(value = "获取上一个环节") |
|||
@GetMapping(value = "/getPreviousNodesForReject") |
|||
ResultBean<List<GetNodeVo>> getPreviousNodesForReject(@Valid @SpringQueryMap GetNodeQuery query); |
|||
|
|||
@ApiOperation(value = "加签") |
|||
@PostMapping(value = "/delegate") |
|||
public ResultBean delegate(@RequestBody CustomerRecordDelegateQuery distributorDelegateQuery); |
|||
|
|||
|
|||
//---------------------------app--------------------------------
|
|||
@ApiOperation("移动端-欠款客户备案分页列表") |
|||
@PostMapping("/getCustomerRecordList") |
|||
@ResponseBody |
|||
ResultBean<PagerVo<AppCustomerRecordVo>> getCustomerRecordList(@RequestBody PagerQuery<AppCustomerRecordQuery> pagerQuery); |
|||
|
|||
} |
@ -0,0 +1,93 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecord; |
|||
|
|||
|
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.app.AppCustomerRecordQuery; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.app.AppCustomerRecordVo; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.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 LoanCustomerRecordFeignFallback implements LoanCustomerRecordFeign { |
|||
|
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<LoanCustomerRecordVo>> listPage(PagerQuery<LoanCustomerRecordQuery> pq) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<LoanCustomerRecordDetailsVo> detail(String sid) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<String> saveRecord(LoanCustomerRecordDto dto) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<List<LoanFinCompanyInvoicingVo>> selectInvoingByOrgPath(String orgPath) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean deleteBySids(String[] sids) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean submitRecordApplication(SubmitCustomerRecordDto dto) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean complete(CustomerRecordCompleteDto dto) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean revokeProcess(CustomerRecordTaskQuery query) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean taskReject(CustomerRecordTaskQuery query) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean breakProcess(CustomerRecordTaskQuery query) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean flowRecord(String procInsId) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<List<GetNodeVo>> getNextNodesForSubmit(GetNodeQuery query) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<List<GetNodeVo>> getPreviousNodesForReject(GetNodeQuery query) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean delegate(CustomerRecordDelegateQuery distributorDelegateQuery) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<AppCustomerRecordVo>> getCustomerRecordList(PagerQuery<AppCustomerRecordQuery> pagerQuery) { |
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,55 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecord; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui-base(安瑞基础信息模块) <br/> |
|||
* File: BaseFinBankQuery.java <br/> |
|||
* Class: com.yxt.anrui.base.api.basefinbank.BaseFinBankQuery <br/> |
|||
* Description: 资方信息表 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-09-10 11:31:46 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "欠款客户备案 查询条件", description = "欠款客户备案 查询条件") |
|||
@Data |
|||
public class LoanCustomerRecordQuery implements Query { |
|||
|
|||
@ApiModelProperty("分公司") |
|||
private String company; // 使用组织名称
|
|||
@ApiModelProperty("申请人") |
|||
private String applyName; // 申请人
|
|||
@ApiModelProperty("申请部门") |
|||
private String dept; |
|||
@ApiModelProperty("销售专员") |
|||
private String salesman; // 销售专员
|
|||
@ApiModelProperty("申请开始日期") |
|||
private String applyStartDate; // 申请日期
|
|||
@ApiModelProperty("申请结束日期") |
|||
private String applyEndDate; // 申请日期
|
|||
@ApiModelProperty("客户名称") |
|||
private String customer; |
|||
@ApiModelProperty("有效期") |
|||
private String effectiveStartDate; |
|||
@ApiModelProperty("有效期") |
|||
private String effectiveEndDate; |
|||
@ApiModelProperty("客户类型") |
|||
private String customerTypeKey; |
|||
@ApiModelProperty("组织全路径") |
|||
private String orgPath; |
|||
@ApiModelProperty("菜单sid") |
|||
private String menuSid; |
|||
@ApiModelProperty("菜单url") |
|||
private String menuUrl; |
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
|
|||
} |
@ -0,0 +1,55 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecord; |
|||
|
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* Project: anrui-base(安瑞基础信息模块) <br/> |
|||
* File: BaseFinBankVo.java <br/> |
|||
* Class: com.yxt.anrui.base.api.basefinbank.BaseFinBankVo <br/> |
|||
* Description: 资方信息表 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-09-10 11:31:46 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "欠款客户备案 视图数据对象", description = "欠款客户备案 视图数据对象") |
|||
@Data |
|||
public class LoanCustomerRecordVo implements Vo { |
|||
|
|||
private String sid; |
|||
@ApiModelProperty("申请人") |
|||
private String applyName; // 申请人
|
|||
@ApiModelProperty("销售专员") |
|||
private String salesman; // 销售专员
|
|||
@ApiModelProperty("申请日期") |
|||
private String applyDate; // 申请日期
|
|||
@ApiModelProperty("申请部门") |
|||
private String dept; |
|||
@ApiModelProperty("客户") |
|||
private String customer; |
|||
@ApiModelProperty("客户类型") |
|||
private String customerType; |
|||
@ApiModelProperty("有效期") |
|||
private String effectiveDate; |
|||
@ApiModelProperty("分公司") |
|||
private String company; // 使用组织名称
|
|||
@ApiModelProperty("流程定义的id") |
|||
private String procDefId; // 流程定义的id
|
|||
@ApiModelProperty("流程实例的sid") |
|||
private String procInstId; // 流程实例的sid
|
|||
@ApiModelProperty("流程状态") |
|||
private String nodeState; // 流程状态
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; // 备注
|
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecord; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/10/11 17:05 |
|||
*/ |
|||
@Data |
|||
public class LoanFinCompanyInvoicingVo { |
|||
@ApiModelProperty("挂靠公司企业名称") |
|||
private String businessName; // 台数
|
|||
@ApiModelProperty("统一社会信用代码") |
|||
private String taxpayerNo; |
|||
@ApiModelProperty("挂靠公司地址") |
|||
private String address; |
|||
@ApiModelProperty("挂靠公司电话") |
|||
private String phone; // 台数
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecord.app; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/10/12 15:51 |
|||
*/ |
|||
@Data |
|||
public class AppCustomerRecordQuery implements Query { |
|||
@ApiModelProperty(value = "用户sid") |
|||
private String userSid; |
|||
@ApiModelProperty(value = "名称") |
|||
private String name; |
|||
@ApiModelProperty("机构sid") |
|||
private String orgPath; |
|||
private String menuSid; |
|||
} |
@ -0,0 +1,56 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecord.app; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/10/12 15:49 |
|||
*/ |
|||
@Data |
|||
public class AppCustomerRecordVo implements Vo { |
|||
/** |
|||
* 申请日期 |
|||
*/ |
|||
private String applyDate; |
|||
/** |
|||
* 申请人 |
|||
*/ |
|||
private String applyName; |
|||
/** |
|||
* 分公司 |
|||
*/ |
|||
private String company; |
|||
/** |
|||
* 申请部门 |
|||
*/ |
|||
private String dept; |
|||
/** |
|||
* 客户名称 |
|||
*/ |
|||
private String customer; |
|||
/** |
|||
* 有效期至 |
|||
*/ |
|||
private String effectiveDate; |
|||
/** |
|||
* 销售专员 |
|||
*/ |
|||
private String salesman; |
|||
/** |
|||
* 备案记录sid |
|||
*/ |
|||
private String sid; |
|||
/** |
|||
* 流程状态 |
|||
*/ |
|||
private String state; |
|||
|
|||
@ApiModelProperty("某某部门,某某人") |
|||
private String publishInfo; |
|||
private boolean updateBtn; |
|||
private boolean deleteBtn; |
|||
|
|||
} |
@ -0,0 +1,41 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecord.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 CustomerRecordCompleteDto 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.loancustomerrecord.flow; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/9/28 9:28 |
|||
*/ |
|||
@Data |
|||
public class CustomerRecordDelegateQuery { |
|||
@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,56 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecord.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 CustomerRecordTaskQuery 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,26 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecord.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 GetNodeQuery 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.loancustomerrecord.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 GetNodeVo 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,20 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecord.flow; |
|||
|
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.LoanCustomerRecordDto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/6/27 13:38 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class SubmitCustomerRecordDto extends LoanCustomerRecordDto { |
|||
private static final long serialVersionUID = 378585162071125756L; |
|||
@ApiModelProperty("流程实例id") |
|||
private String instanceId; |
|||
@ApiModelProperty("任务id") |
|||
private String taskId; |
|||
|
|||
} |
@ -0,0 +1,45 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecordstaff; |
|||
|
|||
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.util.Date; |
|||
|
|||
/** |
|||
* File: LoanCustomerRecord.java <br/> |
|||
* Description: 欠款客户备案. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-09-10 11:31:46 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "欠款客户备案企业人员信息", description = "欠款客户备案企业人员信息") |
|||
@TableName("loan_customer_record_staff") |
|||
@Data |
|||
public class LoanCustomerRecordStaff extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("欠款客户备案sid") |
|||
private String customerRecordSid; |
|||
|
|||
@ApiModelProperty("姓名(陕汽必须字段)") |
|||
private String name; |
|||
|
|||
@ApiModelProperty("身份key") |
|||
private String identityKey; |
|||
|
|||
@ApiModelProperty("身份value") |
|||
private String identityValue; |
|||
|
|||
@ApiModelProperty("联系电话(陕汽必须字段)") |
|||
private String mobile; |
|||
@ApiModelProperty("身份证号") |
|||
private String idNumber; |
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecordstaff; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/10/10 17:05 |
|||
*/ |
|||
@Data |
|||
public class LoanCustomerRecordStaffDto implements Dto { |
|||
|
|||
|
|||
@ApiModelProperty("姓名(陕汽必须字段)") |
|||
private String name; |
|||
@ApiModelProperty("身份key") |
|||
private String identityKey; |
|||
@ApiModelProperty("身份value") |
|||
private String identityValue; |
|||
@ApiModelProperty("联系电话(陕汽必须字段)") |
|||
private String mobile; |
|||
@ApiModelProperty("身份证号") |
|||
private String idNumber; |
|||
} |
@ -0,0 +1,57 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecordstaff; |
|||
|
|||
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 org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* File: BaseFinBankFeign.java <br/> |
|||
* Class: com.yxt.anrui.base.api.basefinbank.BaseFinBankFeign <br/> |
|||
* Description: 欠款客户备案. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-09-10 11:31:46 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "欠款客户备案企业人员") |
|||
@FeignClient( |
|||
contextId = "anrui-riskcenter-LoanCustomerRecordStaff", |
|||
name = "anrui-riskcenter", |
|||
path = "v1/loancustomerrecordstaff", |
|||
fallback = LoanCustomerRecordStaffFeignFallback.class) |
|||
public interface LoanCustomerRecordStaffFeign { |
|||
|
|||
/** |
|||
* 新增 |
|||
*/ |
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/saveStaff") |
|||
public ResultBean saveStaff(@RequestBody LoanCustomerRecordStaffDto dto); |
|||
|
|||
/** |
|||
* 根据欠款客户备案sid删除 |
|||
*/ |
|||
@ApiOperation("根据欠款客户备案sid删除") |
|||
@DeleteMapping("/deleteByMainSid") |
|||
public ResultBean deleteByMainSid(@RequestParam("customerRecordSid") String customerRecordSid); |
|||
|
|||
/** |
|||
* 根据欠款客户备案sid查询人员信息 |
|||
*/ |
|||
@ApiOperation("根据欠款客户备案sid删除") |
|||
@GetMapping("/getStaffsByMainSid") |
|||
@ResponseBody |
|||
public ResultBean<List<LoanCustomerRecordStaffVo>> getStaffsByMainSid(@RequestParam("customerRecordSid") String customerRecordSid); |
|||
|
|||
|
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecordstaff; |
|||
|
|||
|
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.LoanCustomerRecordQuery; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.LoanCustomerRecordVo; |
|||
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 LoanCustomerRecordStaffFeignFallback implements LoanCustomerRecordStaffFeign { |
|||
|
|||
|
|||
@Override |
|||
public ResultBean saveStaff(LoanCustomerRecordStaffDto dto) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean deleteByMainSid(String customerRecordSid) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<List<LoanCustomerRecordStaffVo>> getStaffsByMainSid(String customerRecordSid) { |
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.yxt.anrui.riskcenter.api.loancustomerrecordstaff; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/10/10 17:18 |
|||
*/ |
|||
@Data |
|||
public class LoanCustomerRecordStaffVo implements Vo { |
|||
|
|||
@ApiModelProperty("姓名(陕汽必须字段)") |
|||
private String name; |
|||
@ApiModelProperty("身份key") |
|||
private String identityKey; |
|||
@ApiModelProperty("身份value") |
|||
private String identityValue; |
|||
@ApiModelProperty("联系电话(陕汽必须字段)") |
|||
private String mobile; |
|||
@ApiModelProperty("身份证号") |
|||
private String idNumber; |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loancustomerrecord; |
|||
|
|||
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.loancustomerrecord.LoanCustomerRecord; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.LoanCustomerRecordDetailsVo; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.LoanCustomerRecordVo; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.app.AppCustomerRecordVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
import org.apache.ibatis.annotations.Update; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/7/6 |
|||
**/ |
|||
@Mapper |
|||
public interface LoanCustomerRecordMapper extends BaseMapper<LoanCustomerRecord> { |
|||
|
|||
IPage<LoanCustomerRecordVo> listPage(IPage<LoanCustomerRecord> page, @Param(Constants.WRAPPER) QueryWrapper<LoanCustomerRecord> qw); |
|||
|
|||
LoanCustomerRecordDetailsVo detail(String sid); |
|||
|
|||
@Update("update loan_customer_record set isDelete = 1 where sid =#{sid}") |
|||
int updateBySidDelete(String sid); |
|||
|
|||
int updateFlowFiled(Map<String, Object> map); |
|||
|
|||
IPage<AppCustomerRecordVo> getCustomerRecordList(IPage<LoanCustomerRecord> page, @Param(Constants.WRAPPER) QueryWrapper<LoanCustomerRecord> qw); |
|||
} |
@ -0,0 +1,74 @@ |
|||
<?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.loancustomerrecord.LoanCustomerRecordMapper"> |
|||
<update id="updateFlowFiled"> |
|||
UPDATE loan_customer_record |
|||
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.loancustomerrecord.LoanCustomerRecordVo"> |
|||
SELECT |
|||
sid, |
|||
nodeState, |
|||
useOrgName as company, |
|||
dept, |
|||
applyName, |
|||
date_format(applyDate, '%Y-%m-%d') as applyDate, |
|||
salesman, |
|||
customer, |
|||
effectiveDate, |
|||
remarks, |
|||
customerType, |
|||
procDefId, |
|||
procInstId |
|||
FROM loan_customer_record |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
<select id="detail" |
|||
resultType="com.yxt.anrui.riskcenter.api.loancustomerrecord.LoanCustomerRecordDetailsVo"> |
|||
SELECT sid, |
|||
nodeState, |
|||
useOrgName as company, |
|||
dept, |
|||
applyName, |
|||
date_format(applyDate, '%Y-%m-%d') as applyDate, |
|||
salesman, |
|||
customer, |
|||
effectiveDate, |
|||
remarks, |
|||
procDefId, |
|||
procInstId |
|||
FROM loan_customer_record |
|||
where sid = #{sid} |
|||
</select> |
|||
<select id="getCustomerRecordList" |
|||
resultType="com.yxt.anrui.riskcenter.api.loancustomerrecord.app.AppCustomerRecordVo"> |
|||
SELECT |
|||
sid, |
|||
nodeState as `state`, |
|||
useOrgName as company, |
|||
dept, |
|||
applyName, |
|||
date_format(applyDate, '%Y-%m-%d') as applyDate, |
|||
salesman, |
|||
customer, |
|||
effectiveDate |
|||
FROM loan_customer_record |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,127 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loancustomerrecord; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.yxt.anrui.base.api.basedistributor.app.apply.AppDistributorApplyVo; |
|||
import com.yxt.anrui.flowable.api.utils.ProcDefEnum; |
|||
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.*; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.app.AppCustomerRecordQuery; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.app.AppCustomerRecordVo; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.flow.*; |
|||
import com.yxt.anrui.riskcenter.api.loanfinpolicyrecordapply.LoanFinPolicyRecordApply; |
|||
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterVo; |
|||
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/loancustomerrecord") |
|||
public class LoanCustomerRecordRest implements LoanCustomerRecordFeign { |
|||
|
|||
@Autowired |
|||
private LoanCustomerRecordService loanCustomerRecordService; |
|||
|
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<LoanCustomerRecordVo>> listPage(PagerQuery<LoanCustomerRecordQuery> pq) { |
|||
ResultBean<PagerVo<LoanCustomerRecordVo>> rb = ResultBean.fireFail(); |
|||
PagerVo<LoanCustomerRecordVo> pv = loanCustomerRecordService.listPage(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<LoanCustomerRecordDetailsVo> detail(String sid) { |
|||
return loanCustomerRecordService.detail(sid); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<String> saveRecord(LoanCustomerRecordDto dto) { |
|||
return loanCustomerRecordService.saveRecord(dto); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<List<LoanFinCompanyInvoicingVo>> selectInvoingByOrgPath(String orgPath) { |
|||
return loanCustomerRecordService.selectInvoingByOrgPath(orgPath); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean deleteBySids(String[] sids) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
for (String sid : sids) { |
|||
LoanCustomerRecord loanCustomerRecord = loanCustomerRecordService.fetchBySid(sid); |
|||
if (null != loanCustomerRecord) { |
|||
if (!loanCustomerRecord.getNodeState().equals("待提交")) { |
|||
return rb.setMsg("删除的数据中包含已经提交审批的数据,删除失败"); |
|||
} |
|||
} |
|||
int count = loanCustomerRecordService.updateBySidDelete(sid); |
|||
if (count == 0) { |
|||
return rb.setMsg("删除失败"); |
|||
} |
|||
} |
|||
return ResultBean.fireSuccess().setMsg("删除成功"); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean submitRecordApplication(SubmitCustomerRecordDto dto) { |
|||
return loanCustomerRecordService.submitRecordApplication(dto); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean complete(CustomerRecordCompleteDto dto) { |
|||
BusinessVariables bv = new BusinessVariables(); |
|||
BeanUtil.copyProperties(dto, bv); |
|||
bv.setModelId(ProcDefEnum.LOANCUSTOMERRECORD.getProDefId()); |
|||
return loanCustomerRecordService.complete(bv); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean revokeProcess(CustomerRecordTaskQuery query) { |
|||
return loanCustomerRecordService.revokeProcess(query); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean taskReject(CustomerRecordTaskQuery query) { |
|||
return loanCustomerRecordService.taskReject(query); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean breakProcess(CustomerRecordTaskQuery query) { |
|||
return loanCustomerRecordService.breakProcess(query); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean flowRecord(String procInsId) { |
|||
return loanCustomerRecordService.flowRecord(procInsId); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<List<GetNodeVo>> getNextNodesForSubmit(GetNodeQuery query) { |
|||
return loanCustomerRecordService.getNextNodesForSubmit(query); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<List<GetNodeVo>> getPreviousNodesForReject(GetNodeQuery query) { |
|||
return loanCustomerRecordService.getPreviousNodesForReject(query); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean delegate(CustomerRecordDelegateQuery customerRecordDelegateQuery) { |
|||
return loanCustomerRecordService.delegate(customerRecordDelegateQuery); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<AppCustomerRecordVo>> getCustomerRecordList(PagerQuery<AppCustomerRecordQuery> pagerQuery) { |
|||
ResultBean<PagerVo<AppCustomerRecordVo>> rb = ResultBean.fireFail(); |
|||
PagerVo<AppCustomerRecordVo> pv = loanCustomerRecordService.getCustomerRecordList(pagerQuery); |
|||
return rb.success().setData(pv); |
|||
} |
|||
} |
@ -0,0 +1,935 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loancustomerrecord; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import cn.hutool.core.date.DateUtil; |
|||
import com.alibaba.fastjson.JSON; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.google.common.util.concurrent.ThreadFactoryBuilder; |
|||
import com.yxt.anrui.base.api.basedistributor.BaseDistributor; |
|||
import com.yxt.anrui.base.api.basedistributor.app.BaseDistributorsQuery; |
|||
import com.yxt.anrui.base.api.basedistributor.app.apply.AppDistributorApplyVo; |
|||
import com.yxt.anrui.base.api.basedistributorappendix.BaseDistributorAppendix; |
|||
import com.yxt.anrui.base.api.basedistributorapply.BaseDistributorApply; |
|||
import com.yxt.anrui.base.api.basedistributorapply.flow.DistributorDelegateQuery; |
|||
import com.yxt.anrui.base.api.basedistributorapplyappendix.BaseDistributorApplyAppendixVo; |
|||
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign; |
|||
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo; |
|||
import com.yxt.anrui.fin.api.fincompanyinvoicing.FinCompanyInvoicingDetailsVo; |
|||
import com.yxt.anrui.fin.api.fincompanyinvoicing.FinCompanyInvoicingDto; |
|||
import com.yxt.anrui.fin.api.fincompanyinvoicing.FinCompanyInvoicingFeign; |
|||
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.sysparameter.SysParameterEnum; |
|||
import com.yxt.anrui.portal.api.sysparameter.SysParameterFeign; |
|||
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.loancustomerrecord.*; |
|||
|
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.app.AppCustomerRecordQuery; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.app.AppCustomerRecordVo; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.flow.*; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecordstaff.LoanCustomerRecordStaff; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecordstaff.LoanCustomerRecordStaffDto; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecordstaff.LoanCustomerRecordStaffVo; |
|||
import com.yxt.anrui.riskcenter.api.loanfile.LoanFile; |
|||
import com.yxt.anrui.riskcenter.api.loanfile.LoanFileEnum; |
|||
import com.yxt.anrui.riskcenter.biz.loancustomerrecordstaff.LoanCustomerRecordStaffService; |
|||
import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService; |
|||
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 io.swagger.annotations.ApiModelProperty; |
|||
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 LoanCustomerRecordService extends MybatisBaseService<LoanCustomerRecordMapper, LoanCustomerRecord> { |
|||
|
|||
@Autowired |
|||
private SysUserFeign sysUserFeign; |
|||
|
|||
@Autowired |
|||
private LoanCustomerRecordStaffService loanCustomerRecordStaffService; |
|||
|
|||
@Autowired |
|||
private LoanFileService loanFileService; |
|||
@Autowired |
|||
private SysStaffOrgFeign sysStaffOrgFeign; |
|||
@Autowired |
|||
private SysOrganizationFeign sysOrganizationFeign; |
|||
@Autowired |
|||
private CrmCustomerTempFeign crmCustomerTempFeign; |
|||
@Autowired |
|||
private FinCompanyInvoicingFeign finCompanyInvoicingFeign; |
|||
@Autowired |
|||
private FileUploadComponent fileUploadComponent; |
|||
@Autowired |
|||
private MessageFeign messageFeign; |
|||
@Autowired |
|||
private FlowTaskFeign flowTaskFeign; |
|||
@Autowired |
|||
private FlowFeign flowFeign; |
|||
@Autowired |
|||
private FlowableFeign flowableFeign; |
|||
@Autowired |
|||
private SysParameterFeign sysParameterFeign; |
|||
|
|||
/** |
|||
* 分页列表 |
|||
* |
|||
* @param pq |
|||
* @return |
|||
*/ |
|||
public PagerVo<LoanCustomerRecordVo> listPage(PagerQuery<LoanCustomerRecordQuery> pq) { |
|||
IPage<LoanCustomerRecord> page = PagerUtil.queryToPage(pq); |
|||
LoanCustomerRecordQuery pagerQuery = pq.getParams(); |
|||
QueryWrapper<LoanCustomerRecord> 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("orgSidPath", orgSidPath); |
|||
} else if ("2".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i2); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("3".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i3); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("4".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i4); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("5".equals(orgLevelKey)) { |
|||
qw.eq("createBySid", pagerQuery.getUserSid()); |
|||
} else { |
|||
PagerVo<LoanCustomerRecordVo> p = new PagerVo<>(); |
|||
return p; |
|||
} |
|||
} else { |
|||
PagerVo<LoanCustomerRecordVo> p = new PagerVo<>(); |
|||
return p; |
|||
} |
|||
//=======================
|
|||
//分公司
|
|||
if (StringUtils.isNotBlank(pagerQuery.getCompany())) { |
|||
qw.like("useOrgName", pagerQuery.getCompany()); |
|||
} |
|||
//申请部门
|
|||
if (StringUtils.isNotBlank(pagerQuery.getDept())) { |
|||
qw.like("dept", pagerQuery.getDept()); |
|||
} |
|||
//申请人
|
|||
if (StringUtils.isNotBlank(pagerQuery.getApplyName())) { |
|||
qw.like("applyName", pagerQuery.getApplyName()); |
|||
} |
|||
//销售专员
|
|||
if (StringUtils.isNotBlank(pagerQuery.getSalesman())) { |
|||
qw.like("salesman", pagerQuery.getSalesman()); |
|||
} |
|||
//客户
|
|||
if (StringUtils.isNotBlank(pagerQuery.getCustomer())) { |
|||
qw.like("customer", pagerQuery.getCustomer()); |
|||
} |
|||
//客户
|
|||
if (StringUtils.isNotBlank(pagerQuery.getCustomerTypeKey())) { |
|||
qw.eq("customerTypeKey", pagerQuery.getCustomerTypeKey()); |
|||
} |
|||
String applyStartTime = pagerQuery.getApplyStartDate(); |
|||
String applyEndTime = pagerQuery.getApplyEndDate(); |
|||
qw.apply(StringUtils.isNotEmpty(applyStartTime), "date_format (applyDate,'%Y-%m-%d') >= date_format('" + applyStartTime + "','%Y-%m-%d')"). |
|||
apply(StringUtils.isNotEmpty(applyEndTime), "date_format (applyDate,'%Y-%m-%d') <= date_format('" + applyEndTime + "','%Y-%m-%d')" |
|||
); |
|||
String effStartTime = pagerQuery.getEffectiveStartDate(); |
|||
String effEndTime = pagerQuery.getEffectiveEndDate(); |
|||
qw.apply(StringUtils.isNotEmpty(effStartTime), "date_format (effectiveDate,'%Y-%m-%d') >= date_format('" + effStartTime + "','%Y-%m-%d')"). |
|||
apply(StringUtils.isNotEmpty(effEndTime), "date_format (effectiveDate,'%Y-%m-%d') <= date_format('" + effEndTime + "','%Y-%m-%d')" |
|||
); |
|||
qw.eq("isDelete", 0); |
|||
qw.orderByDesc("createTime"); |
|||
IPage<LoanCustomerRecordVo> pagging = baseMapper.listPage(page, qw); |
|||
PagerVo<LoanCustomerRecordVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
public ResultBean<LoanCustomerRecordDetailsVo> detail(String sid) { |
|||
ResultBean<LoanCustomerRecordDetailsVo> rb = ResultBean.fireFail(); |
|||
LoanCustomerRecordDetailsVo vo = new LoanCustomerRecordDetailsVo(); |
|||
LoanCustomerRecord entity = fetchBySid(sid); |
|||
BeanUtil.copyProperties(entity, vo); |
|||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|||
if (null != entity.getApplyDate()) { |
|||
vo.setApplyDate(sdf.format(entity.getApplyDate())); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getCreateBySid())) { |
|||
vo.setUserSid(entity.getCreateBySid()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getOrgSidPath())) { |
|||
vo.setOrgPath(entity.getOrgSidPath()); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getProcInstId())) { |
|||
vo.setInstanceId(entity.getProcInstId()); |
|||
} |
|||
//查询客户基本信息
|
|||
if (StringUtils.isNotBlank(entity.getCustomerSid())) { |
|||
String customerSid = entity.getCustomerSid(); |
|||
CrmCustomerTempVo customerTempVo = crmCustomerTempFeign.fetchSid(customerSid).getData(); |
|||
if (null != customerTempVo) { |
|||
if (StringUtils.isNotBlank(customerTempVo.getMobile())) { |
|||
vo.setClientPhone(customerTempVo.getMobile()); |
|||
} |
|||
if (StringUtils.isNotBlank(customerTempVo.getIDNumber())) { |
|||
vo.setClientNo(customerTempVo.getIDNumber()); |
|||
} |
|||
if (StringUtils.isNotBlank(customerTempVo.getCertificateType())) { |
|||
vo.setDocuments(customerTempVo.getCertificateType()); |
|||
} |
|||
if (StringUtils.isNotBlank(customerTempVo.getEndDate())) { |
|||
vo.setDocumentsDate(customerTempVo.getEndDate()); |
|||
} |
|||
if (StringUtils.isNotBlank(customerTempVo.getAddress())) { |
|||
vo.setClientAddress(customerTempVo.getAddress()); |
|||
} |
|||
} |
|||
} |
|||
//查询企业人员信息
|
|||
List<LoanCustomerRecordStaffVo> staffVos = loanCustomerRecordStaffService.getStaffsByMainSid(sid).getData(); |
|||
staffVos.removeAll(Collections.singleton(null)); |
|||
if (!staffVos.isEmpty()) { |
|||
vo.setStaffs(staffVos); |
|||
} |
|||
//信息查询授权书
|
|||
List<LoanFile> fileList = loanFileService.selectByLinkSid(sid, LoanFileEnum.INFO_LETTER.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> infoLetter = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()). |
|||
collect(Collectors.toList()); |
|||
vo.setInfoLetter(infoLetter); |
|||
} |
|||
//车队挂靠协议
|
|||
fileList = loanFileService.selectByLinkSid(sid, LoanFileEnum.AGREEMENT.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> agreement = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList()); |
|||
vo.setAgreement(agreement); |
|||
} |
|||
//营业执照
|
|||
fileList = loanFileService.selectByLinkSid(sid, LoanFileEnum.LICENSE.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> license = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList()); |
|||
vo.setLicense(license); |
|||
} |
|||
//法人和实际控制人身份证
|
|||
fileList = loanFileService.selectByLinkSid(sid, LoanFileEnum.ID_CARD.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> idCard = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList()); |
|||
vo.setIdCard(idCard); |
|||
} |
|||
//其他资料
|
|||
fileList = loanFileService.selectByLinkSid(sid, LoanFileEnum.OTHER_INFO.getAttachType()); |
|||
fileList.removeAll(Collections.singleton(null)); |
|||
if (!fileList.isEmpty()) { |
|||
List<String> otherInfo = fileList.stream().map(c -> fileUploadComponent.getUrlPrefix() + c.getFilePath()).collect(Collectors.toList()); |
|||
vo.setOtherInfo(otherInfo); |
|||
} |
|||
return rb.success().setData(vo); |
|||
} |
|||
|
|||
@Transactional(rollbackFor = Exception.class) |
|||
public ResultBean<String> saveRecord(LoanCustomerRecordDto dto) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
String sid = ""; |
|||
// 企业开票人员信息
|
|||
List<LoanCustomerRecordStaffDto> staffs = dto.getStaffs(); |
|||
// 营业执照
|
|||
List<String> license = dto.getLicense(); |
|||
// 法人和实际控制人身份证
|
|||
List<String> idCard = dto.getIdCard(); |
|||
// 信息查询授权书
|
|||
List<String> infoLetter = dto.getInfoLetter(); |
|||
// 车队挂靠协议
|
|||
List<String> agreement = dto.getAgreement(); |
|||
// 其他资料
|
|||
List<String> otherInfo = dto.getOtherInfo(); |
|||
if (StringUtils.isNotBlank(dto.getCustomerTypeKey())) { |
|||
if (dto.getCustomerTypeKey().equals("1")) { |
|||
dto.setStaffs(new ArrayList<>()); |
|||
} else if (dto.getCustomerTypeKey().equals("2")) { |
|||
dto.setBusinessName(""); |
|||
dto.setPhone(""); |
|||
dto.setTaxpayerNo(""); |
|||
dto.setAddress(""); |
|||
dto.setLeader(""); |
|||
dto.setLegal(""); |
|||
} |
|||
} |
|||
if (StringUtils.isNotBlank(dto.getSid())) { |
|||
sid = dto.getSid(); |
|||
LoanCustomerRecord loanCustomerRecord = fetchBySid(sid); |
|||
BeanUtil.copyProperties(dto, loanCustomerRecord, "id", "sid"); |
|||
baseMapper.updateById(loanCustomerRecord); |
|||
} else { |
|||
LoanCustomerRecord loanCustomerRecord = new LoanCustomerRecord(); |
|||
sid = loanCustomerRecord.getSid(); |
|||
BeanUtil.copyProperties(dto, loanCustomerRecord, "id", "sid"); |
|||
loanCustomerRecord.setOrgSidPath(dto.getOrgPath()); |
|||
loanCustomerRecord.setCreateBySid(dto.getUserSid()); |
|||
ResultBean<String> orgSidByPath = sysStaffOrgFeign.getOrgSidByPath(dto.getOrgPath()); |
|||
if (orgSidByPath.getSuccess()) { |
|||
String userOrgSid = orgSidByPath.getData(); |
|||
loanCustomerRecord.setUseOrgSid(userOrgSid); |
|||
ResultBean<SysOrganizationVo> organizationVo = sysOrganizationFeign.fetchBySid(userOrgSid); |
|||
if (organizationVo.getSuccess()) { |
|||
SysOrganizationVo organizationVoData = organizationVo.getData(); |
|||
if (null != organizationVoData) { |
|||
loanCustomerRecord.setUseOrgName(organizationVoData.getName()); |
|||
} |
|||
} |
|||
} |
|||
loanCustomerRecord.setNodeState("待提交"); |
|||
baseMapper.insert(loanCustomerRecord); |
|||
} |
|||
if (StringUtils.isNotBlank(sid)) { |
|||
loanCustomerRecordStaffService.deleteByMainSid(sid); |
|||
if (!staffs.isEmpty()) { |
|||
for (LoanCustomerRecordStaffDto staffDto : staffs) { |
|||
LoanCustomerRecordStaff staff = new LoanCustomerRecordStaff(); |
|||
BeanUtil.copyProperties(staffDto, staff, "id", "sid"); |
|||
staff.setCustomerRecordSid(sid); |
|||
loanCustomerRecordStaffService.insert(staff); |
|||
} |
|||
} |
|||
//删除附件表中关于该linkSid的文件
|
|||
loanFileService.deleteByLinkSid(sid); |
|||
if (!license.isEmpty()) { |
|||
loanFileService.saveAll(sid, license, LoanFileEnum.LICENSE.getAttachType()); |
|||
} |
|||
if (!idCard.isEmpty()) { |
|||
loanFileService.saveAll(sid, idCard, LoanFileEnum.ID_CARD.getAttachType()); |
|||
} |
|||
if (!infoLetter.isEmpty()) { |
|||
loanFileService.saveAll(sid, infoLetter, LoanFileEnum.INFO_LETTER.getAttachType()); |
|||
} |
|||
if (!agreement.isEmpty()) { |
|||
loanFileService.saveAll(sid, agreement, LoanFileEnum.AGREEMENT.getAttachType()); |
|||
} |
|||
if (!otherInfo.isEmpty()) { |
|||
loanFileService.saveAll(sid, otherInfo, LoanFileEnum.OTHER_INFO.getAttachType()); |
|||
} |
|||
} |
|||
return rb.success().setData(sid); |
|||
} |
|||
|
|||
public ResultBean<List<LoanFinCompanyInvoicingVo>> selectInvoingByOrgPath(String orgPath) { |
|||
ResultBean<List<LoanFinCompanyInvoicingVo>> rb = ResultBean.fireFail(); |
|||
List<LoanFinCompanyInvoicingVo> voList = new ArrayList<>(); |
|||
List<FinCompanyInvoicingDetailsVo> data = finCompanyInvoicingFeign.selectInvoingByOrgPath(orgPath).getData(); |
|||
if (!data.isEmpty()) { |
|||
for (FinCompanyInvoicingDetailsVo datum : data) { |
|||
LoanFinCompanyInvoicingVo vo = new LoanFinCompanyInvoicingVo(); |
|||
if (StringUtils.isNotBlank(datum.getPhone())) { |
|||
vo.setPhone(datum.getPhone()); |
|||
} |
|||
if (StringUtils.isNotBlank(datum.getAddress())) { |
|||
vo.setAddress(datum.getAddress()); |
|||
} |
|||
if (StringUtils.isNotBlank(datum.getName())) { |
|||
vo.setBusinessName(datum.getName()); |
|||
} |
|||
if (StringUtils.isNotBlank(datum.getTaxpayerNo())) { |
|||
vo.setTaxpayerNo(datum.getTaxpayerNo()); |
|||
} |
|||
voList.add(vo); |
|||
} |
|||
} |
|||
return rb.success().setData(voList); |
|||
} |
|||
|
|||
public int updateBySidDelete(String sid) { |
|||
return baseMapper.updateBySidDelete(sid); |
|||
} |
|||
|
|||
//-------------------------------------流程------------------------------------------------/
|
|||
|
|||
/** |
|||
* 判断提交的流程是否被允许 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
private synchronized int submitBusinessData(SubmitCustomerRecordDto dto, LoanCustomerRecord loanCustomerRecord) { |
|||
int r = 0; |
|||
if (StringUtils.isBlank(dto.getSid())) { |
|||
r = 1; |
|||
} else { |
|||
if (loanCustomerRecord != null) { |
|||
String businessTaskId = loanCustomerRecord.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(SubmitCustomerRecordDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
LoanCustomerRecord loanCustomerRecord = fetchBySid(dto.getSid()); |
|||
int r = submitBusinessData(dto, loanCustomerRecord); |
|||
if (r == 3) { |
|||
return rb.setMsg("该申请不存在"); |
|||
} |
|||
if (r == 0) { |
|||
return rb.setMsg("操作失败!提交的数据不一致"); |
|||
} |
|||
String businessSid = ""; |
|||
//新增修改保存
|
|||
ResultBean<String> resultBean = saveRecord(dto); |
|||
if (resultBean.getSuccess()) { |
|||
businessSid = resultBean.getData(); |
|||
} |
|||
LoanCustomerRecord 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<>(); |
|||
//若有网关,则赋值网关中判断的字段。
|
|||
variables.put("businessSid", businessSid); |
|||
appMap.put("sid", businessSid); |
|||
variables.put("app", appMap); |
|||
LoanCustomerRecord loanCustomerRecord1 = fetchBySid(businessSid); |
|||
String msgBusinessSid = loanCustomerRecord1.getSid(); |
|||
//用户的部门全路径sid
|
|||
bv.setOrgSidPath(loanCustomerRecord1.getOrgSidPath()); |
|||
//业务sid
|
|||
bv.setBusinessSid(businessSid); |
|||
//用户sid
|
|||
bv.setUserSid(dto.getUserSid()); |
|||
bv.setFormVariables(variables); |
|||
String nextNodeUserSids_ = sysOrganization.getManagerSid(); |
|||
bv.setNextNodeUserSids(nextNodeUserSids_); |
|||
//流程定义id
|
|||
bv.setModelId(ProcDefEnum.LOANCUSTOMERRECORD.getProDefId()); |
|||
if (r == 1) { |
|||
//流程定义id
|
|||
bv.setModelId(ProcDefEnum.LOANCUSTOMERRECORD.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(loanCustomerRecord1.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"); |
|||
} |
|||
LoanCustomerRecord loanCustomerRecord2 = fetchBySid(dto.getSid()); |
|||
bv.setTaskId(dto.getTaskId()); |
|||
bv.setTaskDefKey(loanCustomerRecord2.getNodeSid()); |
|||
bv.setComment("重新提交"); |
|||
bv.setInstanceId(dto.getInstanceId()); |
|||
return complete(bv); |
|||
} |
|||
return rb; |
|||
} |
|||
|
|||
public ResultBean complete(BusinessVariables bv) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
String businessSid = bv.getBusinessSid(); |
|||
LoanCustomerRecord loanCustomerRecord = this.fetchBySid(businessSid); |
|||
if (bv.getTaskId().equals(loanCustomerRecord.getTaskId())) { |
|||
bv.setOrgSidPath(loanCustomerRecord.getOrgSidPath()); |
|||
//流程中的参数赋值
|
|||
Map<String, Object> variables = new HashMap<>(); |
|||
Map<String, Object> appMap = new HashMap<>(); |
|||
//若有网关,则赋值网关中判断的字段。
|
|||
|
|||
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()); |
|||
} |
|||
int i = updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
|||
if ("Event_end".equals(resultBean.getData().getTaskDefKey())) { |
|||
LoanCustomerRecord entity = this.fetchBySid(businessSid); |
|||
//更新有效期
|
|||
//----系统参数中获取有效期------
|
|||
String qkkhba = sysParameterFeign.fetchByParNo(SysParameterEnum.QKKHBAYXQ.getParameterValue()).getData(); |
|||
String effectiveDate = ""; |
|||
if (StringUtils.isNotBlank(qkkhba)) { |
|||
Date dateByDay = getDateByDay(new Date(), Integer.valueOf(qkkhba)); |
|||
effectiveDate = DateUtil.format(dateByDay, "yyyy-MM-dd"); |
|||
entity.setEffectiveDate(effectiveDate); |
|||
baseMapper.updateById(entity); |
|||
} |
|||
//判断是企业还是个人之后判断是否生成企业开票信息。
|
|||
if (StringUtils.isNotBlank(entity.getCustomerTypeKey())) { |
|||
FinCompanyInvoicingDto invoicingDto = new FinCompanyInvoicingDto(); |
|||
//1个人 2企业
|
|||
if (entity.getCustomerTypeKey().equals("1")) { |
|||
if (StringUtils.isNotBlank(entity.getIsAnchored())) { |
|||
if (entity.getIsAnchored().equals("1")) { |
|||
String taxpayerNo = ""; |
|||
String name = ""; |
|||
String address = ""; |
|||
String phone = ""; |
|||
String invoicingSid = ""; |
|||
if (StringUtils.isNotBlank(entity.getTaxpayerNo())) { |
|||
taxpayerNo = entity.getTaxpayerNo(); |
|||
FinCompanyInvoicingDetailsVo data = finCompanyInvoicingFeign.selectInvoingByTaxpayerNo(taxpayerNo).getData(); |
|||
if (null != data) { |
|||
invoicingSid = data.getSid(); |
|||
} |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getBusinessName())) { |
|||
name = entity.getBusinessName(); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getAddress())) { |
|||
address = entity.getAddress(); |
|||
} |
|||
if (StringUtils.isNotBlank(entity.getPhone())) { |
|||
phone = entity.getPhone(); |
|||
} |
|||
if (StringUtils.isNotBlank(invoicingSid)) { |
|||
invoicingDto.setSid(invoicingSid); |
|||
} else { |
|||
invoicingDto.setOrgSidPath(entity.getOrgSidPath()); |
|||
invoicingDto.setCreateBySid(entity.getCreateBySid()); |
|||
} |
|||
invoicingDto.setName(name); |
|||
invoicingDto.setAddress(address); |
|||
invoicingDto.setPhone(phone); |
|||
invoicingDto.setTaxpayerNo(taxpayerNo); |
|||
invoicingDto.setEffectiveDate(effectiveDate); |
|||
finCompanyInvoicingFeign.qySaveOrUpdate(invoicingDto); |
|||
} |
|||
} |
|||
} else if (entity.getCustomerTypeKey().equals("2")) { |
|||
if (StringUtils.isNotBlank(entity.getCustomerSid())) { |
|||
CrmCustomerTempVo customerTempVo = crmCustomerTempFeign.fetchSid(entity.getCustomerSid()).getData(); |
|||
if (null != customerTempVo) { |
|||
String taxpayerNo = ""; |
|||
String name = ""; |
|||
String address = ""; |
|||
String phone = ""; |
|||
String invoicingSid = ""; |
|||
if (StringUtils.isNotBlank(customerTempVo.getIDNumber())) { |
|||
taxpayerNo = customerTempVo.getIDNumber(); |
|||
FinCompanyInvoicingDetailsVo data = finCompanyInvoicingFeign.selectInvoingByTaxpayerNo(taxpayerNo).getData(); |
|||
if (null != data) { |
|||
invoicingSid = data.getSid(); |
|||
} |
|||
} |
|||
if (StringUtils.isNotBlank(customerTempVo.getName())) { |
|||
name = customerTempVo.getName(); |
|||
} |
|||
if (StringUtils.isNotBlank(customerTempVo.getAddress())) { |
|||
address = customerTempVo.getAddress(); |
|||
} |
|||
if (StringUtils.isNotBlank(customerTempVo.getMobile())) { |
|||
phone = customerTempVo.getMobile(); |
|||
} |
|||
if (StringUtils.isNotBlank(invoicingSid)) { |
|||
invoicingDto.setSid(invoicingSid); |
|||
} else { |
|||
invoicingDto.setOrgSidPath(entity.getOrgSidPath()); |
|||
invoicingDto.setCreateBySid(entity.getCreateBySid()); |
|||
} |
|||
invoicingDto.setName(name); |
|||
invoicingDto.setAddress(address); |
|||
invoicingDto.setPhone(phone); |
|||
invoicingDto.setTaxpayerNo(taxpayerNo); |
|||
invoicingDto.setEffectiveDate(effectiveDate); |
|||
finCompanyInvoicingFeign.qySaveOrUpdate(invoicingDto); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return rb.success().setData(resultBean.getData()); |
|||
} else { |
|||
return rb.setMsg("操作失败!提交的数据不一致"); |
|||
} |
|||
} |
|||
|
|||
//----------时间算法-------------
|
|||
public static Date getDateByDay(Date sDate, int num) { |
|||
Calendar cal = Calendar.getInstance(); |
|||
// 设置开始时间
|
|||
cal.setTime(sDate); |
|||
//增加或减少num天
|
|||
cal.add(Calendar.DATE, num); |
|||
//cal.add(Calendar.DATE, -10);//减10天
|
|||
//cal.add(Calendar.DATE, 2);//加2天
|
|||
return cal.getTime(); |
|||
} |
|||
|
|||
public ResultBean revokeProcess(CustomerRecordTaskQuery query) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
if (StringUtils.isBlank(query.getUserSid())) { |
|||
return rb.setMsg("参数错误:userSid"); |
|||
} |
|||
LoanCustomerRecord loanCustomerRecord = fetchBySid(query.getBusinessSid()); |
|||
String businessTaskId = loanCustomerRecord.getTaskId(); |
|||
if (StringUtils.isNotBlank(businessTaskId)) { |
|||
if (businessTaskId.equals(query.getTaskId())) { |
|||
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
|||
BeanUtil.copyProperties(query, flowTaskVo); |
|||
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.revokeProcess(flowTaskVo); |
|||
if (!resultBean.getSuccess()) { |
|||
return rb.setMsg(resultBean.getMsg()); |
|||
} |
|||
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
|||
return rb.success().setData(resultBean.getData()); |
|||
} |
|||
} |
|||
return rb.setMsg("操作失败,提交的数据不一致!"); |
|||
} |
|||
|
|||
public ResultBean taskReject(CustomerRecordTaskQuery query) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
String businessSid = query.getBusinessSid(); |
|||
LoanCustomerRecord loanCustomerRecord = fetchBySid(businessSid); |
|||
if (loanCustomerRecord == null) { |
|||
return rb.setMsg("该申请不存在"); |
|||
} |
|||
String businessTaskId = loanCustomerRecord.getTaskId(); |
|||
if (StringUtils.isNotBlank(businessTaskId)) { |
|||
if (businessTaskId.equals(query.getTaskId())) { |
|||
if (StringUtils.isBlank(query.getComment())) { |
|||
return rb.setMsg("请填写意见"); |
|||
} |
|||
if (org.apache.commons.lang3.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); |
|||
//若有网关,则赋值网关中判断的字段。
|
|||
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); |
|||
//极光推送
|
|||
loanCustomerRecord = fetchBySid(businessSid); |
|||
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); |
|||
MessageFlowVo messageFlowVo = new MessageFlowVo(); |
|||
BeanUtil.copyProperties(ufVo, messageFlowVo); |
|||
String procId = loanCustomerRecord.getProcInstId(); |
|||
messageFlowVo.setProcInsId(procId); |
|||
messageFlowVo.setProcDefId(loanCustomerRecord.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() + "已被驳回,请重新提交"); |
|||
} else { |
|||
SysUserVo userVo = sysUserFeign.fetchBySid(loanCustomerRecord.getCreateBySid()).getData(); |
|||
if (userVo != null) { |
|||
if (org.apache.commons.lang3.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(CustomerRecordTaskQuery query) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
if (org.apache.commons.lang3.StringUtils.isBlank(query.getInstanceId())) { |
|||
return rb.setMsg("参数错误:instanceId"); |
|||
} |
|||
if (org.apache.commons.lang3.StringUtils.isBlank(query.getUserSid())) { |
|||
return rb.setMsg("参数错误:userSid"); |
|||
} |
|||
if (org.apache.commons.lang3.StringUtils.isBlank(query.getComment())) { |
|||
return rb.setMsg("请填写意见"); |
|||
} |
|||
LoanCustomerRecord loanCustomerRecord = fetchBySid(query.getBusinessSid()); |
|||
String businessTaskId = loanCustomerRecord.getTaskId(); |
|||
if (StringUtils.isNotBlank(businessTaskId)) { |
|||
if (query.getUserSid().equals(loanCustomerRecord.getCreateBySid())) { |
|||
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
|||
BeanUtil.copyProperties(query, flowTaskVo); |
|||
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo); |
|||
if (!resultBean.getSuccess()) { |
|||
return rb.setMsg(resultBean.getMsg()); |
|||
} |
|||
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData()); |
|||
updateFlowFiled(map); |
|||
return rb.success().setData(resultBean.getData()); |
|||
} else { |
|||
if (businessTaskId.equals(query.getTaskId())) { |
|||
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
|||
BeanUtil.copyProperties(query, flowTaskVo); |
|||
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.breakProcess(flowTaskVo); |
|||
if (!resultBean.getSuccess()) { |
|||
return rb.setMsg(resultBean.getMsg()); |
|||
} |
|||
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData()); |
|||
updateFlowFiled(map); |
|||
return rb.success().setData(resultBean.getData()); |
|||
} |
|||
} |
|||
|
|||
} |
|||
return rb.setMsg("操作失败!提交的数据不一致!"); |
|||
} |
|||
|
|||
public ResultBean flowRecord(String procInsId) { |
|||
return flowTaskFeign.businessFlowRecord(procInsId); |
|||
} |
|||
|
|||
public ResultBean<List<GetNodeVo>> getNextNodesForSubmit(GetNodeQuery query) { |
|||
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail(); |
|||
BusinessVariables bv = new BusinessVariables(); |
|||
BeanUtil.copyProperties(query, bv); |
|||
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
|
|||
Map<String, Object> variables = new HashMap<>(); |
|||
//根据业务sid查询排产信息
|
|||
LoanCustomerRecord loanCustomerRecord = fetchBySid(query.getBusinessSid()); |
|||
bv.setFormVariables(variables); |
|||
bv.setModelId(loanCustomerRecord.getProcDefId()); |
|||
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv); |
|||
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
|||
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList()); |
|||
return rb.success().setData(voList); |
|||
} |
|||
|
|||
public ResultBean<List<GetNodeVo>> getPreviousNodesForReject(GetNodeQuery query) { |
|||
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail(); |
|||
BusinessVariables bv = new BusinessVariables(); |
|||
BeanUtil.copyProperties(query, bv); |
|||
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
|
|||
Map<String, Object> variables = new HashMap<>(); |
|||
//根据业务sid查询排产信息
|
|||
LoanCustomerRecord loanCustomerRecord = fetchBySid(query.getBusinessSid()); |
|||
bv.setFormVariables(variables); |
|||
bv.setModelId(loanCustomerRecord.getProcDefId()); |
|||
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv); |
|||
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
|||
List<GetNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), GetNodeVo.class)).collect(Collectors.toList()); |
|||
return rb.success().setData(voList); |
|||
} |
|||
|
|||
public ResultBean delegate(CustomerRecordDelegateQuery customerRecordDelegateQuery) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
FlowDelegateQuery delegateQuery = new FlowDelegateQuery(); |
|||
BeanUtil.copyProperties(customerRecordDelegateQuery, delegateQuery); |
|||
flowFeign.delegate(delegateQuery); |
|||
return rb.success(); |
|||
} |
|||
|
|||
public PagerVo<AppCustomerRecordVo> getCustomerRecordList(PagerQuery<AppCustomerRecordQuery> pq) { |
|||
IPage<LoanCustomerRecord> page = PagerUtil.queryToPage(pq); |
|||
AppCustomerRecordQuery pagerQuery = pq.getParams(); |
|||
QueryWrapper<LoanCustomerRecord> 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("orgSidPath", orgSidPath); |
|||
} else if ("2".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i2); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("3".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i3); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("4".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i4); |
|||
qw.like("orgSidPath", orgSidPath); |
|||
} else if ("5".equals(orgLevelKey)) { |
|||
qw.eq("createBySid", pagerQuery.getUserSid()); |
|||
} else { |
|||
PagerVo<AppCustomerRecordVo> p = new PagerVo<>(); |
|||
return p; |
|||
} |
|||
} else { |
|||
PagerVo<AppCustomerRecordVo> p = new PagerVo<>(); |
|||
return p; |
|||
} |
|||
//=======================
|
|||
if (StringUtils.isNotBlank(pagerQuery.getName())) { |
|||
// qw.and(wrapper -> wrapper.like("contractId", query.getName()).or().like("customerName", query.getName()));
|
|||
qw.like("customer", pagerQuery.getName()); |
|||
} |
|||
qw.eq("isDelete", 0); |
|||
qw.orderByDesc("createTime"); |
|||
IPage<AppCustomerRecordVo> pagging = baseMapper.getCustomerRecordList(page, qw); |
|||
List<AppCustomerRecordVo> records = pagging.getRecords(); |
|||
records.removeAll(Collections.singleton(null)); |
|||
if (!records.isEmpty()) { |
|||
for (AppCustomerRecordVo record : records) { |
|||
record.setUpdateBtn(false); |
|||
record.setDeleteBtn(false); |
|||
if (StringUtils.isNotBlank(record.getApplyName()) && StringUtils.isNotBlank(record.getDept())) { |
|||
record.setPublishInfo(record.getDept() + "-" + record.getApplyName()); |
|||
} |
|||
if (StringUtils.isNotBlank(record.getState())) { |
|||
if (record.getState().equals("待提交")) { |
|||
record.setUpdateBtn(true); |
|||
record.setDeleteBtn(true); |
|||
} |
|||
} |
|||
|
|||
} |
|||
} |
|||
PagerVo<AppCustomerRecordVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loancustomerrecordstaff; |
|||
|
|||
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.loancustomerrecord.LoanCustomerRecord; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.LoanCustomerRecordVo; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecordstaff.LoanCustomerRecordStaff; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecordstaff.LoanCustomerRecordStaffVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/7/6 |
|||
**/ |
|||
@Mapper |
|||
public interface LoanCustomerRecordStaffMapper extends BaseMapper<LoanCustomerRecordStaff> { |
|||
|
|||
int deleteByMainSid(String customerRecordSid); |
|||
|
|||
List<LoanCustomerRecordStaffVo> getStaffsByMainSid(String customerRecordSid); |
|||
} |
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.anrui.riskcenter.biz.loancustomerrecordstaff.LoanCustomerRecordStaffMapper"> |
|||
|
|||
<delete id="deleteByMainSid"> |
|||
DELETE |
|||
FROM loan_customer_record_staff |
|||
WHERE customerRecordSid = #{customerRecordSid} |
|||
</delete> |
|||
<select id="getStaffsByMainSid" |
|||
resultType="com.yxt.anrui.riskcenter.api.loancustomerrecordstaff.LoanCustomerRecordStaffVo"> |
|||
select * |
|||
FROM loan_customer_record_staff |
|||
WHERE customerRecordSid = #{customerRecordSid} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,37 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loancustomerrecordstaff; |
|||
|
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecordstaff.LoanCustomerRecordStaffDto; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecordstaff.LoanCustomerRecordStaffFeign; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecordstaff.LoanCustomerRecordStaffVo; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
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/loancustomerrecordstaff") |
|||
public class LoanCustomerRecordStaffRest implements LoanCustomerRecordStaffFeign { |
|||
|
|||
@Autowired |
|||
private LoanCustomerRecordStaffService loanCustomerRecordStaffService; |
|||
|
|||
@Override |
|||
public ResultBean saveStaff(LoanCustomerRecordStaffDto dto) { |
|||
return loanCustomerRecordStaffService.saveStaff(dto); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean deleteByMainSid(String customerRecordSid) { |
|||
return loanCustomerRecordStaffService.deleteByMainSid(customerRecordSid); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<List<LoanCustomerRecordStaffVo>> getStaffsByMainSid(String customerRecordSid) { |
|||
return loanCustomerRecordStaffService.getStaffsByMainSid(customerRecordSid); |
|||
} |
|||
} |
@ -0,0 +1,54 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loancustomerrecordstaff; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; |
|||
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.LoanCustomerRecord; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.LoanCustomerRecordQuery; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.LoanCustomerRecordVo; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecordstaff.LoanCustomerRecordStaff; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecordstaff.LoanCustomerRecordStaffDto; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecordstaff.LoanCustomerRecordStaffVo; |
|||
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 org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fzz |
|||
* @date: 2023/7/6 |
|||
**/ |
|||
@Service |
|||
public class LoanCustomerRecordStaffService extends MybatisBaseService<LoanCustomerRecordStaffMapper, LoanCustomerRecordStaff> { |
|||
|
|||
|
|||
public ResultBean saveStaff(LoanCustomerRecordStaffDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
LoanCustomerRecordStaff loanCustomerRecordStaff = new LoanCustomerRecordStaff(); |
|||
BeanUtil.copyProperties(dto, loanCustomerRecordStaff, "id", "sid"); |
|||
baseMapper.insert(loanCustomerRecordStaff); |
|||
return rb.success(); |
|||
} |
|||
|
|||
|
|||
public ResultBean deleteByMainSid(String customerRecordSid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
int i = baseMapper.deleteByMainSid(customerRecordSid); |
|||
return rb.success(); |
|||
} |
|||
|
|||
public ResultBean<List<LoanCustomerRecordStaffVo>> getStaffsByMainSid(String customerRecordSid) { |
|||
ResultBean<List<LoanCustomerRecordStaffVo>> rb = ResultBean.fireFail(); |
|||
List<LoanCustomerRecordStaffVo> voList = baseMapper.getStaffsByMainSid(customerRecordSid); |
|||
return rb.success().setData(voList); |
|||
} |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.yxt.anrui.terminal.api.risk.loancustomerrecord; |
|||
|
|||
|
|||
import com.yxt.anrui.terminal.api.autoservice.distributor.DistributorQuery; |
|||
import com.yxt.anrui.terminal.api.autoservice.distributor.apply.DistributorApplyVo; |
|||
import com.yxt.anrui.terminal.api.risk.loantemplate.TemplateFeignFallback; |
|||
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 org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fzz |
|||
* @date: 2023/8/8 |
|||
**/ |
|||
@Api(tags = "欠款客户备案") |
|||
@FeignClient( |
|||
contextId = "terminal-LoanCustomerRecord", |
|||
name = "anrui-terminal", |
|||
path = "/risk/v1/CustomerRecord", |
|||
fallback = CustomerRecordFeignFallback.class) |
|||
public interface CustomerRecordFeign { |
|||
|
|||
@ApiOperation("移动端-欠款客户备案分页列表") |
|||
@PostMapping("/getCustomerRecordList") |
|||
@ResponseBody |
|||
ResultBean<PagerVo<CustomerRecordVo>> getCustomerRecordList(@RequestBody PagerQuery<CustomerRecordQuery> pagerQuery); |
|||
|
|||
} |
@ -0,0 +1,19 @@ |
|||
package com.yxt.anrui.terminal.api.risk.loancustomerrecord; |
|||
|
|||
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; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fzz |
|||
* @date: |
|||
**/ |
|||
@Component |
|||
public class CustomerRecordFeignFallback implements CustomerRecordFeign { |
|||
@Override |
|||
public ResultBean<PagerVo<CustomerRecordVo>> getCustomerRecordList(PagerQuery<CustomerRecordQuery> pagerQuery) { |
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.yxt.anrui.terminal.api.risk.loancustomerrecord; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/10/12 15:51 |
|||
*/ |
|||
@Data |
|||
public class CustomerRecordQuery implements Query { |
|||
@ApiModelProperty(value = "用户sid") |
|||
private String userSid; |
|||
@ApiModelProperty(value = "名称") |
|||
private String name; |
|||
@ApiModelProperty("机构sid") |
|||
private String orgPath; |
|||
private String menuSid; |
|||
} |
@ -0,0 +1,56 @@ |
|||
package com.yxt.anrui.terminal.api.risk.loancustomerrecord; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
* @description |
|||
* @date 2023/10/12 15:49 |
|||
*/ |
|||
@Data |
|||
public class CustomerRecordVo implements Vo { |
|||
/** |
|||
* 申请日期 |
|||
*/ |
|||
private String applyDate; |
|||
/** |
|||
* 申请人 |
|||
*/ |
|||
private String applyName; |
|||
/** |
|||
* 分公司 |
|||
*/ |
|||
private String company; |
|||
/** |
|||
* 申请部门 |
|||
*/ |
|||
private String dept; |
|||
/** |
|||
* 客户名称 |
|||
*/ |
|||
private String customer; |
|||
/** |
|||
* 有效期至 |
|||
*/ |
|||
private String effectiveDate; |
|||
/** |
|||
* 销售专员 |
|||
*/ |
|||
private String salesman; |
|||
/** |
|||
* 备案记录sid |
|||
*/ |
|||
private String sid; |
|||
/** |
|||
* 流程状态 |
|||
*/ |
|||
private String state; |
|||
|
|||
@ApiModelProperty("某某部门,某某人") |
|||
private String publishInfo; |
|||
private boolean updateBtn; |
|||
private boolean deleteBtn; |
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.yxt.anrui.terminal.biz.risk.loancustomerrecord; |
|||
|
|||
|
|||
import com.yxt.anrui.terminal.api.risk.loancustomerrecord.CustomerRecordFeign; |
|||
import com.yxt.anrui.terminal.api.risk.loancustomerrecord.CustomerRecordQuery; |
|||
import com.yxt.anrui.terminal.api.risk.loancustomerrecord.CustomerRecordVo; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fzz |
|||
* @date: |
|||
**/ |
|||
@Controller |
|||
@RequestMapping("/risk/v1/CustomerRecord") |
|||
public class CustomerRecordRest implements CustomerRecordFeign { |
|||
|
|||
@Autowired |
|||
private CustomerRecordService customerRecordService; |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<CustomerRecordVo>> getCustomerRecordList(PagerQuery<CustomerRecordQuery> pagerQuery) { |
|||
return customerRecordService.getCustomerRecordList(pagerQuery); |
|||
} |
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.yxt.anrui.terminal.biz.risk.loancustomerrecord; |
|||
|
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.yxt.anrui.base.api.basedistributor.app.BaseDistributorsQuery; |
|||
import com.yxt.anrui.base.api.basedistributor.app.apply.AppDistributorApplyVo; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.LoanCustomerRecordFeign; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.app.AppCustomerRecordQuery; |
|||
import com.yxt.anrui.riskcenter.api.loancustomerrecord.app.AppCustomerRecordVo; |
|||
import com.yxt.anrui.terminal.api.autoservice.distributor.apply.DistributorApplyVo; |
|||
import com.yxt.anrui.terminal.api.risk.loancustomerrecord.CustomerRecordQuery; |
|||
import com.yxt.anrui.terminal.api.risk.loancustomerrecord.CustomerRecordVo; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: fzz |
|||
* @date: |
|||
**/ |
|||
@Service |
|||
public class CustomerRecordService { |
|||
|
|||
@Autowired |
|||
private LoanCustomerRecordFeign loanCustomerRecordFeign; |
|||
|
|||
public ResultBean<PagerVo<CustomerRecordVo>> getCustomerRecordList(PagerQuery<CustomerRecordQuery> pagerQuery) { |
|||
ResultBean<PagerVo<CustomerRecordVo>> rb = ResultBean.fireFail(); |
|||
PagerVo<CustomerRecordVo> pagerVo = new PagerVo<>(); |
|||
PagerQuery<AppCustomerRecordQuery> appCustomerRecordQuery = new PagerQuery<>(); |
|||
BeanUtil.copyProperties(pagerQuery, appCustomerRecordQuery); |
|||
ResultBean<PagerVo<AppCustomerRecordVo>> pagerVoResultBean = loanCustomerRecordFeign.getCustomerRecordList(appCustomerRecordQuery); |
|||
if (pagerVoResultBean.getSuccess()) { |
|||
BeanUtil.copyProperties(pagerVoResultBean.getData(), pagerVo); |
|||
} |
|||
return rb.success().setData(pagerVo); |
|||
} |
|||
} |
Loading…
Reference in new issue