nidapeng
2024-04-06 54bbda6f374f3b8ebafed04d49f756fd75e53a1a
提交一把
已添加1个文件
已修改12个文件
756 ■■■■■ 文件已修改
company/src/api/business/applyChange.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/api/business/unionChange.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaUnionChangeCheckWindow.vue 500 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaUnionChangeDetailWindow.vue 76 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/UnionChangeDetails.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/detailsEntrustedInsurance.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/utils/Constants.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/ApplyChange.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/UnionChange.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/api/business/applyChange.js
@@ -43,7 +43,6 @@
export function applyChangeOpt (data) {
    return request.post('/business/applyChange/applyChangeOpt', data)
}
// åˆ—表查询
export function applyChagneDetailList (data) {
    return request.post('/business/applyChagneDetail/list', data)
company/src/api/business/unionChange.js
@@ -6,6 +6,12 @@
        trim: true
    })
}
// æŸ¥è¯¢
export function getSignLink (data) {
    return request.post('/business/unionChange/getSignLink', data, {
        trim: true
    })
}
// åˆ›å»º
export function create (data) {
@@ -20,7 +26,19 @@
export function updateById (data) {
    return request.post('/business/unionChange/updateById', data)
}
export function uploadBXD (data) {
    return request.post('/business/unionChange/uploadBXD', data)
}
export function close (data) {
    return request.post('/business/unionChange/close', data)
}
export function exportDetailExcel (data) {
    return request.post('/business/unionChange/exportDetailExcel', data, {
        trim: true,
        download: true
    })
}
// æ ¹æ®ID查询
export function getById (id) {
    return request.get(`/business/unionChange/${id}`)
company/src/components/business/OperaUnionChangeCheckWindow.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,500 @@
<template>
    <GlobalWindow
        :title="title"
        width="60%"
        :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="visible3==true" :model="form" ref="form3" :rules="rules3" style="width: 100%;">
        <el-form-item label="期望保险生效期:">
          <span >{{( form.applyTime|| '-')}} </span>
        </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="applyTime" v-if="form.selectRadio === 1">
          <el-date-picker
              v-model="form.applyTime"
              type="date"
              value-format="yyyy-MM-dd HH:mm:ss"
              placeholder="选择日期">
          </el-date-picker>
        </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>
        <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>
          <div class="box_table_content" v-for="(item, index) in model.applyList" :key="index">
            <div class="box_table_content_item">{{index + 1}}</div>
            <div class="box_table_content_item" >{{ item.companyName }}</div>
            <div class="box_table_content_item">{{ item.addNum }}</div>
            <div class="box_table_content_item">{{ item.delNum }}</div>
            <div class="box_table_content_item">
              <el-form-item label="" prop="bxdMultifileList[index]">
                <UploadFileLink   @remove="deleIndex(1,index)" :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileIndex="index" :showTips="showTips" :fileList="model.applyList[index].fileList1" @uploadSuccess="baoxianFileUploaded2" />
              </el-form-item>
            </div>
          </div>
        </div>
      </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 {
  close,
  uploadBXD
} from '@/api/business/unionChange'
import UploadFile from '@/components/common/UploadFile'
import UploadFileLink from '@/components/common/UploadFileLink'
export default {
  name: 'OperaUnionApplyCheckWindow',
  extends: BaseOpera,
  components: { UploadFile, GlobalWindow ,UploadFileLink},
  data () {
    return {
      // è¡¨å•数据
      model: {},
      falg: 0,
      showTips:false,
      rules1: {
        backCheckInfo: [
          { required: true, message: '请完善信息' }
        ]
      },
      rules3: {
        code: [
          { required: true, message: '请完善信息' }
        ],
        applyDate: [
          { required: true, message: '请完善信息' }
        ],
        baoxianFile: [
          { required: true, message: '请完善信息' }
        ]
      },
      form: {
        id: null,
        backCheckInfo: '',
        applyTime: null,
        code: null,
        baoxianFile: null,
        bxdMultifileList: [],
        fileList1: [],
        selectRadio: 0
      },
      visible1: false,
      visible2: false,
      visible3: false
    }
  },
  created () {
    this.config({
      api: '/business/insuranceApply',
      'field.id': 'id'
    })
  },
  methods: {
    deleIndex (flag,index) {
      alert(index)
      if(flag == 0){
        this.form.tbdMultifileList[index].fileurl = null
        this.form.tbdMultifileList[index].name = null
      }else  if(flag ==1){
        this.form.bxdMultifileList[index].fileurl = null
        this.form.bxdMultifileList[index].name = null
      }
    },
    dele3 () {
      this.form.baoxianFile = null
    },
    open (title, target, flag) {
      this.visible = true
      this.model = {}
      this.form = {
        id: null,
        backCheckInfo: '',
        startTime: null,
        code: null,
        baoxianFile: null,
        bxdMultifileList:[],
        fileList1: [],
        selectRadio: 0,
        applyTime:null
      }
      this.model = target
      this.form.applyTime = target.applyStartTime
      this.title = title
      this.flag = flag
      this.visible1 = false
      this.visible2 = false
      this.visible3 = false
      this.form.bxdMultifileList=[]
      if (flag == 1) {
        this.visible1 = true
      }
      if (flag == 3) {
        this.visible3 = true
        if(this.model.applyList){
          this.model.applyList.forEach(item =>{
            item.fileList1 =[]
            this.form.bxdMultifileList.push({objId:item.id,fileUrl:null,fileName:null})
          })
        }
      }
    },
    doSubmit () {
      if (this.flag == 1) {
        this.$refs.form1.validate((valid) => {
          // debugger
          if (!valid) {
            return
          }
          this.backDo()
        })
      }  else if (this.flag == 3) {
        this.$refs.form3.validate((valid) => {
          // debugger
          if (!valid) {
            return
          }
          this.uploadBaoxiandan()
        })
      }
    },
    selectChange () {
      if (this.form.selectRadio == 0) {
        this.form.applyTime = this.model.applyStartTime
      }
    },
    baoxianFileUploaded (data) {
      this.form.baoxianFile = data
    },
    baoxianFileUploaded2 (data) {
      this.form.bxdMultifileList[data.index].fileurl = data.fileurl
      this.form.bxdMultifileList[data.index].name = data.name
    },
    backDo () {
      this.$dialog.messageConfirm('确认进行该操作吗?')
        .then(() => {
          this.isWorking = true
          close({ id: this.model.id, reason: this.form.backCheckInfo })
            .then(response => {
              this.visible = false
              this.$emit('success')
            }).catch(err => {
              this.$tip.apiFailed(err)
            })
        })
    },
    uploadBaoxiandan () {
      this.$dialog.messageConfirm('确认进行该操作吗?')
        .then(() => {
          this.isWorking = true
          var param ={
            id: this.model.id,
            applyDate: this.form.applyTime,
            code: this.form.code,
            fileurl: this.form.baoxianFile.fileurl,
            name: this.form.baoxianFile.name,
            applyChangeBXDList:this.form.bxdMultifileList
          }
          uploadBXD(param)
            .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;
                }
            }
        }
    }
    .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_item1 {
          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;
        }
        .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;;
          }
          &:nth-child(2) {
             flex:1.5;
           }
          &:nth-child(4) {
             flex:1.5;
           }
          &:nth-child(5) {
            flex: 1.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;;
          }
          &:nth-child(2) {
            flex:1.5;
          }
          &:nth-child(4) {
            flex: 1.5;
          }
          &:nth-child(5) {
            flex: 1.5;
          }
        }
      }
    }
