From bcf40504dd6dbad43d4d54a5c099abceb8de6d71 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期一, 01 四月 2024 17:04:41 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/1.0.1' into 1.0.1

---
 server/shop/src/main/java/com/doumee/api/business/UnionApplyController.java               |   18 
 company/src/components/business/InsuranceDetailsWtb.vue                                   |  327 +++++++++++++++++
 server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java |    7 
 server/service/src/main/java/com/doumee/core/utils/Constants.java                         |    6 
 server/service/src/main/java/com/doumee/service/business/UnionApplyService.java           |    3 
 company/src/components/business/detailsEntrustedInsurance.vue                             |  187 ++-------
 server/service/src/main/java/com/doumee/dao/business/model/UnionApply.java                |    7 
 company/src/components/business/OperaUnionApplyCheckWindow.vue                            |  391 ++++++++++++++++++++
 company/src/api/business/unionApply.js                                                    |   19 +
 server/service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java          |   97 +++++
 server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java  |   30 +
 11 files changed, 933 insertions(+), 159 deletions(-)

diff --git a/company/src/api/business/unionApply.js b/company/src/api/business/unionApply.js
index 7655b62..ec6b3af 100644
--- a/company/src/api/business/unionApply.js
+++ b/company/src/api/business/unionApply.js
@@ -7,6 +7,13 @@
     })
 }
 
