
29 changed files with 1658 additions and 124 deletions
@ -0,0 +1,38 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export default { |
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
url: '/fin/v1/finpaymentapplydetailsbeloweve/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 保存修改记录
|
|||
saveOrUpdate: function(params) { |
|||
return request({ |
|||
url: '/fin/v1/finpaymentapplydetailsbeloweve/save', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 通过sid查询一条记录
|
|||
fetchBySid: function(sid) { |
|||
return request({ |
|||
url: '/fin/v1/finpaymentapplydetailsbeloweve/fetchDetailsBySid/' + sid, |
|||
method: 'get' |
|||
}) |
|||
}, |
|||
// 通过sid删除一条或多条记录
|
|||
delBySids: function(data) { |
|||
return request({ |
|||
url: '/fin/v1/finpaymentapplydetailsbeloweve/delBySids', |
|||
method: 'DELETE', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
} |
|||
} |
@ -0,0 +1,520 @@ |
|||
<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" label-width="100px" class="tab-header"> |
|||
<el-form-item label="付款单位"> |
|||
<el-input v-model="listQuery.params.payCompany" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="款项名称"> |
|||
<el-input v-model="listQuery.params.costTitleValue" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="收款单位"> |
|||
<el-input v-model="listQuery.params.receiveCompany" 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.openStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.openEndDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
</el-form-item> |
|||
<el-form-item label="付款日期"> |
|||
<el-date-picker v-model="listQuery.params.exePayStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
<span style="padding: 0 8px">至</span> |
|||
<el-date-picker v-model="listQuery.params.exePayEndDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|||
</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 fixed type="selection" align="center" width="50" /> |
|||
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center" /> |
|||
<el-table-column fixed label="操作" width="180" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="costTitleValue" label="款项名称" align="center" width="140" /> |
|||
<el-table-column prop="openDate" label="融资付款开通日期" align="center" width="160" /> |
|||
<el-table-column prop="period" label="期数" align="center" width="100" /> |
|||
<el-table-column prop="payCompany" label="付款单位" align="center" width="140" /> |
|||
<el-table-column prop="receiveCompany" label="收款单位名称" align="center" width="140" /> |
|||
<el-table-column prop="bank" label="开户行" align="center" width="140" /> |
|||
<el-table-column prop="receivingAccount" label="银行账号" align="center" width="140" /> |
|||
<el-table-column prop="exePayDate" label="平仓付款日期" align="center" width="140" /> |
|||
<el-table-column prop="exePayPrice" label="平仓付款金额" align="center" width="140" /> |
|||
<el-table-column prop="remarks" label="备注" align="center" min-width="200" /> |
|||
</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> |
|||
<el-dialog center :visible.sync="dialogVisible" width="70%"> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<el-row style="border-top: 1px solid #E0E3EB"> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">款项名称</div> |
|||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.costTitleValue" clearable placeholder="" /></el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">融资付款开通日期</div> |
|||
<el-form-item><el-date-picker class="addinputInfo" v-model="formobj.openDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">期数</div> |
|||
<el-form-item><el-input class="addinputInfo addinputw" @keyup.native="formobj.period = getNumber(formobj.period, 0)" v-model="formobj.period" clearable placeholder="" /></el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">付款单位</div> |
|||
<el-form-item> |
|||
<el-select class="addinputInfo" v-model="formobj.payCompany" placeholder="请选择" @change="changePayCompany" filterable clearable> |
|||
<el-option v-for="item in payCompany_list" :key="item.companyInvoicingSid" :label="item.companyInvoicingName" :value="item.companyInvoicingName"/> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">收款单位</div> |
|||
<el-form-item> |
|||
<el-select class="addinputInfo" v-model="formobj.receiveCompany" placeholder="请选择" @change="receiveCompanyChange" clearable filterable> |
|||
<el-option v-for="item in receiveCompany_list" :key="item.sid" :label="item.companyName" :value="item.companyName"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">银行账号</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.receivingAccount }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">开户行</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.bank }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">平仓付款日期</div> |
|||
<el-form-item><el-date-picker class="addinputInfo" v-model="formobj.exePayDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期" /></el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">平仓付款金额</div> |
|||
<el-form-item><el-input class="addinputInfo addinputw" @keyup.native="formobj.exePayPrice = getNumber(formobj.exePayPrice, 2)" v-model="formobj.exePayPrice" clearable placeholder="" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.remarks" clearable placeholder="" /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<div slot="footer" class="dialog-footer" style="text-align: center"> |
|||
<el-button type="primary" size="small" @click="handleConfirm">确定</el-button> |
|||
<el-button size="small" @click="handleClose">取消</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import req from '@/api/anruifinmanagement/financingClosingPayment' |
|||
import payment from '@/api/anruifinmanagement/payment' |
|||
import { getOrgSidByPath, getInvoicingList, fetchBySid } from '@/api/jichuxinxi/dictcommons' |
|||
|
|||
export default { |
|||
name: 'FinancingClosingPayment', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
ButtonBar |
|||
}, |
|||
data() { |
|||
return { |
|||
dialogVisible: false, |
|||
payCompany_list: [], |
|||
receiveCompany_list: [], |
|||
formobj: { |
|||
sid: '', // sid |
|||
remarks: '', |
|||
costTitleValue: '', // 款项名称 |
|||
costTypeKey: '', |
|||
costTypeValue: '', |
|||
detailSid: '', // 付款申请明细的明细sid |
|||
openDate: '', // 融资付款开通日期 |
|||
period: '', // 期数 |
|||
payCompanySid: '', // 付款单位sid |
|||
payCompany: '', // 付款单位名称 |
|||
receiveCompany: '', // 收款单位名称 |
|||
receiveCompanySid: '', // 收款单位sid |
|||
receivingAccount: '', // 收款银行账号 |
|||
bank: '', // 开户行 |
|||
exePayDate: '', |
|||
exePayPrice: '', |
|||
deptSid: '', // 申请部门sid |
|||
deptName: '', // 申请部门名称 |
|||
createOrgSid: '', // 创建组织 |
|||
createOrgName: '', |
|||
useOrgSid: '', // 使用组织 |
|||
useOrgName: '', |
|||
createBySid: '', // 创建人 |
|||
createByName: '' |
|||
}, |
|||
rules: {}, |
|||
btndisabled: false, |
|||
btnList: [ |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'plus', |
|||
btnKey: 'toAdd', |
|||
btnLabel: '新增' |
|||
}, |
|||
{ |
|||
type: 'danger', |
|||
size: 'small', |
|||
icon: 'del', |
|||
btnKey: 'doDel', |
|||
btnLabel: '删除' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
|||
tableKey: 0, |
|||
list: [], |
|||
sids: [], // 用于导出的时候保存已选择的SIDs |
|||
listLoading: false, |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 5, |
|||
total: 0, |
|||
params: { |
|||
payCompany: '', |
|||
openStartDate: '', |
|||
openEndDate: '', |
|||
costTitleValue: '', |
|||
receiveCompany: '', |
|||
exePayStartDate: '', |
|||
exePayEndDate: '', |
|||
period: '', |
|||
remarks: '', |
|||
state: '', |
|||
orgPath: '', |
|||
userSid: '', |
|||
menuUrl: '' |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.init() |
|||
this.getList() |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
methods: { |
|||
init() { |
|||
getInvoicingList({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { |
|||
if (res.success) { |
|||
this.payCompany_list = res.data |
|||
} |
|||
}) |
|||
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => { |
|||
if (resp.success) { |
|||
this.formobj.createOrgSid = resp.data |
|||
this.formobj.useOrgSid = resp.data |
|||
fetchBySid({ useOrgSid: resp.data }).then((respsone) => { |
|||
if (respsone.success) { |
|||
this.formobj.createOrgName = respsone.data.name |
|||
this.formobj.useOrgName = respsone.data.name |
|||
} |
|||
}) |
|||
payment.selectByUseOrgSid({ useOrgSid: resp.data }).then((res) => { |
|||
if (res.success) { |
|||
this.receiveCompany_list = res.data |
|||
} |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
getNumber(val, limit) { |
|||
val = val.replace(/[^0-9.]/g, '') // 保留数字 |
|||
val = val.replace(/^00/, '0.') // 开头不能有两个0 |
|||
val = val.replace(/^\./g, '0.') // 开头为小数点转换为0. |
|||
val = val.replace(/\.{2,}/g, '.') // 两个以上的小数点转换成一个 |
|||
val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); // 只保留一个小数点 |
|||
/^0\d+/.test(val) ? val = val.slice(1) : '' // 两位以上数字开头不能为0 |
|||
const str = '^(\\d+)\\.(\\d{' + limit + '}).*$' |
|||
const reg = new RegExp(str) |
|||
if (limit === 0) { |
|||
// 不需要小数点 |
|||
val = val.replace(reg, '$1') |
|||
} else { |
|||
// 通过正则保留小数点后指定的位数 |
|||
val = val.replace(reg, '$1.$2') |
|||
} |
|||
return val |
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|||
switch (btnKey) { |
|||
case 'toAdd': |
|||
this.toAdd() |
|||
break |
|||
case 'doDel': |
|||
this.doDel() |
|||
break |
|||
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.menuUrl = this.$route.path |
|||
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
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: 5, |
|||
total: 0, |
|||
params: { |
|||
payCompany: '', |
|||
openStartDate: '', |
|||
openEndDate: '', |
|||
costTitleValue: '', |
|||
receiveCompany: '', |
|||
exePayStartDate: '', |
|||
exePayEndDate: '', |
|||
period: '', |
|||
remarks: '', |
|||
state: '', |
|||
orgPath: '', |
|||
userSid: '', |
|||
menuUrl: '' |
|||
} |
|||
} |
|||
this.getList() |
|||
}, |
|||
toAdd() { |
|||
this.dialogVisible = true |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
}, |
|||
toEdit(row) { |
|||
this.dialogVisible = true |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
req.fetchBySid(row.sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
} |
|||
}) |
|||
}, |
|||
changePayCompany(value) { |
|||
const choose = this.payCompany_list.filter((item) => item.companyInvoicingName === value) |
|||
if (choose.length > 0 && choose !== null) { |
|||
this.formobj.payCompanySid = choose[0].companyInvoicingSid |
|||
} else { |
|||
this.formobj.payCompanySid = '' |
|||
} |
|||
}, |
|||
receiveCompanyChange(value) { |
|||
const choose = this.receiveCompany_list.filter((item) => item.companyName === value) |
|||
if (choose !== null && choose.length > 0) { |
|||
this.formobj.receiveCompanySid = choose[0].sid |
|||
this.formobj.receivingAccount = choose[0].receivingAccount |
|||
this.formobj.bank = choose[0].bank |
|||
} else { |
|||
this.formobj.receiveCompanySid = '' |
|||
this.formobj.receivingAccount = '' |
|||
this.formobj.bank = '' |
|||
} |
|||
}, |
|||
handleConfirm() { |
|||
this.formobj.createBySid = window.sessionStorage.getItem('userSid') |
|||
this.formobj.name = window.sessionStorage.getItem('name') |
|||
this.formobj.deptName = window.sessionStorage.getItem('defaultOrgPathName').substring(window.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1) |
|||
this.formobj.deptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1) |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
req.saveOrUpdate(this.formobj).then((resp) => { |
|||
if (resp.success) { |
|||
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
|||
this.getList() |
|||
this.handleClose() |
|||
} |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
handleClose() { |
|||
this.dialogVisible = false |
|||
this.$refs['form_obj'].resetFields() |
|||
this.formobj = { |
|||
sid: '', // sid |
|||
remarks: '', |
|||
costTitleValue: '', // 款项名称 |
|||
costTypeKey: '', |
|||
costTypeValue: '', |
|||
detailSid: '', // 付款申请明细的明细sid |
|||
openDate: '', // 融资付款开通日期 |
|||
period: '', // 期数 |
|||
payCompanySid: '', // 付款单位sid |
|||
payCompany: '', // 付款单位名称 |
|||
receiveCompany: '', // 收款单位名称 |
|||
receiveCompanySid: '', // 收款单位sid |
|||
receivingAccount: '', // 收款银行账号 |
|||
bank: '', // 开户行 |
|||
exePayDate: '', |
|||
exePayPrice: '', |
|||
deptSid: '', // 申请部门sid |
|||
deptName: '', // 申请部门名称 |
|||
createOrgSid: '', // 创建组织 |
|||
createOrgName: '', |
|||
useOrgSid: '', // 使用组织 |
|||
useOrgName: '', |
|||
createBySid: '', // 创建人 |
|||
createByName: '' |
|||
} |
|||
}, |
|||
// 删除 |
|||
doDel() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) |
|||
return |
|||
} |
|||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|||
this.$confirm(tip, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: 'Loading', |
|||
spinner: 'el-icon-loading', |
|||
background: 'rgba(0, 0, 0, 0.7)' |
|||
}) |
|||
req.delBySids(this.sids).then(resp => { |
|||
if (resp.success) { |
|||
this.$message({ type: 'success', message: resp.msg, showClose: true }) |
|||
} |
|||
this.getList() |
|||
loading.close() |
|||
}).catch(e => { |
|||
loading.close() |
|||
}) |
|||
}).catch(() => { |
|||
}) |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.span-sty { |
|||
width: 140px !important; |
|||
} |
|||
.addinputInfo { |
|||
margin-left: 135px !important; |
|||
} |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 135px !important; |
|||
} |
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 135px !important; |
|||
width: calc(100% - 130px); |
|||
} |
|||
</style> |
@ -0,0 +1,53 @@ |
|||
package com.yxt.anrui.oa.api; |
|||
|
|||
import com.yxt.anrui.oa.biz.adfixedassetledger.AdFixedAssetLedgerDto; |
|||
import com.yxt.anrui.oa.biz.adfixedassetledger.AdFixedAssetLedgerQuery; |
|||
import com.yxt.anrui.oa.biz.adfixedassetledger.AdFixedAssetLedgerService; |
|||
import com.yxt.anrui.oa.biz.adfixedassetledger.AdFixedAssetLedgerVo; |
|||
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.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
@Api(tags = "固定资产台账管理") |
|||
@RestController |
|||
@RequestMapping("v1/adfixedassetledger") |
|||
public class AdFixedAssetLedgerRest { |
|||
|
|||
@Autowired |
|||
private AdFixedAssetLedgerService adFixedAssetLedgerService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<AdFixedAssetLedgerVo>> listPage(@RequestBody PagerQuery<AdFixedAssetLedgerQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<AdFixedAssetLedgerVo> pv = adFixedAssetLedgerService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
@ApiOperation("新增或修改") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody AdFixedAssetLedgerDto dto) { |
|||
return adFixedAssetLedgerService.saveOrUpdateDto(dto); |
|||
} |
|||
|
|||
@ApiOperation("根据sid批量删除") |
|||
@DeleteMapping("/delBySids") |
|||
public ResultBean delBySids(@RequestBody String[] sids) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
adFixedAssetLedgerService.delBySids(sids); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@ApiOperation("根据SID获取一条记录") |
|||
@GetMapping("/fetchDetailsBySid/{sid}") |
|||
public ResultBean<AdFixedAssetLedgerVo> fetchDetailsBySid(@PathVariable("sid") String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
AdFixedAssetLedgerVo vo = adFixedAssetLedgerService.fetchDetailsVoBySid(sid); |
|||
return rb.success().setData(vo); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,53 @@ |
|||
package com.yxt.anrui.oa.api; |
|||
|
|||
import com.yxt.anrui.oa.biz.adfixedasset.AdFixedAssetDto; |
|||
import com.yxt.anrui.oa.biz.adfixedasset.AdFixedAssetQuery; |
|||
import com.yxt.anrui.oa.biz.adfixedasset.AdFixedAssetService; |
|||
import com.yxt.anrui.oa.biz.adfixedasset.AdFixedAssetVo; |
|||
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.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
@Api(tags = "固定资产管理") |
|||
@RestController |
|||
@RequestMapping("v1/adfixedasset") |
|||
public class AdFixedAssetRest { |
|||
|
|||
@Autowired |
|||
private AdFixedAssetService adFixedAssetService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<AdFixedAssetVo>> listPage(@RequestBody PagerQuery<AdFixedAssetQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<AdFixedAssetVo> pv = adFixedAssetService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
@ApiOperation("新增或修改") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody AdFixedAssetDto dto) { |
|||
return adFixedAssetService.saveOrUpdateDto(dto); |
|||
} |
|||
|
|||
@ApiOperation("根据sid批量删除") |
|||
@DeleteMapping("/delBySids") |
|||
public ResultBean delBySids(@RequestBody String[] sids) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
adFixedAssetService.delBySids(sids); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@ApiOperation("根据SID获取一条记录") |
|||
@GetMapping("/fetchDetailsBySid/{sid}") |
|||
public ResultBean<AdFixedAssetVo> fetchDetailsBySid(@PathVariable("sid") String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
AdFixedAssetVo vo = adFixedAssetService.fetchDetailsVoBySid(sid); |
|||
return rb.success().setData(vo); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,54 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedasset; |
|||
|
|||
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; |
|||
|
|||
@Data |
|||
@ApiModel(value = "固定资产表", description = "固定资产表") |
|||
@TableName("ad_fixed_asset") |
|||
public class AdFixedAsset extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("固定资产名称") |
|||
private String assetName; // 固定资产名称
|
|||
@ApiModelProperty("编号") |
|||
private String assetNumber; // 编号
|
|||
@ApiModelProperty("单位") |
|||
private String unit; // 单位
|
|||
@ApiModelProperty("规格") |
|||
private String specification; // 规格
|
|||
@ApiModelProperty("固定资产类别key") |
|||
private String assetTypeKey; // 固定资产类别key
|
|||
@ApiModelProperty("固定资产类别") |
|||
private String assetTypeValue; // 固定资产类别
|
|||
|
|||
|
|||
} |
@ -0,0 +1,58 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedasset; |
|||
|
|||
|
|||
import com.yxt.anrui.oa.biz.oaform.OaFormDto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "固定资产表 数据传输对象", description = "固定资产表 数据传输对象") |
|||
public class AdFixedAssetDto extends OaFormDto { |
|||
|
|||
private String sid; // sid
|
|||
@ApiModelProperty("固定资产名称") |
|||
private String assetName; // 固定资产名称
|
|||
@ApiModelProperty("编号") |
|||
private String assetNumber; // 编号
|
|||
@ApiModelProperty("单位") |
|||
private String unit; // 单位
|
|||
@ApiModelProperty("规格") |
|||
private String specification; // 规格
|
|||
@ApiModelProperty("固定资产类别key") |
|||
private String assetTypeKey; // 固定资产类别key
|
|||
@ApiModelProperty("固定资产类别") |
|||
private String assetTypeValue; // 固定资产类别
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
} |
@ -0,0 +1,44 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedasset; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface AdFixedAssetMapper extends BaseMapper<AdFixedAsset> { |
|||
|
|||
IPage<AdFixedAssetVo> selectPageVo(IPage<AdFixedAsset> page, @Param(Constants.WRAPPER) Wrapper<AdFixedAsset> qw); |
|||
} |
@ -0,0 +1,12 @@ |
|||
<?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.oa.biz.adfixedasset.AdFixedAssetMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.anrui.oa.biz.adfixedasset.AdFixedAssetVo"> |
|||
SELECT * from ad_fixed_asset |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,63 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedasset; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: oa(驻外人员认定申请) <br/> |
|||
* File: AdExpatriatesApplyQuery.java <br/> |
|||
* Class: com.yxt.anrui.oa.api.adexpatriatesapply.AdExpatriatesApplyQuery <br/> |
|||
* Description: 驻外人员认定申请 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2025-01-16 15:22:53 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "驻外人员认定申请 查询条件", description = "驻外人员认定申请 查询条件") |
|||
public class AdFixedAssetQuery implements Query { |
|||
|
|||
@ApiModelProperty("固定资产名称") |
|||
private String assetName; // 固定资产名称
|
|||
@ApiModelProperty("编号") |
|||
private String assetNumber; // 编号
|
|||
@ApiModelProperty("单位") |
|||
private String unit; // 单位
|
|||
@ApiModelProperty("规格") |
|||
private String specification; // 规格
|
|||
@ApiModelProperty("固定资产类别key") |
|||
private String assetTypeKey; // 固定资产类别key
|
|||
@ApiModelProperty("固定资产类别") |
|||
private String assetTypeValue; // 固定资产类别
|
|||
} |
@ -0,0 +1,94 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedasset; |
|||
|
|||
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.oa.biz.oaappendix.OaAppendixService; |
|||
import com.yxt.anrui.oa.biz.oaform.OaFormService; |
|||
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; |
|||
|
|||
@Service |
|||
public class AdFixedAssetService extends MybatisBaseService<AdFixedAssetMapper, AdFixedAsset> { |
|||
|
|||
@Autowired |
|||
private OaAppendixService oaAppendixService; |
|||
@Autowired |
|||
private OaFormService oaFormService; |
|||
|
|||
public PagerVo<AdFixedAssetVo> listPageVo(PagerQuery<AdFixedAssetQuery> pq) { |
|||
AdFixedAssetQuery query = pq.getParams(); |
|||
QueryWrapper<AdFixedAsset> qw = new QueryWrapper<>(); |
|||
if (query != null) { |
|||
if (StringUtils.isNotBlank(query.getAssetName())) { |
|||
qw.like("assetName", query.getAssetName()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getAssetNumber())) { |
|||
qw.like("assetNumber", query.getAssetNumber()); |
|||
} |
|||
} |
|||
IPage<AdFixedAsset> page = PagerUtil.queryToPage(pq); |
|||
IPage<AdFixedAssetVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<AdFixedAssetVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
public ResultBean<String> saveOrUpdateDto(AdFixedAssetDto dto) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
String sid = dto.getSid(); |
|||
if (StringUtils.isBlank(sid)) { |
|||
// 新建操作
|
|||
AdFixedAsset entity = new AdFixedAsset(); |
|||
BeanUtil.copyProperties(dto, entity, "sid"); |
|||
baseMapper.insert(entity); |
|||
sid = entity.getSid(); |
|||
} else { |
|||
// 更新操作
|
|||
AdFixedAsset entity = fetchBySid(sid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
} |
|||
return rb.success().setData(sid); |
|||
} |
|||
|
|||
|
|||
public AdFixedAssetVo fetchDetailsVoBySid(String sid) { |
|||
AdFixedAsset entity = fetchBySid(sid); |
|||
AdFixedAssetVo vo = new AdFixedAssetVo(); |
|||
BeanUtil.copyProperties(entity, vo); |
|||
return vo; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,59 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedasset; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "驻外人员认定申请 视图数据对象", description = "驻外人员认定申请 视图数据对象") |
|||
public class AdFixedAssetVo implements Vo { |
|||
|
|||
private String sid; |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("固定资产名称") |
|||
private String assetName; // 固定资产名称
|
|||
@ApiModelProperty("编号") |
|||
private String assetNumber; // 编号
|
|||
@ApiModelProperty("单位") |
|||
private String unit; // 单位
|
|||
@ApiModelProperty("规格") |
|||
private String specification; // 规格
|
|||
@ApiModelProperty("固定资产类别key") |
|||
private String assetTypeKey; // 固定资产类别key
|
|||
@ApiModelProperty("固定资产类别") |
|||
private String assetTypeValue; // 固定资产类别
|
|||
} |
@ -0,0 +1,62 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedassetledger; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
@Data |
|||
@ApiModel(value = "固定资产台账", description = "固定资产台账") |
|||
@TableName("ad_fixed_asset_ledger") |
|||
public class AdFixedAssetLedger extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("固定资产名称") |
|||
private String assetName; // 固定资产名称
|
|||
@ApiModelProperty("编号") |
|||
private String assetNumber; // 编号
|
|||
@ApiModelProperty("单位") |
|||
private String unit; // 单位
|
|||
@ApiModelProperty("规格") |
|||
private String specification; // 规格
|
|||
@ApiModelProperty("固定资产类别key") |
|||
private String assetTypeKey; // 固定资产类别key
|
|||
@ApiModelProperty("固定资产类别") |
|||
private String assetTypeValue; // 固定资产类别
|
|||
@ApiModelProperty("使用组织sid") |
|||
private String useOrgSid; // 使用组织sid
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 使用组织sid
|
|||
@ApiModelProperty("数量") |
|||
private BigDecimal num; // 数量
|
|||
@ApiModelProperty("采购单价") |
|||
private BigDecimal price; // 采购单价
|
|||
} |
@ -0,0 +1,66 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedassetledger; |
|||
|
|||
|
|||
import com.yxt.anrui.oa.biz.oaform.OaFormDto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "固定资产台账 数据传输对象", description = "固定资产台账 数据传输对象") |
|||
public class AdFixedAssetLedgerDto extends OaFormDto { |
|||
|
|||
private String sid; // sid
|
|||
@ApiModelProperty("固定资产名称") |
|||
private String assetName; // 固定资产名称
|
|||
@ApiModelProperty("编号") |
|||
private String assetNumber; // 编号
|
|||
@ApiModelProperty("单位") |
|||
private String unit; // 单位
|
|||
@ApiModelProperty("规格") |
|||
private String specification; // 规格
|
|||
@ApiModelProperty("固定资产类别key") |
|||
private String assetTypeKey; // 固定资产类别key
|
|||
@ApiModelProperty("固定资产类别") |
|||
private String assetTypeValue; // 固定资产类别
|
|||
@ApiModelProperty("使用组织sid") |
|||
private String useOrgSid; // 使用组织sid
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 使用组织sid
|
|||
@ApiModelProperty("数量") |
|||
private String num; // 数量
|
|||
@ApiModelProperty("采购单价") |
|||
private String price; // 采购单价
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
} |
@ -0,0 +1,44 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedassetledger; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface AdFixedAssetLedgerMapper extends BaseMapper<AdFixedAssetLedger> { |
|||
|
|||
IPage<AdFixedAssetLedgerVo> selectPageVo(IPage<AdFixedAssetLedger> page, @Param(Constants.WRAPPER) Wrapper<AdFixedAssetLedger> qw); |
|||
} |
@ -0,0 +1,12 @@ |
|||
<?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.oa.biz.adfixedassetledger.AdFixedAssetLedgerMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.anrui.oa.biz.adfixedassetledger.AdFixedAssetLedgerVo"> |
|||
SELECT * from ad_fixed_asset_ledger |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,67 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedassetledger; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: oa(驻外人员认定申请) <br/> |
|||
* File: AdExpatriatesApplyQuery.java <br/> |
|||
* Class: com.yxt.anrui.oa.api.adexpatriatesapply.AdExpatriatesApplyQuery <br/> |
|||
* Description: 驻外人员认定申请 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2025-01-16 15:22:53 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "驻外人员认定申请 查询条件", description = "驻外人员认定申请 查询条件") |
|||
public class AdFixedAssetLedgerQuery implements Query { |
|||
|
|||
@ApiModelProperty("固定资产名称") |
|||
private String assetName; // 固定资产名称
|
|||
@ApiModelProperty("编号") |
|||
private String assetNumber; // 编号
|
|||
@ApiModelProperty("单位") |
|||
private String unit; // 单位
|
|||
@ApiModelProperty("规格") |
|||
private String specification; // 规格
|
|||
@ApiModelProperty("固定资产类别key") |
|||
private String assetTypeKey; // 固定资产类别key
|
|||
@ApiModelProperty("固定资产类别") |
|||
private String assetTypeValue; // 固定资产类别
|
|||
@ApiModelProperty("使用组织sid") |
|||
private String useOrgSid; // 使用组织sid
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 使用组织sid
|
|||
} |
@ -0,0 +1,94 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedassetledger; |
|||
|
|||
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.oa.biz.oaappendix.OaAppendixService; |
|||
import com.yxt.anrui.oa.biz.oaform.OaFormService; |
|||
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; |
|||
|
|||
@Service |
|||
public class AdFixedAssetLedgerService extends MybatisBaseService<AdFixedAssetLedgerMapper, AdFixedAssetLedger> { |
|||
|
|||
@Autowired |
|||
private OaAppendixService oaAppendixService; |
|||
@Autowired |
|||
private OaFormService oaFormService; |
|||
|
|||
public PagerVo<AdFixedAssetLedgerVo> listPageVo(PagerQuery<AdFixedAssetLedgerQuery> pq) { |
|||
AdFixedAssetLedgerQuery query = pq.getParams(); |
|||
QueryWrapper<AdFixedAssetLedger> qw = new QueryWrapper<>(); |
|||
if (query != null) { |
|||
if (StringUtils.isNotBlank(query.getAssetName())) { |
|||
qw.like("assetName", query.getAssetName()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getAssetNumber())) { |
|||
qw.like("assetNumber", query.getAssetNumber()); |
|||
} |
|||
} |
|||
IPage<AdFixedAssetLedger> page = PagerUtil.queryToPage(pq); |
|||
IPage<AdFixedAssetLedgerVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<AdFixedAssetLedgerVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
public ResultBean<String> saveOrUpdateDto(AdFixedAssetLedgerDto dto) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
String sid = dto.getSid(); |
|||
if (StringUtils.isBlank(sid)) { |
|||
// 新建操作
|
|||
AdFixedAssetLedger entity = new AdFixedAssetLedger(); |
|||
BeanUtil.copyProperties(dto, entity, "sid"); |
|||
baseMapper.insert(entity); |
|||
sid = entity.getSid(); |
|||
} else { |
|||
// 更新操作
|
|||
AdFixedAssetLedger entity = fetchBySid(sid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
} |
|||
return rb.success().setData(sid); |
|||
} |
|||
|
|||
|
|||
public AdFixedAssetLedgerVo fetchDetailsVoBySid(String sid) { |
|||
AdFixedAssetLedger entity = fetchBySid(sid); |
|||
AdFixedAssetLedgerVo vo = new AdFixedAssetLedgerVo(); |
|||
BeanUtil.copyProperties(entity, vo); |
|||
return vo; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,68 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedassetledger; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "固定资产台账 视图数据对象", description = "固定资产台账 视图数据对象") |
|||
public class AdFixedAssetLedgerVo implements Vo { |
|||
|
|||
private String sid; |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("固定资产名称") |
|||
private String assetName; // 固定资产名称
|
|||
@ApiModelProperty("编号") |
|||
private String assetNumber; // 编号
|
|||
@ApiModelProperty("单位") |
|||
private String unit; // 单位
|
|||
@ApiModelProperty("规格") |
|||
private String specification; // 规格
|
|||
@ApiModelProperty("固定资产类别key") |
|||
private String assetTypeKey; // 固定资产类别key
|
|||
@ApiModelProperty("固定资产类别") |
|||
private String assetTypeValue; // 固定资产类别
|
|||
@ApiModelProperty("使用组织sid") |
|||
private String useOrgSid; // 使用组织sid
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 使用组织sid
|
|||
@ApiModelProperty("数量") |
|||
private String num; // 数量
|
|||
@ApiModelProperty("采购单价") |
|||
private String price; // 采购单价
|
|||
} |
Loading…
Reference in new issue