
35 changed files with 2519 additions and 13 deletions
@ -0,0 +1,360 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button v-show="viewState == 4" type="primary" size="small" :disabled="submitdisabled" @click="handAffirm()">确认</el-button> |
|||
<el-button v-show="viewState == 4" type="primary" size="small" :disabled="submitdisabled" @click="handReject()">驳回</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<div class="titwu"><span>收款确认申请</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top" class="formadd"> |
|||
<el-row style="border-left: 0"> |
|||
<el-col :span="24" class="tleftb" style="border-right: 0"> |
|||
<el-form-item> |
|||
<span>收款单号:{{ receiptNumber }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>申请部门</span> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
<span>{{ formobj.createDept }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>申请人</span> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
<span>{{ formobj.createByName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>申请日期</span> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
<span>{{ formobj.createDate }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>收款方式</span> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item> |
|||
<span>{{ formobj.collectionTypeValue }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>收款金额(元)</span> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item> |
|||
<span>{{ formobj.collectionMoney }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>收款日期</span> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item> |
|||
<span>{{ formobj.collectionDate }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-show="formobj.collectionTypeKey === '03' || formobj.collectionTypeKey === '05'"> |
|||
<el-col :span="4" class="tleftb balanceStyle"> |
|||
<span>收款银行账号</span> |
|||
</el-col> |
|||
<el-col :span="4" class="tlineheightb"> |
|||
<el-form-item> |
|||
<span>{{ formobj.collectionBankNum }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb balanceStyle"> |
|||
<span>收款账户名称</span> |
|||
</el-col> |
|||
<el-col :span="4" class="tlineheightb"> |
|||
<el-form-item> |
|||
<span>{{ formobj.receivingName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb balanceStyle"> |
|||
<span>收款银行</span> |
|||
</el-col> |
|||
<el-col :span="4" class="tlineheightb"> |
|||
<el-form-item> |
|||
<span>{{ formobj.collectionBank }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>付款方名称</span> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item> |
|||
<span>{{ formobj.payerName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span v-show="formobj.collectionTypeKey === '03' || formobj.collectionTypeKey === '05'">付款账号后4位</span> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item> |
|||
<span v-show="formobj.collectionTypeKey === '03' || formobj.collectionTypeKey === '05'">{{ formobj.payAccount }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span v-show="formobj.collectionTypeKey === '03' || formobj.collectionTypeKey === '05'">付款银行</span> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item> |
|||
<span v-show="formobj.collectionTypeKey === '03' || formobj.collectionTypeKey === '05'">{{ formobj.payBank }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>备注</span> |
|||
</el-col> |
|||
<el-col :span="20" class="trightb"> |
|||
<el-form-item> |
|||
<span>{{ formobj.remarks }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<el-form-item><span>打款凭证</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item> |
|||
<span v-for="(item, index) in list1" :key="index"> |
|||
<el-link :underline="false" :href="item.path" target="_blank">{{ item.name }}</el-link> |
|||
</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="tleftb"> |
|||
<el-form-item><span>汇款确认书</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8" class="trightb"> |
|||
<el-form-item> |
|||
<span v-for="(item, index) in list2" :key="index"> |
|||
<el-link :underline="false" :href="item.path" target="_blank">{{ item.name }}</el-link> |
|||
</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-show="formobj.reason !== ''"> |
|||
<el-col :span="6" class="tleftb"> |
|||
<el-form-item><span>审核状态</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="18" class="trightb"> |
|||
<el-form-item> |
|||
<span>{{ formobj.reason }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-table border :key="selectedreceivableKey" style="width: 100%" :data="formobj.finSelectedReceivablesDetaileds"> |
|||
<el-table-column label="车架号/车牌号" align="center"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.vinNo }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="贷款人" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.borrowerName }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="期数" align="center" width="80"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.period }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="应收项目" align="center"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.receivablesName }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="当前未收金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.currentReceivableMoney }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="认款金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.subscriptionMoney }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="剩余未收" align="center"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.noReceivableMoney }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="状态" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.auditState == 1 ? '待审核' : scope.row.auditState == 2 ? '已驳回' : scope.row.auditState == 3 ? '已审核' : '其他' }} |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
<el-dialog center :visible.sync="dialogVisible" width="50%"> |
|||
<el-form ref="form_obj" class="formadd"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>意见</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><el-input v-model="reason" clearable placeholder="" type="textarea" :autosize="{ minRows: 2, maxRows: 20}" resize="none"/></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<span slot="footer" class="dialog-footer"> |
|||
<el-button size="small" type="primary" @click="handleConfirm">确定</el-button> |
|||
<el-button size="small" @click="dialogVisible = false">取消</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { rskDetails, rskCashierConfirm, rskCashierReject } from '@/api/anruifinmanagement/paymentConfirmation.js' |
|||
|
|||
export default { |
|||
name: 'CashierConfitmationByFinancial', |
|||
data() { |
|||
return { |
|||
sid: '', |
|||
viewTitle: '', |
|||
viewState: '', |
|||
dialogVisible: false, |
|||
submitdisabled: false, |
|||
reason: '', // 驳回原因 |
|||
selectedreceivableKey: 0, |
|||
receiptNumber: '', |
|||
formobj: {}, |
|||
list1: [], |
|||
list2: [], |
|||
rules: {} |
|||
} |
|||
}, |
|||
methods: { |
|||
showInfo(row, viewState) { |
|||
this.viewState = viewState |
|||
this.sid = row.sid |
|||
this.viewTitle = '认款详情' |
|||
this.receiptNumber = row.billNo |
|||
rskDetails(row.sid).then(resp => { |
|||
if (resp.success) { |
|||
this.formobj = resp.data |
|||
if (this.formobj.paymentVoucherAppendixs.length > 0) { |
|||
this.formobj.paymentVoucherAppendixs.forEach((e) => { |
|||
this.list1.push({ |
|||
name: e.fileName, |
|||
path: e.filePath |
|||
}) |
|||
}) |
|||
} |
|||
if (this.formobj.remittanceConfirmationAppendixs.length > 0) { |
|||
this.formobj.remittanceConfirmationAppendixs.forEach((e) => { |
|||
this.list2.push({ |
|||
name: e.fileName, |
|||
path: e.filePath |
|||
}) |
|||
}) |
|||
} |
|||
} |
|||
}).catch(e => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
handAffirm() { |
|||
this.submitdisabled = true |
|||
rskCashierConfirm({ sid: this.sid, userSid: window.sessionStorage.getItem('userSid') }).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ showClose: true, message: '确认成功', type: 'success' }) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
handReject() { |
|||
this.dialogVisible = true |
|||
}, |
|||
handleConfirm() { |
|||
if (this.reason === '') { |
|||
this.$message({ showClose: true, type: 'error', message: '请填写驳回意见' }) |
|||
return |
|||
} |
|||
this.submitdisabled = true |
|||
rskCashierReject({ sid: this.sid, reason: this.reason, userSid: window.sessionStorage.getItem('userSid') }).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ showClose: true, message: '已驳回', type: 'success' }) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = {} |
|||
this.list1 = [] |
|||
this.list2 = [] |
|||
this.reason = '' |
|||
this.receiptNumber = '' |
|||
this.dialogVisible = false |
|||
this.submitdisabled = false |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.titwu { |
|||
padding: 0; |
|||
} |
|||
.tableTitle{ |
|||
border: 1px solid #e0e3eb; |
|||
line-height: 42px; |
|||
text-align: center; |
|||
font-weight: bold; |
|||
font-size: 18px; |
|||
} |
|||
.balanceStyle { |
|||
line-height: 15px !important; |
|||
display: flex; |
|||
justify-content: flex-end; |
|||
align-items: center; |
|||
} |
|||
|
|||
.tlineheightb { |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: flex-start; |
|||
align-items: center; |
|||
} |
|||
/deep/ .tlineheightb .el-form-item .el-form-item__content { |
|||
line-height: 15px !important; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: flex-start; |
|||
align-items: center; |
|||
} |
|||
</style> |
@ -0,0 +1,22 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export default { |
|||
// 查询分页列表 -- 客户还款情况计划表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
url: '/riskcenter/v1/loanrepaymenthistory/repaymentStatistics', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 查询分页列表 -- 客户还款明细查询
|
|||
pageList: function(params) { |
|||
return request({ |
|||
url: '/riskcenter/v1/loanrepaymenthistory/repaymentDetailsList', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
} |
@ -0,0 +1,330 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--列表页面--> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="客户还款情况统计表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<!--Start查询列表部分--> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" class="tab-header"> |
|||
<el-form-item label="分公司"> |
|||
<el-input v-model="listQuery.params.useOrgName" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="销售部门"> |
|||
<el-input v-model="listQuery.params.dept" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="销售专员"> |
|||
<el-input v-model="listQuery.params.staffName" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="贷款合同编号"> |
|||
<el-input v-model="listQuery.params.loanContractNo" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="车架号"> |
|||
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="资方"> |
|||
<el-input v-model="listQuery.params.bankName" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="资方合同编号"> |
|||
<el-input v-model="listQuery.params.bankContractNo" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="客户名称"> |
|||
<el-input v-model="listQuery.params.customer" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="贷款人"> |
|||
<el-input v-model="listQuery.params.borrowerName" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="期数"> |
|||
<el-input v-model="listQuery.params.period" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="应还日期"> |
|||
<el-date-picker v-model="listQuery.params.dueStartDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.dueEndDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="还款状态"> |
|||
<el-select v-model="listQuery.params.returnState" placeholder="请选择" clearable> |
|||
<el-option v-for="item in returnState_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="当前是否逾期"> |
|||
<el-select v-model="listQuery.params.nowOverdue" placeholder="请选择" clearable> |
|||
<el-option v-for="item in nowOverdue_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="本期是否曾逾期"> |
|||
<el-select v-model="listQuery.params.dueOverdue" placeholder="请选择" clearable> |
|||
<el-option v-for="item in dueOverdue_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="更新日期"> |
|||
<el-date-picker v-model="listQuery.params.updateStartDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.updateEndDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
<div class="listtop"> |
|||
<div class="tit">客户月还还款统计表</div> |
|||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange"> |
|||
<el-table-column type="selection" align="center" width="50"/> |
|||
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center"/> |
|||
<el-table-column prop="useOrgName" label="分公司" width="100" align="center" /> |
|||
<el-table-column prop="dept" label="销售部门" width="100" align="center" /> |
|||
<el-table-column prop="staffName" label="销售专员" width="100" align="center" /> |
|||
<el-table-column prop="vinNo" label="车架号" width="100" align="center" /> |
|||
<el-table-column prop="loanContractNo" label="贷款合同号" width="100" align="center" /> |
|||
<el-table-column prop="bankName" label="资方" width="100" align="center" /> |
|||
<el-table-column prop="bankContractNo" label="资方合同号" width="100" align="center" /> |
|||
<el-table-column prop="customer" label="客户名称" width="100" align="center" /> |
|||
<el-table-column prop="borrowerName" label="贷款人" width="100" align="center" /> |
|||
<el-table-column prop="period" label="期数" min-width="100" align="center" /> |
|||
<el-table-column prop="dueDate" label="应还日期" width="100" align="center" /> |
|||
<el-table-column prop="dueMoney" label="应还金额" width="100" align="center" /> |
|||
<el-table-column prop="repaidMoney" label="已还金额" width="100" align="center" /> |
|||
<el-table-column prop="outstandingMoney" label="未还金额" width="100" align="center" /> |
|||
<el-table-column label="还款状态" width="100" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.returnState == '01' ? '未还' : scope.row.returnState == '02' ? '部分还款' : scope.row.returnState == '03' ? '已还款' : '' }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="paymentMoney" label="公司垫款" width="100" align="center" /> |
|||
<el-table-column prop="bankBeInter" label="垫资方逾期利息" width="120" align="center" /> |
|||
<el-table-column prop="fund" label="资金占用费" width="100" align="center" /> |
|||
<el-table-column label="当前是否逾期" width="120" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.nowOverdue == '0' ? '是' : scope.row.nowOverdue == '1' ? '否' : '' }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="本期是否曾逾期" width="120" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.dueOverdue == '0' ? '是' : scope.row.dueOverdue == '1' ? '否' : '' }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="updateDate" label="更新日期" width="100" align="center" /> |
|||
</el-table> |
|||
</div> |
|||
<!--End 主页面主要部分--> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import req from '@/api/customerrepayment/customerrepayment' |
|||
|
|||
export default { |
|||
name: 'CustomerRepayment', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
btnList: [ |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], // 用于导出的时候保存已选择的SIDs |
|||
returnState_list: [ |
|||
{ |
|||
dictKey: '01', |
|||
dictValue: '未还' |
|||
}, |
|||
{ |
|||
dictKey: '02', |
|||
dictValue: '部分还款' |
|||
}, |
|||
{ |
|||
dictKey: '03', |
|||
dictValue: '已还款' |
|||
} |
|||
], |
|||
nowOverdue_list: [ |
|||
{ |
|||
dictKey: '0', |
|||
dictValue: '是' |
|||
}, |
|||
{ |
|||
dictKey: '1', |
|||
dictValue: '否' |
|||
} |
|||
], |
|||
dueOverdue_list: [ |
|||
{ |
|||
dictKey: '0', |
|||
dictValue: '是' |
|||
}, |
|||
{ |
|||
dictKey: '1', |
|||
dictValue: '否' |
|||
} |
|||
], |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
userSid: '', |
|||
menuUrl: '', |
|||
loanContractNo: '', |
|||
vinNo: '', |
|||
dueStartDate: '', |
|||
dueEndDate: '', |
|||
bankName: '', |
|||
orgPath: '', |
|||
bankContractNo: '', |
|||
customer: '', |
|||
borrowerName: '', |
|||
period: '', |
|||
updateStartDate: '', |
|||
updateEndDate: '', |
|||
dueOverdue: '', |
|||
nowOverdue: '', |
|||
returnState: '', |
|||
useOrgName: '', |
|||
dept: '', |
|||
staffName: '' |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.getList() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 信息条数 获取点击时当前的sid |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
row.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|||
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.listQuery.params.menuUrl = this.$route.path |
|||
req.listPage(this.listQuery).then(response => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
userSid: '', |
|||
menuUrl: '', |
|||
loanContractNo: '', |
|||
vinNo: '', |
|||
dueStartDate: '', |
|||
dueEndDate: '', |
|||
bankName: '', |
|||
orgPath: '', |
|||
bankContractNo: '', |
|||
customer: '', |
|||
borrowerName: '', |
|||
period: '', |
|||
updateStartDate: '', |
|||
updateEndDate: '', |
|||
dueOverdue: '', |
|||
nowOverdue: '', |
|||
returnState: '', |
|||
useOrgName: '', |
|||
dept: '', |
|||
staffName: '' |
|||
} |
|||
} |
|||
this.getList() |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,346 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--列表页面--> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar view-title="客户还款明细查询" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|||
<!--Start查询列表部分--> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" class="tab-header"> |
|||
<el-form-item label="分公司"> |
|||
<el-input v-model="listQuery.params.useOrgName" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="销售部门"> |
|||
<el-input v-model="listQuery.params.dept" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="销售专员"> |
|||
<el-input v-model="listQuery.params.staffName" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="贷款合同编号"> |
|||
<el-input v-model="listQuery.params.loanContractNo" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="车架号"> |
|||
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="资方"> |
|||
<el-input v-model="listQuery.params.bankName" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="资方合同编号"> |
|||
<el-input v-model="listQuery.params.bankContractNo" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="客户名称"> |
|||
<el-input v-model="listQuery.params.customer" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="贷款人"> |
|||
<el-input v-model="listQuery.params.borrowerName" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="期数"> |
|||
<el-input v-model="listQuery.params.period" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="应还日期"> |
|||
<el-date-picker v-model="listQuery.params.dueStartDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.dueEndDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="实还日期"> |
|||
<el-date-picker v-model="listQuery.params.actualStartDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.actualEndDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="还款方式"> |
|||
<el-select v-model="listQuery.params.returnWayKey" placeholder="请选择" clearable> |
|||
<el-option v-for="item in returnWay_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="数据日期"> |
|||
<el-date-picker v-model="listQuery.params.dataStartTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.dataEndTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="更新日期"> |
|||
<el-date-picker v-model="listQuery.params.updateStartDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.updateEndDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="更新状态"> |
|||
<el-select v-model="listQuery.params.updateState" placeholder="请选择" clearable> |
|||
<el-option v-for="item in updateState_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="财务收款单编号"> |
|||
<el-input v-model="listQuery.params.billNo" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="划扣状态"> |
|||
<el-select v-model="listQuery.params.buckleKey" placeholder="请选择" clearable> |
|||
<el-option v-for="item in buckle_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="划扣申请通过日期"> |
|||
<el-date-picker v-model="listQuery.params.closingStartDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.closingEndDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
|||
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
<div class="listtop"> |
|||
<div class="tit">客户还款记录列表</div> |
|||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange"> |
|||
<el-table-column type="selection" align="center" width="50"/> |
|||
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center"/> |
|||
<el-table-column prop="useOrgName" label="分公司" align="center" width="100" /> |
|||
<el-table-column prop="dept" label="销售部门" align="center"/> |
|||
<el-table-column prop="staffName" label="销售专员" align="center" width="100" /> |
|||
<el-table-column prop="loanContractNo" label="贷款合同编号" align="center" width="120" /> |
|||
<el-table-column prop="vinNo" label="车架号" align="center" width="100" /> |
|||
<el-table-column prop="bankName" label="资方" align="center" width="100" /> |
|||
<el-table-column prop="bankContractNo" label="资方合同号" align="center" width="100" /> |
|||
<el-table-column prop="customer" label="客户名称" align="center" width="100" /> |
|||
<el-table-column prop="borrowerName" label="贷款人" align="center" width="100" /> |
|||
<el-table-column prop="period" label="期数" align="center" min-width="100" /> |
|||
<el-table-column prop="dueDate" label="应还日期" align="center" width="100" /> |
|||
<el-table-column prop="dueMoney" label="应还金额" align="center" width="100" /> |
|||
<el-table-column prop="actualDate" label="实还日期" align="center" width="100" /> |
|||
<el-table-column prop="actualMoney" label="实还金额" align="center" width="100" /> |
|||
<el-table-column prop="returnWay" label="还款方式" align="center" width="100" /> |
|||
<el-table-column prop="dataTime" label="数据日期" align="center" width="100" /> |
|||
<el-table-column prop="updateTime" label="更新日期" align="center" width="100" /> |
|||
<el-table-column label="更新状态" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.updateState == '0' ? '未更新' : scope.row.updateState == '1' ? '已更新' : '' }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="billNo" label="财务收款单编号" align="center" width="120" /> |
|||
<el-table-column prop="buckle" label="划扣状态" align="center" width="100" /> |
|||
<el-table-column prop="closingDate" label="划扣申请通过时间" align="center" width="140" /> |
|||
</el-table> |
|||
</div> |
|||
<!--End 主页面主要部分--> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import req from '@/api/customerrepayment/customerrepayment' |
|||
import { typeValues } from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
name: 'CustomerRepaymentDetails', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
btnList: [ |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], // 用于导出的时候保存已选择的SIDs |
|||
updateState_list: [ |
|||
{ |
|||
dictKey: '0', |
|||
dictValue: '未更新' |
|||
}, |
|||
{ |
|||
dictKey: '1', |
|||
dictValue: '已更新' |
|||
} |
|||
], |
|||
returnWay_list: [], |
|||
buckle_list: [], |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
userSid: '', |
|||
menuUrl: '', |
|||
loanContractNo: '', |
|||
vinNo: '', |
|||
dueStartDate: '', |
|||
dueEndDate: '', |
|||
actualStartDate: '', |
|||
actualEndDate: '', |
|||
dataStartTime: '', |
|||
dataEndTime: '', |
|||
bankName: '', |
|||
orgPath: '', |
|||
bankContractNo: '', |
|||
customer: '', |
|||
borrowerName: '', |
|||
period: '', |
|||
returnWayKey: '', |
|||
buckleKey: '', |
|||
billNo: '', |
|||
updateStartDate: '', |
|||
updateEndDate: '', |
|||
closingStartDate: '', |
|||
closingEndDate: '', |
|||
updateState: '', |
|||
useOrgName: '', |
|||
dept: '', |
|||
staffName: '' |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.getList() |
|||
this.init() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
init() { |
|||
typeValues({ type: 'buckle_list' }).then((res) => { |
|||
if (res.success) { |
|||
this.buckle_list = res.data |
|||
} |
|||
}) |
|||
typeValues({ type: 'repaymentWay' }).then((res) => { |
|||
if (res.success) { |
|||
this.returnWay_list = res.data |
|||
} |
|||
}) |
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
// 信息条数 获取点击时当前的sid |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
row.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|||
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.listQuery.params.menuUrl = this.$route.path |
|||
req.pageList(this.listQuery).then(response => { |
|||
this.listLoading = false |
|||
if (response.success) { |
|||
this.list = response.data.records |
|||
this.listQuery.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.listQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
userSid: '', |
|||
menuUrl: '', |
|||
loanContractNo: '', |
|||
vinNo: '', |
|||
dueStartDate: '', |
|||
dueEndDate: '', |
|||
actualStartDate: '', |
|||
actualEndDate: '', |
|||
dataStartTime: '', |
|||
dataEndTime: '', |
|||
bankName: '', |
|||
orgPath: '', |
|||
bankContractNo: '', |
|||
customer: '', |
|||
borrowerName: '', |
|||
period: '', |
|||
returnWayKey: '', |
|||
buckleKey: '', |
|||
billNo: '', |
|||
updateStartDate: '', |
|||
updateEndDate: '', |
|||
closingStartDate: '', |
|||
closingEndDate: '', |
|||
updateState: '', |
|||
useOrgName: '', |
|||
dept: '', |
|||
staffName: '' |
|||
} |
|||
} |
|||
this.getList() |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,43 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanoverduefin; |
|||
|
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@Data |
|||
public class LoanOverdueFin extends BaseEntity { |
|||
private static final long serialVersionUID = 9129799865000313133L; |
|||
@ApiModelProperty("申请人") |
|||
private String createByName; |
|||
@ApiModelProperty("申请部门sid") |
|||
private String createDeptSid; |
|||
@ApiModelProperty("申请部门") |
|||
private String createDept; |
|||
@ApiModelProperty("截止时间") |
|||
private String stopDate; |
|||
@ApiModelProperty("附件") |
|||
private String files; |
|||
@ApiModelProperty("流程状态") |
|||
private String nodeState; |
|||
@ApiModelProperty("分公司sid") |
|||
private String useOrgSid; |
|||
@ApiModelProperty("分公司名称") |
|||
private String useOrgName; |
|||
@ApiModelProperty("办结时间") |
|||
private String closeDate; |
|||
@ApiModelProperty("实例id") |
|||
private String procInstId; |
|||
@ApiModelProperty("流程定义id") |
|||
private String procDefId; |
|||
@ApiModelProperty("任务id") |
|||
private String taskId; |
|||
@ApiModelProperty("环节id") |
|||
private String taskDefKey; |
|||
@ApiModelProperty("机构全路径sid") |
|||
private String orgSidPath; |
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanoverduefin; |
|||
|
|||
import com.yxt.anrui.riskcenter.api.loanoverduefindetails.LoanOverdueFinDetailsDto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@Data |
|||
public class LoanOverdueFinDetailVo { |
|||
|
|||
private String sid; |
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
@ApiModelProperty("机构全路径sid") |
|||
private String orgPath; |
|||
@ApiModelProperty("截止时间") |
|||
private String stopDate; |
|||
@ApiModelProperty("附件") |
|||
private List<String> filesList = new ArrayList<>(); |
|||
private List<LoanOverdueFinDetailsDto> detailsVoList = new ArrayList<>(); |
|||
|
|||
@ApiModelProperty("申请人") |
|||
private String createByName; |
|||
@ApiModelProperty("申请部门sid") |
|||
private String createDeptSid; |
|||
@ApiModelProperty("申请部门") |
|||
private String createDept; |
|||
|
|||
private String remarks; |
|||
|
|||
private String files; |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanoverduefin; |
|||
|
|||
import com.yxt.anrui.riskcenter.api.loanoverduefindetails.LoanOverdueFinDetailsDto; |
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@Data |
|||
public class LoanOverdueFinDto implements Dto { |
|||
private static final long serialVersionUID = 924273052526415079L; |
|||
|
|||
private String sid; |
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
@ApiModelProperty("机构全路径sid") |
|||
private String orgPath; |
|||
@ApiModelProperty("截止时间") |
|||
private String stopDate; |
|||
@ApiModelProperty("附件") |
|||
private List<String> filesList = new ArrayList<>(); |
|||
|
|||
private String remarks; |
|||
|
|||
private List<LoanOverdueFinDetailsDto> detailsVoList = new ArrayList<>(); |
|||
} |
@ -0,0 +1,79 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanoverduefin; |
|||
|
|||
import com.yxt.anrui.riskcenter.api.loanoverduefin.flowable.CompleteDto; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefin.flowable.OverdueApplyNodeQuery; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefin.flowable.OverdueApplyNodeVo; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefin.flowable.OverdueApplyTaskQuery; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefindetails.LoanOverdueFinDetailsVo; |
|||
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutionsFeignFallback; |
|||
import com.yxt.anrui.riskcenter.api.loantemplate.LoanTemplateQuery; |
|||
import com.yxt.anrui.riskcenter.api.loantemplate.LoanTemplateVo; |
|||
import com.yxt.anrui.riskcenter.api.loantemplate.flowable.*; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.cloud.openfeign.SpringQueryMap; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.validation.Valid; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@FeignClient( |
|||
contextId = "anrui-riskcenter-LoanOverdueFin", |
|||
name = "anrui-riskcenter", |
|||
path = "v1/LoanOverdueFin", |
|||
fallback = LoanOverdueFinFeignFallback.class) |
|||
public interface LoanOverdueFinFeign { |
|||
|
|||
@ApiOperation("分页列表") |
|||
@PostMapping("/listPage") |
|||
ResultBean<PagerVo<LoanOverdueFinVo>> listPage(@RequestBody PagerQuery<LoanOverdueFinQuery> pq); |
|||
|
|||
@ApiOperation("新增或修改") |
|||
@PostMapping("/listPage") |
|||
ResultBean<String> saveOrUpdate(@RequestBody LoanOverdueFinDto dto); |
|||
|
|||
@ApiOperation("详情初始化") |
|||
@PostMapping("/details") |
|||
ResultBean<LoanOverdueFinDetailVo> details(@RequestParam("sid") String sid); |
|||
|
|||
@ApiOperation("删除/批量删除") |
|||
@DeleteMapping("/delBySids") |
|||
ResultBean delBySids(@RequestBody String[] sids); |
|||
|
|||
@ApiOperation("提交") |
|||
@PostMapping("/submitApply") |
|||
public ResultBean submitApply(@Valid @RequestBody SubmitApplyDto dto); |
|||
|
|||
@ApiOperation(value = "办理(同意)") |
|||
@PostMapping("/complete") |
|||
public ResultBean complete(@Valid @RequestBody CompleteDto query); |
|||
|
|||
@ApiOperation(value = "获取上一个环节") |
|||
@GetMapping(value = "/getPreviousNodesForReject") |
|||
ResultBean<List<OverdueApplyNodeVo>> getPreviousNodesForReject(@Valid @SpringQueryMap OverdueApplyNodeQuery query); |
|||
|
|||
@ApiOperation(value = "获取下一个环节") |
|||
@GetMapping(value = "/getNextNodesForSubmit") |
|||
ResultBean<List<OverdueApplyNodeVo>> getNextNodesForSubmit(@Valid @SpringQueryMap OverdueApplyNodeQuery query); |
|||
|
|||
@ApiOperation(value = "驳回任务") |
|||
@PostMapping(value = "/reject") |
|||
public ResultBean taskReject(@Valid @RequestBody OverdueApplyTaskQuery query); |
|||
|
|||
@ApiOperation(value = "撤回流程") |
|||
@PostMapping(value = "/revokeProcess") |
|||
public ResultBean revokeProcess(@Valid @RequestBody OverdueApplyTaskQuery query); |
|||
|
|||
@ApiOperation(value = "终止任务") |
|||
@PostMapping(value = "/breakProcess") |
|||
public ResultBean breakProcess(@Valid @RequestBody OverdueApplyTaskQuery query); |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanoverduefin; |
|||
|
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@Component |
|||
public class LoanOverdueFinFeignFallback { |
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanoverduefin; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@Data |
|||
public class LoanOverdueFinQuery implements Query { |
|||
private static final long serialVersionUID = -1932149333671928968L; |
|||
@ApiModelProperty("分公司") |
|||
private String useOrgName; |
|||
@ApiModelProperty("申请部门") |
|||
private String createDept; |
|||
@ApiModelProperty("申请人") |
|||
private String createByName; |
|||
@ApiModelProperty("申请开始时间") |
|||
private String createStart; |
|||
@ApiModelProperty("申请结束时间") |
|||
private String createEnd; |
|||
@ApiModelProperty("办结开始时间") |
|||
private String closeDateStart; |
|||
@ApiModelProperty("办结结束时间") |
|||
private String closeDateEnd; |
|||
@ApiModelProperty("菜单url") |
|||
private String menuUrl; |
|||
|
|||
private String orgPath; |
|||
private String userSid; |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanoverduefin; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@Data |
|||
public class LoanOverdueFinVo implements Vo { |
|||
private static final long serialVersionUID = -3978574514391361081L; |
|||
|
|||
private String sid; |
|||
@ApiModelProperty("流程状态") |
|||
private String nodeState; |
|||
@ApiModelProperty("分公司") |
|||
private String useOrgName; |
|||
@ApiModelProperty("申请部门") |
|||
private String createDept; |
|||
@ApiModelProperty("申请人") |
|||
private String createByName; |
|||
@ApiModelProperty("申请日期") |
|||
private String createTime; |
|||
@ApiModelProperty("办结日期") |
|||
private String closeDate; |
|||
@ApiModelProperty("截止时间") |
|||
private String stopDate; |
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
} |
@ -0,0 +1,19 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanoverduefin; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/26 |
|||
**/ |
|||
@Data |
|||
public class SubmitApplyDto extends LoanOverdueFinDto { |
|||
|
|||
private static final long serialVersionUID = -8306701581329373696L; |
|||
@ApiModelProperty("流程实例id") |
|||
private String instanceId; |
|||
@ApiModelProperty("任务id") |
|||
private String taskId; |
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanoverduefin.flowable; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/26 |
|||
**/ |
|||
@Data |
|||
public class CompleteDto implements Dto { |
|||
|
|||
private static final long serialVersionUID = -4538880395421097165L; |
|||
@ApiModelProperty(value = "用户sid") |
|||
@NotBlank(message = "参数错误:userSid") |
|||
private String userSid; |
|||
@ApiModelProperty(value = "用户全路径sid") |
|||
private String orgSidPath; |
|||
@ApiModelProperty(value = "节点id") |
|||
@NotBlank(message = "参数错误:taskDefKey") |
|||
private String taskDefKey; |
|||
@ApiModelProperty(value = "任务id") |
|||
@NotBlank(message = "参数错误:taskId") |
|||
private String taskId; |
|||
@ApiModelProperty(value = "流程id") |
|||
@NotBlank(message = "参数错误:instanceId") |
|||
private String instanceId; |
|||
@ApiModelProperty(value = "意见") |
|||
private String comment; |
|||
@ApiModelProperty(value = "业务sid") |
|||
@NotBlank(message = "参数错误:businessSid") |
|||
private String businessSid; |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanoverduefin.flowable; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/26 |
|||
**/ |
|||
@Data |
|||
public class OverdueApplyNodeQuery { |
|||
|
|||
@ApiModelProperty(value = "环节定义id") |
|||
private String taskDefKey; |
|||
@ApiModelProperty(value = "业务sid") |
|||
private String businessSid; |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanoverduefin.flowable; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/26 |
|||
**/ |
|||
@Data |
|||
public class OverdueApplyNodeVo implements Vo { |
|||
private static final long serialVersionUID = -1497825424519567460L; |
|||
|
|||
@ApiModelProperty(value = "节点名称") |
|||
private String name; |
|||
@ApiModelProperty(value = "节点id") |
|||
private String id; |
|||
@ApiModelProperty(value = "审批组") |
|||
private List<String> candidateGroups; |
|||
@ApiModelProperty(value = "是否是最后环节") |
|||
private String endTask; |
|||
} |
@ -0,0 +1,43 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanoverduefin.flowable; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/26 |
|||
**/ |
|||
@Data |
|||
public class OverdueApplyTaskQuery { |
|||
|
|||
/** |
|||
* 终止、驳回、撤回 |
|||
*/ |
|||
@ApiModelProperty("任务Id") |
|||
@NotBlank(message = "参数错误:taskId") |
|||
private String taskId; |
|||
/** |
|||
* 终止、驳回、撤回 |
|||
*/ |
|||
@ApiModelProperty("业务sid") |
|||
@NotBlank(message = "参数错误:businessSid") |
|||
private String businessSid; |
|||
/** |
|||
* 终止、驳回 |
|||
*/ |
|||
@ApiModelProperty("任务意见") |
|||
private String comment; |
|||
/** |
|||
* 终止、撤回、驳回 |
|||
*/ |
|||
@ApiModelProperty("用户Sid") |
|||
private String userSid; |
|||
/** |
|||
* 终止 |
|||
*/ |
|||
@ApiModelProperty("流程实例Id") |
|||
private String instanceId; |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanoverduefindetails; |
|||
|
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@Data |
|||
public class LoanOverdueFinDetails extends BaseEntity { |
|||
private static final long serialVersionUID = -6018143288593527991L; |
|||
|
|||
private String mainSid; |
|||
@ApiModelProperty("客户名称") |
|||
private String customerName; |
|||
@ApiModelProperty("客户sid") |
|||
private String customerSid; |
|||
@ApiModelProperty("贷款人sid") |
|||
private String loanSid; |
|||
@ApiModelProperty("贷款人") |
|||
private String loanName; |
|||
@ApiModelProperty("当前逾期金额") |
|||
private String overdueMoney; |
|||
@ApiModelProperty("累欠") |
|||
private String tiredDeficiency; |
|||
@ApiModelProperty("差异金额") |
|||
private String diffMoney; |
|||
|
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanoverduefindetails; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@Data |
|||
public class LoanOverdueFinDetailsDto implements Dto { |
|||
private static final long serialVersionUID = 7484921327629725722L; |
|||
|
|||
@ApiModelProperty("客户名称") |
|||
private String customerName; |
|||
@ApiModelProperty("客户sid") |
|||
private String customerSid; |
|||
@ApiModelProperty("贷款人sid") |
|||
private String loanSid; |
|||
@ApiModelProperty("贷款人") |
|||
private String loanName; |
|||
@ApiModelProperty("当前逾期金额") |
|||
private String overdueMoney; |
|||
@ApiModelProperty("累欠") |
|||
private String tiredDeficiency; |
|||
@ApiModelProperty("差异金额") |
|||
private String diffMoney; |
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanoverduefindetails; |
|||
|
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@FeignClient( |
|||
contextId = "anrui-riskcenter-LoanOverdueFinDetails", |
|||
name = "anrui-riskcenter", |
|||
path = "v1/LoanOverdueFinDetails", |
|||
fallback = LoanOverdueFinDetailsFeignFallback.class) |
|||
public interface LoanOverdueFinDetailsFeign { |
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanoverduefindetails; |
|||
|
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@Component |
|||
public class LoanOverdueFinDetailsFeignFallback { |
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.yxt.anrui.riskcenter.api.loanoverduefindetails; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@Data |
|||
public class LoanOverdueFinDetailsVo { |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanoverduefin; |
|||
|
|||
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.loanoverduefin.LoanOverdueFin; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefin.LoanOverdueFinDetailVo; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefin.LoanOverdueFinVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@Mapper |
|||
public interface LoanOverdueFinMapper extends BaseMapper<LoanOverdueFin> { |
|||
IPage<LoanOverdueFinVo> selectPageVo(IPage<LoanOverdueFin> page, @Param(Constants.WRAPPER) QueryWrapper<LoanOverdueFin> qw); |
|||
|
|||
LoanOverdueFinDetailVo details(String sid); |
|||
|
|||
int selectBySid(String join); |
|||
|
|||
int updateFlowFiled(Map<String, Object> beanToMap); |
|||
} |
@ -0,0 +1,58 @@ |
|||
<?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.loanoverduefin.LoanOverdueFinMapper"> |
|||
<select id="selectPageVo" resultType="com.yxt.anrui.riskcenter.api.loanoverduefin.LoanOverdueFinVo"> |
|||
select lof.sid, |
|||
lof.nodeState, |
|||
lof.useOrgName, |
|||
lof.createDept, |
|||
lof.createByName, |
|||
DATE_FORMAT(lof.createTime, '%Y-%m-%d') as createTime, |
|||
lof.closeDate, |
|||
lof.stopDate, |
|||
lof.remarks |
|||
from loan_overdue_fin lof |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="details" resultType="com.yxt.anrui.riskcenter.api.loanoverduefin.LoanOverdueFinDetailVo"> |
|||
select lof.sid, |
|||
lof.files, |
|||
lof.remarks, |
|||
lof.createByName, |
|||
lof.createBySid userSid, |
|||
lof.createDept, |
|||
lof.createDeptSid, |
|||
lof.orgSidPath orgPath, |
|||
lof.stopDate |
|||
from loan_overdue_fin lof |
|||
where sid = #{sid} |
|||
</select> |
|||
|
|||
<select id="selectBySid" resultType="int"> |
|||
select count(*) |
|||
from loan_overdue_fin |
|||
where length(nodeState) > 0 |
|||
and find_in_set(sid, #{list}) |
|||
</select> |
|||
|
|||
<update id="updateFlowFiled"> |
|||
UPDATE loan_overdue_fin |
|||
SET nodeState=#{nodeState} |
|||
<if test="taskDefKey != null and taskDefKey != ''"> |
|||
, taskDefKey=#{taskDefKey} |
|||
</if> |
|||
<if test="procDefId != null and procDefId != ''"> |
|||
, procDefId=#{procDefId} |
|||
</if> |
|||
<if test="procInsId != null and procInsId != ''"> |
|||
, procInstId=#{procInsId} |
|||
</if> |
|||
<if test="taskId != null and taskId != ''"> |
|||
, taskId=#{taskId} |
|||
</if> |
|||
WHERE sid = #{sid} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,91 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanoverduefin; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefin.*; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefin.flowable.CompleteDto; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefin.flowable.OverdueApplyNodeQuery; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefin.flowable.OverdueApplyNodeVo; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefin.flowable.OverdueApplyTaskQuery; |
|||
import com.yxt.anrui.riskcenter.api.loantemplate.LoanTemplateVo; |
|||
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.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@RestController |
|||
@RequestMapping("v1/LoanOverdueFin") |
|||
public class LoanOverdueFinRest implements LoanOverdueFinFeign { |
|||
|
|||
@Autowired |
|||
private LoanOverdueFinService loanOverdueFinService; |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<LoanOverdueFinVo>> listPage(PagerQuery<LoanOverdueFinQuery> pq) { |
|||
ResultBean<PagerVo<LoanOverdueFinVo>> rb = ResultBean.fireFail(); |
|||
PagerVo<LoanOverdueFinVo> pv = loanOverdueFinService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<String> saveOrUpdate(LoanOverdueFinDto dto) { |
|||
return loanOverdueFinService.saveOrUpdateOver(dto); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<LoanOverdueFinDetailVo> details(String sid) { |
|||
return loanOverdueFinService.details(sid); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean delBySids(String[] sids) { |
|||
return loanOverdueFinService.delAllBySids(sids); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean submitApply(SubmitApplyDto dto) { |
|||
return loanOverdueFinService.submitApply(dto); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean complete(CompleteDto query) { |
|||
BusinessVariables bv = new BusinessVariables(); |
|||
BeanUtil.copyProperties(query, bv); |
|||
bv.setModelId(""); |
|||
return loanOverdueFinService.complete(bv); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<List<OverdueApplyNodeVo>> getPreviousNodesForReject(OverdueApplyNodeQuery query) { |
|||
return loanOverdueFinService.getPreviousNodesForReject(query); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<List<OverdueApplyNodeVo>> getNextNodesForSubmit(OverdueApplyNodeQuery query) { |
|||
return loanOverdueFinService.getNextNodesForSubmit(query); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean taskReject(OverdueApplyTaskQuery query) { |
|||
return loanOverdueFinService.taskReject(query); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean revokeProcess(OverdueApplyTaskQuery query) { |
|||
return loanOverdueFinService.revokeProcess(query); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean breakProcess(OverdueApplyTaskQuery query) { |
|||
return loanOverdueFinService.breakProcess(query); |
|||
} |
|||
} |
@ -0,0 +1,523 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanoverduefin; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
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.flowable.api.flow.FlowableFeign; |
|||
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo; |
|||
import com.yxt.anrui.flowable.api.flow2.FlowFeign; |
|||
import com.yxt.anrui.flowable.api.flowtask.FlowTaskFeign; |
|||
import com.yxt.anrui.flowable.api.flowtask.FlowTaskVo; |
|||
import com.yxt.anrui.flowable.api.flowtask.LatestTaskVo; |
|||
import com.yxt.anrui.flowable.api.utils.ProcDefEnum; |
|||
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables; |
|||
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; |
|||
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; |
|||
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|||
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; |
|||
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefin.*; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefin.flowable.OverdueApplyNodeQuery; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefin.flowable.OverdueApplyNodeVo; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefin.flowable.OverdueApplyTaskQuery; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefindetails.LoanOverdueFinDetailsDto; |
|||
import com.yxt.anrui.riskcenter.biz.loanoverduefindetails.LoanOverdueFinDetailsService; |
|||
import com.yxt.common.base.config.component.FileUploadComponent; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.messagecenter.api.message.MessageFeign; |
|||
import com.yxt.messagecenter.api.message.MessageFlowVo; |
|||
import com.yxt.messagecenter.api.message.MessageFlowableQuery; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.apache.tomcat.util.threads.ThreadPoolExecutor; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.*; |
|||
import java.util.concurrent.*; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@Service |
|||
public class LoanOverdueFinService extends MybatisBaseService<LoanOverdueFinMapper, LoanOverdueFin> { |
|||
|
|||
@Autowired |
|||
private SysUserFeign sysUserFeign; |
|||
@Autowired |
|||
private SysStaffOrgFeign sysStaffOrgFeign; |
|||
@Autowired |
|||
private SysOrganizationFeign sysOrganizationFeign; |
|||
@Autowired |
|||
private FileUploadComponent fileUploadComponent; |
|||
@Autowired |
|||
private LoanOverdueFinDetailsService loanOverdueFinDetailsService; |
|||
@Autowired |
|||
private FlowFeign flowFeign; |
|||
@Autowired |
|||
private MessageFeign messageFeign; |
|||
@Autowired |
|||
private FlowTaskFeign flowTaskFeign; |
|||
@Autowired |
|||
private FlowableFeign flowableFeign; |
|||
|
|||
public PagerVo<LoanOverdueFinVo> listPageVo(PagerQuery<LoanOverdueFinQuery> pq) { |
|||
LoanOverdueFinQuery query = pq.getParams(); |
|||
QueryWrapper<LoanOverdueFin> qw = new QueryWrapper<>(); |
|||
if (query != null) { |
|||
String createStart = query.getCreateStart(); |
|||
String createEnd = query.getCreateEnd(); |
|||
qw.apply(StringUtils.isNotBlank(createStart), "date_format (lof.createTime,'%Y-%m-%d') >= date_format('" + createStart + "','%Y-%m-%d')"). |
|||
apply(StringUtils.isNotBlank(createEnd), "date_format (lof.createTime,'%Y-%m-%d') <= date_format('" + createEnd + "','%Y-%m-%d')" |
|||
); |
|||
if (StringUtils.isNotBlank(query.getUseOrgName())) { |
|||
qw.like("lof.useOrgName", query.getUseOrgName()); |
|||
} |
|||
|
|||
if (StringUtils.isNotBlank(query.getCreateByName())) { |
|||
qw.eq("lof.createByName", query.getCreateByName()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getCreateDept())) { |
|||
qw.eq("lof.createDept", query.getCreateDept()); |
|||
} |
|||
qw.apply(StringUtils.isNotBlank(query.getCloseDateStart()), "date_format (lof.closeDate,'%Y-%m-%d') >= date_format('" + query.getCloseDateStart() + "','%Y-%m-%d')"). |
|||
apply(StringUtils.isNotBlank(query.getCloseDateEnd()), "date_format (lof.closeDate,'%Y-%m-%d') <= date_format('" + query.getCloseDateEnd() + "','%Y-%m-%d')" |
|||
); |
|||
//========================================数据授权开始
|
|||
if (StringUtils.isNotBlank(query.getMenuUrl())) { |
|||
//=======================
|
|||
PrivilegeQuery privilegeQuery = new PrivilegeQuery(); |
|||
privilegeQuery.setOrgPath(query.getOrgPath()); |
|||
privilegeQuery.setMenuUrl(query.getMenuUrl()); |
|||
privilegeQuery.setUserSid(query.getUserSid()); |
|||
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); |
|||
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) { |
|||
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
|
|||
String orgSidPath = query.getOrgPath(); |
|||
orgSidPath = orgSidPath + "/"; |
|||
int i1 = orgSidPath.indexOf("/"); |
|||
int i2 = orgSidPath.indexOf("/", i1 + 1); |
|||
int i3 = orgSidPath.indexOf("/", i2 + 1); |
|||
int i4 = orgSidPath.indexOf("/", i3 + 1); |
|||
String orgLevelKey = defaultIdReltBean.getData(); |
|||
if ("1".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i1); |
|||
qw.like("lof.orgSidPath", orgSidPath); |
|||
} else if ("2".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i2); |
|||
qw.like("lof.orgSidPath", orgSidPath); |
|||
} else if ("3".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i3); |
|||
qw.like("lof.orgSidPath", orgSidPath); |
|||
} else if ("4".equals(orgLevelKey)) { |
|||
orgSidPath = orgSidPath.substring(0, i4); |
|||
qw.like("lof.orgSidPath", orgSidPath); |
|||
} else if ("5".equals(orgLevelKey)) { |
|||
qw.eq("lof.createBySid", query.getUserSid()); |
|||
} else { |
|||
PagerVo<LoanOverdueFinVo> p = new PagerVo<>(); |
|||
return p; |
|||
} |
|||
} else { |
|||
PagerVo<LoanOverdueFinVo> p = new PagerVo<>(); |
|||
return p; |
|||
} |
|||
} |
|||
} |
|||
qw.orderByDesc("lof.createTime"); |
|||
IPage<LoanOverdueFin> page = PagerUtil.queryToPage(pq); |
|||
IPage<LoanOverdueFinVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<LoanOverdueFinVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
public ResultBean<String> saveOrUpdateOver(LoanOverdueFinDto dto) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
String sid = dto.getSid(); |
|||
if (StringUtils.isBlank(sid)) { |
|||
LoanOverdueFin loanOverdueFin = new LoanOverdueFin(); |
|||
BeanUtil.copyProperties(dto, loanOverdueFin, "sid"); |
|||
loanOverdueFin.setCreateBySid(dto.getUserSid()); |
|||
String orgPath = dto.getOrgPath(); |
|||
loanOverdueFin.setOrgSidPath(orgPath); |
|||
String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(orgPath).getData(); |
|||
loanOverdueFin.setUseOrgSid(useOrgSid); |
|||
//创建组织使用组织
|
|||
ResultBean<SysOrganizationVo> organizationResultBean = sysOrganizationFeign.fetchBySid(useOrgSid); |
|||
if (organizationResultBean.getData() != null) { |
|||
loanOverdueFin.setUseOrgName(organizationResultBean.getData().getName()); |
|||
} |
|||
//申请部门
|
|||
List<String> orgList = Arrays.asList(orgPath.split("/")); |
|||
String deptSid = orgList.get(orgList.size() - 1); |
|||
ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(deptSid); |
|||
if (sysOrganizationVoResultBean.getData() != null) { |
|||
loanOverdueFin.setCreateDept(sysOrganizationVoResultBean.getData().getName()); |
|||
loanOverdueFin.setCreateDeptSid(deptSid); |
|||
} |
|||
List<String> filesList = dto.getFilesList(); |
|||
if (!filesList.isEmpty()) { |
|||
String files = String.join(",", filesList).replaceAll(fileUploadComponent.getUrlPrefix(), ""); |
|||
loanOverdueFin.setFiles(files); |
|||
} |
|||
List<LoanOverdueFinDetailsDto> detailsVoList = dto.getDetailsVoList(); |
|||
detailsVoList.removeAll(Collections.singleton(null)); |
|||
if (!detailsVoList.isEmpty()) { |
|||
loanOverdueFinDetailsService.saveOrUpdateDetails(detailsVoList, loanOverdueFin.getSid()); |
|||
} |
|||
sid = loanOverdueFin.getSid(); |
|||
} else { |
|||
LoanOverdueFin loanOverdueFin = fetchBySid(sid); |
|||
if (loanOverdueFin == null) { |
|||
return rb.setMsg("该申请不存在"); |
|||
} |
|||
BeanUtil.copyProperties(dto, loanOverdueFin, "sid"); |
|||
List<String> filesList = dto.getFilesList(); |
|||
if (!filesList.isEmpty()) { |
|||
String files = String.join(",", filesList).replaceAll(fileUploadComponent.getUrlPrefix(), ""); |
|||
loanOverdueFin.setFiles(files); |
|||
} |
|||
List<LoanOverdueFinDetailsDto> detailsVoList = dto.getDetailsVoList(); |
|||
detailsVoList.removeAll(Collections.singleton(null)); |
|||
if (!detailsVoList.isEmpty()) { |
|||
loanOverdueFinDetailsService.saveOrUpdateDetails(detailsVoList, loanOverdueFin.getSid()); |
|||
} |
|||
} |
|||
return rb.success().setData(sid); |
|||
} |
|||
|
|||
public ResultBean<LoanOverdueFinDetailVo> details(String sid) { |
|||
ResultBean<LoanOverdueFinDetailVo> rb = ResultBean.fireFail(); |
|||
LoanOverdueFin loanOverdueFin = fetchBySid(sid); |
|||
if (loanOverdueFin == null) { |
|||
return rb.setMsg("该申请不存在"); |
|||
} |
|||
LoanOverdueFinDetailVo loanOverdueFinDetailVo = baseMapper.details(sid); |
|||
List<LoanOverdueFinDetailsDto> detailsVoList = loanOverdueFinDetailsService.selectByMainSid(sid); |
|||
detailsVoList.removeAll(Collections.singleton(null)); |
|||
if (!detailsVoList.isEmpty()) { |
|||
loanOverdueFinDetailVo.setDetailsVoList(detailsVoList); |
|||
} |
|||
String files = loanOverdueFinDetailVo.getFiles(); |
|||
if (StringUtils.isNotBlank(files)) { |
|||
List<String> fileList = Arrays.asList(files.split(",")).stream().map(c -> fileUploadComponent.getUrlPrefix() + c).collect(Collectors.toList()); |
|||
loanOverdueFinDetailVo.setFilesList(fileList); |
|||
} |
|||
return rb.success().setData(loanOverdueFinDetailVo); |
|||
} |
|||
|
|||
public ResultBean delAllBySids(String[] sids) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
//查询该sid中是否有流程不是待提交的
|
|||
int count = baseMapper.selectBySid(StringUtils.join(sids, ",")); |
|||
if (count > 0) { |
|||
return rb.setMsg("删除的数据中包含已经提交审批的数据,删除失败"); |
|||
} |
|||
List<String> sidss = Arrays.asList(sids); |
|||
for (int i = 0; i < sidss.size(); i++) { |
|||
loanOverdueFinDetailsService.deleteByMainSid(sidss.get(i)); |
|||
} |
|||
delBySids(sids); |
|||
return rb.success().setMsg("删除成功"); |
|||
} |
|||
|
|||
public ResultBean submitApply(SubmitApplyDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
LoanOverdueFin loanOverdueFin = fetchBySid(dto.getSid()); |
|||
int r = submitBusinessData(dto, loanOverdueFin); |
|||
if (r == 3) { |
|||
return rb.setMsg("该申请不存在"); |
|||
} |
|||
if (r == 0) { |
|||
return rb.setMsg("操作失败!提交的数据不一致"); |
|||
} |
|||
ResultBean<String> resultBean = saveOrUpdateOver(dto); |
|||
if (!resultBean.getSuccess()) { |
|||
return rb.setMsg(resultBean.getMsg()); |
|||
} |
|||
String businessSid = resultBean.getData(); |
|||
loanOverdueFin = fetchBySid(businessSid); |
|||
//创建BusinessVariables实体对象
|
|||
BusinessVariables bv = new BusinessVariables(); |
|||
//流程中的参数赋值、若有网关,则赋值网关中判断的字段。
|
|||
Map<String, Object> variables = new HashMap<>(); |
|||
Map<String, Object> appMap = new HashMap<>(); |
|||
appMap.put("sid", businessSid); |
|||
variables.put("app", appMap); |
|||
//用户的部门全路径sid
|
|||
bv.setOrgSidPath(loanOverdueFin.getOrgSidPath()); |
|||
bv.setBusinessSid(businessSid); |
|||
bv.setUserSid(dto.getUserSid()); |
|||
bv.setFormVariables(variables); |
|||
if (r == 1) { |
|||
//ToDo:流程定义id
|
|||
bv.setModelId(ProcDefEnum.LOANOVERDUEFIN.getProDefId()); |
|||
ResultBean<UpdateFlowFieldVo> voResultBean = flowFeign.startProcess(bv); |
|||
if (!voResultBean.getSuccess()) { |
|||
return rb.setMsg(voResultBean.getMsg()); |
|||
} |
|||
UpdateFlowFieldVo ufVo = voResultBean.getData(); |
|||
updateFlowFiled(BeanUtil.beanToMap(ufVo)); |
|||
loanOverdueFin = fetchBySid(businessSid); |
|||
//==================================添加线程
|
|||
try { |
|||
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() |
|||
.setNameFormat("demo-pool-%d").build(); |
|||
ExecutorService pool = new ThreadPoolExecutor(2, 100, |
|||
0L, TimeUnit.MILLISECONDS, |
|||
new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); |
|||
LoanOverdueFin finalLoanOverdueFin = loanOverdueFin; |
|||
Future future1 = pool.submit(() -> { |
|||
//极光推送
|
|||
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); |
|||
MessageFlowVo messageFlowVo = new MessageFlowVo(); |
|||
BeanUtil.copyProperties(ufVo, messageFlowVo); |
|||
messageFlowableQuery.setUfVo(messageFlowVo); |
|||
messageFlowableQuery.setAppMap(appMap); |
|||
messageFlowableQuery.setBusinessSid(businessSid); |
|||
messageFlowableQuery.setModuleName("逾期对账申请(财务)"); |
|||
messageFlowableQuery.setMsgContent(finalLoanOverdueFin.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); |
|||
messageFlowableQuery.setMsgTitle("逾期对账申请(财务)"); |
|||
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery); |
|||
}); |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} |
|||
//==================================添加线程
|
|||
return voResultBean; |
|||
} |
|||
if (r == 2) { |
|||
// ToDo:驳回到发起人后再次提交
|
|||
if (StringUtils.isBlank(dto.getInstanceId())) { |
|||
return rb.setMsg("参数错误:instanceId"); |
|||
} |
|||
bv.setTaskId(loanOverdueFin.getTaskId()); |
|||
bv.setTaskDefKey(loanOverdueFin.getTaskDefKey()); |
|||
bv.setComment("重新提交"); |
|||
bv.setInstanceId(dto.getInstanceId()); |
|||
return complete(bv); |
|||
} |
|||
return rb; |
|||
} |
|||
|
|||
private int submitBusinessData(SubmitApplyDto dto, LoanOverdueFin loanOverdueFin) { |
|||
int r = 0; |
|||
if (StringUtils.isBlank(dto.getSid())) { |
|||
r = 1; |
|||
} else { |
|||
if (loanOverdueFin != null) { |
|||
String businessTaskId = loanOverdueFin.getTaskId(); |
|||
if (StringUtils.isBlank(businessTaskId) && StringUtils.isBlank(dto.getTaskId())) { |
|||
//新提交
|
|||
r = 1; |
|||
} else if (StringUtils.isNotBlank(businessTaskId) && businessTaskId.equals(dto.getTaskId())) { |
|||
//二次提交//只有数据一致的时候才能进行下一步
|
|||
r = 2; |
|||
} |
|||
} else { |
|||
r = 3; |
|||
} |
|||
} |
|||
return r; |
|||
} |
|||
|
|||
private int updateFlowFiled(Map<String, Object> beanToMap) { |
|||
return baseMapper.updateFlowFiled(beanToMap); |
|||
} |
|||
|
|||
public ResultBean complete(BusinessVariables bv) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
String businessSid = bv.getBusinessSid(); |
|||
LoanOverdueFin loanOverdueFin = fetchBySid(businessSid); |
|||
Map<String, Object> variables = new HashMap<>(); |
|||
Map<String, Object> appMap = new HashMap<>(); |
|||
appMap.put("sid", businessSid); |
|||
variables.put("app", appMap); |
|||
bv.setFormVariables(variables); |
|||
bv.setOrgSidPath(loanOverdueFin.getOrgSidPath()); |
|||
bv.setModelId(loanOverdueFin.getProcDefId()); |
|||
if (bv.getTaskId().equals(loanOverdueFin.getTaskId())) { |
|||
ResultBean<UpdateFlowFieldVo> resultBean = flowFeign.handleProsess(bv); |
|||
if (!resultBean.getSuccess()) { |
|||
return rb.setMsg(resultBean.getMsg()); |
|||
} |
|||
UpdateFlowFieldVo ufVo = resultBean.getData(); |
|||
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
|||
if ("Event_end".equals(resultBean.getData().getTaskDefKey())) { |
|||
|
|||
} else { |
|||
//极光推送
|
|||
loanOverdueFin = fetchBySid(businessSid); |
|||
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); |
|||
MessageFlowVo messageFlowVo = new MessageFlowVo(); |
|||
BeanUtil.copyProperties(ufVo, messageFlowVo); |
|||
messageFlowVo.setProcDefId(loanOverdueFin.getProcDefId()); |
|||
messageFlowVo.setProcInsId(loanOverdueFin.getProcInstId()); |
|||
messageFlowableQuery.setUfVo(messageFlowVo); |
|||
messageFlowableQuery.setAppMap(appMap); |
|||
messageFlowableQuery.setBusinessSid(businessSid); |
|||
messageFlowableQuery.setModuleName("逾期对账申请(财务)"); |
|||
messageFlowableQuery.setMsgContent(loanOverdueFin.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); |
|||
messageFlowableQuery.setMsgTitle("逾期对账申请(财务)"); |
|||
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery); |
|||
} |
|||
return rb.success().setData(resultBean.getData()); |
|||
} else { |
|||
return rb.setMsg("操作失败!提交的数据不一致"); |
|||
} |
|||
} |
|||
|
|||
public ResultBean<List<OverdueApplyNodeVo>> getPreviousNodesForReject(OverdueApplyNodeQuery query) { |
|||
ResultBean<List<OverdueApplyNodeVo>> rb = ResultBean.fireFail(); |
|||
BusinessVariables bv = new BusinessVariables(); |
|||
BeanUtil.copyProperties(query, bv); |
|||
LoanOverdueFin loanOverdueFin = fetchBySid(query.getBusinessSid()); |
|||
bv.setModelId(loanOverdueFin.getProcDefId()); |
|||
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv); |
|||
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给TemplateApplyNodeVo
|
|||
List<OverdueApplyNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), OverdueApplyNodeVo.class)).collect(Collectors.toList()); |
|||
return rb.success().setData(voList); |
|||
} |
|||
|
|||
public ResultBean<List<OverdueApplyNodeVo>> getNextNodesForSubmit(OverdueApplyNodeQuery query) { |
|||
ResultBean<List<OverdueApplyNodeVo>> rb = ResultBean.fireFail(); |
|||
BusinessVariables bv = new BusinessVariables(); |
|||
BeanUtil.copyProperties(query, bv); |
|||
LoanOverdueFin loanOverdueFin = fetchBySid(query.getBusinessSid()); |
|||
bv.setModelId(loanOverdueFin.getProcDefId()); |
|||
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv); |
|||
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给TemplateApplyNodeVo
|
|||
List<OverdueApplyNodeVo> voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), OverdueApplyNodeVo.class)).collect(Collectors.toList()); |
|||
return rb.success().setData(voList); |
|||
} |
|||
|
|||
public ResultBean taskReject(OverdueApplyTaskQuery query) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
String businessSid = query.getBusinessSid(); |
|||
LoanOverdueFin loanOverdueFin = fetchBySid(businessSid); |
|||
if (loanOverdueFin == null) { |
|||
return rb.setMsg("该申请不存在"); |
|||
} |
|||
String businessTaskId = loanOverdueFin.getTaskId(); |
|||
if (StringUtils.isNotBlank(businessTaskId)) { |
|||
if (businessTaskId.equals(query.getTaskId())) { |
|||
if (StringUtils.isBlank(query.getComment())) { |
|||
return rb.setMsg("请填写意见"); |
|||
} |
|||
if (StringUtils.isBlank(query.getUserSid())) { |
|||
return rb.setMsg("参数错误:userSid"); |
|||
} |
|||
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
|||
BeanUtil.copyProperties(query, flowTaskVo); |
|||
Map<String, Object> variables = new HashMap<>(); |
|||
Map<String, Object> appMap = new HashMap<>(); |
|||
appMap.put("sid", businessSid); |
|||
variables.put("app", appMap); |
|||
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.taskReject(flowTaskVo); |
|||
if (!resultBean.getSuccess()) { |
|||
return rb.setMsg(resultBean.getMsg()); |
|||
} |
|||
UpdateFlowFieldVo ufVo = resultBean.getData(); |
|||
Map<String, Object> map = BeanUtil.beanToMap(ufVo); |
|||
//更新业务中的流程相关的参数
|
|||
updateFlowFiled(map); |
|||
//极光推送
|
|||
loanOverdueFin = fetchBySid(businessSid); |
|||
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); |
|||
MessageFlowVo messageFlowVo = new MessageFlowVo(); |
|||
BeanUtil.copyProperties(ufVo, messageFlowVo); |
|||
String procId = loanOverdueFin.getProcInstId(); |
|||
messageFlowVo.setProcInsId(procId); |
|||
messageFlowVo.setProcDefId(loanOverdueFin.getProcDefId()); |
|||
messageFlowableQuery.setUfVo(messageFlowVo); |
|||
messageFlowableQuery.setAppMap(appMap); |
|||
messageFlowableQuery.setBusinessSid(businessSid); |
|||
messageFlowableQuery.setModuleName("逾期对账申请(财务)"); |
|||
ResultBean<List<LatestTaskVo>> listResultBean = flowTaskFeign.getLatestTasks(procId); |
|||
String nextName = listResultBean.getData().get(0).getName_(); |
|||
String nextNodeUserSids = listResultBean.getData().get(0).getASSIGNEE_(); |
|||
if ("发起申请".equals(nextName)) { |
|||
messageFlowableQuery.setMsgContent("您提交的" + messageFlowableQuery.getModuleName() + "已被驳回,请重新提交"); |
|||
} else { |
|||
messageFlowableQuery.setMsgContent(loanOverdueFin.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); |
|||
} |
|||
|
|||
messageFlowableQuery.setMsgTitle("逾期对账申请(财务)"); |
|||
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery); |
|||
return rb.success(); |
|||
} |
|||
} |
|||
return rb.setMsg("操作失败!提交的数据不一致!"); |
|||
} |
|||
|
|||
public ResultBean revokeProcess(OverdueApplyTaskQuery query) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
if (StringUtils.isBlank(query.getUserSid())) { |
|||
return rb.setMsg("参数错误:userSid"); |
|||
} |
|||
LoanOverdueFin loanOverdueFin = fetchBySid(query.getBusinessSid()); |
|||
String businessTaskId = loanOverdueFin.getTaskId(); |
|||
if (StringUtils.isNotBlank(businessTaskId)) { |
|||
if (businessTaskId.equals(query.getTaskId())) { |
|||
FlowTaskVo flowTaskVo = new FlowTaskVo(); |
|||
BeanUtil.copyProperties(query, flowTaskVo); |
|||
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.revokeProcess(flowTaskVo); |
|||
if (!resultBean.getSuccess()) { |
|||
return rb.setMsg(resultBean.getMsg()); |
|||
} |
|||
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
|||
return rb.success().setData(resultBean.getData()); |
|||
} |
|||
} |
|||
return rb.setMsg("操作失败,提交的数据不一致!"); |
|||
} |
|||
|
|||
public ResultBean breakProcess(OverdueApplyTaskQuery query) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
if (StringUtils.isBlank(query.getInstanceId())) { |
|||
return rb.setMsg("参数错误:instanceId"); |
|||
} |
|||
if (StringUtils.isBlank(query.getUserSid())) { |
|||
return rb.setMsg("参数错误:userSid"); |
|||
} |
|||
if (StringUtils.isBlank(query.getComment())) { |
|||
return rb.setMsg("请填写意见"); |
|||
} |
|||
LoanOverdueFin loanOverdueFin = fetchBySid(query.getBusinessSid()); |
|||
String businessTaskId = loanOverdueFin.getTaskId(); |
|||
if (StringUtils.isNotBlank(businessTaskId)) { |
|||
if (query.getUserSid().equals(loanOverdueFin.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("操作失败!提交的数据不一致!"); |
|||
} |
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanoverduefindetails; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefindetails.LoanOverdueFinDetails; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefindetails.LoanOverdueFinDetailsDto; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@Mapper |
|||
public interface LoanOverdueFinDetailsMapper extends BaseMapper<LoanOverdueFinDetails> { |
|||
int deleteByMainSid(String sid); |
|||
|
|||
List<LoanOverdueFinDetailsDto> selectByMainSid(String sid); |
|||
} |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.yxt.anrui.riskcenter.biz.loanoverduefindetails.LoanOverdueFinDetailsMapper"> |
|||
<delete id="deleteByMainSid"> |
|||
delete |
|||
from loan_overdue_fin_details |
|||
where mainSid = #{sid} |
|||
</delete> |
|||
|
|||
<select id="selectByMainSid" |
|||
resultType="com.yxt.anrui.riskcenter.api.loanoverduefindetails.LoanOverdueFinDetailsDto"> |
|||
select customerName, |
|||
customerSid, |
|||
loanName, |
|||
loanSid, |
|||
overdueMoney, |
|||
diffMoney, |
|||
tiredDeficiency |
|||
from loan_overdue_fin_details |
|||
where mainSid = #{sid} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,14 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanoverduefindetails; |
|||
|
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@RestController |
|||
@RequestMapping("v1/LoanOverdueFinDetails") |
|||
public class LoanOverdueFinDetailsRest { |
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.yxt.anrui.riskcenter.biz.loanoverduefindetails; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefindetails.LoanOverdueFinDetails; |
|||
import com.yxt.anrui.riskcenter.api.loanoverduefindetails.LoanOverdueFinDetailsDto; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2023/12/25 |
|||
**/ |
|||
@Service |
|||
public class LoanOverdueFinDetailsService extends MybatisBaseService<LoanOverdueFinDetailsMapper, LoanOverdueFinDetails> { |
|||
public void saveOrUpdateDetails(List<LoanOverdueFinDetailsDto> detailsVoList, String sid) { |
|||
baseMapper.deleteByMainSid(sid); |
|||
detailsVoList.stream().forEach(dto -> { |
|||
LoanOverdueFinDetails loanOverdueFinDetails = new LoanOverdueFinDetails(); |
|||
BeanUtil.copyProperties(dto, loanOverdueFinDetails, "sid"); |
|||
loanOverdueFinDetails.setMainSid(sid); |
|||
baseMapper.insert(loanOverdueFinDetails); |
|||
}); |
|||
} |
|||
|
|||
public List<LoanOverdueFinDetailsDto> selectByMainSid(String sid) { |
|||
return baseMapper.selectByMainSid(sid); |
|||
} |
|||
|
|||
public int deleteByMainSid(String s) { |
|||
return baseMapper.deleteByMainSid(s); |
|||
} |
|||
} |
Loading…
Reference in new issue