</style>
company/src/components/business/OperaUnionChangeDetailWindow.vue
@@ -21,9 +21,10 @@
                        <template v-if="2">
                            <el-button type="primary"  @click="$refs.ApplyChangeDetails.open('加减保详单',model,0)">导出详单</el-button>
                            <el-button v-if="[1,2].includes(model.status)" type="primary" @click="viewApplyFile">查看申请单</el-button>
                            <el-button v-if="[0].includes(model.status)" type="primary" @click="getSignLink(0)">签署申请单</el-button>
                            <el-button v-if="[2].includes(model.status)" type="primary" @click="viewPidan">查看批单</el-button>
                            <el-button v-if=" [1].includes(model.status)" type="primary" @click="$refs.OperaApplyChangeCheckWindow.open('上传批单',model,3)">上传批单</el-button>
                            <el-button  v-if="[0,1].includes(model.status)" type="danger" @click="$refs.OperaApplyChangeCheckWindow.open('退回投保',model,1)">退回投保</el-button>
                            <el-button v-if=" [1].includes(model.status)" type="primary" @click="$refs.OperaUnionChangeCheckWindow.open('上传批单',model,3)">上传批单</el-button>
                            <el-button  v-if="[0,1].includes(model.status)" type="danger" @click="$refs.OperaUnionChangeCheckWindow.open('退回投保',model,1)">退回投保</el-button>
                        </template>
                        <template  v-if="0">
                                             </template>
