Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
32c8d566a3
@ -11,11 +11,14 @@ import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.fantang.domain.FtInvoiceDao;
|
||||
import com.ruoyi.system.fantang.domain.FtReturnDao;
|
||||
import com.ruoyi.system.fantang.domain.FtSettlementDao;
|
||||
import com.ruoyi.system.fantang.service.IFtInvoiceDaoService;
|
||||
import com.ruoyi.system.fantang.service.IFtReturnDaoService;
|
||||
import com.ruoyi.system.fantang.service.IFtSettlementDaoService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@ -36,7 +39,7 @@ public class FtInvoiceDaoController extends BaseController {
|
||||
|
||||
private final IFtInvoiceDaoService iFtInvoiceDaoService;
|
||||
|
||||
private final IFtReturnDaoService iFtReturnDaoService;
|
||||
private final IFtSettlementDaoService settSettlementDaoService;
|
||||
|
||||
/**
|
||||
* 查询财务收费开票列表
|
||||
@ -108,8 +111,8 @@ public class FtInvoiceDaoController extends BaseController {
|
||||
}
|
||||
|
||||
@PostMapping("/addToInvoice")
|
||||
@Transactional
|
||||
public AjaxResult addToInvoice(@RequestBody JSONObject params) {
|
||||
System.out.println(params);
|
||||
|
||||
// 应收
|
||||
BigDecimal payable = params.getBigDecimal("payable");
|
||||
@ -136,13 +139,14 @@ public class FtInvoiceDaoController extends BaseController {
|
||||
invoiceDao.setInvoiceName(invoiceName);
|
||||
invoiceDao.setTaxId(taxId);
|
||||
invoiceDao.setInvoiceType(invoiceType);
|
||||
invoiceDao.setInvoiceAmount(receipts);
|
||||
iFtInvoiceDaoService.save(invoiceDao);
|
||||
//
|
||||
// if (invoiceType == 2) {
|
||||
// FtReturnDao ftReturnDao = new FtReturnDao();
|
||||
// ftReturnDao.setInvoiceId(invoiceDao.getId());
|
||||
// iFtReturnDaoService.save(ftReturnDao);
|
||||
// }
|
||||
|
||||
FtSettlementDao settlementDao = new FtSettlementDao();
|
||||
settlementDao.setSettleId(params.getLong("settleId"));
|
||||
settlementDao.setInvoiceId(invoiceDao.getId());
|
||||
settlementDao.setInvoiceFlag(true);
|
||||
settSettlementDaoService.updateById(settlementDao);
|
||||
|
||||
return AjaxResult.success("已开票");
|
||||
}
|
||||
|
@ -39,26 +39,6 @@ public class FtSettlementDaoController extends BaseController {
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(FtSettlementDao ftSettlementDao) {
|
||||
startPage();
|
||||
LambdaQueryWrapper<FtSettlementDao> lqw = Wrappers.lambdaQuery(ftSettlementDao);
|
||||
if (ftSettlementDao.getSettleAt() != null) {
|
||||
lqw.eq(FtSettlementDao::getSettleAt, ftSettlementDao.getSettleAt());
|
||||
}
|
||||
if (ftSettlementDao.getPrice() != null) {
|
||||
lqw.eq(FtSettlementDao::getPrice, ftSettlementDao.getPrice());
|
||||
}
|
||||
if (ftSettlementDao.getPayable() != null) {
|
||||
lqw.eq(FtSettlementDao::getPayable, ftSettlementDao.getPayable());
|
||||
}
|
||||
if (ftSettlementDao.getReceipts() != null) {
|
||||
lqw.eq(FtSettlementDao::getReceipts, ftSettlementDao.getReceipts());
|
||||
}
|
||||
if (StringUtils.isNotBlank(ftSettlementDao.getType())) {
|
||||
lqw.eq(FtSettlementDao::getType, ftSettlementDao.getType());
|
||||
}
|
||||
if (ftSettlementDao.getRefund() != null) {
|
||||
lqw.eq(FtSettlementDao::getRefund, ftSettlementDao.getRefund());
|
||||
}
|
||||
// List<FtSettlementDao> list = iFtSettlementDaoService.list(lqw);
|
||||
List<FtSettlementDao> list = iFtSettlementDaoService.listWithPatient(ftSettlementDao);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.ruoyi.system.fantang.domain;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@ -98,4 +99,14 @@ public class FtSettlementDao implements Serializable {
|
||||
|
||||
@TableField(exist = false)
|
||||
private String name;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String beginOfDay;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String endOfDay;
|
||||
|
||||
private Long invoiceId;
|
||||
|
||||
private Boolean invoiceFlag;
|
||||
}
|
||||
|
@ -1,11 +1,15 @@
|
||||
package com.ruoyi.system.fantang.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.system.fantang.domain.FtSettlementDao;
|
||||
import com.ruoyi.system.fantang.mapper.FtSettlementDaoMapper;
|
||||
import com.ruoyi.system.fantang.service.IFtSettlementDaoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -19,6 +23,16 @@ public class FtSettlementDaoServiceImpl extends ServiceImpl<FtSettlementDaoMappe
|
||||
|
||||
@Override
|
||||
public List<FtSettlementDao> listWithPatient(FtSettlementDao ftSettlementDao) {
|
||||
|
||||
Date settleAt = ftSettlementDao.getSettleAt();
|
||||
if (settleAt != null) {
|
||||
DateTime beginOfDay = DateUtil.beginOfDay(settleAt);
|
||||
DateTime endOfDay = DateUtil.endOfDay(settleAt);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
ftSettlementDao.setBeginOfDay(sdf.format(beginOfDay));
|
||||
ftSettlementDao.setEndOfDay(sdf.format(endOfDay));
|
||||
}
|
||||
|
||||
return this.baseMapper.listWithPatient(ftSettlementDao);
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,8 @@
|
||||
<result property="type" column="type"/>
|
||||
<result property="flag" column="flag"/>
|
||||
<result property="refund" column="refund"/>
|
||||
<result property="invoiceId" column="invoice_id"/>
|
||||
<result property="invoiceFlag" column="invoice_flag"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="listWithPatient" resultType="com.ruoyi.system.fantang.domain.FtSettlementDao">
|
||||
@ -24,8 +26,10 @@
|
||||
FROM ft_settle a
|
||||
LEFT JOIN ft_patient b ON b.patient_id = a.patient_id
|
||||
<where>
|
||||
<if test="settleAt != null and settleAt !=''">and a.settle_at = #{settleAt}</if>
|
||||
<if test="beginOfDay != null and beginOfDay !=''">settle_at BETWEEN #{beginOfDay}</if>
|
||||
<if test="endOfDay != null and endOfDay !=''">AND #{endOfDay}</if>
|
||||
<if test="type != null and type !=''">and a.type = #{type}</if>
|
||||
<if test="invoiceFlag != null and invoiceFlag !=''">and a.invoice_flag = #{invoiceFlag}</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
@ -9,24 +9,6 @@
|
||||
placeholder="选择结算日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="应收" prop="payable">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.payable"-->
|
||||
<!-- placeholder="请输入应收"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="实收" prop="receipts">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.receipts"-->
|
||||
<!-- placeholder="请输入实收"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="结算类型" prop="type">
|
||||
<el-select v-model="queryParams.type" placeholder="请选择结算类型" clearable size="small">
|
||||
<el-option
|
||||
@ -37,15 +19,16 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="退款总额" prop="refund">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.refund"-->
|
||||
<!-- placeholder="请输入退款总额"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="已开票" prop="invoiceFlag">
|
||||
<el-select v-model="queryParams.invoiceFlag" placeholder="请选择已开票" clearable size="small">
|
||||
<el-option
|
||||
v-for="item in invoiceFlagOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@ -53,36 +36,15 @@
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleAdd"-->
|
||||
<!-- v-hasPermi="['fantang:settlement:add']"-->
|
||||
<!-- >新增-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['fantang:settlement:edit']"
|
||||
>开票
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['fantang:settlement:remove']"
|
||||
>删除
|
||||
@click=""
|
||||
v-hasPermi="['fantang:settlement:edit']"
|
||||
>组合开票
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -110,6 +72,7 @@
|
||||
<span>{{ parseTime(scope.row.settleAt, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已开票" align="center" prop="invoiceFlag" :formatter="formatInvoiceFlag"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -118,16 +81,9 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['fantang:settlement:edit']"
|
||||
v-if="!scope.row.invoiceFlag"
|
||||
>开票
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['fantang:settlement:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -143,12 +99,6 @@
|
||||
<!-- 添加或修改结算管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<!-- <el-form-item label="记录清单" prop="list">-->
|
||||
<!-- <el-input v-model="form.list" placeholder="请输入记录清单" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="结算总价" prop="price">-->
|
||||
<!-- <el-input v-model="form.price" placeholder="请输入结算总价" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="应收" prop="payable">
|
||||
<el-input v-model="form.payable" placeholder="请输入应收" :disabled="true"/>
|
||||
</el-form-item>
|
||||
@ -177,9 +127,6 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="退款总额" prop="refund">-->
|
||||
<!-- <el-input v-model="form.refund" placeholder="请输入退款总额"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@ -190,8 +137,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addSettlement, delSettlement, exportSettlement, listSettlement} from "@/api/fantang/settlement";
|
||||
import {getSettlement} from "../../../api/fantang/settlement";
|
||||
import {
|
||||
addSettlement,
|
||||
delSettlement,
|
||||
exportSettlement,
|
||||
getSettlement,
|
||||
listSettlement
|
||||
} from "../../../api/fantang/settlement";
|
||||
import {addToInvoice} from "../../../api/fantang/invoice";
|
||||
|
||||
export default {
|
||||
@ -206,6 +158,13 @@ export default {
|
||||
value: 2,
|
||||
label: '挂账'
|
||||
}],
|
||||
invoiceFlagOptions: [{
|
||||
value: true,
|
||||
label: '是'
|
||||
}, {
|
||||
value: false,
|
||||
label: '否'
|
||||
}],
|
||||
typeOptions: [{
|
||||
value: '现金',
|
||||
label: '现金'
|
||||
@ -249,7 +208,8 @@ export default {
|
||||
payable: undefined,
|
||||
receipts: undefined,
|
||||
type: undefined,
|
||||
refund: undefined
|
||||
refund: undefined,
|
||||
invoiceFlag: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -292,10 +252,18 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
formatInvoiceFlag(row) {
|
||||
if (row.invoiceFlag === true) {
|
||||
return '是';
|
||||
} else {
|
||||
return '否';
|
||||
}
|
||||
},
|
||||
/** 查询结算管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listSettlement(this.queryParams).then(response => {
|
||||
console.log(response)
|
||||
this.settlementList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user