+export function exportDetailExcel (data) {
+    return request.post('/business/unionApply/exportDetailExcel', data, {
+        trim: true,
+        download: true
+    })
+}
+
 // 鍒涘缓
 export function create (data) {
     return request.post('/business/unionApply/create', data)
@@ -14,6 +21,18 @@
 export function merge (data) {
     return request.post('/business/unionApply/merge', data)
 }
+export function cancel (data) {
+    return request.post('/business/unionApply/cancel', data)
+}
+export function uploadToubaodan (data) {
+    return request.post('/business/unionApply/uploadToubaodan', data)
+}
+export function getSignLink (data) {
+    return request.post('/business/unionApply/getSignLink', data)
+}
+export function uploadBXD (data) {
+    return request.post('/business/unionApply/uploadBXD', data)
+}
 
 // 淇敼
 export function updateById (data) {
diff --git a/company/src/components/business/InsuranceDetailsWtb.vue b/company/src/components/business/InsuranceDetailsWtb.vue
new file mode 100644
index 0000000..06ae5f7
--- /dev/null
+++ b/company/src/components/business/InsuranceDetailsWtb.vue
@@ -0,0 +1,327 @@
+<template>
+    <GlobalWindow
+        :title="title"
+        width="100%"
+        :visible.sync="visible"
+        :confirm-working="isWorking"
+        @confirm="confirm"
+    >
+        <div class="box">
+          <div class="top">
+            {{title}}
+          </div>
+          <div class="box_table">
+            <div class="box_table_head">
+              <div class="box_table_head_item">鎶曚繚浜�</div>
+              <div class="box_table_head_item">琚繚闄╀汉</div>
+              <div class="box_table_head_item">淇濋櫓鏂规</div>
+              <div class="box_table_head_item">淇濋櫓鐢熸晥璧锋湡</div>
+              <div class="box_table_head_item">淇濋櫓鐢熸晥姝㈡湡</div>
+              <div class="box_table_head_item">鎶曚繚浜烘暟</div>
+              <div class="box_table_head_item">鎬昏垂鐢�(鍏�)</div>
+            </div>
+            <div class="box_table_content "  >
+              <div class="box_table_content_item box_table_content_header">{{ model.companyName }}</div>
+              <div class="box_table_content_item box_table_content_header">{{ model.companyNames }}</div>
+              <div class="box_table_content_item box_table_content_header">{{ model.solutionName }}</div>
+              <div class="box_table_content_item box_table_content_header">{{ model.startTime }}</div>
+              <div class="box_table_content_item box_table_content_header">{{ model.endTime }}</div>
+              <div class="box_table_content_item box_table_content_header">{{ model.insureNum }}</div>
+              <div class="box_table_content_item box_table_content_header">{{model.fee}}</div>
+            </div>
+          </div>
+            <div class="box_table">
+                <div class="box_table_head">
+                    <div class="box_table_head_item">搴忓彿</div>
+                    <div class="box_table_head_item">鍛樺伐濮撳悕</div>
+                  <div class="box_table_head_item">鎬у埆</div>
+                  <div class="box_table_head_item">韬唤璇佸彿</div>
+                    <div class="box_table_head_item">琚繚闄╀汉</div>
+                    <div class="box_table_head_item">娲鹃仯鍗曚綅</div>
+                    <div class="box_table_head_item">鎵�灞炲伐绉�</div>
+                </div>
+                <div class="box_table_content" v-for="(item, index) in detailList" :key="index">
+                    <div class="box_table_content_item">{{index + 1}}</div>
+                    <div class="box_table_content_item">{{ item.memberName }}</div>
+                  <div class="box_table_content_item">{{ item.sex==0?"鐢�":"濂�" }}</div>
+                  <div class="box_table_content_item">{{ item.idcardNo }}</div>
+                    <div class="box_table_content_item">{{ item.companyName }}</div>
+                    <div class="box_table_content_item">{{ item.duName }}</div>
+                    <div class="box_table_content_item">{{item.workTypeName}}</div>
+                </div>
+            </div>
+          <div class="box_table" v-if="type==1" style="border-top: 0px solid #b4bbc5;" >
+            <div class="box_table_head">
+              <div class="box_table_head_item5">澶囨敞</div>
+              <div class="box_table_head_item5">
+                    <input v-model="form.checkInfo" style="width: 100%;height: 45px;border: 0px;outline: none;" placeholder="璇疯緭鍏�" v-trim/>
+              </div>
+            </div>
+          </div>
+        </div>
+        <template v-if="type==1" v-slot:footer>
+            <el-button type="primary"  :loading="isWorking.export" @click="check(0)">鎻愪氦閫氳繃</el-button>
+<!--            <el-button type="danger"  :loading="isWorking.export" @click="check(1)">瀹℃牳涓嶉�氳繃</el-button>-->
+            <el-button @click="visible=false">鍙栨秷</el-button>
+        </template>
+        <template v-else v-slot:footer>
+            <el-button type="primary"  :loading="isWorking.export" @click="exportDetail">瀵煎嚭璇﹀崟</el-button>
+            <el-button @click="visible=false">鍙栨秷</el-button>
+        </template>
+    </GlobalWindow>
+</template>
+
+<script>
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import { check, getDetailList } from '@/api/business/insuranceApply'
+import { exportDetailExcel } from '@/api/business/unionApply'
+import { exportComFiles } from '@/api/business/company'
+// import {all as solutionAll} from "@/api/business/solutions";
+export default {
+  name: 'InsuranceDetails',
+  extends: BaseOpera,
+  components: { GlobalWindow },
+  data () {
+    return {
+      model: {},
+      type: 0,
+      detailList: [],
+      // 琛ㄥ崟鏁版嵁
+      form: {
+        id: null,
+        dealBackApply: 0,
+        checkInfo: ''
+      },
+      // 楠岃瘉瑙勫垯
+      rules: {
+      },
+      reverse: false,
+      tableData: []
+    }
+  },
+  created () {
+    this.config({
+      api: '/business/insuranceApply',
+      'field.id': 'id'
+    })
+  },
+  methods: {
+    open (title, target, type) {
+      this.title = title
+      this.visible = true
+      this.model = target
+      this.type = type
+      this.form.id = target.id
+      this.form.checkInfo = ''
+      this.getDetailListDo()
+    },
+    getDetailListDo () {
+      getDetailList({ unionApplyId: this.model.id }).then(res => {
+        this.detailList = res
+      }).catch(err => {
+      })
+    },
+    exportDetail () {
+      this.$dialog.exportConfirm('纭瀵煎嚭璇﹀崟鍚楋紵')
+        .then(() => {
+          this.isWorking = true
+          exportDetailExcel({ id: this.model.id })
+            .then(response => {
+              this.download(response)
+            })
+            .catch(e => {
+              console.log(e)
+              this.$message.error('鏁版嵁涓嬭浇澶辫触锛�')
+            })
+            .finally(() => {
+              this.isWorking = false
+            })
+        })
+        .catch(() => {
+        })
+    },
+    check (type) {
+      this.form.dealBackApply = type
+      this.$dialog.messageConfirm('纭杩涜璇ユ搷浣滃悧锛�')
+        .then(() => {
+          this.isWorking = true
+          check(this.form)
+            .then(response => {
+              this.visible = false
+              this.$emit('success')
+            }).catch(err => {
+              this.$tip.apiFailed(err)
+            })
+        })
+        .catch(() => {
+        })
+    },
+    exportComFilesDo () {
+      this.$dialog.exportConfirm('纭瀵煎嚭浼佷笟璇佷欢鍚楋紵')
+        .then(() => {
+          this.isWorking = true
+          exportComFiles({ id: this.model.companyId })
+            .then(response => {
+              this.download(response)
+            })
+            .catch(e => {
+              console.log(e)
+              this.$message.error('鏁版嵁涓嬭浇澶辫触锛�')
+            })
+        })
+        .catch(() => {
+        })
+    },
+    handleSizeChange (val) {
+      console.log(`姣忛〉 ${val} 鏉)
+    },
+    handleCurrentChange (val) {
+      console.log(`褰撳墠椤�: ${val}`)
+    },
+    handleClick (tab, event) {
+      console.log(tab, event)
+    },
+    onSubmit () {
+
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+    .box {
+        width: 100%;
+       .top{
+           width: 100%;
+           align-items: center;
+           flex-wrap: wrap;
+           border-top: 1px solid #b4bbc5;
+           border-left: 1px solid #b4bbc5;
+            font-size: 14px;
+            font-weight: bold;
+            text-align: center;
+          padding: 15px;
+         }
+        .box_header {
+            width: 100%;
+            display: flex;
+            align-items: center;
+            flex-wrap: wrap;
+            border-top: 1px solid #b4bbc5;
+            border-left: 1px solid #b4bbc5;
+            .box_header_item {
+                width: 50%;
+                height: 50px;
+                display: flex;
+                align-items: center;
+                border-right: 1px solid #b4bbc5;
+                border-bottom: 1px solid #b4bbc5;
+                box-sizing: border-box;
+                .box_header_item_label {
+                    flex: 1;
+                    height: 100%;
+                    display: flex;
+                    align-items: center;
+                    justify-content: center;
+                    font-size: 14px;
+                    color: black;
+                    background: #f2f2f2;
+                    border-right: 1px solid #b4bbc5;
+                }
+                .box_header_item_val {
+                    flex: 1;
+                    height: 100%;
+                    display: flex;
+                    align-items: center;
+                    justify-content: center;
+                    font-size: 14px;
+                    color: black;
+                }
+            }
+        }
+        .box_table {
+            width: 100%;
+            border-top: 1px solid #b4bbc5;
+            border-left: 1px solid #b4bbc5;
+            box-sizing: border-box;
+            .box_table_head {
+                width: 100%;
+                display: flex;
+                align-items: center;
+                .box_table_head_item {
+                    flex: 1;
+                    height: 50px;
+                    background: #f2f2f2;
+                    display: flex;
+                    align-items: center;
+                    justify-content: center;
+                    font-size: 14px;
+                    color: black;
+                    border-right: 1px solid #b4bbc5;
+                    border-bottom: 1px solid #b4bbc5;
+                    box-sizing: border-box;
+                    &:nth-child(1) {
+                        //flex: 0.5;
+                    }
+                }
+              .box_table_head_item5 {
+                flex: 1;
+                height: 50px;
+                background: #f2f2f2;
+                display: flex;
+                align-items: center;
+                justify-content: center;
+                font-size: 14px;
+                color: black;
+                border-right: 1px solid #b4bbc5;
+                border-bottom: 1px solid #b4bbc5;
+                box-sizing: border-box;
+                &:nth-child(2) {
+                   flex: 5;
+                }
+              }
+              .box_form_item {
+                flex: 1;
+                height: 50px;
+                background: #ffffff;
+                display: flex;
+                align-items: center;
+                justify-content: center;
+                font-size: 14px;
+                color: black;
+                border-right: 1px solid #b4bbc5;
+                border-bottom: 1px solid #b4bbc5;
+                box-sizing: border-box;
+                &:nth-child(1) {
+                  //flex: 0.5;
+                }
+              }
+            }
+            .box_table_content {
+                width: 100%;
+                display: flex;
+                align-items: center;
+                .box_table_content_header{
+                  border-bottom: 0px solid #b4bbc5 !important;
+                }
+              .box_table_content_item {
+                    flex: 1;
+                    height: 50px;
+                    background: #ffffff;
+                    display: flex;
+                    align-items: center;
+                    justify-content: center;
+                    font-size: 14px;
+                    color: black;
+                    border-right: 1px solid #b4bbc5;
+                    border-bottom: 1px solid #b4bbc5;
+                    box-sizing: border-box;
+                    &:nth-child(1) {
+                       // flex: 0.5;
+                    }
+                }
+            }
+        }
+    }
+</style>
diff --git a/company/src/components/business/OperaUnionApplyCheckWindow.vue b/company/src/components/business/OperaUnionApplyCheckWindow.vue
new file mode 100644
index 0000000..9c4dd14
--- /dev/null
+++ b/company/src/components/business/OperaUnionApplyCheckWindow.vue
@@ -0,0 +1,391 @@
+<template>
+    <GlobalWindow
+        :title="title"
+        width="50%"
+        :visible.sync="visible"
+        :confirm-working="isWorking"
+        @confirm="confirm"
+    >
+        <!--    閫�鍥炴姇淇�    -->
+        <el-form v-if="visible1==true" :model="form" ref="form1" :rules="rules1" style="width: 100%;">
+          <el-form-item label="濉啓閫�鍥炶鏄庯細" prop="backCheckInfo">
+            <el-input type="textarea" v-model="form.backCheckInfo" placeholder="璇疯緭鍏�" v-trim/>
+          </el-form-item>
+        </el-form>
+        <el-form v-if="visible2==true" :model="form" ref="form2" :rules="rules2" style="width: 100%;">
+          <el-form-item label="涓婁紶鎶曚繚鍗曪細" prop="toubaodanFile">
+            <UploadFile @remove="dele2" :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileList="form.fileList" @uploadSuccess="toubaoFileUploaded" />
+          </el-form-item>
+        </el-form>
+        <!--    涓婁紶淇濋櫓鍗�    -->
+      <el-form v-if="visible3==true" :model="form" ref="form3" :rules="rules3" style="width: 100%;">
+        <el-form-item label="瀹㈡埛鏈熸湜淇濋櫓鐢熸晥璧锋湡锛�">
+          {{ model.applyStartTime }}
+        </el-form-item>
+        <el-form-item label="" >
+          <el-radio-group v-model="form.selectRadio" @change="selectChange">
+            <el-radio :label="0" >涓庝繚鍗曚竴鑷�</el-radio>
+            <el-radio :label="1" >涓庝繚鍗曚笉涓�鑷�</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="淇濋櫓鐢熸晥璧锋湡锛�" prop="startTime" v-if="form.selectRadio === 1">
+          <el-date-picker
+              v-model="form.startTime"
+              type="date"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              placeholder="閫夋嫨鏃ユ湡">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="淇濋櫓鐢熸晥璧锋湡锛�">
+          {{ form.startTime }}
+        </el-form-item>
+        <el-form-item label="淇濆崟鍙凤細" prop="code">
+          <el-input v-model="form.code" placeholder="璇疯緭鍏�" v-trim/>
+        </el-form-item>
+        <el-form-item label="涓婁紶淇濋櫓鍗曪細" prop="baoxianFile">
+          <UploadFile @remove="dele3" :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileList="form.fileList1" @uploadSuccess="baoxianFileUploaded" />
+        </el-form-item>
+      </el-form>
+      <template v-slot:footer>
+        <el-button type="primary" @click="doSubmit">纭� 瀹�</el-button>
+        <el-button @click="visible=false">鍙栨秷</el-button>
+      </template>
+    </GlobalWindow>
+</template>
+
+<script>
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import {
+  cancel,
+  uploadBXD,
+  uploadToubaodan,
+} from "@/api/business/unionApply";
+import UploadFile from "@/components/common/UploadFile";
+import {remark} from "@/api/business/settleClaims";
+export default {
+  name: 'OperaUnionApplyCheckWindow',
+  extends: BaseOpera,
+  components: {UploadFile, GlobalWindow },
+  data () {
+    return {
+      // 琛ㄥ崟鏁版嵁
+      model: {},
+      falg :0,
+      rules1: {
+        backCheckInfo: [
+          { required: true, message: '璇峰畬鍠勪俊鎭�' }
+        ]
+      },
+      rules2: {
+        toubaodanFile: [
+          { required: true, message: '璇峰畬鍠勪俊鎭�' }
+        ]
+      },
+      rules3: {
+        code: [
+          { required: true, message: '璇峰畬鍠勪俊鎭�' }
+        ],
+        startTime: [
+          { required: true, message: '璇峰畬鍠勪俊鎭�' }
+        ],
+        baoxianFile: [
+          { required: true, message: '璇峰畬鍠勪俊鎭�' }
+        ],
+      },
+      form: {
+         id: null,
+         backCheckInfo:'',
+         editCheckInfo:'',
+        startTime:null,
+        code:null,
+        toubaodanFile:null,
+        baoxianFile:null,
+        tbdMultifileList:[],
+        bxdMultifileList:[],
+        fileList: [],
+        fileList1: [],
+        selectRadio:0
+      },
+      visible1: false,
+      visible2: false,
+      visible3: false
+    }
+  },
+  created () {
+      this.config({
+          api: '/business/insuranceApply',
+          'field.id': 'id'
+      })
+  },
+  methods: {
+    dele2() {
+      this.form.toubaodanFile = ''
+    },
+    dele3() {
+      this.form.baoxianFile = ''
+    },
+     open(title,target,flag){
+       this.visible=true
+       this.model={}
+       this.form= {
+         id: null,
+         backCheckInfo:'',
+         dealBackInfo:'',
+         editCheckInfo:'',
+         editDate: '',
+         editCode: '',
+         startTime:null,
+         code:null,
+         toubaodanFile:null,
+         baoxianFile:null,
+         editBaoxianFile:null,
+         fileList: [],
+         fileList1: [],
+         selectRadio:0
+       },
+       this.model = target
+       this.form.startTime = target.startTime
+       this.title = title
+       this.flag = flag
+       this.visible1 = false
+       this.visible2 = false
+       this.visible3 = false
+       if(flag == 1){
+         this.visible1 = true
+       }
+       if(flag == 2){
+         this.visible2 = true
+       }
+       if(flag == 3){
+         this.visible3 = true
+       }
+     },
+    doSubmit(){
+      if (this.flag == 1) {
+        this.$refs.form1.validate((valid) => {
+          // debugger
+          if (!valid) {
+            return
+          }
+          this.backDo()
+        })
+      } else if (this.flag == 2) {
+        this.$refs.form2.validate((valid) => {
+          // debugger
+          if (!valid) {
+            return
+          }
+          this.uploadToubaodan()
+        })
+      } else if (this.flag == 3) {
+        this.$refs.form3.validate((valid) => {
+          // debugger
+          if (!valid) {
+            return
+          }
+          this.uploadBaoxiandan()
+        })
+      }
+    },
+    selectChange(){
+       if(this.form.selectRadio == 0){
+         this.form.startTime = this.model.startTime
+       }else{
+         this.form.startTime = ''
+       }
+    },
+    toubaoFileUploaded(data){
+      this.form.toubaodanFile=data
+    },
+    baoxianFileUploaded(data){
+      this.form.baoxianFile=data
+    },
+    backDo(){
+      this.$dialog.messageConfirm('纭杩涜璇ユ搷浣滃悧锛�')
+          .then(() => {
+            this.isWorking = true
+            cancel({id:this.model.id,reason:this.form.backCheckInfo})
+                .then(response => {
+                  this.visible = false
+                  this.$emit('success')
+                  }).catch(err => {
+                this.$tip.apiFailed(err)
+                 })
+          })
+    },
+    uploadToubaodan(){
+      this.$dialog.messageConfirm('纭杩涜璇ユ搷浣滃悧锛�')
+          .then(() => {
+            this.isWorking = true
+            uploadToubaodan({businessId:this.model.id,fileurl:this.form.toubaodanFile.fileurl,name:this.form.toubaodanFile.name,multifileList:this.form.tbdMultifileList})
+                .then(response => {
+                  this.visible = false
+                  this.$emit('success')
+                }).catch(err => {
+                  this.$tip.apiFailed(err)
+                })
+          })
+    },
+
+    uploadBaoxiandan(){
+      this.$dialog.messageConfirm('纭杩涜璇ユ搷浣滃悧锛�')
+          .then(() => {
+            this.isWorking = true
+            uploadBXD({id:this.model.id,startTime:this.form.startTime,code:this.form.code,baoxiandanFile:this.form.baoxianFile})
+                .then(response => {
+                  this.visible = false
+                  this.$emit('success')
+                }).catch(err => {
+                  this.$tip.apiFailed(err)
+                })
+          })
+
+    },
+      handleRemove(file, fileList) {
+          console.log(file, fileList);
+      },
+      handlePreview(file) {
+          console.log(file);
+      },
+      handleExceed(files, fileList) {
+          this.$message.warning(`褰撳墠闄愬埗閫夋嫨 3 涓枃浠讹紝鏈閫夋嫨浜� ${files.length} 涓枃浠讹紝鍏遍�夋嫨浜� ${files.length + fileList.length} 涓枃浠禶);
+      },
+      beforeRemove(file, fileList) {
+          return this.$confirm(`纭畾绉婚櫎 ${ file.name }锛焋);
+      },
+      successEvent() {
+
+      },
+      handleSizeChange(val) {
+          console.log(`姣忛〉 ${val} 鏉);
+      },
+      handleCurrentChange(val) {
+          console.log(`褰撳墠椤�: ${val}`);
+      },
+      handleClick(tab, event) {
+          console.log(tab, event);
+      },
+      onSubmit() {
+
+      }
+  }
+}
+</script>
+<style>
+
+</style>
+<style lang="scss" scoped>
+    .form {
+        width: 100%;
+        display: flex;
+        align-items: center;
+        flex-direction: column;
+        .form_span {
+            width: 100%;
+            display: flex;
+            align-items: start;
+            flex-direction: column;
+            margin-bottom: 20px;
+            span {
+                font-size: 14px;
+                &:nth-child(1) {
+                    color: black;
+                    margin-bottom: 5px;
+                }
+                &:nth-child(2) {
+                    color: #8c939d;
+                }
+            }
+        }
+        .form_item {
+            width: 100%;
+            display: flex;
+            align-items: center;
+            margin-bottom: 20px;
+            &:last-child {
+                margin: 0 !important;
+            }
+            .form_item_label {
+                flex-shrink: 0;
+                /*width: 170px;*/
+                color: black;
+                font-size: 14px;
+                span {
+                    color: red;
+                    font-size: 14px;
+                }
+            }
+            .form_item_val {
+                flex: 1;
+                /*height: 40px;*/
+                margin-left: 20px;
+                textarea {
+                    width: 100%;
+                    height: 70px;
+                    border: 1px solid #cbcbcb;
+                    padding: 10px;
+                    outline: none;
+                    box-sizing: border-box;
+                }
+                input {
+                    width: 100%;
+                    height: 40px;
+                    outline: none;
+                    border-radius: 5px;
+                    border: 1px solid #cbcbcb;
+                    padding: 0 20px;
+                    box-sizing: border-box;
+                }
+            }
+        }
+    }
+    .desc {
+        width: 100%;
+        .desc_item {
+            width: 100%;
+            display: flex;
+            flex-direction: column;
+            .desc_item_label {
+                width: 100%;
+                display: flex;
+                align-items: center;
+                justify-content: space-between;
+                margin-bottom: 10px;
+                span {
+                    font-size: 14px;
+                    color: black;
+                    margin-right: 30px;
+                }
+            }
+            .desc_item_from {
+                width: 100%;
+                margin-bottom: 10px;
+                .desc_item_from_page {
+                    width: 100%;
+                    display: flex;
+                    align-items: center;
+                    justify-content: end;
+                    margin-top: 10px;
+                }
+            }
+            .desc_item_cate {
+                width: 100%;
+                margin-bottom: 10px;
+            }
+            .desc_item_search {
+                width: 100%;
+                margin-bottom: 20px;
+            }
+            .desc_item_review {
+                width: 100%;
+                .desc_item_review_label {
+                    font-size: 20px;
+                    color: black;
+                    font-weight: bold;
+                    margin-bottom: 15px;
+                }
+            }
+        }
+    }
+</style>
diff --git a/company/src/components/business/detailsEntrustedInsurance.vue b/company/src/components/business/detailsEntrustedInsurance.vue
index 017b085..b3c6a68 100644
--- a/company/src/components/business/detailsEntrustedInsurance.vue
+++ b/company/src/components/business/detailsEntrustedInsurance.vue
@@ -15,30 +15,18 @@
             <span>鎻愪氦鏃堕棿锛歿{ model.createDate }}</span>
           </div>
           <div class="desc_item_label_right">
-            <template v-if="userInfo.type === 1">
-              <el-button v-if="model.status == 24" type="primary" @click="$refs.OperaInsuranceApply.open('鎶曚繚鐢宠', {id: dataId})">鍐嶆鎶曚繚</el-button>
-              <el-button v-if="model.status == 24" type="primary" @click="closeOrder">鍏抽棴璁㈠崟</el-button>
-              <el-button v-if="[21,22,23,24,25,26,27].includes(model.status)" type="primary" @click="viewFanganshu">鏌ョ湅纭涔�</el-button>
-              <el-button v-if="[22,23,24,25,26,27].includes(model.status)" type="primary" @click="viewShenqingdan">鏌ョ湅鐢宠鍗�</el-button>
-              <el-button v-if="[1,2,3].includes(model.unionApplyTbdStatus)" type="primary" @click="viewToubaodan">鏌ョ湅鎶曚繚鍗�</el-button>
-              <el-button v-if="[3].includes(model.unionApplyTbdStatus) " type="primary" @click="viewBaoxiandan">鏌ョ湅淇濋櫓鍗�</el-button>
-              <!--                          goSign-->
-              <el-button v-if="model.status == 20" type="primary" @click="getSignLink(0)">绛剧讲鏂规纭涔�</el-button>
-              <el-button v-if="model.status == 21" type="primary" @click="getSignLink(1)">绛剧讲鐢宠鍗�</el-button>
-              <el-button v-if="model.unionApplyTbdStatus == 1" type="primary" @click="getSignLink(2)">绛剧讲鎶曚繚鍗�</el-button>
-            </template>
             <template v-if="userInfo.type === 2">
-              <el-button v-if="[21,22,23,24,25,26,27].includes(model.status)" type="primary" @click="viewFanganshu">鏌ョ湅纭涔�</el-button>
-              <el-button v-if="[22,23,24,25,26,27].includes(model.status)" type="primary" @click="viewShenqingdan">鏌ョ湅鐢宠鍗�</el-button>
-              <el-button v-if="model.status == 22" type="primary" @click="$refs.InsuranceDetails.open('鎶曚繚瀹℃牳',model,1)">鎶曚繚瀹℃牳</el-button>
-              <el-button v-if="[20,21,22].includes(model.status)" type="danger" @click="$refs.OperaWtbApplyCheckWindow.open('閫�鍥炴姇淇�',model,1)">閫�鍥炵敵璇�</el-button>
-              <el-button v-if="model.status == 23" type="danger" @click="$refs.OperaWtbApplyCheckWindow.open('鍏抽棴鐢宠',model,2)">鍏抽棴鐢宠</el-button>
+              <el-button type="primary" v-if="[0].includes(model.status) " @click="$refs.InsuranceDetails.open('瀵煎嚭璇﹀崟',model,0)">瀵煎嚭璇﹀崟</el-button>
+              <el-button v-if="[0].includes(model.status) " type="primary" @click="$refs.OperaUnionApplyCheckWindow.open('涓婁紶鎶曚繚鍗�',model,2)">涓婁紶鎶曚繚鍗�</el-button>
+              <el-button v-if="model.status == 1" type="primary" @click="getSignLink(0)">绛剧讲鎶曚繚鍗�</el-button>
+              <el-button v-if="[2,3,4].includes(model.status)" type="primary" @click="viewToubaodan">鏌ョ湅鎶曚繚鍗�</el-button>
+              <el-button v-if="[3].includes(model.status) " type="primary" @click="$refs.OperaUnionApplyCheckWindow.open('涓婁紶鎶曚繚鍗�',model,3)">涓婁紶淇濋櫓鍗�</el-button>
+              <el-button v-if="model.status == 4" type="primary" @click="viewBaoxiandan">鏌ョ湅淇濋櫓鍗�</el-button>
+              <el-button v-if="[0,1,2].includes(model.status) " type="danger" @click="$refs.OperaUnionApplyCheckWindow.open('閫�鍥炴姇淇�',model,1)">閫�鍥炵敵璇�</el-button>
             </template>
-            <template v-if="userInfo.type === 0">
-              <el-button v-if="[27].includes(model.status)" type="primary" @click="viewFanganshu">鏌ョ湅纭涔�</el-button>
-              <el-button v-if="[27].includes(model.status)" type="primary" @click="viewShenqingdan">鏌ョ湅鐢宠鍗�</el-button>
-              <el-button v-if="[27].includes(model.status)" type="primary" @click="viewToubaodan">鏌ョ湅鎶曚繚鍗�</el-button>
-              <el-button v-if="[27].includes(model.status)" type="primary" @click="viewBaoxiandan">鏌ョ湅淇濋櫓鍗�</el-button>
+            <template v-if="userInfo.type ===0">
+              <el-button v-if="[2,3,4].includes(model.status)" type="primary" @click="viewToubaodan">鏌ョ湅鎶曚繚鍗�</el-button>
+              <el-button v-if="[4].includes(model.status)" type="primary" @click="viewBaoxiandan">鏌ョ湅淇濋櫓鍗�</el-button>
             </template>
           </div>
         </div>
@@ -107,52 +95,11 @@
                   <el-option label="涓嶅湪淇�" value="2"></el-option>
                 </el-select>
               </el-form-item>
-              <el-form-item label="娲鹃仯鍗曚綅" prop="duId">
-                <el-select v-model="formInline.duId" placeholder="璇烽�夋嫨" @change="search">
-                  <el-option
-                      v-for="item in dwList"
-                      :key="item.id"
-                      :label="item.name"
-                      :value="item.id">
-                  </el-option>
-                </el-select>
-              </el-form-item>
-              <el-form-item label="鎵�灞炲伐绉�" prop="workTypeId">
-                <el-select v-model="formInline.workTypeId" placeholder="璇烽�夋嫨" @change="search">
-                  <el-option
-                      v-for="item in gzList"
-                      :key="item.id"
-                      :label="item.name"
-                      :value="item.id">
-                  </el-option>
-                </el-select>
-              </el-form-item>
               <el-form-item label="鍛樺伐濮撳悕" prop="memberName">
                 <el-input v-model="formInline.memberName" placeholder="璇疯緭鍏�" @keypress.enter.native="search"></el-input>
               </el-form-item>
-              <el-form-item label="淇濋櫓鐢熸晥璧锋湡" prop="end">
-                <el-date-picker
-                    @change="changeStart"
-                    v-model="formInline.end"
-                    type="daterange"
-                    format="yyyy 骞� MM 鏈� dd 鏃�"
-                    value-format="yyyy-MM-dd"
-                    range-separator="鑷�"
-                    start-placeholder="寮�濮嬫棩鏈�"
-                    end-placeholder="缁撴潫鏃ユ湡">
-                </el-date-picker>
-              </el-form-item>
-              <el-form-item label="淇濋櫓鐢熸晥姝㈡湡" prop="start">
-                <el-date-picker
-                    @change="changeEnd"
-                    v-model="formInline.start"
-                    type="daterange"
-                    format="yyyy 骞� MM 鏈� dd 鏃�"
-                    value-format="yyyy-MM-dd"
-                    range-separator="鑷�"
-                    start-placeholder="寮�濮嬫棩鏈�"
-                    end-placeholder="缁撴潫鏃ユ湡">
-                </el-date-picker>
+              <el-form-item label="琚繚闄╀汉" prop="applyCompanyName">
+                <el-input v-model="formInline.applyCompanyName" placeholder="璇疯緭鍏�" @keypress.enter.native="search"></el-input>
               </el-form-item>
             </template>
             <template v-else>
@@ -160,11 +107,9 @@
                 <el-select v-model="formInline.applyStatus" @change="search" placeholder="璇烽�夋嫨">
                   <el-option label="鍏ㄩ儴" value=""></el-option>
                   <el-option label="寰呯缃�" value="0"></el-option>
-                  <el-option label="寰呭鏍�" value="1"></el-option>
-                  <el-option label="宸茬敓鏁�" value="2"></el-option>
-                  <el-option label="鐢宠閫�鍥�" value="3"></el-option>
-                  <el-option label="宸查��鍥�" value="5"></el-option>
-                  <el-option label="宸插叧闂�" value="6"></el-option>
+                  <el-option label="寰呭嚭鍗�" value="1"></el-option>
+                  <el-option label="淇濋殰涓�" value="2"></el-option>
+                  <el-option label="宸查��鍥�" value="3"></el-option>
                 </el-select>
               </el-form-item>
               <el-form-item label="鎵瑰崟鐢熸晥璧锋湡" prop="end">
@@ -269,11 +214,9 @@
                              align="center">
               <template slot-scope="{row}">
                 <span :class="'change-status'+row.status" v-if="row.status === 0">寰呯缃�</span>
-                <span :class="'change-status'+row.status" v-if="row.status === 1">寰呭鏍�</span>
-                <span :class="'change-status'+row.status" v-if="row.status === 2">宸茬敓鏁�</span>
-                <span :class="'change-status'+row.status" v-if="row.status === 3 || row.status === 4">鐢宠閫�鍥�</span>
-                <span :class="'change-status'+row.status" v-if="row.status === 5 || row.status === 8">宸查��鍥�</span>
-                <span :class="'change-status'+row.status" v-if="row.status === 6">宸插叧闂�</span>
+                <span :class="'change-status'+row.status" v-if="row.status === 1">寰呭嚭鍗�</span>
+                <span :class="'change-status'+row.status" v-if="row.status === 2">淇濋殰涓�</span>
+                <span :class="'change-status'+row.status" v-if="row.status === 3">宸查��鍥�</span>
               </template>
             </el-table-column>
             <el-table-column
@@ -311,7 +254,9 @@
                 :key="Math.random()"
                 label="鎿嶄綔">
               <template slot-scope="{row}">
+
                 <el-button type="text" @click="$refs.OperaApplyChangeDetailWindow.open('鍔犲噺淇濊鎯�', row)">鏌ョ湅璇︽儏</el-button>
+
               </template>
             </el-table-column>
           </el-table>
@@ -331,11 +276,9 @@
                 align="center" label="淇濆崟鐘舵��" :key="Math.random()">
               <template slot-scope="{row}">
                 <span :class="'change-status'+row.status" v-if="row.status === 0">寰呯缃�</span>
-                <span :class="'change-status'+row.status" v-if="row.status === 1">寰呭鏍�</span>
-                <span :class="'change-status'+row.status" v-if="row.status === 2">宸茬敓鏁�</span>
-                <span :class="'change-status'+row.status" v-if="row.status === 3 || row.status === 4">鐢宠閫�鍥�</span>
-                <span :class="'change-status'+row.status" v-if="row.status === 5 || row.status === 8">宸查��鍥�</span>
-                <span :class="'change-status'+row.status" v-if="row.status === 6">宸插叧闂�</span>
+                <span :class="'change-status'+row.status" v-if="row.status === 1">寰呭嚭鍗�</span>
+                <span :class="'change-status'+row.status" v-if="row.status === 2">淇濋殰涓�</span>
+                <span :class="'change-status'+row.status" v-if="row.status === 3">宸查��鍥�</span>
               </template>
             </el-table-column>
             <el-table-column
@@ -403,22 +346,13 @@
         </div>
       </div>
     </div>
-    <InsuranceDetails ref="InsuranceDetails" @success="successEvent" />
-    <OperaWtbApplyCheckWindow ref="OperaWtbApplyCheckWindow" @success="successEvent" />
-    <!--    浼佷笟鐢宠閫�鍥�    -->
-    <applyReturn ref="applyReturn" @success="successEvent" />
-    <!--    鏂板鎶曚繚    -->
-    <OperaInsuranceApply ref="OperaInsuranceApply" @success="successEvent" />
-    <!--    鍔犲噺淇濈敵璇�    -->
-    <additionSubtractionApplication ref="additionSubtractionApplication" @success="successEvent" />
-    <!--    鏇存崲娲鹃仯鍗曚綅鐢宠    -->
-    <factoryChange ref="factoryChange" @success="successEvent" />
+    <InsuranceDetailsWtb ref="InsuranceDetails" @success="successEvent" />
+    <OperaUnionApplyCheckWindow ref="OperaUnionApplyCheckWindow" @success="successEvent" />
     <!-- 鍔犲噺淇濊鎯� -->
     <OperaApplyChangeDetailWindow ref="OperaApplyChangeDetailWindow" @success="successEvent"/>
     <!-- 鏇存崲娲鹃仯鍗曚綅璇︽儏 -->
     <OperaApplyChangeUnitDetailWindow ref="OperaApplyChangeUnitDetailWindow" @success="successEvent"/>
-    <!--    楠岃瘉鎵嬫満鍙�    -->
-    <operaverifyPhoneNumberWindew ref="operaverifyPhoneNumberWindew" @success="goSign" />
+    <!-- 鍔犲噺淇濊鎯� -->
     <template v-slot:footer>
       <el-button @click="visible=false">杩斿洖</el-button>
     </template>
@@ -455,46 +389,35 @@
 <script>
 import BaseOpera from '@/components/base/BaseOpera'
 import GlobalWindow from '@/components/common/GlobalWindow'
-import InsuranceDetails from '@/components/business/InsuranceDetails'
-import OperaWtbApplyCheckWindow from '@/components/business/OperaWtbApplyCheckWindow'
-import additionSubtractionApplication from '@/components/enterprise/additionSubtractionApplication'
-import factoryChange from '@/components/enterprise/factoryChange'
-import operaverifyPhoneNumberWindew from '@/components/business/operaverifyPhoneNumberWindew'
+import InsuranceDetailsWtb from '@/components/business/InsuranceDetailsWtb'
+
 import OperaApplyChangeDetailWindow from '@/components/business/OperaApplyChangeDetailWindow'
 import OperaApplyChangeUnitDetailWindow from '@/components/business/OperaApplyChangeUnitDetailWindow'
-import { getById } from '@/api/business/unionApply'
 
-import applyReturn from '@/components/enterprise/applyReturn'
+import OperaUnionApplyCheckWindow from '@/components/business/OperaUnionApplyCheckWindow'
+import { getById,getSignLink } from '@/api/business/unionApply'
+
 import {
-  getDetail,
-  getSignLink,
   applyDetailPage,
   exportExcel,
   applyChagneDetailExcel,
   applyOpt,
-  getMemberListOnlineSignLink, getSignTBQRSLink
 } from '@/api/business/insuranceApply'
 import { findListByDTO } from '@/api/business/dispatchUnit'
 import { fetchList } from '@/api/business/applyChange'
 import { findListByDTO as worktypeFindListByDTO } from '@/api/business/worktype'
-import OperaInsuranceApply from '@/components/enterprise/OperaInsuranceApplyWindow'
 import { mapState } from 'vuex'
-import {sendSms, validateCode} from "@/api/business/smsEmail";
+import {sendSms} from "@/api/business/smsEmail";
 
 export default {
   name: 'OperaWtbApplyShopWindow',
   extends: BaseOpera,
   components: {
     GlobalWindow,
-    InsuranceDetails,
-    OperaWtbApplyCheckWindow,
-    applyReturn,
-    OperaInsuranceApply,
-    additionSubtractionApplication,
-    factoryChange,
-    OperaApplyChangeDetailWindow,
     OperaApplyChangeUnitDetailWindow,
-    operaverifyPhoneNumberWindew
+    OperaApplyChangeDetailWindow,
+    InsuranceDetailsWtb,
+    OperaUnionApplyCheckWindow,
   },
   data () {
     return {
@@ -517,22 +440,12 @@
       timer: null,
       formInline: {
         applyStatus: '',
-        duId: '',
-        workTypeId: '',
         memberName: '',
-        end: [],
-        start: [],
-        endTimeE: '',
-        endTimeS: '',
-        startTimeE: '',
-        startTimeS: '',
-        type: ''
+        end:[],
+        startTimeS:null,
+        startTimeE:null,
+        applyCompanyName: ''
       },
-      visible1: false,
-      visible2: false,
-      visible3: false,
-      visible4: false,
-      visible5: false,
       visiblePhone: false,
       reverse: false,
       radio: 0,
@@ -584,10 +497,6 @@
     },
     getSignLink (flag) {
       if (flag === 0) {
-        this.signTitle = '绛剧讲鏂规纭涔�'
-      } else if (flag === 1) {
-        this.signTitle = '绛剧讲鐢宠鍗�'
-      } else if (flag === 2) {
         this.signTitle = '绛剧讲鎶曚繚鍗�'
       }
       this.form.type = flag
@@ -604,24 +513,6 @@
         this.isWorking = true
         if(this.form.type===0){
           getSignTBQRSLink(this.form).then(res => {
-            setTimeout(() => {
-              this.visiblePhone=false
-              window.open(res)
-            }, 500)
-          }).catch(err => {
-            this.$tip.apiFailed(err)
-          })
-        } else if (this.form.type === 1) {
-          getMemberListOnlineSignLink(this.form).then(res => {
-            setTimeout(() => {
-              this.visiblePhone=false
-              window.open(res)
-            }, 500)
-          }).catch(err => {
-            this.$tip.apiFailed(err)
-          })
-        } else if (this.form.type === 2) {
-          getSignLink(this.dataId).then(res => {
             setTimeout(() => {
               this.visiblePhone=false
               window.open(res)
diff --git a/server/service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java b/server/service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java
index 207b8d2..b5bf545 100644
--- a/server/service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java
+++ b/server/service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java
@@ -1267,6 +1267,103 @@
             return null;
     }
 
+    public void exportUnionApplyDetail(UnionApply model, HttpServletResponse response) {
+        try {
+            String encodeFileName = URLEncoder.encode("鎶曚繚璇︽儏鍗昣"+model.getCompanyName()+"_"+model.getSolutionName(), Charset.forName("UTF-8").toString()) + ".xlsx";
+            response.setHeader("Content-Disposition","attachment;filename=" + encodeFileName);
+            response.setContentType("application/octet-stream");
+            response.setHeader("eva-opera-type", "download");
+            response.setHeader("eva-download-filename", encodeFileName);
+            this.exportUnionApplyDetailDo(model,"鎶曚繚鐢宠琛�", response.getOutputStream());
+        } catch (IOException e) {
+            throw new BusinessException(ResponseStatus.EXPORT_EXCEL_ERROR, e);
+        }
+    }
+    public void exportUnionApplyDetailDo (UnionApply data, String sheetName, OutputStream os) {
+        SXSSFWorkbook sxssfWorkbook;
+        try {
+            sxssfWorkbook = new SXSSFWorkbook();
+            Sheet sheet = sxssfWorkbook.createSheet(sheetName);
+            for (int i = 0; i <7; i++) {
+                sheet.setColumnWidth(i, (i==5?20:15) * 2 * 256);
+            }
+            sheet.createFreezePane(0, 1);
+            Row title = sheet.createRow(0);
+            title.setHeight((short) 800);
+            for (int i = 0; i < 7; i++) {
+                title.createCell(i).setCellValue(i==0?sheetName:"");
+                configTitleCell(sxssfWorkbook,title.getCell(i));
+            }
+            sheet.addMergedRegion(new CellRangeAddress(0   ,0,0,6));
+            Row header1 = sheet.createRow(1);
+            header1.setHeight((short) 500);
+            header1.createCell(0).setCellValue("鎶曚繚浜�");
+            header1.createCell(1).setCellValue("琚繚闄╀汉");
+            header1.createCell(2).setCellValue("淇濋櫓鏂规");
+            header1.createCell(3).setCellValue("淇濋櫓鐢熸晥璧锋湡");
+            header1.createCell(4).setCellValue("淇濋櫓鐢熸晥姝㈡湡");
+            header1.createCell(5).setCellValue("鎶曚繚浜烘暟");
+            header1.createCell(6).setCellValue("鎬昏垂鐢紙鍏冿級");
+            for (int i = 0; i < 7; i++) {
+                configFirstCell(sxssfWorkbook,header1.getCell(i));
+            }
+            Row header2 = sheet.createRow(2);
+            header2.createCell(0).setCellValue(data.getCompanyName());
+            header2.createCell(1).setCellValue(data.getCompanyNames());
+            header2.createCell(2).setCellValue(data.getSolutionName());
+            header2.createCell(3).setCellValue(com.doumee.core.utils.DateUtil.getPlusTime2(data.getStartTime()));
+            header2.createCell(4).setCellValue(com.doumee.core.utils.DateUtil.getPlusTime2(data.getEndTime()));
+            header2.createCell(5).setCellValue(data.getInsureNum());
+            header2.createCell(6).setCellValue(Constants.formatBigdecimal2Float(data.getFee()).toString());
+            for (int i = 0; i < 7; i++) {
+                configDataCell(sxssfWorkbook,   header2.getCell(i));
+            }
+            Row header4 = sheet.createRow(3);
+            header4.createCell(0).setCellValue("搴忓彿");
+            header4.createCell(1).setCellValue("鍛樺伐濮撳悕");
+            header4.createCell(2).setCellValue("鎬у埆");
+            header4.createCell(3).setCellValue("韬唤璇佸彿");
+            header4.createCell(4).setCellValue("琚繚闄╀汉");
+            header4.createCell(5).setCellValue("娲鹃仯鍗曚綅");
+            header4.createCell(6).setCellValue("鎵�灞炲伐绉�");
+            header4.setHeight((short) 500);
+            for (int i = 0; i < 7; i++) {
+                configFirstCell(sxssfWorkbook,header4.getCell(i));
+            }
+            if(data.getApplyDetailList()!=null){
+                // 鍒涘缓鏁版嵁璁板綍
+                for (int rowIndex = 0; rowIndex < data.getApplyDetailList().size(); rowIndex++) {
+                    ApplyDetail d = data.getApplyDetailList().get(rowIndex);
+                    Row header5 = sheet.createRow(rowIndex + 4);
+//                    header5.setHeight((short) 300);
+                    header5.createCell(0).setCellValue(rowIndex+1);
+                    header5.createCell(1).setCellValue(StringUtils.defaultString(d.getMemberName(),""));
+                    header5.createCell(2).setCellValue(Constants.equalsInteger(d.getSex(),0)?"鐢�":(Constants.equalsInteger(d.getSex(),1)?"濂�":"-"));
+                    header5.createCell(3).setCellValue(StringUtils.defaultString(d.getIdcardNo(),""));
+                    header5.createCell(4).setCellValue(StringUtils.defaultString(d.getCompanyName(),""));
+                    header5.createCell(5).setCellValue(StringUtils.defaultString(d.getDuName(),""));
+                    header5.createCell(6).setCellValue(StringUtils.defaultString(d.getWorkTypeName(),""));
+                    // 璁剧疆鏁版嵁鍗曞厓鏍�
+                    for (int i = 0; i < 7; i++) {
+                        configDataCell(sxssfWorkbook,   header5.getCell(i));
+                    }
+                }
+            }
+            sxssfWorkbook.write(os);
+            os.close();
+        } catch (Exception e) {
+            throw new BusinessException(ResponseStatus.EXPORT_EXCEL_ERROR, e);
+        } finally {
+            if (os != null) {
+                try {
+                    os.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+
 
     @Data
     @AllArgsConstructor
diff --git a/server/service/src/main/java/com/doumee/core/utils/Constants.java b/server/service/src/main/java/com/doumee/core/utils/Constants.java
index 8b88097..cce057f 100644
--- a/server/service/src/main/java/com/doumee/core/utils/Constants.java
+++ b/server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -995,10 +995,10 @@
 
 
     public  enum UnionChangeStatus {
-        MERGE(0, "寰呯缃茬敵璇峰崟",""),
-        UPLOAD_INSURANCE_POLICY(1, "寰呬笂浼犱繚鍗�",""),
+        MERGE(0, "寰呯缃�",""),
+        UPLOAD_INSURANCE_POLICY(1, "寰呭嚭鍗�",""),
         FINISH(2, "淇濋殰涓�",""),
-        CLOSE(3, "鍏抽棴",""),
+        CLOSE(3, "宸查��鍥�",""),
         ;
         // 鎴愬憳鍙橀噺
         private String name;
diff --git a/server/service/src/main/java/com/doumee/dao/business/model/UnionApply.java b/server/service/src/main/java/com/doumee/dao/business/model/UnionApply.java
index 4d2e6ba..bf708e9 100644
--- a/server/service/src/main/java/com/doumee/dao/business/model/UnionApply.java
+++ b/server/service/src/main/java/com/doumee/dao/business/model/UnionApply.java
@@ -107,6 +107,9 @@
     @ApiModelProperty(value = "鍟嗘埛鍚嶇О", example = "1")
     @TableField(exist = false)
     private String companyName;
+    @ApiModelProperty(value = "琚繚闄╀汉浼佷笟鍚嶇О ,鍒嗗壊")
+    @TableField(exist = false)
+    private String companyNames;
 
     @ApiModelProperty(value = "鏂规鍚嶇О", example = "1")
     @TableField(exist = false)
@@ -137,4 +140,8 @@
     @ApiModelProperty(value = "鏃ュ織璁板綍")
     @TableField(exist = false)
     private List<ApplyLog> applyLogList;
+
+    @ApiModelProperty(value = "浜哄憳淇℃伅")
+    @TableField(exist = false)
+    private List<ApplyDetail> applyDetailList;
 }
diff --git a/server/service/src/main/java/com/doumee/service/business/UnionApplyService.java b/server/service/src/main/java/com/doumee/service/business/UnionApplyService.java
index 8594892..572f492 100644
--- a/server/service/src/main/java/com/doumee/service/business/UnionApplyService.java
+++ b/server/service/src/main/java/com/doumee/service/business/UnionApplyService.java
@@ -3,6 +3,7 @@
 import com.doumee.core.model.PageData;
 import com.doumee.core.model.PageWrap;
 import com.doumee.dao.business.dto.*;
+import com.doumee.dao.business.model.InsuranceApply;
 import com.doumee.dao.business.model.UnionApply;
 import java.util.List;
 
@@ -128,4 +129,6 @@
     void uploadBXD(UnionApplyBXDDTO unionApplyBXDDTO);
 
     UnionApply detail(Integer applyId);
+
+    UnionApply findDetailForExport(UnionApply model);
 }
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java
index 5c1ffc7..9fbfd5d 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java
@@ -94,20 +94,23 @@
 
     @Override
     public List<ApplyDetail> findList(ApplyDetail applyDetailPageDTO) {
-        if(applyDetailPageDTO.getApplyId() == null){
+        if(applyDetailPageDTO.getApplyId()==null && applyDetailPageDTO.getUnionApplyId() ==null){
             return  new ArrayList<>();
         }
         MPJLambdaWrapper<ApplyDetail> queryWrapper = new MPJLambdaWrapper<>();
         Utils.MP.blankToNull(applyDetailPageDTO);
         queryWrapper.selectAll(ApplyDetail.class);
         queryWrapper.selectAs(DispatchUnit::getName,ApplyDetail::getDuName);
+        queryWrapper.selectAs(Company::getName,ApplyDetail::getCompanyName);
         queryWrapper.selectAs(Worktype::getName,ApplyDetail::getWorkTypeName);
         queryWrapper.selectAs(Member::getIdcardNo,ApplyDetail::getIdcardNo);
         queryWrapper.selectAs(Member::getName,ApplyDetail::getMemberName);
         queryWrapper.leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyDetail::getDuId);
         queryWrapper.leftJoin(Worktype.class,Worktype::getId,ApplyDetail::getWorktypeId);
         queryWrapper.leftJoin(Member.class,Member::getId,ApplyDetail::getMemberId);
-        queryWrapper.eq( ApplyDetail::getApplyId,applyDetailPageDTO.getApplyId());
+        queryWrapper.leftJoin(Company.class,Company::getId,Member::getCompanyId);
+        queryWrapper.eq( applyDetailPageDTO.getApplyId()!=null,ApplyDetail::getApplyId,applyDetailPageDTO.getApplyId());
+        queryWrapper.eq( applyDetailPageDTO.getUnionApplyId()!=null,ApplyDetail::getUnionApplyId,applyDetailPageDTO.getUnionApplyId());
         List<ApplyDetail> pageData=  applyDetailJoinMapper.selectJoinList( ApplyDetail.class, queryWrapper);
         if(pageData!=null){
             int num = 1;
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java
index 5dd2762..138b050 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java
@@ -258,6 +258,35 @@
         return unionApplyMapper.selectCount(wrapper);
     }
 
+    @Override
+    public      UnionApply findDetailForExport(UnionApply model){
+        UnionApply insuranceApply = detail(model.getId());
+        if(Objects.isNull(insuranceApply)){
+            throw new BusinessException(ResponseStatus.DATA_EMPTY);
+        }
+
+        MPJLambdaWrapper<ApplyDetail> queryWrapper = new MPJLambdaWrapper<>();
+        queryWrapper.selectAll(ApplyDetail.class);
+        queryWrapper.selectAs(DispatchUnit::getName,ApplyDetail::getDuName);
+        queryWrapper.selectAs(Company::getName,ApplyDetail::getCompanyName);
+        queryWrapper.selectAs(Worktype::getName,ApplyDetail::getWorkTypeName);
+        queryWrapper.selectAs(Member::getIdcardNo,ApplyDetail::getIdcardNo);
+        queryWrapper.selectAs(Member::getName,ApplyDetail::getMemberName);
+        queryWrapper.leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyDetail::getDuId);
+        queryWrapper.leftJoin(Worktype.class,Worktype::getId,ApplyDetail::getWorktypeId);
+        queryWrapper.leftJoin(Member.class,Member::getId,ApplyDetail::getMemberId);
+        queryWrapper.leftJoin(Company.class,Company::getId,Member::getCompanyId);
+        queryWrapper.eq(  ApplyDetail::getUnionApplyId,model.getId());
+        List<ApplyDetail> detailList=  applyDetailJoinMapper.selectJoinList( ApplyDetail.class, queryWrapper);
+        //鏌ヨ鏄庣粏
+        if(detailList!=null){
+            insuranceApply.setInsureNum(detailList.size());
+            insuranceApply.setApplyDetailList(detailList);
+        }
+        insuranceApply.setRemark(model.getRemark());
+        return insuranceApply;
+    }
+
 
 
     @Override
@@ -268,6 +297,7 @@
                         .selectAs(Solutions::getName,UnionApply::getSolutionName)
                         .selectAs(Company::getName,UnionApply::getCompanyName)
                         .select(" ( select count(DISTINCT(ad.MEMBER_ID)) from apply_detail ad  where ad.UNION_APPLY_ID = t.id ) as insureNum")
+                        .select(" ( select group_concat(DISTINCT(cd.name)) from insurance_apply ad left join company cd on ad.company_id = cd.id where ad.UNION_APPLY_ID = t.id ) as companyNames")
                         .leftJoin(Solutions.class,Solutions::getId,UnionApply::getSolutionId)
                         .leftJoin(Company.class,Company::getId,UnionApply::getCompanyId)
                         .eq(UnionApply::getId,applyId)
diff --git a/server/shop/src/main/java/com/doumee/api/business/UnionApplyController.java b/server/shop/src/main/java/com/doumee/api/business/UnionApplyController.java
index 1a57ba5..f13a251 100644
--- a/server/shop/src/main/java/com/doumee/api/business/UnionApplyController.java
+++ b/server/shop/src/main/java/com/doumee/api/business/UnionApplyController.java
@@ -7,6 +7,7 @@
 import com.doumee.core.model.PageData;
 import com.doumee.core.model.PageWrap;
 import com.doumee.dao.business.dto.*;
+import com.doumee.dao.business.model.InsuranceApply;
 import com.doumee.dao.business.model.UnionApply;
 import com.doumee.service.business.UnionApplyService;
 import io.swagger.annotations.Api;
@@ -81,7 +82,12 @@
     public void exportExcel (@RequestBody PageWrap<UnionApply> pageWrap, HttpServletResponse response) {
         ExcelExporter.build(UnionApply.class).export(unionApplyService.findPage(pageWrap).getRecords(), "鍚堝苟鎶曚繚鍗曚俊鎭〃", response);
     }
-
+    @ApiOperation("瀵煎嚭鎶曚繚璇︽儏鍗�")
+    @PostMapping("/exportDetailExcel")
+    @RequiresPermissions("business:unionapply:exportExcel")
+    public void exportDetailExcel (@RequestBody UnionApply model, HttpServletResponse response) {
+        ExcelExporter.build(UnionApply.class).exportUnionApplyDetail(unionApplyService.findDetailForExport(model),  response);
+    }
 
     @ApiOperation("鏍规嵁ID鏌ヨ")
     @GetMapping("/{id}")
@@ -99,9 +105,9 @@
         return ApiResponse.success(unionApplyService.merge(saveUnionApplyDTO));
     }
 
-    @ApiOperation("鍏抽棴鍚堝苟鍗�")
-    @PostMapping("/close")
-    @RequiresPermissions("business:unionapply:close")
+    @ApiOperation("閫�鍥炲悎骞跺崟")
+    @PostMapping("/cancel")
+    @RequiresPermissions("business:unionapply:cancel")
     public ApiResponse close(@RequestBody CloseDTO closeDTO) {
         unionApplyService.cancelMerge(closeDTO);
         return ApiResponse.success(null);
@@ -110,7 +116,7 @@
     @PreventRepeat
     @ApiOperation("涓婁紶鎶曚繚鍗�")
     @PostMapping("/uploadToubaodan")
-    @RequiresPermissions("business:unionapply:create")
+    @RequiresPermissions("business:unionapply:uploadToubaodan")
     public ApiResponse uploadToubaodan(@RequestBody UploadMultifileDTO uploadMultifileDTO) {
         unionApplyService.uploadToubaodan(uploadMultifileDTO);
         return ApiResponse.success(null);
@@ -127,7 +133,7 @@
 
     @ApiOperation("涓婁紶淇濋櫓鍗�")
     @PostMapping("/uploadBXD")
-    @RequiresPermissions("business:unionchange:query")
+    @RequiresPermissions("business:unionchange:uploadBXD")
     public ApiResponse uploadBXD(@RequestBody UnionApplyBXDDTO unionApplyBXDDTO) {
         unionApplyService.uploadBXD(unionApplyBXDDTO);
         return ApiResponse.success(null);

--
Gitblit v1.9.3