@@ -173,7 +174,7 @@
            </div>
        </div>
        <UnionChangeDetails ref="ApplyChangeDetails" @success="successEvent" />
        <OperaApplyChangeCheckWindow ref="OperaApplyChangeCheckWindow" @success="successEvent" />
        <OperaUnionChangeCheckWindow ref="OperaUnionChangeCheckWindow" @success="successEvent" />
        <!--    ä¼ä¸šç”³è¯·é€€å›ž    -->
<!--        <applyReturn ref="applyReturn" @success="successEvent" />-->
        <add_subtract_return ref="add_subtract_return" @success="successEvent" />
@@ -207,8 +208,26 @@
          </el-form-item>
        </el-form>
        <span slot="footer" class="dialog-footer">
                <el-button type="primary" @click="goSignDo()">ç¡®  å®š</el-button>
                <el-button type="primary" :loading="signing" @click="goSignDo()">ç¡®  å®š</el-button>
                <el-button @click="visiblePhone=false">取 æ¶ˆ</el-button>
            </span>
      </el-dialog>
      <el-dialog
          title="查看保险单"
          :visible.sync="visibleFile"
          width="500px"
          :modal="true"
          :show-close="true"
          :close-on-click-modal="false"
          append-to-body
          center>
        <div class="desc_item_from" v-for="(item, index) in pidanFileData" :key="index"  style="margin-bottom: 15px">
          <span v-if="index ==0">{{item.name}}:</span>
          <span v-if="index >0">被保险人({{item.name}})保险单:</span>
          <a style="cursor: pointer;color: #2E68EC" v-if="item.file && item.file.fileurl" @click="openFile(item.file.fileurlFull)">在线预览</a><span v-if="!item.file || !item.file.fileurl">未上传</span>
        </div>
        <span slot="footer" class="dialog-footer">
                <el-button @click="visibleFile=false">关 é—­</el-button>
            </span>
      </el-dialog>
      <template v-slot:footer>
@@ -222,7 +241,7 @@
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import UnionChangeDetails from '@/components/business/UnionChangeDetails'
import OperaApplyChangeCheckWindow from '@/components/business/OperaApplyChangeCheckWindow'
import OperaUnionChangeCheckWindow from '@/components/business/OperaUnionChangeCheckWindow'
import reinsurance from '@/components/enterprise/reinsurance'
import factoryChange from '@/components/enterprise/factoryChange'
import add_subtract_return from '@/components/enterprise/add_subtract_return'
@@ -231,9 +250,9 @@
} from '@/api/business/insuranceApply'
import {
  getById,
    getSignLink
} from '@/api/business/unionChange'
import { applyChangeOpt ,
  getChangeMemberListOnlineSignLink} from '@/api/business/applyChange'
