jiangping
2024-02-04 9658db7f832eca9f4bbf7791c5e440886e5824d3
Merge remote-tracking branch 'origin/master'

# Conflicts:
# server/service/src/main/java/com/doumee/core/utils/Constants.java
已添加4个文件
已修改13个文件
966 ■■■■ 文件已修改
company/src/api/business/taxes.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/enterprise/OperaInsuranceApplyWindow.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/enterprise/additionSubtractionApplication.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/enterprise/editFactoryChange.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/enterprise/entrustedInvoicingApplication.vue 253 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/enterprise/entrustmentHistory.vue 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/enterprise/factoryChange.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/business/taxes.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/enterprise/directInvoicing.vue 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/enterprise/entrustedInvoicing.vue 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/company/src/main/java/com/doumee/api/business/TaxesController.java 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/utils/Constants.java 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/utils/DateUtil.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/TaxesService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/api/business/taxes.js
@@ -20,3 +20,10 @@
        trim: true
    })
}
// åˆ—表查询
export function list(data) {
    return request.post('/business/taxes/list', data, {
        trim: true
    })
}
company/src/components/enterprise/OperaInsuranceApplyWindow.vue
@@ -24,13 +24,12 @@
                        <el-date-picker
                            @change="getTimeVal"
                            v-model="form.applyStartTime"
                            type="datetime"
                            type="date"
                            class="date_picker"
                            default-time="00:00:00"
                            :disabled="!form.solutionId"
                            :picker-options="pickerOptions"
                            value-format="yyyy-MM-dd hh:mm:ss"
                            format="yyyy-MM-dd hh:mm:ss"
                            value-format="yyyy-MM-dd HH:mm:ss"
                            format="yyyy-MM-dd HH:mm:ss"
                            placeholder="选择日期">
                        </el-date-picker>
                        <span style="color: #F95601; font-size: 14px;">(次日生效投保请于17:30前提交,超时提交以保险单为准)</span>
@@ -40,10 +39,11 @@
                    <el-date-picker
                        disabled
                        v-model="form.applyEndTime"
                        type="datetime"
                        default-time="00:00:00"
                        value-format="yyyy-MM-dd hh:mm:ss"
                        format="yyyy-MM-dd hh:mm:ss"
                        type="date"
                        class="date_picker"
                        :picker-options="pickerOptions"
                        value-format="yyyy-MM-dd HH:mm:ss"
                        format="yyyy-MM-dd HH:mm:ss"
                        placeholder="选择日期">
                    </el-date-picker>
                </el-form-item>
@@ -319,7 +319,7 @@
                startDate: time
            }).then(res => {
                this.price = res.cyclePrice
                this.form.applyEndTime = res.endDate.substring(0, 10)
                this.form.applyEndTime = res.endDate
                this.tableData.forEach(item => {
                    item.fee = res.cyclePrice
                })
company/src/components/enterprise/additionSubtractionApplication.vue
@@ -19,8 +19,8 @@
                            v-model="form.applyStartTime"
                            type="date"
                            :picker-options="pickerOptions"
                            value-format="yyyy-MM-dd"
                            format="yyyy å¹´ MM æœˆ dd æ—¥"
                            value-format="yyyy-MM-dd HH:mm:ss"
                            format="yyyy-MM-dd HH:mm:ss"
                            placeholder="选择日期">
                        </el-date-picker>
                        <span style="color: #F95601; font-size: 14px;">(次日生效投保请于17:30前提交,超时提交以保险单为准)</span>
company/src/components/enterprise/editFactoryChange.vue
@@ -16,10 +16,10 @@
                    <div style="display: flex; flex-direction: column;">
                        <el-date-picker
                            v-model="form.applyStartTime"
                            type="datetime"
                            type="date"
                            :picker-options="pickerOptions"
                            value-format="yyyy-MM-dd hh:mm:ss"
                            format="yyyy-MM-dd hh:mm:ss"
                            value-format="yyyy-MM-dd HH:mm:ss"
                            format="yyyy-MM-dd HH:mm:ss"
                            placeholder="选择日期">
                        </el-date-picker>
                        <span style="color: #F95601; font-size: 14px;">(次日生效投保请于17:30前提交,超时提交以保险单为准)</span>
company/src/components/enterprise/entrustedInvoicingApplication.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,253 @@
<template>
    <GlobalWindow
        :title="title"
        width="100%"
        :visible.sync="visible"
        :confirm-working="isWorking"
        @confirm="confirm"
    >
        <div class="info">
            <div class="info_list">
                <div class="info_list_item">
                    <div class="info_list_item_label">开票名称:</div>
                    <div class="info_list_item_val">{{userInfo.company.name}}</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">纳税人识别号:</div>
                    <div class="info_list_item_val">{{userInfo.company.code}}</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">开户行:</div>
                    <div class="info_list_item_val">{{userInfo.company.taxBank}}</div>
                </div>
                <div class="info_list_item">
                    <div class="info_list_item_label">账号:</div>
                    <div class="info_list_item_val">
                        {{userInfo.company.taxAccount}}
                    </div>
                </div>
                <div class="info_list_item" style="width: 100%;">
                    <div class="info_list_item_label">地址、电话:</div>
                    <div class="info_list_item_val">{{userInfo.company.invoiceAddr}} {{userInfo.company.phone}}</div>
                </div>
                <div class="info_list_item" style="width: 100%;">
                    <div class="info_list_item_label">开票金额:</div>
                    <div class="info_list_item_val" style="color:rgba(249, 86, 1, 0.996078431372549);">{{total}}</div>
                </div>
                <div class="info_list_item" style="width: 100%;">
                    <div class="info_list_item_label">接收方式:</div>
                    <div class="info_list_item_val">电子发票</div>
<!--                    <div v-if="model.type === 1" class="info_list_item_val">纸质发票</div>-->
                </div>
            </div>
            <el-table
                :data="form.list"
                border
                show-summary
                :summary-method="getSummaries"
                style="width: 100%; margin-bottom: 20px;">
                <el-table-column
                    label="序号"
                    align="center"
                    width="80">
                    <template slot-scope="scope">
                        <span>{{scope.$index + 1}}</span>
                    </template>
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="solutionsName"
                    label="保险方案">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="code"
                    label="保单号">
                </el-table-column>
                <el-table-column
                    align="center"
                    label="金额">
                    <template slot-scope="{row}">
                        <span style="color:rgba(249, 86, 1, 0.996078431372549);">{{row.totalPrice}}</span>
                    </template>
                </el-table-column>
            </el-table>
        </div>
    </GlobalWindow>
</template>
<script>
    import BaseOpera from '@/components/base/BaseOpera'
    import GlobalWindow from '@/components/common/GlobalWindow'
    import { mapState } from 'vuex'
    export default {
        name: 'entrustedInvoicingApplication',
        extends: BaseOpera,
        components: { GlobalWindow },
        data () {
            return {
                form: {
                    id: null,
                    backInfo:'',
                    list: []
                },
                rules: {
                    backInfo: [
                        { required: true, message: '请输入退回说明' }
                    ]
                }
            }
        },
        created () {
            console.log(this.userInfo)
            this.config({
                api: '/business/taxes',
                'field.id': 'id'
            })
        },
        computed: {
            ...mapState(['userInfo']),
            total () {
                let price = 0
                this.form.list.forEach(item => {
                    price += item.totalPrice
                })
                return price;
            }
        },
        methods: {
            open (title, target) {
                this.title = title
                this.visible = true
                this.$nextTick(() => {
                    for (const key in this.form) {
                        this.form[key] = target[key]
                    }
                })
            },
            getSummaries (param) {
                const { columns, data } = param
                const sums = []
                columns.forEach((column, index) => {
                    if (index === 0) {
                        sums[index] = '合计'
                    } else if (index == 4) {
                        let price = 0
                        data.forEach(item => {
                            price += item.totalPrice
                        })
                        sums[index] = price
                    }
                })
            }
        }
    }
</script>
<style lang="scss" scoped>
    ::v-deep .el-table__footer-wrapper tbody td {
        cursor: pointer;
        text-align: center;
        &:nth-child(5) {
            color:rgba(249, 86, 1, 0.996078431372549);
        }
    }
    /*   ::v-deep .el-table__header-wrapper   th:first-child .cell{
          color:rgba(249, 86, 1, 0.996078431372549) !important
       }
       ::v-deep  table:first-of-type th:first-child .cell{
            //color:rgba(249, 86, 1, 0.996078431372549) !important
       }
       ::v-deep   .el-table--border th:first-child .cell {
         &:nth-child(2) {
           color:rgba(249, 86, 1, 0.996078431372549);
         }
       }*/
    .info {
        width: 100%;
        .info_label {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
            span {
                font-size: 14px;
                font-weight: 500;
                color: #000000;
            }
        }
        .info_list {
            width: 100%;
            display: flex;
            align-items: left;
            flex-wrap: wrap;
            .info_list_item {
                width: 50%;
                display: flex;
                align-items: start;
                font-size: 14px;
                margin-bottom: 20px;
                .info_list_item_label {
                    width: 150px;
                    flex-shrink: 0;
                }
                .info_list_item_val {
                    flex: 1;
                    display: flex;
                    align-items: center;
                    .image {
                        width: 100px;
                        height: 100px;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        overflow: hidden;
                        img {
                            width: 100%;
                        }
                    }
                }
            }
        }
    }
    .form {
        width: 100%;
        display: flex;
        flex-direction: column;
        .form_item {
            width: 100%;
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            &:last-child {
                margin-bottom: 0 !important;
            }
            .form_item_label {
                width: 100px;
                flex-shrink: 0;
                font-size: 14px;
                color: black;
            }
            .form_item_val {
                flex: 1;
                min-height: 35px;
                display: flex;
                align-items: center;
                input {
                    width: 100%;
                    height: 100%;
                    font-size: 14px;
                    color: black;
                    padding: 5px 10px;
                    outline: none;
                    box-sizing: border-box;
                    border: 1px solid #ececec;
                }
            }
        }
    }
</style>
company/src/components/enterprise/entrustmentHistory.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,93 @@
<template>
    <GlobalWindow
        :title="title"
        width="100%"
        :visible.sync="visible"
        :confirm-working="isWorking"
        @confirm="confirm"
    >
        <div style="width: 100%; display: flex; align-items: center; margin-bottom: 20px;">
            ä¿é™©æ–¹æ¡ˆï¼š{{form.solutionsName}} <div style="width: 20px;"></div> ä¿å•号:{{form.code || '-'}}
        </div>
        <el-table
            :data="list"
            border
            ref="table"
            style="width: 100%">
            <el-table-column label="序号" width="80px">
                <template slot-scope="scope">
                    <span>{{scope.$index + 1}}</span>
                </template>
            </el-table-column>
            <el-table-column
                prop="solutionName"
                label="申请开票时间">
            </el-table-column>
            <el-table-column
                prop="bdCode"
                label="开票状态">
            </el-table-column>
            <el-table-column
                prop="applyChangeId"
                label="开票金额(元)">
            </el-table-column>
            <el-table-column
                prop="duName"
                label="接收方式">
            </el-table-column>
            <el-table-column
                label="操作">
                <template slot-scope="{row}">
                    <el-button type="text">申请详情</el-button>
                </template>
            </el-table-column>
        </el-table>
    </GlobalWindow>
</template>
<script>
    import BaseOpera from '@/components/base/BaseOpera'
    import GlobalWindow from '@/components/common/GlobalWindow'
    import { list } from '@/api/business/taxes'
    export default {
        name: 'entrustmentHistory',
        extends: BaseOpera,
        components: { GlobalWindow },
        data () {
            return {
                form: {
                    id: null,
                    solutionsName: '',
                    code: ''
                },
                list: []
            }
        },
        created () {
            this.config({
                api: '/business/dispatchUnit',
                'field.id': 'id'
            })
        },
        methods: {
            open (title, target) {
                this.title = title
                this.visible = true
                // ç¼–辑
                this.$nextTick(() => {
                    for (const key in this.form) {
                        this.form[key] = target[key]
                    }
                    this.getList()
                })
            },
            getList() {
                list({ insuranceApplyId: this.form.id })
                    .then(res => {
                        console.log(res)
                        this.list = res
                    })
            }
        }
    }
</script>
company/src/components/enterprise/factoryChange.vue
@@ -16,10 +16,10 @@
                    <div style="display: flex; flex-direction: column;">
                        <el-date-picker
                            v-model="form.applyStartTime"
                            type="datetime"
                            type="date"
                            :picker-options="pickerOptions"
                            value-format="yyyy-MM-dd hh:mm:ss"
                            format="yyyy-MM-dd hh:mm:ss"
                            value-format="yyyy-MM-dd HH:mm:ss"
                            format="yyyy-MM-dd HH:mm:ss"
                            placeholder="选择日期">
                        </el-date-picker>
                        <span style="color: #F95601; font-size: 14px;">(次日生效投保请于17:30前提交,超时提交以保险单为准)</span>
company/src/views/business/taxes.vue
@@ -19,7 +19,7 @@
                    end-placeholder="结束日期">
                </el-date-picker>
            </el-form-item>
            <el-form-item label="申请开票企业" prop="companyId">
            <el-form-item label="申请开票企业" prop="companyId" v-if="userInfo.type === 0">
              <el-select v-model="searchForm.companyId" placeholder="请选择" @change="search">
                <el-option
                    v-for="item in companyList"
@@ -54,7 +54,7 @@
                        <span v-if="row.status === 3">已冲红</span>
                    </template>
                </el-table-column>
                <el-table-column prop="companyName" label="申请企业" min-width="100px"></el-table-column>
                <el-table-column prop="companyName" label="申请企业" min-width="100px" v-if="userInfo.type === 0"></el-table-column>
                <el-table-column prop="createDate" label="申请开票时间" min-width="100px"></el-table-column>
                <el-table-column prop="creatorName" label="申请人" min-width="100px"></el-table-column>
                <el-table-column prop="price" label="开票金额(元)" min-width="100px"></el-table-column>
@@ -82,9 +82,9 @@
                </el-table-column>
                <el-table-column label="操作" min-width="180px">
                    <template slot-scope="{row}">
                        <el-button v-if="row.status==0" type="text" @click="$refs.OperaTaxesUploadWindow.open('上传发票',row)">上传发票</el-button>
                        <el-button v-if="row.status ==1 " type="text" @click="$refs.OperaTaxesUploadWindow.open('修改发票',row)">修改发票</el-button>
                        <el-button type="text"    @click="$refs.OperaTaxesWindow.open('申请详情',row)">申请详情</el-button>
                        <el-button v-if="row.status == 0" type="text" @click="$refs.OperaTaxesUploadWindow.open('上传发票',row)">上传发票</el-button>
                        <el-button v-if="row.status == 1 && userInfo.type === 0" type="text" @click="$refs.OperaTaxesUploadWindow.open('修改发票',row)">修改发票</el-button>
                        <el-button type="text" @click="$refs.OperaTaxesWindow.open('申请详情',row)">申请详情</el-button>
                    </template>
                </el-table-column>
            </el-table>
@@ -136,6 +136,7 @@
import { pageAll as companyAll } from '@/api/business/company'
import { doneApply } from '@/api/business/taxes'
import UploadAvatarImage from '@/components/common/UploadAvatarImage'
import { mapState } from 'vuex'
export default {
  name: 'Taxes',
  extends: BaseTable,
@@ -157,6 +158,9 @@
      visible: false
    }
  },
    computed: {
      ...mapState(['userInfo'])
    },
  created () {
    this.config({
      module: '发票信息表',
company/src/views/enterprise/directInvoicing.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,149 @@
<template>
    <TableLayout>
        <!-- è¡¨æ ¼å’Œåˆ†é¡µ -->
        <template v-slot:table-wrap>
            <ul style="margin-bottom: 30px;width: 100%;display: flex;align-items: center;justify-content: space-between;">
                <li style="font-size: 18px;font-weight: bold;">申请开票</li>
                <li><el-button type="primary" @click="apply">提交开票</el-button></li>
            </ul>
            <el-table
                    v-loading="isWorking.search"
                    :data="tableData.list"
                    stripe
                    @selection-change="handleSelectionChange"
            >
                <el-table-column type="selection" fixed="left" width="55"></el-table-column>
                <el-table-column label="序号" width="80px">
                    <template slot-scope="scope">
                        <span>{{scope.$index + 1}}</span>
                    </template>
                </el-table-column>
                <el-table-column prop="statusInfo" label="状态"></el-table-column>
                <el-table-column prop="solutionsName" label="保险方案"></el-table-column>
                <el-table-column prop="code" label="保单号"></el-table-column>
                <el-table-column label="产生费用(元)">
                    <template slot-scope="{row}">
                        <span>{{row.currentFee}}</span>
                    </template>
                </el-table-column>
                <el-table-column label="已开票费用(元)">
                    <template slot-scope="{row}">
                        <span>{{row.taxesMoney}}</span>
                    </template>
                </el-table-column>
                <el-table-column prop="fee" label="未开票费用(元)">
                    <template slot-scope="{row}">
                        <span>{{row.currentFee - row.taxesMoney}}</span>
                    </template>
                </el-table-column>
                <el-table-column prop="taxesLast" label="上次开票时间"></el-table-column>
                <el-table-column prop="startTime" label="投保生效日期"></el-table-column>
                <el-table-column prop="endTime" label="投保失效日期"></el-table-column>
                <el-table-column label="操作" min-width="180px">
                    <template slot-scope="{row}">
                        <el-button type="text" @click="$refs.entrustmentHistory.open('开票历史', row)">开票历史</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <pagination
                    @size-change="handleSizeChange"
                    @current-change="handlePageChange"
                    :pagination="tableData.pagination"
            >
            </pagination>
        </template>
        <!--   ç”³è¯·    -->
        <entrustedInvoicingApplication ref="entrustedInvoicingApplication" @success="handlePageChange" />
        <!--    å¼€ç¥¨åŽ†å²    -->
        <entrustmentHistory ref="entrustmentHistory" @success="handlePageChange" />
    </TableLayout>
</template>
<script>
    import BaseTable from '@/components/base/BaseTable'
    import TableLayout from '@/layouts/TableLayout'
    import Pagination from '@/components/common/Pagination'
    import entrustedInvoicingApplication from '@/components/enterprise/entrustedInvoicingApplication'
    import entrustmentHistory from '@/components/enterprise/entrustmentHistory'
    export default {
        name: 'directInvoicing',
        extends: BaseTable,
        components: { TableLayout, Pagination, entrustedInvoicingApplication, entrustmentHistory },
        data () {
            return {
                searchForm: {
                    type: 0
                }
            }
        },
        created () {
            this.config({
                module: '投保申请信息表',
                api: '/business/insuranceApply',
                'field.id': 'id',
                'field.main': 'id'
            })
            this.search()
        },
        methods: {
            apply() {
                if (this.tableData.selectedRows.length === 0) {
                    this.$message.warning('至少选择一项内容')
                    return
                }
                for (let i = 0; i < this.tableData.selectedRows.length; i++) {
                    if (this.tableData.selectedRows[i].currentFee - this.tableData.selectedRows[i].taxesMoney === 0) {
                        this.$message.warning(`第${i + 1}项可开票金额为0,不能进行开票!`)
                        return
                    }
                }
                let obj = {}
                obj.list = JSON.parse(JSON.stringify(this.tableData.selectedRows))
                obj.list.forEach(item => {
                    item.totalPrice = item.currentFee - item.taxesMoney
                })
                console.log(obj.list)
                this.$refs.entrustedInvoicingApplication.open('申请开票', obj)
            }
        }
    }
</script>
<style lang="scss" scoped>
    .form {
        width: 100%;
        display: flex;
        flex-direction: column;
        .form_item {
            width: 100%;
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            &:last-child {
                margin-bottom: 0 !important;
            }
            .form_item_label {
                width: 100px;
                flex-shrink: 0;
                font-size: 14px;
                color: black;
            }
            .form_item_val {
                flex: 1;
                min-height: 35px;
                display: flex;
                align-items: center;
                input {
                    width: 100%;
                    height: 100%;
                    font-size: 14px;
                    color: black;
                    padding: 5px 10px;
                    outline: none;
                    box-sizing: border-box;
                    border: 1px solid #ececec;
                }
            }
        }
    }
</style>
company/src/views/enterprise/entrustedInvoicing.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,149 @@
<template>
    <TableLayout>
        <!-- è¡¨æ ¼å’Œåˆ†é¡µ -->
        <template v-slot:table-wrap>
            <ul style="margin-bottom: 30px;width: 100%;display: flex;align-items: center;justify-content: space-between;">
                <li style="font-size: 18px;font-weight: bold;">申请开票</li>
                <li><el-button type="primary" @click="apply">提交开票</el-button></li>
            </ul>
            <el-table
                v-loading="isWorking.search"
                :data="tableData.list"
                stripe
                @selection-change="handleSelectionChange"
            >
                <el-table-column type="selection" fixed="left" width="55"></el-table-column>
                <el-table-column label="序号" width="80px">
                    <template slot-scope="scope">
                        <span>{{scope.$index + 1}}</span>
                    </template>
                </el-table-column>
                <el-table-column prop="statusInfo" label="状态"></el-table-column>
                <el-table-column prop="solutionsName" label="保险方案"></el-table-column>
                <el-table-column prop="code" label="保单号"></el-table-column>
                <el-table-column label="产生费用(元)">
                    <template slot-scope="{row}">
                        <span>{{row.currentFee}}</span>
                    </template>
                </el-table-column>
                <el-table-column label="已开票费用(元)">
                    <template slot-scope="{row}">
                        <span>{{row.taxesMoney}}</span>
                    </template>
                </el-table-column>
                <el-table-column prop="fee" label="未开票费用(元)">
                    <template slot-scope="{row}">
                        <span>{{row.currentFee - row.taxesMoney}}</span>
                    </template>
                </el-table-column>
                <el-table-column prop="taxesLast" label="上次开票时间"></el-table-column>
                <el-table-column prop="startTime" label="投保生效日期"></el-table-column>
                <el-table-column prop="endTime" label="投保失效日期"></el-table-column>
                <el-table-column label="操作" min-width="180px">
                    <template slot-scope="{row}">
                        <el-button type="text" @click="$refs.entrustmentHistory.open('开票历史', row)">开票历史</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <pagination
                @size-change="handleSizeChange"
                @current-change="handlePageChange"
                :pagination="tableData.pagination"
            >
            </pagination>
        </template>
        <!--   ç”³è¯·    -->
        <entrustedInvoicingApplication ref="entrustedInvoicingApplication" @success="handlePageChange" />
        <!--    å¼€ç¥¨åŽ†å²    -->
        <entrustmentHistory ref="entrustmentHistory" @success="handlePageChange" />
    </TableLayout>
</template>
<script>
    import BaseTable from '@/components/base/BaseTable'
    import TableLayout from '@/layouts/TableLayout'
    import Pagination from '@/components/common/Pagination'
    import entrustedInvoicingApplication from '@/components/enterprise/entrustedInvoicingApplication'
    import entrustmentHistory from '@/components/enterprise/entrustmentHistory'
    export default {
        name: 'entrustedInvoicing',
        extends: BaseTable,
        components: { TableLayout, Pagination, entrustedInvoicingApplication, entrustmentHistory },
        data () {
            return {
                searchForm: {
                    type: 1
                }
            }
        },
        created () {
            this.config({
                module: '投保申请信息表',
                api: '/business/insuranceApply',
                'field.id': 'id',
                'field.main': 'id'
            })
            this.search()
        },
        methods: {
            apply() {
                if (this.tableData.selectedRows.length === 0) {
                    this.$message.warning('至少选择一项内容')
                    return
                }
                for (let i = 0; i < this.tableData.selectedRows.length; i++) {
                    if (this.tableData.selectedRows[i].currentFee - this.tableData.selectedRows[i].taxesMoney === 0) {
                        this.$message.warning(`第${i + 1}项可开票金额为0,不能进行开票!`)
                        return
                    }
                }
                let obj = {}
                obj.list = JSON.parse(JSON.stringify(this.tableData.selectedRows))
                obj.list.forEach(item => {
                    item.totalPrice = item.currentFee - item.taxesMoney
                })
                console.log(obj.list)
                this.$refs.entrustedInvoicingApplication.open('申请开票', obj)
            }
        }
    }
</script>
<style lang="scss" scoped>
    .form {
        width: 100%;
        display: flex;
        flex-direction: column;
        .form_item {
            width: 100%;
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            &:last-child {
                margin-bottom: 0 !important;
            }
            .form_item_label {
                width: 100px;
                flex-shrink: 0;
                font-size: 14px;
                color: black;
            }
            .form_item_val {
                flex: 1;
                min-height: 35px;
                display: flex;
                align-items: center;
                input {
                    width: 100%;
                    height: 100%;
                    font-size: 14px;
                    color: black;
                    padding: 5px 10px;
                    outline: none;
                    box-sizing: border-box;
                    border: 1px solid #ececec;
                }
            }
        }
    }
</style>
server/company/src/main/java/com/doumee/api/business/TaxesController.java
@@ -82,6 +82,13 @@
        return ApiResponse.success(taxesService.findPageForCompany(pageWrap));
    }
    @ApiOperation("列表查询")
    @PostMapping("/list")
    @RequiresPermissions("business:taxes:query")
    public ApiResponse<List<Taxes>> findList (@RequestBody Taxes taxes) {
        return ApiResponse.success(taxesService.findListForCompany(taxes));
    }
    @ApiOperation("导出Excel")
    @PostMapping("/exportExcel")
    @RequiresPermissions("business:taxes:exportExcel")
@@ -89,17 +96,25 @@
        ExcelExporter.build(Taxes.class).export(taxesService.findPage(pageWrap).getRecords(), "发票信息表", response);
    }
    @ApiOperation("获取企业信息")
    @GetMapping("/getCompanyDetail")
    @ApiOperation("根据ID查询")
    @GetMapping("/{id}")
    @RequiresPermissions("business:taxes:query")
    public ApiResponse<Taxes> getCompanyDetail() {
        LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if(!loginUserInfo.getType().equals(Constants.ONE)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非企业类用户无法进行该操作");
        }
        return ApiResponse.success(taxesService.findById(loginUserInfo.getCompanyId()));
    public ApiResponse<Taxes> findById(@PathVariable Integer id) {
        return ApiResponse.success(taxesService.findById(id));
    }
//    @ApiOperation("获取企业信息")
//    @GetMapping("/getCompanyDetail")
//    @RequiresPermissions("business:taxes:query")
//    public ApiResponse<Taxes> getCompanyDetail() {
//        LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
//        if(!loginUserInfo.getType().equals(Constants.ONE)){
//            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非企业类用户无法进行该操作");
//        }
//        return ApiResponse.success(taxesService.findById(loginUserInfo.getCompanyId()));
//    }
    @ApiOperation("提交委托投报开票")
    @PostMapping("/entrustInvoicing")
    public ApiResponse entrustInvoicing(@RequestBody EntrustInvoicingDTO entrustInvoicingDTOs) {
server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -166,14 +166,23 @@
    public static CountCyclePriceVO countPriceVO(Date startDate, Solutions solutions){
        CountCyclePriceVO countCyclePriceVO = new CountCyclePriceVO();
        if(solutions.getInsureCycleUnit().equals(Constants.ZERO)){
            countCyclePriceVO.setEndDate(DateUtil.afterDateByType(startDate,0,solutions.getInsureCycle()));
            countCyclePriceVO.setEndDate(
                    DateUtil.getMontageDate(
                        DateUtil.afterDateByType(startDate,0,solutions.getInsureCycle())
                    ,2)
            );
        }else if(solutions.getInsureCycleUnit().equals(Constants.TWO)){
            //获取当月天数
            Integer monthDays = DateUtil.monthDays(startDate);
            //获取天数后的日期
            Date afterDate = DateUtil.afterDateByType(startDate,0,monthDays);
            countCyclePriceVO.setEndDate(DateUtil.afterDateByType(afterDate,0,-1));
            //赋值 æ¯æ—¥ç»“束时分秒
            countCyclePriceVO.setEndDate(DateUtil.getMontageDate(afterDate,2));
        }else if(solutions.getInsureCycleUnit().equals(Constants.THREE)){
            //获取X年后日期 å¤šäº†ä¸€å¤©
            Date afterDate = DateUtil.afterDateByType(startDate,2,solutions.getInsureCycle());
            countCyclePriceVO.setEndDate(DateUtil.afterDateByType(afterDate,0,-1));
            //赋值 æ¯æ—¥ç»“束时分秒 ç„¶åŽå‡å°‘一天
            countCyclePriceVO.setEndDate(DateUtil.getMontageDate(afterDate,3));
        }
        countCyclePriceVO.setCyclePrice(Constants.countDetailFee(solutions,countCyclePriceVO.getEndDate(),startDate));
        return countCyclePriceVO;
@@ -635,8 +644,8 @@
        AUDIT_UN_PASS(2, "派遣单位不通过"),
        EDIT_UNIT(3, "修改派遣单位信息"),
        ADD_WORK_TYPE(4, "提交添加工种"),
        WORK_TYPE_AUDIT_PASS(5, "添加工种审核通过"),
        WORK_TYPE_AUDIT_UN_PASS(6, "添加工种审核不通过"),
        WORK_TYPE_AUDIT_PASS(5, "添加工种审批通过"),
        WORK_TYPE_AUDIT_UN_PASS(6, "添加工种审批不通过"),
        ;
        // æˆå‘˜å˜é‡
        private String name;
@@ -678,7 +687,7 @@
    }
    public  enum ApplyCollectStatus {
        DSP(0, "待审核"),
        DSP(0, "待审批"),
        DCD(1, "待出单"),
        BZZ(2, "保障中"),
        YGQ(3, "已过期"),
@@ -728,43 +737,48 @@
    public  enum ApplyLogType {
        UPLOAD(0, "提交投保","提交意见:${param}"),
        PLATFORM_RETURN(1, "退回投保","提交意见:${param}"),
        WAIT_SIGNATURE(2, "上传投保单","提交意见:${param}"),
        SIGNATURE(3, "企业签章",""),
        FAIL_RETURN(4, "保单出具失败退回","提交意见:${param}"),
        UPLOAD_INSURANCE(5, "保单完成","保险生效起期:${param1}变更为${param2}"),
        COMPANY_APPLY_RETURN(6, "申请退回","提交意见:${param}"),
        COMPANY_APPLY_CLOSE(7, "关闭申请",""),
        PLATFORM_AGREE_BACK(8, "同意退回申请",""),
        PLATFORM_UN_AGREE_BACK(9, "驳回退回申请","提交意见:${param}"),
        COMPANY_EDIT(10, "保单修改","提交意见:${param1}\n${param2}"),
        PLATFORM_CHECK_PASS(11, "投保审核通过",""),
        CA_PLATFORM_CHECK_PASS_NO(12, "退回投保","提交意见:${param}"),
        CA_PLATFORM_AGREE_BACK_APPLY(13, "同意退回申请","提交意见:${param}"),
        CA_PLATFORM_APPROVE(14, "批单完成","保险生效起期:${param1}变更为${param2}"),
        CA_PLATFORM_CHECK_SIGNATURE(15, "企业签章",""),
        CA_COMPANY_EDIT(16, "批单修改","提交意见:${param1}\n${param2}"),
        CA_COMPANY_COMMIT(17, "提交投保","提交意见:${param}"),
        CA_COMPANY_BACK_APPLY(18, "申请退回","提交意见:${param}"),
        CA_COMPANY_CLOSE(19, "关闭订单",""),
        CA_PALTFORM_REFUSE_APPLY(20, "驳回退回申请",""),
        CA_PALTFORM_EDIT_PIDAN(21, "修改批单","修改原因:${param}"),
        PALTFORM_EDIT_BD(22, "修改保单","修改原因:${param}"),
        CA_JIAJIAN_APPLY_SIGN(23, "加减保申请企业签章",""),
        UPLOAD(0, "提交投保","提交意见:${param}",0),
        PLATFORM_RETURN(1, "退回投保","提交意见:${param}",0),
        WAIT_SIGNATURE(2, "上传投保单","提交意见:${param}",0),
        SIGNATURE(3, "企业签章","",0),
        FAIL_RETURN(4, "保单出具失败退回","提交意见:${param}",0),
        UPLOAD_INSURANCE(5, "保单完成","保险生效起期:${param1}变更为${param2}",0),
        COMPANY_APPLY_RETURN(6, "申请退回","提交意见:${param}",0),
        COMPANY_APPLY_CLOSE(7, "关闭申请","",0),
        PLATFORM_AGREE_BACK(8, "同意退回申请","",0),
        PLATFORM_UN_AGREE_BACK(9, "驳回退回申请","提交意见:${param}",0),
        COMPANY_EDIT(10, "保单修改","提交意见:${param1}\n${param2}",0),
        PLATFORM_CHECK_PASS(11, "投保审核通过","",0),
        UPLOAD_AGAIN(26, "再次投保","",0),
        CA_CHANGUNIT_APPLY_SIGN(24, "换成申请企业签章",""),
        CA_PLATFORM_CHECK_PASS_NO(12, "退回投保","提交意见:${param}",1),
        CA_PLATFORM_AGREE_BACK_APPLY(13, "同意退回申请","提交意见:${param}",1),
        CA_PLATFORM_APPROVE(14, "批单完成","保险生效起期:${param1}变更为${param2}",1),
        CA_PLATFORM_CHECK_SIGNATURE(15, "企业签章","",1),
        CA_COMPANY_EDIT(16, "批单修改","提交意见:${param1}\n${param2}",1),
        CA_COMPANY_COMMIT(17, "提交投保","提交意见:${param}",1),
        CA_COMPANY_BACK_APPLY(18, "申请退回","提交意见:${param}",1),
        CA_COMPANY_CLOSE(19, "关闭订单","",1),
        CA_PALTFORM_REFUSE_APPLY(20, "驳回退回申请","",1),
        CA_PALTFORM_EDIT_PIDAN(21, "修改批单","修改原因:${param}",1),
        PALTFORM_EDIT_BD(22, "修改保单","修改原因:${param}",1),
        CA_JIAJIAN_APPLY_SIGN(23, "加减保申请企业签章","",1),
        CA_CHANGUNIT_APPLY_SIGN(24, "换成申请企业签章","",1),
        CA_UPLOAD_AGAIN(25, "再次投保","",1),
        ;
        // æˆå‘˜å˜é‡
        private String name;
        private String info;
        private int key;
        private int type;
        // æž„造方法
        ApplyLogType(int key, String name,String info) {
        ApplyLogType(int key, String name,String info,int type) {
            this.name = name;
            this.info = info;
            this.key = key;
            this.type = type;
        }
        // æ™®é€šæ–¹æ³•
@@ -784,6 +798,16 @@
            }
            return null;
        }
        public static List<Integer> getTypeList(int type) {
            List<Integer> list = new ArrayList<>();
            for (ApplyLogType c : ApplyLogType.values()) {
                if (c.getType() == type) {
                    list.add(c.getKey());
                }
            }
            return list;
        }
        // get set æ–¹æ³•
        public String getName() {
@@ -809,6 +833,15 @@
        public void setInfo(String info) {
            this.info = info;
        }
        public int getType() {
            return type;
        }
        public void setType(int type) {
            this.type = type;
        }
    }
    public  enum InsuranceApplyStatus {
@@ -822,7 +855,7 @@
        COMPANY_BACK_APPLY_WAIT_SIGNATURE(7, "企业申请退回(待签章)","提交意见:${param}",5),
        COMPANY_BACK_APPLY_SIGNATURE(8, "企业申请退回(已签章)","提交意见:${param}",5),
        CLOSE(9, "订单关闭","",6),
        PLATFORM_CHECK_PASS(10,"平台投保审核通过","提交意见:${param}",0),
        PLATFORM_CHECK_PASS(10,"平台投保审核通过","提交意见:${param}",1),
        ;
        // æˆå‘˜å˜é‡
        private String name;
@@ -972,9 +1005,9 @@
    public  enum NoticeType {
        ZERO(0, "待审核","","","待审核","已申请","待受理"),
        ZERO(0, "待审批","","","待审核","已申请","待受理"),
        ONE(1, "企业待签署","","","工种待审核","","完成受理"),
        TWO(2, "待出单","待审核","待审核","","",""),
        TWO(2, "待出单","待审批","待审批","","",""),
        THREE(3, "申请退回","申请退回","申请退回","","",""),
        FOUR(4, "已退回","已退回","已退回","","",""),
        FIVE(5, "申请驳回","申请驳回","申请驳回","","","")
server/service/src/main/java/com/doumee/core/utils/DateUtil.java
@@ -1298,7 +1298,7 @@
        calo.setTime(oldDate);
        caln.setTime(newDate);
        if(type==0||type==1){
            return    calculateDaysBetweenDates(caln, calo) ;
            return    calculateDaysBetweenDates(caln, calo)  + 1 ;
        }else if(type==2){
            int day = caln.get(Calendar.DATE);
server/service/src/main/java/com/doumee/service/business/TaxesService.java
@@ -92,6 +92,8 @@
    PageData<Taxes> findPage(PageWrap<Taxes> pageWrap);
    PageData<Taxes> findPageForCompany(PageWrap<Taxes> pageWrap);
    List<Taxes> findListForCompany(Taxes queryModel);
    /**
     * æ¡ä»¶ç»Ÿè®¡
     *
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
@@ -637,7 +637,14 @@
        applyChangeMapper.updateById(applyChangeFee);
        this.saveApplyLog(applyChange,Constants.ApplyChangeLogStatus.UPLOAD,null);
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_COMPANY_COMMIT;
        String info =applyLogType.getInfo();
//        info = info.replace("${param}", update.getCheckInfo());
        ApplyLog log = new ApplyLog(applyChange,applyLogType.getName(),info,applyChange.getId(),applyLogType.getKey(), null, null);
        applyLogMapper.insert(log);
        return applyChange.getId();
    }
@@ -710,7 +717,15 @@
        BigDecimal fee = this.dealApplyChangeData(applyChange,insuranceApply,companySolution,solutions,loginUserInfo,BigDecimal.ZERO);
        applyChange.setFee(fee);
        applyChangeMapper.updateById(applyChange);
        this.saveApplyLog(applyChange,Constants.ApplyChangeLogStatus.UPLOAD,null);
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_UPLOAD_AGAIN;
        String info =applyLogType.getInfo();
//        info = info.replace("${param}", update.getCheckInfo());
        ApplyLog log = new ApplyLog(applyChange,applyLogType.getName(),info,applyChange.getId(),applyLogType.getKey(), null, null);
        applyLogMapper.insert(log);
        return applyChange.getId();
    }
@@ -783,23 +798,18 @@
    }
    public void saveApplyLog(ApplyChange applyChange,Constants.ApplyChangeLogStatus applyChangeLogStatus,String content){
    public void saveApplyLog(ApplyChange applyChange,Constants.ApplyLogType applyLogType,String content){
        LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        ApplyLog applyLog = new ApplyLog();
        applyLog.setCreateDate(new Date());
        applyLog.setCreator(loginUserInfo.getId());
        applyLog.setIsdeleted(Constants.ZERO);
        applyLog.setApplyId(applyChange.getApplyId());
        applyLog.setTitle(applyChangeLogStatus.getName());
        applyLog.setTitle(applyLogType.getName());
        if(StringUtils.isNotBlank(content)){
            applyLog.setContent(applyChangeLogStatus.getInfo().replace("${param}",content));
        }else{
            applyLog.setContent(applyChangeLogStatus.getInfo());
            applyLog.setContent(applyLogType.getInfo().replace("${param}",content));
        }
        applyLog.setObjType(applyChangeLogStatus.getKey());
        applyLog.setObjType(applyLogType.getKey());
        applyLog.setObjId( applyChange.getId());
        applyLog.setStatus(applyChange.getStatus());
        applyLogMapper.insert(applyLog);
@@ -1190,7 +1200,7 @@
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询方案信息");
        }
        Constants.ApplyChangeLogStatus applyChangeLogStatus = Constants.ApplyChangeLogStatus.RETURN_APPLY;
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_PLATFORM_CHECK_PASS_NO;
        Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.APPLY_CHANGE;
        if(applyChange.getType().equals(Constants.ONE)){
@@ -1221,7 +1231,7 @@
        }else if(applyChangeOptDTO.getOptType().equals(4)){
            applyChangeLogStatus = Constants.ApplyChangeLogStatus.PLATFORM_AGREE;
            applyLogType = Constants.ApplyLogType.CA_PLATFORM_AGREE_BACK_APPLY;
            //平台同意退回
            if(loginUserInfo.getType().equals(Constants.ZERO)){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非平台端用户无法进行该操作");
@@ -1232,7 +1242,7 @@
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"数据状态错误无法进行该操作!");
            }
        }else if(applyChangeOptDTO.getOptType().equals(5)){
            applyChangeLogStatus = Constants.ApplyChangeLogStatus.PLATFORM_UN_AGREE;
            applyLogType = Constants.ApplyLogType.CA_PALTFORM_REFUSE_APPLY;
            //平台驳回退回
            if(loginUserInfo.getType().equals(Constants.ZERO)){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非平台端用户无法进行该操作");
@@ -1249,7 +1259,7 @@
            }
        }else if(applyChangeOptDTO.getOptType().equals(6)){
            //企业关闭
            applyChangeLogStatus = Constants.ApplyChangeLogStatus.CLOSE;
            applyLogType = Constants.ApplyLogType.CA_COMPANY_CLOSE;
            if(!loginUserInfo.getType().equals(Constants.ONE)){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非企业端用户无法进行该操作");
            }
@@ -1257,7 +1267,6 @@
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"数据状态错误无法进行该操作!");
            }
            applyChange.setStatus(Constants.ApplyChangeStatus.CLOSE.getKey());
            //存储待办信息
            //删除其他待办
@@ -1270,8 +1279,10 @@
        applyChange.setEditDate(new Date());
        applyChangeMapper.updateById(applyChange);
        //存储日志数据
        this.saveApplyLog(applyChange,applyChangeLogStatus,applyChangeOptDTO.getOptIllustration());
        String info = applyLogType.getInfo();
        info = info.replace("${param}", applyChangeOptDTO.getOptIllustration());
        ApplyLog log = new ApplyLog(applyChange,applyLogType.getName(),info,applyChange.getId(),applyLogType.getKey(), null, null);
        applyLogMapper.insert(log);
    }
@@ -1302,6 +1313,7 @@
                        .selectAs(Company::getName,ApplyLog::getCompanyName)
                        .leftJoin(SystemUser.class,SystemUser::getId,ApplyLog::getCreator)
                        .leftJoin(Company.class,Company::getId,SystemUser::getCompanyId)
                        .in(ApplyLog::getObjType,Constants.ApplyLogType.getTypeList(Constants.ONE))
                        .eq(ApplyLog::getObjId,applyChange.getId())
                        .orderByAsc(ApplyLog::getCreateDate)
        );
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -817,7 +817,14 @@
        updBean.setFee(applyDetailList.stream().map(ApplyDetail::getFee).reduce(BigDecimal.ZERO,BigDecimal::add));
        insuranceApplyMapper.updateById(updBean);
        //存储日志数据
        this.saveApplyLog(insuranceApply,insuranceApplyStatus,null);
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.UPLOAD;
        String info =applyLogType.getInfo();
//        info = info.replace("${param}", update.getCheckInfo());
        ApplyLog log = new ApplyLog(insuranceApply,applyLogType.getName(),info,insuranceApply.getId(),applyLogType.getKey(),null, null);
        applyLogMapper.insert(log);
        //发送待办业务
        //存储待办信息
@@ -896,7 +903,12 @@
        insuranceApply.setFee(applyDetailList.stream().map(ApplyDetail::getFee).reduce(BigDecimal.ZERO,BigDecimal::add));
        insuranceApplyMapper.updateById(insuranceApply);
        //存储日志数据
        this.saveApplyLog(insuranceApply,insuranceApplyStatus,null);
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.UPLOAD_AGAIN;
        String info =applyLogType.getInfo();
//        info = info.replace("${param}", update.getCheckInfo());
        ApplyLog log = new ApplyLog(insuranceApply,applyLogType.getName(),info,insuranceApply.getId(),applyLogType.getKey(),null, null);
        applyLogMapper.insert(log);
        //存储待办信息
@@ -1009,43 +1021,6 @@
    }
    public void saveApplyLog(InsuranceApply insuranceApply,Constants.InsuranceApplyStatus insuranceApplyStatus,String content){
        LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        ApplyLog applyLog = new ApplyLog();
        applyLog.setCreateDate(new Date());
        applyLog.setCreator(loginUserInfo.getId());
        applyLog.setIsdeleted(Constants.ZERO);
        applyLog.setApplyId(insuranceApply.getId());
        applyLog.setTitle(insuranceApplyStatus.getName());
        applyLog.setContent(content);
        applyLog.setObjType(insuranceApplyStatus.getKey());
        applyLog.setObjId( insuranceApply.getId());
        applyLog.setStatus(insuranceApply.getStatus());
        applyLogMapper.insert(applyLog);
    }
//    public BigDecimal countDetailFee(Solutions solutions ,Date startDate,Date endDate){
//        //查询保险实际周期
//        Integer cycle = DateUtil.calculateBetween(endDate,startDate,solutions.getDataType());
//        if(cycle==-1){
//            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"日期信息错误!");
//        }
//        return solutions.getPrice().multiply(new BigDecimal(cycle));
//    }
//    public static void main(String[] args) {
//        Date date1 = DateUtil.StringToDate("2023-03-01 00:00:00");
//        Date date2 = DateUtil.StringToDate("2023-04-01 00:00:00");
//        System.out.println(DateUtil.calculateBetween(date1,date2,0));
//        System.out.println(DateUtil.calculateBetween(date1,date2,1));
//        System.out.println(DateUtil.calculateBetween(date1,date2,2));
//        System.out.println(DateUtil.calculateBetween(date1,date2,3));
//
//    }
    @Override
    public void deleteById(Integer id) {
        insuranceApplyMapper.deleteById(id);
@@ -1109,7 +1084,7 @@
        queryWrapper.select(" DATEDIFF( t.END_TIME ,now()  ) AS loseEfficacyDays ");
        queryWrapper.select(" ( select count(1) from apply_detail ad  where ad.apply_id = t.id ) as insureNum");
        if(!Objects.isNull(pageWrap.getModel())&&!Objects.isNull(pageWrap.getModel().getType())){
            queryWrapper.select(" ( select sum(td.fee) from taxes ts inner join tax_detial td on td.TAX_ID = ts.id  where ts.status != 2 and td.INSURANCE_APPLY_ID = t.id ) as taxesMoney");
            queryWrapper.select(" ifnull(( select sum(td.fee) from taxes ts inner join tax_detial td on td.TAX_ID = ts.id  where ts.status != 2 and td.INSURANCE_APPLY_ID = t.id ),0) as taxesMoney");
            queryWrapper.select(" ( select td.CREATE_DATE from taxes ts inner join tax_detial td on td.TAX_ID = ts.id  where ts.status != 2 and td.INSURANCE_APPLY_ID = t.id order by td.CREATE_DATE desc limit 1 ) as taxesLast ");
        }
        queryWrapper.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId);
@@ -1302,6 +1277,7 @@
                        .selectAs(Company::getName,ApplyLog::getCompanyName)
                        .leftJoin(SystemUser.class,SystemUser::getId,ApplyLog::getCreator)
                        .leftJoin(Company.class,Company::getId,SystemUser::getCompanyId)
                        .in(ApplyLog::getObjType,Constants.ApplyLogType.getTypeList(Constants.ZERO))
                        .eq(ApplyLog::getApplyId,insuranceApply.getId())
                        .orderByAsc(ApplyLog::getCreateDate)
        );
@@ -1472,7 +1448,6 @@
        info = info.replace("${param}", insuranceApplyOptDTO.getOptIllustration());
        ApplyLog log = new ApplyLog(insuranceApply,applyLogType.getName(),info,insuranceApply.getId(),applyLogType.getKey(),JSONObject.toJSONString(insuranceApply), JSONObject.toJSONString(insuranceApply));
        applyLogMapper.insert(log);
//        this.saveApplyLog(insuranceApply,insuranceApplyStatus,null);
    }
server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java
@@ -347,6 +347,7 @@
        queryWrapper.selectAll(Taxes.class);
        queryWrapper.selectAs(SystemUser::getRealname,Taxes::getCreatorName);
        queryWrapper.leftJoin(SystemUser.class,SystemUser::getId,Taxes::getCreator);
        Utils.MP.blankToNull(pageWrap.getModel());
        queryWrapper.eq(Taxes::getIsdeleted, Constants.ZERO);
        Taxes queryModel = pageWrap.getModel();
@@ -375,6 +376,29 @@
    @Override
    public List<Taxes> findListForCompany(Taxes queryModel) {
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        MPJLambdaWrapper<Taxes> queryWrapper = new MPJLambdaWrapper<>();
        queryWrapper.selectAll(Taxes.class);
        queryWrapper.selectAs(SystemUser::getRealname,Taxes::getCreatorName);
        queryWrapper.leftJoin(SystemUser.class,SystemUser::getId,Taxes::getCreator);
        queryWrapper.eq(Taxes::getIsdeleted, Constants.ZERO);
        if(!user.getType().equals(Constants.ONE)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非企业用户无法进行该业务查询");
        }
        if(!Objects.isNull(queryModel)){
            queryWrapper.ge(queryModel.getStartDate() != null,Taxes::getCreateDate, (queryModel.getStartDate()));
            queryWrapper.le(queryModel.getEndDate() != null,Taxes::getCreateDate,  (queryModel.getEndDate()));
            queryWrapper.eq(!Objects.isNull(queryModel.getInsuranceApplyId()),Taxes::getInsuranceApplyId,queryModel.getInsuranceApplyId());
            queryWrapper.eq(!Objects.isNull(queryModel.getStatus()),Taxes::getStatus,queryModel.getStatus());
        }
        queryWrapper.orderByAsc(Taxes::getCreateDate);
        return taxesJoinMapper.selectJoinList(Taxes.class, queryWrapper);
    }
    @Override