import {applyChangeOpt, listAll as applyList} from '@/api/business/applyChange'
import {sendSms} from "@/api/business/smsEmail";
import OperaInsuranceApply from '@/components/enterprise/OperaInsuranceApplyWindow'
@@ -245,7 +264,7 @@
  components: {
      GlobalWindow,
    UnionChangeDetails,
      OperaApplyChangeCheckWindow,
    OperaUnionChangeCheckWindow,
      add_subtract_return,
      OperaInsuranceApply,
      reinsurance,
@@ -258,9 +277,12 @@
      modelId:null,
      num: 0,
      timer: null,
      signing:false,
      signTitle: '手机号验证',
      pidanFileData:[],
      model: {},
      visiblePhone: false,
      visibleFile:false,
      form: {
          businessId: null,
          phone: this.$store.state.userInfo.company.phone,
@@ -305,6 +327,10 @@
       this.model={}
       this.form.businessId = target.id
       this.num=0
       this.signing=false
       this.visiblePhone=false
       this.visibleFile=false
       this. pidanFileData=[]
       this.timer=null
        this.getDetail()
        this.getList()
@@ -328,13 +354,7 @@
      }, 1000)
    },
    getSignLink (flag) {
      if (flag === 0) {
        this.signTitle = '签署方案确认书'
      } else if (flag === 1) {
        this.signTitle = '签署申请单'
      } else if (flag === 2) {
        this.signTitle = '签署投保单'
      }
      this.form.type = flag
      this.visiblePhone = true
      this.$nextTick(() => {
@@ -346,14 +366,16 @@
        if (!valid) {
          return
        }
        this.isWorking = true
        this.signing = true
        if(this.form.type===0){
          getChangeMemberListOnlineSignLink(this.form).then(res => {
          getSignLink(this.form).then(res => {
            setTimeout(() => {
              this.visiblePhone=false
              this.signing=false
              window.open(res)
            }, 500)
          }).catch(err => {
            this.signing=false
            this.$tip.apiFailed(err)
          })
        }
@@ -407,9 +429,7 @@
       }
    },
    viewPidan(){
      if(this.model.pidanFile && this.model.pidanFile.fileurlFull){
        window.open(this.model.pidanFile.fileurlFull)
      }
      this.visibleFile=true
    },
    handleSizeChange(val){
        console.log(val)
@@ -423,10 +443,28 @@
    },
    getDetail(){
      this.pidanFileData=[]
      getById(this.modelId).then(res => {
        this.model = res
        this.tableData = new Array()
        this.tableData.push(res)
        this.pidanFileData.push({ name: '商户保险单', file: this.model.pidanFile })
        this.getApplyList()
      }).catch(err => {
      })
    },
    getApplyList () {
      applyList({ unionChangeId: this.model.id, getFiles: 1 }).then(res => {
        this.model.applyList = res
        if (res && res.length > 0) {
          res.forEach(item => {
            if (item.pidanFile) {
              this.pidanFileData.push({ name: item.companyName, file: item.pidanFile })
            } else {
              this.pidanFileData.push({ name: item.companyName, file: null })
            }
          })
        }
      }).catch(err => {
      })
    },
company/src/components/business/UnionChangeDetails.vue
@@ -117,7 +117,7 @@
    import GlobalWindow from '@/components/common/GlobalWindow'
    import {getChangeDetailList, exportJiajianBaoExcel} from "@/api/business/insuranceApply";
    import {check } from "@/api/business/applyChange";
    import {exportComFiles} from "@/api/business/company";
    import {exportDetailExcel} from "@/api/business/unionChange";
    export default {
        name: 'ApplyChangeDetails',
        extends: BaseOpera,
@@ -195,7 +195,7 @@
            this.$dialog.exportConfirm('确认导出详单吗?')
                .then(() => {
                  this.isWorking = true
                  exportJiajianBaoExcel({ id: this.model.id })
                  exportDetailExcel({ id: this.model.id })
                      .then(response => {
                        this.download(response)
                      })
company/src/components/business/detailsEntrustedInsurance.vue
@@ -770,6 +770,7 @@
    viewToubaodan () {
      this.fileData = this.taobaodanFileData;
      this.visibleFile=true
      this.fileTitle='查看投保单'
      this.fileFlag = 0
     /* if (this.model.toubaodanSignedFile && this.model.toubaodanSignedFile.fileurlFull) {
        setTimeout(() => {
@@ -783,6 +784,7 @@
    },
    viewBaoxiandan () {
      this.fileFlag = 1
      this.fileTitle='查看保险单'
      this.fileData = this.baoxiandanFileData;
      this.visibleFile=true
     /* if (this.model.baoxiandanFile && this.model.baoxiandanFile.fileurlFull) {
server/service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java
@@ -1006,17 +1006,17 @@
        try {
            sxssfWorkbook = new SXSSFWorkbook();
            Sheet sheet = sxssfWorkbook.createSheet(sheetName);
            for (int i = 0; i < 8; i++) {
            for (int i = 0; i < 9; i++) {
                sheet.setColumnWidth(i, ((i==3|| i== 4|| i== 5 ||i== 6 || i==7)?16:8) * 2 * 256);
            }
            sheet.createFreezePane(0, 1);
            sheet.addMergedRegion(new CellRangeAddress(0   ,0,0,7));
            sheet.addMergedRegion(new CellRangeAddress(0   ,0,0,8));
            Row title = sheet.createRow(0);
            title.setHeight((short) 2000);
            Cell c = title.createCell(0);
            c.setCellValue(sheetName);
            configFirstCell(sxssfWorkbook,c);
            for (int i = 0; i < 8; i++) {
            for (int i = 0; i < 9; i++) {
                if(i>0){
                    title.createCell(i).setCellValue("");
                }
@@ -1549,14 +1549,14 @@
        try {
            sxssfWorkbook = new SXSSFWorkbook();
            Sheet sheet = sxssfWorkbook.createSheet(sheetName);
            for (int i = 0; i < 12; i++) {
                sheet.setColumnWidth(i, ((i==3|| i==4|| i== 5 || i==9||i==10||  i==11)?16:8) * 2 * 256);
            for (int i = 0; i < 8; i++) {
                sheet.setColumnWidth(i, ((i==0|| i==1|| i== 3|| i== 4|| i== 7)?16:8) * 2 * 256);
            }
            sheet.createFreezePane(0, 1);
            sheet.addMergedRegion(new CellRangeAddress(0   ,0,0,11));
            sheet.addMergedRegion(new CellRangeAddress(0   ,0,0,7));
            Row title = sheet.createRow(0);
            title.setHeight((short) 2000);
            for (int i = 0; i < 12; i++) {
            for (int i = 0; i < 8; i++) {
                title.createCell(i).setCellValue(i==0?sheetName:"");
                configTitleCell(sxssfWorkbook,title.getCell(i));
            }
@@ -1681,7 +1681,7 @@
                    header6.createCell(6).setCellValue("");
                    header6.createCell(7).setCellValue(applyChagneDetail.getWorkTypeName());
                    for (int i = 0; i < 8; i++) {
                        configFirstCell(sxssfWorkbook,header6.getCell(i));
                        configDataCell(sxssfWorkbook,header6.getCell(i));
                    }
                    sheet.addMergedRegion(new CellRangeAddress(row  ,row,5,6));
                }
@@ -1703,7 +1703,7 @@
                configInfoCell(sxssfWorkbook,header6.getCell(i),HorizontalAlignment.LEFT);
            }
            header6.setHeight((short) 2000);
            sheet.addMergedRegion(new CellRangeAddress(rowIndex ,rowIndex,0,11));
            sheet.addMergedRegion(new CellRangeAddress(rowIndex ,rowIndex,0,7));
            Row header7= sheet.createRow(rowIndex+1);
            header7.setHeight((short) 3000);
            header7.createCell(0).setCellValue("投保人签章 ï¼š                            \n \n \n" +"日期:     å¹´     æœˆ     æ—¥    ");
@@ -1713,7 +1713,7 @@
                }
                configInfoCell(sxssfWorkbook,header7.getCell(i),HorizontalAlignment.RIGHT);
            }
            sheet.addMergedRegion(new CellRangeAddress(rowIndex+1 ,rowIndex+1,0,11));
            sheet.addMergedRegion(new CellRangeAddress(rowIndex+1 ,rowIndex+1,0,7));
            //临时缓冲区
            ByteArrayOutputStream out = new ByteArrayOutputStream();
@@ -1798,7 +1798,7 @@
            header2.createCell(4).setCellValue(com.doumee.core.utils.DateUtil.getPlusTime2(data.getEndTime()));
            header2.createCell(5).setCellValue(data.getApplyChagneDetailList().stream().filter(i->i.getType().equals(Constants.ZERO)).collect(Collectors.toList()).size());
            header2.createCell(6).setCellValue(data.getApplyChagneDetailList().stream().filter(i->i.getType().equals(Constants.ONE)).collect(Collectors.toList()).size());
            header2.createCell(7).setCellValue(com.doumee.core.utils.DateUtil.getPlusTime2(data.getValidTime()));
            header2.createCell(7).setCellValue(com.doumee.core.utils.DateUtil.getPlusTime2(data.getApplyStartTime()));
            for (int i = 0; i < 8; i++) {
                configDataCell(sxssfWorkbook,   header2.getCell(i));
            }
@@ -1812,8 +1812,9 @@
            header3.createCell(5).setCellValue("");
            header3.createCell(6).setCellValue("");
            header3.createCell(7).setCellValue("");
            for (int i = 0; i < 8; i++) {
                configFirstCell(sxssfWorkbook,header3.getCell(i));
            configFirstCell(sxssfWorkbook,header3.getCell(0));
            for (int i = 1; i < 8; i++) {
                configDataCell(sxssfWorkbook,header3.getCell(i));
            }
            sheet.addMergedRegion(new CellRangeAddress(3  ,3,1,7));
@@ -1853,7 +1854,7 @@
                    header6.createCell(6).setCellValue("");
                    header6.createCell(7).setCellValue(applyChagneDetail.getWorkTypeName());
                    for (int i = 0; i < 8; i++) {
                        configFirstCell(sxssfWorkbook,header6.getCell(i));
                        configDataCell(sxssfWorkbook,header6.getCell(i));
                    }
                    sheet.addMergedRegion(new CellRangeAddress(row  ,row,5,6));
                }
server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -85,6 +85,7 @@
    public static final String SETTLE_FILE ="SETTLE_FILE" ;
    public static final String DU_FILE ="DU_FILE" ;
    public static final String SIGN_DONE_NOTIFY_URL = "SIGN_DONE_NOTIFY_URL";
    public static final int FOUR = 4;
    /**
     * ä¼ä¸šæ•°æ®æ¥æº 0平台注册 1后台导入
@@ -197,6 +198,9 @@
    }
    public static Integer getSexByIdCard(String idCard){
        if(StringUtils.isBlank(idCard)){
            return 2;
        }
        Pattern pattern = Pattern.compile("\\d{17}[\\d|x]"); // å®šä¹‰èº«ä»½è¯å·ç æ ¼å¼çš„æ­£åˆ™è¡¨è¾¾å¼
        Matcher matcher = pattern.matcher(idCard);
        Integer sex = 0;
@@ -208,7 +212,7 @@
                sex = 1;
            }
        } else {
           sex = -1;
           sex = 2;
        }
        return sex;
    }
@@ -453,7 +457,7 @@
        WTB_BD_DONE_PDF(21, "委托投保单 - åˆå¹¶å•最终保单", "委托投保单 - åˆå¹¶å•最终保单"),
        WTB_CA_DONE_PDF(23, "委托加减保/换厂业务 - åˆå¹¶å•最终保单", "委托加减保/换厂业务 - åˆå¹¶å•最终保单"),
        WTB_CONFIRMATION_LATTER(24, "委托保 - æŠ•保方案确认书", "委托保 - æŠ•保方案确认书"),
        WTB_CA_TBD_PDF(25, "委托加减保/换厂业务 -投保单(企业签署后PDF)", "委托加减保/换厂业务 -投保单(企业签署后PDF)"),
        WTB_CA_TBD_PDF(25, "委托加减保/换厂业务 -申请单(商户签署后PDF)", "委托加减保/换厂业务 -申请单(商户签署后PDF)"),
        ;
        // æˆå‘˜å˜é‡
        private String name;
server/service/src/main/java/com/doumee/dao/business/model/ApplyChange.java
@@ -237,5 +237,7 @@
        taxesInvoicingVO.setType(Constants.ONE);
        return taxesInvoicingVO;
    }
    @ApiModelProperty(value = "是否获取附件信息 0不需要 1需要")
    @TableField(exist = false)
    private Integer getFiles;
}
server/service/src/main/java/com/doumee/dao/business/model/UnionChange.java
@@ -35,7 +35,6 @@
    @ApiModelProperty(value = "创建时间")
    @ExcelColumn(name="创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createDate;
    @ApiModelProperty(value = "更新人编码", example = "1")
@@ -44,7 +43,6 @@
    @ApiModelProperty(value = "更新时间")
    @ExcelColumn(name="更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date editDate;
    @ApiModelProperty(value = "是否删除0否 1是", example = "1")
@@ -69,7 +67,6 @@
    @ApiModelProperty(value = "批单生效时间")
    @ExcelColumn(name="批单生效时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date applyStartTime;
    @ApiModelProperty(value = "状态 0待签署申请单 1待上传批单 2已上传批单 3退回")
@@ -78,7 +75,6 @@
    @ApiModelProperty(value = "期望保险生效起期")
    @ExcelColumn(name="期望保险生效起期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date validTime;
    @ApiModelProperty(value = "批单号")
@@ -160,5 +156,12 @@
    @ApiModelProperty(value = "日志记录")
    @TableField(exist = false)
    private List<ApplyLog> applyLogList;
    @ApiModelProperty(value = "申请单附件")
    @TableField(exist = false)
    private Multifile applyFile;
    @ApiModelProperty(value = "批单附件")
    @TableField(exist = false)
    private Multifile pidanFile;
}
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
@@ -1537,6 +1537,7 @@
//                .eq(!Objects.isNull(model.getSolutionsId()),ApplyChange::getSolutionsId,model.getSolutionsId())
                .eq(!Objects.isNull(model.getSolutionType()),Solutions::getType,model.getSolutionType())
                .eq(!Objects.isNull(model.getApplyId()),ApplyChange::getApplyId,model.getApplyId())
                .eq(!Objects.isNull(model.getUnionChangeId()),ApplyChange::getUnionChangeId,model.getUnionChangeId())
                .eq(!Objects.isNull(model.getBaseSolutionsId()),Solutions::getBaseId,model.getBaseSolutionsId())
                .like(StringUtils.isNotBlank(model.getSolutionsName()),Solutions::getName,model.getSolutionsName())
                .ge(StringUtils.isNotBlank(model.getCreateDateS()),ApplyChange::getCreateDate, model.getCreateDateS()+" 00:00:00" )
@@ -1567,7 +1568,46 @@
        }
        queryWrapper.orderByDesc(ApplyDetail::getCreateDate);
        return applyChangeJoinMapper.selectJoinList(ApplyChange.class,queryWrapper);
        List<ApplyChange> list =applyChangeJoinMapper.selectJoinList(ApplyChange.class,queryWrapper);
        if(Constants.equalsObject(model.getGetFiles(),Constants.ONE)){
            //如果是合并单,需要查询附件信息
            initFileForList(list);
        }
        return list;
    }
    private void initFileForList(List<ApplyChange> list) {
        List<Integer> objList =  new ArrayList<>();
        if(list!=null && list.size()>0){
            for(ApplyChange param : list){
                objList.add(param.getId());
            }
        }else{
            return;
        }
        List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda()
                .in(Multifile::getObjId,objList)
                .in(Multifile::getObjType,Arrays.asList(new Integer[]{Constants.MultiFile.CA_PD_PDF.getKey()}))
                .eq(Multifile::getIsdeleted,Constants.ZERO)
                .orderByAsc(Multifile::getId));
        if(multifiles!=null && multifiles.size()>0){
            String path = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()
                    +systemDictDataBiz.queryByCode(Constants.OSS,Constants.APPLY_FILE).getCode();
            for(ApplyChange model : list){
                for(Multifile f : multifiles) {
                    if (StringUtils.isBlank(f.getFileurl())) {
                        continue;
                    }
                    f.setFileurlFull(path+f.getFileurl());
                    if(Constants.equalsInteger(f.getObjId(), model.getId()) ){
                        if (Constants.equalsInteger(f.getObjType(), Constants.MultiFile.CA_PD_PDF.getKey())) {
                            //签署前的投保单
                            model.setPidanFile(f);
                        }
                    }
                }
            }
        }
    }
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -852,8 +852,8 @@
        f.setType(Constants.TWO);
        f.setFileurl(fileurl);
        f.setFileurlFull(fullUrl);
        f.setInfo("委托加减保/换厂业务 -投保单");
        f.setName("委托加减保/换厂业务 -投保单.pdf");
        f.setInfo("投保申请单 -申请单");
        f.setName("投保申请单.pdf");
        multifileMapper.insert(f);
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_HBD_SIGNATURE_TBD;
server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java
@@ -172,15 +172,40 @@
                            .selectAs(SystemUser::getType,ApplyLog::getCreatorType)
                            .leftJoin(SystemUser.class,SystemUser::getId,ApplyLog::getCreator)
                            .leftJoin(Company.class,Company::getId,SystemUser::getCompanyId)
                            .in(ApplyLog::getObjType,Constants.ApplyLogType.getTypeList(Constants.THREE))
                            .in(ApplyLog::getObjType,Constants.ApplyLogType.getTypeList(Constants.FOUR))
                            .eq(ApplyLog::getApplyId,unionChange.getId())
                            .orderByAsc(ApplyLog::getCreateDate)
            );
            unionChange.setApplyLogList(applyLogList);
        }
        initFiles(unionChange);
        return unionChange;
    }
    private void initFiles(UnionChange unionChange) {
        List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda()
                .eq(Multifile::getObjId, unionChange.getId() )
                .in(Multifile::getObjType, Arrays.asList(new Integer[]{Constants.MultiFile.WTB_CA_TBD_PDF.getKey(),Constants.MultiFile.WTB_CA_DONE_PDF.getKey()}))
                .eq(Multifile::getIsdeleted,Constants.ZERO));
        if(multifiles!=null){
            String path = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()
                    +systemDictDataBiz.queryByCode(Constants.OSS,Constants.APPLY_FILE).getCode();
            for(Multifile f : multifiles){
                if(StringUtils.isBlank(f.getFileurl())){
                    continue;
                }
                f.setFileurlFull(path+f.getFileurl());
                if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.WTB_CA_TBD_PDF.getKey())){
                    //签署后申请单
                    unionChange.setApplyFile(f);
                }
                if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.WTB_CA_DONE_PDF.getKey())){
                    //签署后申请单
                    unionChange.setPidanFile(f);
                }
            }
        }
    }
    @Override
@@ -494,6 +519,7 @@
        }
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        UnionChange unionChange = this.unionChangeDetail(smsCheckDTO.getBusinessId());
        unionChange.setStatus(Constants.formatIntegerNum(unionChange.getStatus()));
        if(Objects.isNull(unionChange)||!Constants.equalsInteger(unionChange.getIsdeleted(),Constants.ZERO)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY);
        }
@@ -506,7 +532,7 @@
        if(unionChange.getStatus().equals(Constants.UnionChangeStatus.CLOSE.getKey())){
            throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"对不起,合并单业务已关闭");
        }
        if(unionChange.getStatus().equals(Constants.UnionChangeStatus.MERGE.getKey())){
        if(!unionChange.getStatus().equals(Constants.UnionChangeStatus.MERGE.getKey())){
            throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"对不起,合并单状态已流转");
        }
        Company company =  companyMapper.selectById(user.getCompanyId());
@@ -559,6 +585,8 @@
        if(Objects.isNull(unionChange)||!Constants.equalsInteger(unionChange.getIsdeleted(),Constants.ZERO)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY);
        }
        unionChange.setStatus(Constants.formatIntegerNum(unionChange.getStatus()));
        unionChange.setShopId(Constants.formatIntegerNum(unionChange.getShopId()));
        if(!unionChange.getShopId().equals(user.getCompanyId())){
            throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"对不起非您的合并单,您无法进行操作!");
        }
@@ -568,7 +596,7 @@
        if(unionChange.getStatus().equals(Constants.UnionChangeStatus.CLOSE.getKey())){
            throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"对不起,合并单业务已关闭");
        }
        if(unionChange.getStatus().equals(Constants.UnionChangeStatus.UPLOAD_INSURANCE_POLICY.getKey())){
        if(!unionChange.getStatus().equals(Constants.UnionChangeStatus.UPLOAD_INSURANCE_POLICY.getKey())){
            throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"对不起,合并单状态已流转");
        }
@@ -608,15 +636,15 @@
                        ||StringUtils.isBlank(m.getFileurl())
                        ||StringUtils.isBlank(m.getName())
                ){
                    throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"加减保/换厂业务批单文件信息缺失");
                    throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"批单文件信息缺失");
                }
                multifile.setIsdeleted(Constants.ZERO);
                multifile.setCreator(user.getId());
                multifile.setCreateDate(new Date());
                multifile.setCreateDate(new Date());
                multifile.setObjType(Constants.MultiFile.CA_PD_PDF.getKey());
                multifile.setType(Constants.TWO);
                multifileMapper.insert(multifile);
                m.setId(null);
                m.setIsdeleted(Constants.ZERO);
                m.setCreator(user.getId());
                m.setCreateDate(new Date());
                m.setObjType(Constants.MultiFile.CA_PD_PDF.getKey());
                m.setType(Constants.TWO);
                multifileMapper.insert(m);
            }
        }
@@ -628,7 +656,12 @@
                applyChange.setEditDate(new Date());
                applyChange.setEditor(user.getId());
                applyChange.setStatus(Constants.ApplyChangeStatus.APPROVE.getKey());
                List<ApplyChagneDetail> allList = applyChagneDetailJoinMapper.selectList(new QueryWrapper<ApplyChagneDetail>().lambda().eq(ApplyChagneDetail::getApplyChangeId,applyChange.getId()));
                List<ApplyChagneDetail> allList = applyChagneDetailJoinMapper.selectJoinList(ApplyChagneDetail.class,
                        new MPJLambdaWrapper<ApplyChagneDetail>().selectAll(ApplyChagneDetail.class)
                                .selectAs(Member::getName,ApplyChagneDetail::getMemberName )
                                .selectAs(Member::getIdcardNo,ApplyChagneDetail::getIdcardNo )
                                .leftJoin(Member.class,Member::getId,ApplyChagneDetail::getMemberId)
                                .eq(ApplyChagneDetail::getApplyChangeId,applyChange.getId()));
                this.dealApplyChangeDetail(applyChange,allList);
                applyChange.setCode(unionChangeBXDDTO.getCode());
                applyChange.setCheckUserId(user.getId());