MrShi
2024-04-01 2ba1c199ce3199a243f7735ef992babf80737d65
mrshi
已添加4个文件
已修改43个文件
3716 ■■■■ 文件已修改
company/.env.developmentCom 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/api/business/insuranceApply.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/assets/style/style.scss 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaSolutionsWindow.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaWtbApplyCheckWindow.vue 501 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaWtbApplyShopWindow.vue 1025 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/operaverifyPhoneNumberWindew.vue 150 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/common/MenuSelect.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/common/UploadFile.vue 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/business/insuranceApplyShop.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/enterprise/insuranceApply.vue 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/enterprise/myPolicy.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/company/src/main/java/com/doumee/api/business/ApplyChangeController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/company/src/main/java/com/doumee/api/business/InsuranceApplyController.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/company/src/main/java/com/doumee/api/business/UnionApplyController.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/company/src/main/java/com/doumee/api/business/UnionChangeController.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java 379 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/utils/Constants.java 94 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/dto/ApplyDetailPageDTO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/dto/SmsCheckDTO.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/dto/UnionChangeBXDDTO.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/dto/UploadMultifileDTO.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/join/UnionChangeJoinMapper.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/ApplyChagneDetail.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/ApplyChange.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/ApplyDetail.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/Solutions.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/UnionApply.java 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/UnionChange.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/ApplyChangeService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/InsuranceApplyService.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/UnionApplyService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/UnionChangeService.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/ApplyChagneDetailServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/DispatchUnitServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java 341 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/SmsEmailServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java 201 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java 231 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/third/SignService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/shop/src/main/java/com/doumee/api/business/ApplyChangeController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/shop/src/main/java/com/doumee/api/business/UnionApplyController.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/shop/src/main/java/com/doumee/api/business/UnionChangeController.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/.env.developmentCom
@@ -15,4 +15,4 @@
# å¹³å°ç«¯-萍姐
# VUE_APP_API = 'http://192.168.0.105:10023/'
VUE_APP_API = 'http://localhost:10032/'
VUE_APP_API = 'http://192.168.0.176:10032/'
company/src/api/business/insuranceApply.js
@@ -62,6 +62,20 @@
export function getSignLink (id) {
    return request.get(`business/insuranceApply/getSignLink/${id}`)
}
export function getSignTBQRSLink (data) {
    // return request.get('/business/insuranceApply/signTBQRSLink')
    return request.post('/business/insuranceApply/signTBQRSLink', data)
}
export function getMemberListOnlineSignLink (data) {
    return request.post('/business/insuranceApply/getMemberListOnlineSignLink', data, {
        trim: true
    })
}
export function getSignWTBTBDLinkk (data) {
    return request.post('/business/insuranceApply/getSignWTBTBDLinkk', data, {
        trim: true
    })
}
export function getJiajianBaoSignLink (data) {
    return request.post('/business/applyChange/getJiajianBaoSignLink', data, {
        trim: true
company/src/assets/style/style.scss
@@ -77,20 +77,22 @@
::v-deep .el-table__cell {
  height: 100% !important;
}
.apply-status0, .apply-status2 , .apply-status3, .apply-status10,
.apply-status0, .apply-status28,.apply-status20,.apply-status21,.apply-status22,
.apply-status25,.apply-status2 , .apply-status3, .apply-status10,
.change-status0,.change-status1,.change-status2,
.settle-status0,.settle-status2,.settle-status3,
.tax-status0,
.du-status0 {
  color: #216EEE  !important;
}
  .apply-status1 , .apply-status4, .apply-status6, .apply-status7, .apply-status8, .apply-status11,
.apply-status1 ,.apply-status24,.apply-status23, .apply-status4, .apply-status6,
.apply-status7, .apply-status8, .apply-status11,
.change-status3,.change-status4,.change-status5,.change-status8,
.settle-status1,
.tax-status2,
.du-status2 {
  color: #F95601 !important;
}
  .apply-status5,.change-status7,.settle-status7,.tax-status1,.du-status1,.settle-status4  {
  .apply-status5,.apply-status26,.change-status7,.settle-status7,.tax-status1,.du-status1,.settle-status4  {
  color: #00BA92  !important;
}
company/src/components/business/OperaSolutionsWindow.vue
@@ -95,6 +95,9 @@
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="上传方案确认书:" prop="fanganFile" v-if="form.type =='1'">
            <UploadFile   :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileList="form.fileList1" @uploadSuccess="editFanganFile" />
          </el-form-item>
            <el-form-item label="接收文件邮箱" prop="email">
                <el-input v-model="form.email" placeholder="请输入" v-trim/>
            </el-form-item>
@@ -157,10 +160,11 @@
import { all as allWorktype } from '@/api/business/worktype'
import { solutionsId } from '@/api/business/solutions'
import { pageAll as shopList } from '@/api/business/company'
import UploadFile from "@/components/common/UploadFile";
export default {
  name: 'OperaSolutionsWindow',
  extends: BaseOpera,
  components: { GlobalWindow },
  components: { GlobalWindow ,UploadFile},
  data () {
    var validType = (rule, value, callback) => {
      if (this.form.validType === 0 && !value) {
@@ -192,6 +196,8 @@
        ortherInfo: '',
        signKeyword: '',
        validTypeNum: '',
        fileList1:[],
        fanganFile:null,
        worktypeIdList: [{ worktypeId: '' }]
      },
      // éªŒè¯è§„则
@@ -236,6 +242,9 @@
    })
  },
  methods: {
    editFanganFile(data){
      this.form.fanganFile=data
    },
    // åˆ‡æ¢å…¬å¸
    getAllWorktype1 () {
      this.form.worktypeIdList = [{ worktypeId: '' }]
@@ -287,7 +296,10 @@
      this.form.insureCycleUnit = ''
      this.form.validTypeNum = ''
      this.visible = true
      this.form.fanganFile=null
      this.form.fileList1= new Array();
      this.form.worktypeIdList = [{ worktypeId: '' }]
      // this.$refs['$upload'].clearFiles()//初始化导入组件
      this.allCompany()
      this.allShops()
      // æ–°å»º
@@ -305,6 +317,10 @@
            for (const key in this.form) {
              this.form[key] = res[key]
            }
            if(this.form.fanganFile && this.form.fanganFile.fileurl){
              this.form.fileList1= [{url: this.form.fanganFile.fileurlFull, name:this.form.fanganFile.name}];
            }
            console.log(this.form.fileList1)
            this.form.worktypeIdList = res.worktypeList.map(item => {
              return {
                worktypeId: item.worktypeId
company/src/components/business/OperaWtbApplyCheckWindow.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,501 @@
<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 :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileList="form.fileList1" @uploadSuccess="baoxianFileUploaded" />
        </el-form-item>
      </el-form>
        <!--    ä¿®æ”¹ä¿é™©å•    -->
      <el-form v-if="visible4==true" :model="form" ref="form4" :rules="rules4" style="width: 100%;">
        <el-form-item label="保险生效起期:">
          {{ model.startTime }}
        </el-form-item>
        <el-form-item label="保单号:" prop="editCode">
          <el-input v-model="form.editCode" placeholder="请输入" v-trim/>
        </el-form-item>
        <el-form-item label="上传保险单:" prop="editBaoxianFile">
          <UploadFile :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileList="form.fileList1" @uploadSuccess="editBaoxianFileUploaded" />
        </el-form-item>
        <el-form-item label="修改原因:" prop="editCheckInfo">
          <el-input type="textarea" v-model="form.editCheckInfo" placeholder="请输入" v-trim/>
        </el-form-item>
      </el-form>
        <el-form v-if="visible5==true || visible6==true" :model="form" ref="form5" :rules="rules5" style="width: 100%;">
          <el-form-item label="填写说明:" prop="dealBackInfo">
            <el-input type="textarea" v-model="form.dealBackInfo" placeholder="请输入" v-trim/>
          </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 {
  dealBackApply,
  back,
  uploadBaoxiandan,
  editBaoxiandan,
  uploadToubaodan,
  check
} from "@/api/business/insuranceApply";
import UploadFile from "@/components/common/UploadFile";
import {remark} from "@/api/business/settleClaims";
export default {
  name: 'OperaWtbApplyCheckWindow',
  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: '请完善信息' }
        ],
      },
      rules5: {
        dealBackInfo: [
          { required: true, message: '请完善信息' }
        ]
      },
      rules4: {
        editCode: [
          { required: true, message: '请完善信息' }
        ],
        editBaoxianFile: [
          { required: true, message: '请完善信息' }
        ],
        editCheckInfo: [
          { required: true, message: '请完善信息' }
        ]
      },
      form: {
          id: null,
          backCheckInfo:'',
          dealBackInfo:'',
         editCheckInfo:'',
          editDate: '',
        editCode: '',
          startTime:null,
         code:null,
          toubaodanFile:null,
        baoxianFile:null,
         editBaoxianFile:null,
          fileList: [],
          fileList1: [],
          fileList2: [],
          selectRadio:0
      },
      visible1: false,
      visible2: false,
      visible3: false,
      visible4: false,
      visible5: false,
      visible6: false,
    }
  },
  created () {
      this.config({
          api: '/business/insuranceApply',
          'field.id': 'id'
      })
  },
  methods: {
    dele2() {
      this.form.toubaodanFile = ''
    },
     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: [],
         fileList2: [],
         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
       this.visible4 = false
       this.visible5 = false
       this.visible6 = false
       if(flag == 1){
         this.visible1 = true
       }
       if(flag == 2){
         this.visible2 = true
       }
       if(flag == 3){
         this.visible3 = true
       }
       if(flag == 4){
         this.visible4 = true
         this.$nextTick(() => {
           this.$refs.form4.resetFields()
         })
       }
       if(flag == 5){
         this.visible5 = true
       }
       if(flag == 6){
         this.visible6 = 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()
        })
      } else if (this.flag == 4) {
        this.$refs.form4.validate((valid) => {
          // debugger
          if (!valid) {
            return
          }
          this.editBaoxiandan()
        })
      } else if (this.flag == 5) {
        this.$refs.form5.validate((valid) => {
          // debugger
          if (!valid) {
            return
          }
          this.dealBackApply(1)
        })
      } else if (this.flag == 6) {
        this.$refs.form5.validate((valid) => {
          // debugger
          if (!valid) {
            return
          }
          this.dealBackApply(0)
        })
      }
    },
    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
    },
    editBaoxianFileUploaded(data){
      this.form.editBaoxianFile=data
    },
    backDo(){
      this.$dialog.messageConfirm('确认进行该操作吗?')
          .then(() => {
            this.isWorking = true
            back({id:this.model.id,checkInfo: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({id:this.model.id,toubaodanFile:this.form.toubaodanFile})
                .then(response => {
                  this.visible = false
                  this.$emit('success')
                }).catch(err => {
                  this.$tip.apiFailed(err)
                })
          })
    },
    dealBackApply(type){
      this.$dialog.messageConfirm('确认进行该操作吗?')
          .then(() => {
            this.isWorking = true
            dealBackApply({ id: this.model.id, checkInfo: this.form.dealBackInfo, dealBackApply: type })
                .then(response => {
                  this.visible = false
                  this.$emit('success')
                }).catch(err => {
                  this.$tip.apiFailed(err)
                })
          })
    },
    uploadBaoxiandan(){
      this.$dialog.messageConfirm('确认进行该操作吗?')
          .then(() => {
            this.isWorking = true
            uploadBaoxiandan({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)
                })
          })
    },
    editBaoxiandan(){
      this.$dialog.messageConfirm('确认进行该操作吗?')
          .then(() => {
            this.isWorking = true
            editBaoxiandan({id:this.model.id, checkInfo:this.form.editCheckInfo,code:this.form.editCode,baoxiandanFile:this.form.editBaoxianFile})
                .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>
company/src/components/business/OperaWtbApplyShopWindow.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,1025 @@
<template>
    <GlobalWindow
        :title="title"
        width="100%"
        :visible.sync="visible"
        :confirm-working="isWorking"
        @confirm="confirm"
    >
        <div class="desc">
            <div class="desc_item">
                <div class="desc_item_label" v-if="userInfo.type === 1 &&(model.statusCollect === 2 || model.statusCollect === 3)">
                    <div class="desc_item_label_left">
                        <span>保险到期还有 <b style="color: #F95601;">{{model.loseEfficacyDays ? model.loseEfficacyDays : '-'}}</b> å¤©</span>
                        <el-button type="primary" v-if="model.statusCollect === 2 || model.statusCollect === 3" @click="$refs.OperaInsuranceApply.open('续保', { id: dataId, type: 1 })">一键续保</el-button>
                        <el-button type="primary" v-if="model.statusCollect === 2" @click="$refs.additionSubtractionApplication.open('加减保申请', { id: dataId })">加减保申请</el-button>
                        <el-button type="primary" v-if="model.statusCollect === 2" @click="$refs.factoryChange.open('更换派遣单位申请', { id: dataId })">更换派遣单位申请</el-button>
                    </div>
                </div>
                <div class="desc_item_label">
                    <div class="desc_item_label_left">
                        <span>投保企业:{{ model.companyName }}</span>
                      <span>保单状态:<span  :class="'apply-status'+model.status" >{{ model.statusInfo }}</span></span>
                        <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="model.status == 22" type="danger" @click="$refs.OperaInsuranceApplyCheckWindow.open('退回投保',model,1)">退回申请</el-button>
                      <el-button v-if="model.status == 23" type="danger" @click="$refs.OperaInsuranceApplyCheckWindow.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>
                  </div>
                </div>
                <div class="desc_item_from">
                    <el-table
                        :data="tableData"
                        border
                        style="width: 100%">
                        <el-table-column
                            prop="code"
                            align="center"
                            label="保单号">
                        </el-table-column>
                        <el-table-column
                            prop="solutionsName"
                            label="保险方案"
                            align="center"
                            width="180">
                        </el-table-column>
                        <el-table-column
                            prop="startTime"
                            align="center"
                            label="保险生效起期">
                        </el-table-column>
                        <el-table-column
                            prop="endTime"
                            align="center"
                            label="保险生效止期">
                        </el-table-column>
                        <el-table-column
                            prop="insureNum"
                            align="center"
                            label="投保人数">
                        </el-table-column>
                        <el-table-column
                            prop="serviceDays"
                            align="center"
                            label="在保时长(天)">
                        </el-table-column>
                        <el-table-column
                            prop="currentFee"
                            align="center"
                            label="已产生费用(元)">
                        </el-table-column>
                        <el-table-column
                            prop="fee"
                            align="center"
                            label="总费用(元)">
                        </el-table-column>
                    </el-table>
                </div>
                <div class="desc_item_cate">
                    <el-tabs v-model="activeName" @tab-click="handleClick">
                        <el-tab-pane label="在保人员" name="0" ></el-tab-pane>
                        <el-tab-pane label="加/减保记录"  name="1"></el-tab-pane>
                        <el-tab-pane label="更换派遣单位记录" name="2"></el-tab-pane>
                    </el-tabs>
                </div>
                <div class="desc_item_search">
                    <el-form :inline="true" :model="formInline" ref="sou" class="demo-form-inline">
                        <template v-if="activeName === '0'">
                            <el-form-item label="在保状态" prop="applyStatus">
                                <el-select v-model="formInline.applyStatus" @change="search" placeholder="请选择">
                                    <el-option label="全部" value="0"></el-option>
                                    <el-option label="保障中" value="1"></el-option>
                                    <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>
                        </template>
                        <template v-else>
                            <el-form-item label="状态" prop="applyStatus">
                                <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-select>
                            </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>
                        </template>
                        <el-form-item>
                            <el-button type="primary" style="width: 80px;" @click="search">查询</el-button>
                            <el-button @click="resetting" style="width: 80px;">重置</el-button>
                            <el-button type="primary" style="width: 80px;" @click="exportExcel" v-if="activeName === '0'">导出名单</el-button>
                        </el-form-item>
                    </el-form>
                </div>
                <div class="desc_item_from">
                    <el-table
                        :data="list"
                        border
                        ref="table"
                        v-if="activeName === '0'"
                        style="width: 100%">
                        <el-table-column label="序号"
                                         align="center">
                            <template slot-scope="scope">
                                <span>{{scope.$index + 1}}</span>
                            </template>
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="memberName"
                            align="center"
                            label="员工姓名">
                        </el-table-column>
                        <el-table-column
                            align="center"
                            :key="Math.random()"
                            label="性别">
                            <template slot-scope="{row}">
                                <span v-if="row.sex === 0">男</span>
                                <span v-else>女</span>
                            </template>
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="idcardNo"
                            align="center"
                            label="身份证号">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="duName"
                            align="center"
                            label="派遣单位">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="workTypeName"
                            align="center"
                            label="所属工种">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="startTime"
                            align="center"
                            label="保险生效起期">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="endTime"
                            align="center"
                            label="保险生效止期">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            align="center"
                            prop="fee"
                            label="产生费用">
                        </el-table-column>
                    </el-table>
                    <el-table
                        :data="list1"
                        border
                        ref="table"
                        v-if="activeName === '1'"
                        style="width: 100%">
                        <el-table-column
                            label="序号"
                            align="center">
                            <template slot-scope="scope">
                                <span>{{scope.$index + 1}}</span>
                            </template>
                        </el-table-column>
                        <el-table-column label="保单状态" :key="Math.random()"
                             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>
                            </template>
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="applyCode"
                            align="center"
                            label="批单号">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="addNum"
                            align="center"
                            label="增加人数(人)">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="delNum"
                            align="center"
                            label="减少人数(人)">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="createDate"
                            align="center"
                            label="提交时间">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="applyStartTime"
                            align="center"
                            label="批单生效起期">
                        </el-table-column>
                        <el-table-column
                            align="center"
                            :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>
                    <el-table
                        :data="list2"
                        border
                        ref="table"
                        v-if="activeName === '2'"
                        style="width: 100%">
                        <el-table-column label="序号"
                                         align="center">
                            <template slot-scope="scope">
                                <span>{{scope.$index + 1}}</span>
                            </template>
                        </el-table-column>
                        <el-table-column
                            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>
                            </template>
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            align="center"
                            prop="applyCode"
                            label="批单号">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="changeNum"
                            align="center"
                            label="更换派遣单位人数">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="createDate"
                            align="center"
                            label="提交时间">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="applyStartTime"
                            align="center"
                            label="批单生效起期">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            align="center"
                            label="操作">
                            <template slot-scope="{row}">
                                <el-button type="text" @click="$refs.OperaApplyChangeUnitDetailWindow.open('更换派遣单位详情', row)">查看详情</el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                    <div class="desc_item_from_page">
                        <el-pagination
                            @current-change="handleCurrentChange"
                            :current-page="currentPage"
                            :page-size="10"
                            layout="total, prev, pager, next, jumper"
                            :total="total">
                        </el-pagination>
                    </div>
                </div>
                <div class="desc_item_review">
                    <div class="desc_item_review_label">审核流程</div>
                  <el-timeline :reverse="reverse">
                    <el-timeline-item
                        v-for="(activity, index) in activities"
                        :key="index">
                      <div style="display: flex; flex-direction: column;">
                        <span style="font-size: 16px; font-weight: 400; color: black;">
                            {{activity.title}}
                            <span style="font-size: 16px; font-weight: 400; color: black; margin-left: 10px;" v-if="[1, 2, 5, 6, 9, 11, 22].includes(activity.objType)">
                              {{activity.content}}
                            </span>
                        </span>
                        <span style="margin-top: 5px; font-size: 12px; font-weight: 400; color: #999999;">
                            æ“ä½œå‘˜-{{activity.creatorName}}({{activity.creatorType == 1 ? activity.companyName: "平台端"}}){{activity.createDate}}
                        </span>
                      </div>
                    </el-timeline-item>
                  </el-timeline>
                </div>
            </div>
        </div>
        <InsuranceDetails ref="InsuranceDetails" @success="successEvent" />
        <OperaInsuranceApplyCheckWindow ref="OperaInsuranceApplyCheckWindow" @success="successEvent" />
        <!--    ä¼ä¸šç”³è¯·é€€å›ž    -->
        <applyReturn ref="applyReturn" @success="successEvent" />
        <!--    æ–°å¢žæŠ•保    -->
        <OperaInsuranceApply ref="OperaInsuranceApply" @success="successEvent" />
        <!--    åŠ å‡ä¿ç”³è¯·    -->
        <additionSubtractionApplication ref="additionSubtractionApplication" @success="successEvent" />
        <!--    æ›´æ¢æ´¾é£å•位申请    -->
        <factoryChange ref="factoryChange" @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>
      <!-- ä¿®æ”¹æ‰‹æœºå· -->
      <el-dialog
          :title="signTitle"
          :visible.sync="visiblePhone"
          width="500px"
          :modal="false"
          :show-close="false"
          :close-on-click-modal="false"
          center>
        <el-form :model="form" ref="form" :rules="rules">
          <el-form-item label="手机号" prop="phone">
            <el-input v-model="form.phone" placeholder="请输入" disabled v-trim/>
          </el-form-item>
          <el-form-item label="验证码" prop="code">
            <div style="width: 100%; display: flex; align-items: center;">
              <el-input v-model="form.code" placeholder="请输入" v-trim/>
              <el-button type="primary" style="margin-left: 15px;" @click="send" v-if="num === 0">发送验证码</el-button>
              <el-button type="primary" style="margin-left: 15px;" v-else>{{num}}s</el-button>
            </div>
          </el-form-item>
        </el-form>
        <span slot="footer" class="dialog-footer">
                <el-button type="primary" @click="goSignDo()">ç¡®  å®š</el-button>
                <el-button @click="visiblePhone=false">取 æ¶ˆ</el-button>
            </span>
      </el-dialog>
    </GlobalWindow>
</template>
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import InsuranceDetails from '@/components/business/InsuranceDetails'
import OperaInsuranceApplyCheckWindow from '@/components/business/OperaInsuranceApplyCheckWindow'
import additionSubtractionApplication from '@/components/enterprise/additionSubtractionApplication'
import factoryChange from '@/components/enterprise/factoryChange'
import operaverifyPhoneNumberWindew from '@/components/business/operaverifyPhoneNumberWindew'
import OperaApplyChangeDetailWindow from '@/components/business/OperaApplyChangeDetailWindow'
import OperaApplyChangeUnitDetailWindow from '@/components/business/OperaApplyChangeUnitDetailWindow'
import applyReturn from '@/components/enterprise/applyReturn'
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";
export default {
  name: 'OperaWtbApplyShopWindow',
  extends: BaseOpera,
  components: {
    GlobalWindow,
    InsuranceDetails,
    OperaInsuranceApplyCheckWindow,
    applyReturn,
    OperaInsuranceApply,
    additionSubtractionApplication,
    factoryChange,
    OperaApplyChangeDetailWindow,
    OperaApplyChangeUnitDetailWindow,
    operaverifyPhoneNumberWindew
  },
  data () {
    return {
      // è¡¨å•数据
      dataId: null,
      signTitle: '手机号验证',
      model: {},
      form: {
        businessId: null,
        phone: this.$store.state.userInfo.company.phone,
        code: '',
        type:0
      },
      rules: {
        code: [
          { required: true, message: '请输入验证码' }
        ]
      },
      num: 0,
      timer: null,
      formInline: {
        applyStatus: '',
        duId: '',
        workTypeId: '',
        memberName: '',
        end: [],
        start: [],
        endTimeE: '',
        endTimeS: '',
        startTimeE: '',
        startTimeS: '',
        type: ''
      },
      visible1: false,
      visible2: false,
      visible3: false,
      visible4: false,
      visible5: false,
      visiblePhone: false,
      reverse: false,
      radio: 0,
      activities: [],
      tableData: [],
      list: [],
      list1: [],
      list2: [],
      dwList: [],
      gzList: [],
      activeName: '0',
      total: 0,
      currentPage: 1
    }
  },
  created () {
    this.config({
      api: '/business/insuranceApply',
      'field.id': 'id'
    })
  },
  computed: {
    ...mapState(['userInfo'])
  },
  methods: {
    open (title, target) {
      this.visible = true
      this.title = title
      this.model = {}
      this.dataId = null
      this.dataId = target.id
      this.form.businessId = target.id
      this.formInline.applyStatus = ''
      this.formInline.duId = ''
      this.formInline.workTypeId = ''
      this.formInline.memberName = ''
      this.formInline.end = ''
      this.formInline.start = ''
      this.formInline.endTimeE = ''
      this.formInline.endTimeS = ''
      this.formInline.startTimeE = ''
      this.formInline.startTimeS = ''
      this.formInline.type = ''
      this.activeName = '0'
      this.getDetail()
      this.getList()
      this.getDW()
      this.getGZ()
    },
    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(() => {
        this.$refs.form.resetFields()
      });
    },
    goSignDo(){
      this.$refs.form.validate((valid) => {
        if (!valid) {
          return
        }
        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)
            }, 500)
          }).catch(err => {
            this.$tip.apiFailed(err)
          })
        }
      })
    },
    send () {
      sendSms({
        phone: this.form.phone
      }).then(res => {
        this.num = 60
        this.setTime()
      })
    },
    setTime () {
      this.timer = setInterval(() => {
        if (this.num === 0) {
          clearInterval(this.timer)
          this.timer = null
          return
        }
        this.num = this.num - 1
      }, 1000)
    },
    // å…³é—­è®¢å•
    closeOrder () {
      this.$confirm('确认关闭此订单吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        applyOpt({
          applyId: this.dataId,
          optType: 2
        }).then(res => {
          this.getDetail()
        })
      }).catch(() => {
      })
    },
    // æ´¾é£å•位
    getDW () {
      findListByDTO({ applyId: this.dataId })
        .then(res => {
          this.dwList = res
        })
    },
    // å·¥ç§
    getGZ () {
      worktypeFindListByDTO({
        id: this.dataId,
        queryType: 2
      }).then(res => {
        this.gzList = res
      })
    },
    resetting () {
      if (this.activeName === '0') {
        this.formInline.applyStatus = '0'
      } else {
        this.formInline.applyStatus = ''
      }
      this.formInline.start = ''
      this.formInline.startTimeE = ''
      this.formInline.endTimeE = ''
      this.list = []
      this.list1 = []
      this.list2 = []
      this.formInline.duId = ''
      this.formInline.workTypeId = ''
      this.formInline.memberName = ''
      this.formInline.end = []
      this.formInline.end = []
      this.formInline.endTimeE = ''
      this.formInline.endTimeS = ''
      this.formInline.startTimeE = ''
      this.formInline.startTimeS = ''
      this.search()
    },
    search () {
      this.currentPage = 1
      this.getList()
    },
    changeStart (e) {
      if (e.length > 0) {
        this.formInline.startTimeS = e[0]
        this.formInline.startTimeE = e[1]
      } else {
        this.formInline.startTimeS = ''
        this.formInline.startTimeE = ''
      }
      this.search()
    },
    changeEnd (e) {
      if (e.length > 0) {
        this.formInline.endTimeS = e[0]
        this.formInline.endTimeE = e[1]
      } else {
        this.formInline.endTimeS = ''
        this.formInline.endTimeE = ''
      }
      this.search()
    },
    exportExcel () {
      if (this.activeName === '0') {
        exportExcel({
          capacity: 10,
          page: this.currentPage,
          model: {
            solutionName: this.tableData[0].solutionsName,
            applyId: this.dataId,
            applyStatus: this.formInline.applyStatus,
            duId: this.formInline.duId,
            workTypeId: this.formInline.workTypeId,
            memberName: this.formInline.memberName,
            endTimeE: this.formInline.endTimeE,
            endTimeS: this.formInline.endTimeS,
            startTimeE: this.formInline.startTimeE,
            startTimeS: this.formInline.startTimeS
          }
        }).then(response => {
          this.download(response)
        })
      } else {
        applyChagneDetailExcel({
          capacity: 10,
          page: this.currentPage,
          model: {
            applyId: this.dataId,
            applyStatus: this.formInline.applyStatus,
            duId: this.formInline.duId,
            workTypeId: this.formInline.workTypeId,
            memberName: this.formInline.memberName,
            endTimeE: this.formInline.endTimeE,
            endTimeS: this.formInline.endTimeS,
            startTimeE: this.formInline.startTimeE,
            startTimeS: this.formInline.startTimeS,
            type: this.formInline.type
          }
        }).then(response => {
          this.download(response)
        })
      }
    },
    getList () {
      if (this.activeName === '0') {
        applyDetailPage({
          capacity: 10,
          page: this.currentPage,
          model: {
            applyId: this.dataId,
            applyStatus: this.formInline.applyStatus,
            duId: this.formInline.duId,
            workTypeId: this.formInline.workTypeId,
            memberName: this.formInline.memberName,
            endTimeE: this.formInline.endTimeE,
            endTimeS: this.formInline.endTimeS,
            startTimeE: this.formInline.startTimeE,
            startTimeS: this.formInline.startTimeS
          }
        }).then(res => {
          this.list = res.records
          this.total = res.total
          this.$nextTick(() => {
            console.log(this.$refs.table)
            if (this.$refs.table && this.$refs.table.doLayout) {
              this.$refs.table.doLayout()
            }
          })
        })
      } else {
        fetchList({
          capacity: 10,
          page: this.currentPage,
          model: {
            applyId: this.dataId,
            status: this.formInline.applyStatus,
            endTimeE: this.formInline.endTimeS,
            endTimeS: this.formInline.startTimeS,
            type: this.formInline.type
          }
        }).then(res => {
          if (this.activeName === '1') {
            this.list1 = res.records
          } else if (this.activeName === '2') {
            this.list2 = res.records
          }
          this.total = res.total
          this.$nextTick(() => {
            console.log(this.$refs.table)
            if (this.$refs.table && this.$refs.table.doLayout) {
              this.$refs.table.doLayout()
            }
          })
        })
      }
    },
    handleClick (e) {
      this.activeName = e.index
      if (e.index === '1') {
        this.formInline.type = 0
      } else if (e.index === '2') {
        this.formInline.type = 1
      }
      this.resetting()
    },
    goSign () {
      getSignLink(this.dataId).then(res => {
        setTimeout(() => {
          window.open(res)
        }, 500)
      }).catch(err => {
        this.$tip.apiFailed(err)
      })
    },
    viewToubaodan () {
      if (this.model.toubaodanSignedFile && this.model.toubaodanSignedFile.fileurlFull) {
        setTimeout(() => {
          window.open(this.model.toubaodanSignedFile.fileurlFull)
        }, 500)
      } else if (this.model.toubaodanFile && this.model.toubaodanFile.fileurlFull) {
        setTimeout(() => {
          window.open(this.model.toubaodanFile.fileurlFull)
        }, 500)
      }
    },
    viewBaoxiandan () {
      if (this.model.baoxiandanFile && this.model.baoxiandanFile.fileurlFull) {
        window.open(this.model.baoxiandanFile.fileurlFull)
      }
    },
    viewFanganshu () {
      if (this.model.fanganFile && this.model.fanganFile.fileurlFull) {
        window.open(this.model.fanganFile.fileurlFull)
      }
    },
    viewShenqingdan () {
      if (this.model.shenqingdanFile && this.model.shenqingdanFile.fileurlFull) {
        window.open(this.model.shenqingdanFile.fileurlFull)
      }
    },
    handleSizeChange (val) {
      console.log(val)
    },
    handleCurrentChange (val) {
      console.log(val)
      this.currentPage = val
      this.getList()
    },
    onSubmit () {
    },
    getDetail () {
      getDetail(this.dataId).then(res => {
        this.model = res
        this.tableData = new Array()
        this.tableData.push(res)
        console.log(this.tableData)
        this.activities = res.applyLogList
      }).catch(err => {
      })
    },
    successEvent () {
      // this.visible=false
      this.getDetail()
      this.$emit('success')
    }
  }
}
</script>
<style scoped>
 ::v-deep .el-tabs__item{
    font-weight: 600;
 }
</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>
company/src/components/business/operaverifyPhoneNumberWindew.vue
@@ -22,80 +22,80 @@
</template>
<script>
    import BaseOpera from '@/components/base/BaseOpera'
    import GlobalWindow from '@/components/common/GlobalWindow'
    import { sendSms, validateCode } from '@/api/business/smsEmail'
    import { mapState } from 'vuex'
    export default {
        name: 'operaverifyPhoneNumberWindew',
        extends: BaseOpera,
        components: { GlobalWindow },
        data () {
            return {
                form: {
                    phone: this.$store.state.userInfo.company.phone,
                    code: ''
                },
                rules: {
                    code: [
                        { required: true, message: '请输入验证码' }
                    ]
                },
                num: 0,
                timer: null
            }
        },
        computed: {
            ...mapState(['userInfo'])
        },
        methods: {
            open (title) {
                this.title = title
                this.num = 0
                clearInterval(this.timer)
                this.timer = null
                this.visible = true
                this.$nextTick(() => {
                    this.$refs.form.resetFields()
                })
            },
            send () {
                sendSms({
                    phone: this.form.phone
                }).then(res => {
                    this.num = 60
                    this.setTime()
                })
            },
            setTime () {
                this.timer = setInterval(() => {
                    if (this.num === 0) {
                        clearInterval(this.timer)
                        this.timer = null
                        return
                    }
                    this.num = this.num - 1
                }, 1000)
            },
            confirm () {
                this.$refs.form.validate((valid) => {
                    if (!valid) {
                        return
                    }
                    this.isWorking = true
                    validateCode({
                        code: this.form.code
                    }).then(res => {
                        this.visible = false
                        this.$tip.apiSuccess('操作成功')
                        this.$emit('success')
                    }).catch(e => {
                        this.$tip.apiFailed(e)
                    }).finally(() => {
                        this.isWorking = false
                    })
                })
            }
        }
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import { sendSms, validateCode } from '@/api/business/smsEmail'
import { mapState } from 'vuex'
export default {
  name: 'operaverifyPhoneNumberWindew',
  extends: BaseOpera,
  components: { GlobalWindow },
  data () {
    return {
      form: {
        phone: this.$store.state.userInfo.company.phone,
        code: ''
      },
      rules: {
        code: [
          { required: true, message: '请输入验证码' }
        ]
      },
      num: 0,
      timer: null
    }
  },
  computed: {
    ...mapState(['userInfo'])
  },
  methods: {
    open (title) {
      this.title = title
      this.num = 0
      clearInterval(this.timer)
      this.timer = null
      this.visible = true
      this.$nextTick(() => {
        this.$refs.form.resetFields()
      })
    },
    send () {
      sendSms({
        phone: this.form.phone
      }).then(res => {
        this.num = 60
        this.setTime()
      })
    },
    setTime () {
      this.timer = setInterval(() => {
        if (this.num === 0) {
          clearInterval(this.timer)
          this.timer = null
          return
        }
        this.num = this.num - 1
      }, 1000)
    },
    confirm () {
      this.$refs.form.validate((valid) => {
        if (!valid) {
          return
        }
        this.isWorking = true
        validateCode({
          code: this.form.code
        }).then(res => {
          this.visible = false
          this.$tip.apiSuccess('操作成功')
          this.$emit('success')
        }).catch(e => {
          this.$tip.apiFailed(e)
        }).finally(() => {
          this.isWorking = false
        })
      })
    }
  }
}
</script>
company/src/components/common/MenuSelect.vue
@@ -43,6 +43,9 @@
    }
  },
  watch: {
    type: function (newVal, oldVal) {
      this.type = newVal
    },
    excludeId () {
      this.fetchData()
    }
@@ -50,7 +53,7 @@
  methods: {
    // èŽ·å–æ‰€æœ‰èœå•
    fetchData () {
      if (this.type == '1' || this.type == '2')  {
      if (this.type == '1' || this.type == '2') {
        fetchTree1(this.type)
          .then(records => {
            this.data = []
company/src/components/common/UploadFile.vue
@@ -1,6 +1,7 @@
<template>
  <div>
    <el-upload
      ref="uploadFileBtn"
      class="upload-demo"
      :accept="uploadData.fileTyp"
      :action="uploadImgUrl"
@@ -11,8 +12,8 @@
      :on-error="uploadError"
      :before-upload="beforeFileUpload"
      :file-list="fileList">
    <el-button size="small" type="primary">点击上传</el-button>
    <div slot="tip" class="el-upload__tip">只能上传{{ uploadData.fileType }}文件,且不超过5mb</div>
    <el-button size="small" type="primary"  >点击上传</el-button>
    <div style="display: inline-block"  slot="tip" class="el-upload__tip">(只能上传{{ uploadData.fileType }}文件,且不超过5mb)</div>
  </el-upload>
  </div>
@@ -21,6 +22,10 @@
<script>
export default {
  props: {
    fileList:{
      type: Array,
      default: () => []
    },
    file: {
      type: Object,
      default: () => {}
@@ -28,40 +33,50 @@
    tipsLabel: '',
    customStyle: {
      type: String,
    default: 'width: 190px; height: 190px;'
      default: 'width: 190px; height: 190px;'
    },
    uploadData: Object
  },
  data() {
    return {
      fileList:null,
      // fileList:[],
      uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/upload?folder='+this.uploadData.folder
    }
  },
  watch: {
    fileList (nv,ov) {
      if(this.fileList ==null){
        this.fileList = new Array();
      }
     // alert(this.fileList)
    }
  },
  methods: {
    removes() {
      this.$emit('remove')
    },
    // ä¸Šä¼ å›¾ç‰‡
    handleExceed(){},
    handleExceed(){
      this.$message.error('只允许上传1个文件,请删除已传文件,重试!')
    },
    handleFileSuccess(res, file) {
      if (res.code == 200) {
        let { data } = res
        // this.fileList = [{name: data.originname, url: data.url }]
        this.$message.success('上传成功')
        this.$emit('uploadSuccess', { fileurl: data.imgaddr, fileurlFull: data.url, name: data.originname })
        this.$emit('uploadSuccess', { fileurl: data.imgaddr,  fileurlFull: data.url, name: data.originname })
      } else {
        this.$tip.apiFailed('上传失败')
        this.$message.apiFailed('上传失败')
      }
      this.$emit('uploadEnd')
    },
    uploadError() {
      this.$tip.apiFailed('上传失败')
      this.$message.apiFailed('上传失败')
      this.$emit('endUpload')
    },
    // // æ‹¦æˆª
    beforeFileUpload(file) {
      this.$emit('uploadBegin')
      return true
    }
@@ -81,7 +96,7 @@
  cursor: pointer;
  position: relative;
  width: $image-width;
  height: $image-width;
  height: auto;
  overflow: hidden;
}
.avatar-uploader .el-upload:hover {
company/src/views/business/insuranceApplyShop.vue
@@ -4,6 +4,7 @@
        <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
            <el-form-item label="保单状态" prop="statusCollect">
                <el-select v-model="searchForm.statusCollect" placeholder="请选择" @keypress.enter.native="search">
<<<<<<< HEAD
                    <el-option label="待审核" value="0"></el-option>
                    <el-option label="待出单" value="1"></el-option>
                    <el-option label="待签署" value="7"></el-option>
@@ -12,6 +13,15 @@
                    <el-option label="已退回" value="4"></el-option>
                    <el-option label="退回申请中" value="5"></el-option>
                    <el-option label="已关闭" value="6"></el-option>
=======
                    <el-option label="待签署" value="28"></el-option>
                    <el-option label="待审核" value="22"></el-option>
                  <el-option label="待出单" value="23"></el-option>
                  <el-option label="已退回" value="24"></el-option>
                  <el-option label="已关闭" value="25"></el-option>
                  <el-option label="投保中" value="26"></el-option>
                  <el-option label="保障中" value="27"></el-option>
>>>>>>> 2ce7d1d9934f97604ff00b1789dd3628d814dd60
                </el-select>
            </el-form-item>
            <el-form-item label="投保企业" prop="companyId">
@@ -64,7 +74,7 @@
                </el-table-column>
                <el-table-column prop="statusInfo" label="投保状态" min-width="100px">
                  <template slot-scope="{row}">
                    <span :class="'apply-status'+row.status" >{{row.statusInfo}}</span>
                    <span :class="'apply-status'+row.statusCollect" >{{row.statusInfo}}</span>
                  </template>
                </el-table-column>
                <el-table-column prop="companyName" label="投保企业" min-width="100px"></el-table-column>
@@ -79,7 +89,7 @@
                    fixed="right"
                >
                    <template slot-scope="{row}">
                        <el-button type="text" @click="$refs.operaInsuranceApplyShopWindow.open('委托投保详情', row)" icon="el-icon-edit" v-permissions="['business:insuranceapply:update']">查看详情</el-button>
                        <el-button type="text" @click="$refs.operaWtbApplyShopWindow.open('委托投保详情', row)" icon="el-icon-edit" v-permissions="['business:insuranceapply:update']">查看详情</el-button>
                    </template>
                </el-table-column>
            </el-table>
@@ -91,7 +101,7 @@
            </pagination>
        </template>
        <!-- æ–°å»º/修改 -->
        <OperaInsuranceApplyShopWindow ref="operaInsuranceApplyShopWindow" @success="handlePageChange"/>
        <OperaWtbApplyShopWindow ref="operaWtbApplyShopWindow" @success="handlePageChange"/>
    </TableLayout>
</template>
@@ -101,11 +111,11 @@
import Pagination from '@/components/common/Pagination'
import { all as solutionAll } from '@/api/business/solutions'
import { pageAll as companyAll } from '@/api/business/company'
import OperaInsuranceApplyShopWindow from '@/components/business/OperaInsuranceApplyShopWindow'
import OperaWtbApplyShopWindow from '@/components/business/OperaWtbApplyShopWindow'
export default {
  name: 'InsuranceApply',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaInsuranceApplyShopWindow },
  components: { TableLayout, Pagination, OperaWtbApplyShopWindow },
  data () {
    return {
      // æœç´¢
company/src/views/enterprise/insuranceApply.vue
@@ -12,6 +12,7 @@
                    <el-option label="已退回" value="4"></el-option>
                    <el-option label="退回申请中" value="5"></el-option>
                    <el-option label="已关闭" value="6"></el-option>
                    <el-option label="投保中" value="25"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="保险方案" prop="baseSolutionId">
@@ -61,6 +62,12 @@
                  </template>
                </el-table-column>
                <el-table-column prop="solutionsName" label="保险方案"></el-table-column>
                <el-table-column label="类型">
                  <template slot-scope="{row}">
                    <span style="color: #00BA92" v-if="row.solutionType == 1">委托投保</span>
                    <span style="color: #F95601;"  v-else>直接投保</span>
                  </template>
                </el-table-column>
                <el-table-column prop="insureNum" label="投保人数"></el-table-column>
                <el-table-column label="投保时长(天)">
                    <template slot-scope="{row}">
@@ -78,7 +85,7 @@
                    fixed="right"
                >
                    <template slot-scope="{row}">
                        <el-button type="text" @click="$refs.OperaInsuranceApplyDetails.open('投保详情', { id: row.id })" v-permissions="['business:insuranceapply:update']">查看详情</el-button>
                        <el-button type="text" @click="godetail(row)" v-permissions="['business:insuranceapply:update']">查看详情</el-button>
                    </template>
                </el-table-column>
            </el-table>
@@ -91,6 +98,7 @@
        </template>
        <!--    æ–°å¢žæŠ•保    -->
        <OperaInsuranceApplyWindow ref="OperaInsuranceApplyWindow" @success="handlePageChange" />
        <OperaWtbApplyShopWindow ref="OperaWtbApplyShopWindow" @success="handlePageChange" />
        <!--    æŠ•保详情    -->
        <OperaInsuranceApplyDetails ref="OperaInsuranceApplyDetails" @success="handlePageChange" />
    </TableLayout>
@@ -102,40 +110,48 @@
import Pagination from '@/components/common/Pagination'
import OperaInsuranceApplyWindow from '@/components/enterprise/OperaInsuranceApplyWindow'
import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
import OperaWtbApplyShopWindow from '@/components/business/OperaWtbApplyShopWindow'
import { all as solutionAll} from '@/api/business/solutions'
import { all as solutionAll } from '@/api/business/solutions'
export default {
    name: 'InsuranceApply',
    extends: BaseTable,
    components: { TableLayout, Pagination, OperaInsuranceApplyWindow, OperaInsuranceApplyDetails },
    data () {
        return {
            // æœç´¢
            searchForm: {
                createTimeS: '',
                createTimeE: '',
                baseSolutionId: '',
                statusCollect: ''
            },
            solutionList:[]
        }
    },
    created () {
        this.config({
            module: '投保申请信息表',
            api: '/business/insuranceApply',
            'field.id': 'id',
            'field.main': 'id'
        })
        this.search()
        this.loadSelectList()
    },
    methods:{
        loadSelectList() {
          solutionAll({ dataType:2}).then(res => {
              this.solutionList = res
            })
        }
  name: 'InsuranceApply',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaInsuranceApplyWindow, OperaInsuranceApplyDetails,OperaWtbApplyShopWindow },
  data () {
    return {
      // æœç´¢
      searchForm: {
        createTimeS: '',
        createTimeE: '',
        baseSolutionId: '',
        statusCollect: ''
      },
      solutionList: []
    }
  },
  created () {
    this.config({
      module: '投保申请信息表',
      api: '/business/insuranceApply',
      'field.id': 'id',
      'field.main': 'id'
    })
    this.search()
    this.loadSelectList()
  },
  methods: {
    godetail (row) {
      if (row.solutionType == 1) {
        this.$refs.OperaWtbApplyShopWindow.open('委托投保详情', { id: row.id })
      } else {
        this.$refs.OperaInsuranceApplyDetails.open('投保详情', { id: row.id })
      }
    },
    loadSelectList () {
      solutionAll({ dataType: 2 }).then(res => {
        this.solutionList = res
      })
    }
  }
}
</script>
company/src/views/enterprise/myPolicy.vue
@@ -87,7 +87,13 @@
                  </template>
                </el-table-column>
                <el-table-column prop="solutionsName" label="保险方案"></el-table-column>
                <el-table-column label="保单号">
              <el-table-column label="类型">
                <template slot-scope="{row}">
                  <span style="color: #00BA92" v-if="row.solutionType == 1">委托投保</span>
                  <span style="color: #F95601;"  v-else>直接投保</span>
                </template>
              </el-table-column>
              <el-table-column label="保单号">
                    <template slot-scope="{row}">
                        <span>{{row.code ? row.code : '-'}}</span>
                    </template>
@@ -110,7 +116,7 @@
                    fixed="right"
                >
                    <template slot-scope="{row}">
                        <el-button type="text" @click="$refs.OperaInsuranceApplyDetails.open('投保详情', { id: row.id })" v-permissions="['business:insuranceapply:update']">查看详情</el-button>
                        <el-button type="text" @click="godetail(row)" v-permissions="['business:insuranceapply:update']">查看详情</el-button>
<!--                        <template v-if="row.statusCollect === 2">-->
<!--                            <el-button type="text" @click="$refs.additionSubtractionApplication.open('加减保申请', { id: row.id })">加减保申请</el-button>-->
<!--                        </template>-->
@@ -128,6 +134,7 @@
        <OperaInsuranceApplyWindow ref="OperaInsuranceApplyWindow" @success="handlePageChange" />
        <!--    æŠ•保详情    -->
        <OperaInsuranceApplyDetails ref="OperaInsuranceApplyDetails" @success="handlePageChange" />
      <OperaWtbApplyShopWindow ref="OperaWtbApplyShopWindow" @success="handlePageChange" />
        <!--    åŠ å‡ä¿ç”³è¯·    -->
        <additionSubtractionApplication ref="additionSubtractionApplication" @success="handlePageChange" />
        <!--    ç»­ä¿å¼¹çª—    -->
@@ -143,6 +150,7 @@
    import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
    import additionSubtractionApplication from '@/components/enterprise/additionSubtractionApplication'
    import renewalInsurance from '@/components/enterprise/renewalInsurance'
    import OperaWtbApplyShopWindow from '@/components/business/OperaWtbApplyShopWindow'
    import { all as solutionAll} from '@/api/business/solutions'
    import { getCaptcha, closeApplyNotice } from '@/api/business/notices'
@@ -155,7 +163,8 @@
            OperaInsuranceApplyWindow,
            OperaInsuranceApplyDetails,
            renewalInsurance,
            additionSubtractionApplication
            additionSubtractionApplication,
          OperaWtbApplyShopWindow
        },
        data () {
            return {
@@ -190,6 +199,13 @@
            this.getNum()
        },
        methods:{
          godetail (row) {
            if (row.solutionType == 1) {
              this.$refs.OperaWtbApplyShopWindow.open('委托投保详情', { id: row.id })
            } else {
              this.$refs.OperaInsuranceApplyDetails.open('投保详情', { id: row.id })
            }
          },
            see() {
                this.searchForm.statusCollect = '7'
                this.search()
server/company/src/main/java/com/doumee/api/business/ApplyChangeController.java
@@ -8,10 +8,7 @@
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.utils.Constants;
import com.doumee.dao.business.dto.ApplyChangeCyclePriceDTO;
import com.doumee.dao.business.dto.ApplyChangeOptDTO;
import com.doumee.dao.business.dto.CountCyclePriceDTO;
import com.doumee.dao.business.dto.InsuranceApplyOptDTO;
import com.doumee.dao.business.dto.*;
import com.doumee.dao.business.model.ApplyChange;
import com.doumee.dao.business.vo.CountCyclePriceVO;
import com.doumee.service.business.ApplyChangeService;
@@ -134,10 +131,10 @@
    }
    @ApiOperation("投保确认书签章业务")
    @GetMapping("/getChangeMemberListOnlineSignLink/{id}")
    @PostMapping("/getChangeMemberListOnlineSignLink")
    @RequiresPermissions("business:applychange:query")
    public ApiResponse<String> getChangeMemberListOnlineSignLink(@PathVariable Integer id) {
        return ApiResponse.success(applyChangeService.getChangeMemberListOnlineSignLink(id));
    public ApiResponse<String> getChangeMemberListOnlineSignLink(@RequestBody SmsCheckDTO smsCheckDTO) {
        return ApiResponse.success(applyChangeService.getChangeMemberListOnlineSignLink(smsCheckDTO));
    }
}
server/company/src/main/java/com/doumee/api/business/InsuranceApplyController.java
@@ -9,6 +9,7 @@
import com.doumee.dao.business.dto.CountCyclePriceDTO;
import com.doumee.dao.business.dto.InsuranceApplyOptDTO;
import com.doumee.dao.business.dto.InsuranceApplyQueryDTO;
import com.doumee.dao.business.dto.SmsCheckDTO;
import com.doumee.dao.business.model.InsuranceApply;
import com.doumee.dao.business.vo.CountCyclePriceVO;
import com.doumee.service.business.InsuranceApplyService;
@@ -151,20 +152,24 @@
    }
    @ApiOperation("投保确认书签章业务")
    @GetMapping("/getSignTBQRSLink/{id}")
    @ApiOperation("方案确认书签章业务")
    @PostMapping("/signTBQRSLink")
    @RequiresPermissions("business:insuranceapply:query")
    public ApiResponse<String> getSignTBQRSLink(@PathVariable Integer id) {
        return ApiResponse.success(insuranceApplyService.getSignTBQRSLink(id));
    public ApiResponse<String> getSignTBQRSLink(@RequestBody SmsCheckDTO smsCheckDTO) {
        return ApiResponse.success(insuranceApplyService.getSignTBQRSLink(smsCheckDTO));
    }
    @ApiOperation("人员名单签章")
    @PostMapping("/getMemberListOnlineSignLink")
    @RequiresPermissions("business:insuranceapply:query")
    public ApiResponse<String> getMemberListOnlineSignLink(@RequestBody SmsCheckDTO smsCheckDTO) {
        return ApiResponse.success(insuranceApplyService.getMemberListOnlineSignLink(smsCheckDTO));
    }
    @ApiOperation("人员名单签章")
    @GetMapping("/getMemberListOnlineSignLink/{id}")
    @ApiOperation("投保申请单签章业务")
    @PostMapping("/getSignWTBTBDLink")
    @RequiresPermissions("business:insuranceapply:query")
    public ApiResponse<String> getMemberListOnlineSignLink(@PathVariable Integer id) {
        return ApiResponse.success(insuranceApplyService.getMemberListOnlineSignLink(id));
    public ApiResponse<String> getSignWTBTBDLink(@RequestBody SmsCheckDTO smsCheckDTO) {
        return ApiResponse.success(insuranceApplyService.getSignWTBTBDLink(smsCheckDTO));
    }
server/company/src/main/java/com/doumee/api/business/UnionApplyController.java
@@ -82,55 +82,6 @@
        ExcelExporter.build(UnionApply.class).export(unionApplyService.findPage(pageWrap).getRecords(), "合并投保单信息表", response);
    }
    @ApiOperation("根据ID查询")
    @GetMapping("/{id}")
    @RequiresPermissions("business:unionapply:query")
    public ApiResponse findById(@PathVariable Integer id) {
        return ApiResponse.success(unionApplyService.findById(id));
    }
    @PreventRepeat
    @ApiOperation("创建合并单")
    @PostMapping("/merge")
    @RequiresPermissions("business:unionapply:create")
    public ApiResponse merge(@RequestBody SaveUnionApplyDTO saveUnionApplyDTO) {
        return ApiResponse.success(unionApplyService.merge(saveUnionApplyDTO));
    }
    @ApiOperation("关闭合并单")
    @GetMapping("/close")
    @RequiresPermissions("business:unionapply:close")
    public ApiResponse close(@RequestParam Integer id) {
        unionApplyService.cancelMerge(id);
        return ApiResponse.success(null);
    }
    @PreventRepeat
    @ApiOperation("上传投保单")
    @PostMapping("/uploadToubaodan")
    @RequiresPermissions("business:unionapply:create")
    public ApiResponse uploadToubaodan(@RequestBody UploadMultifileDTO uploadMultifileDTO) {
        unionApplyService.uploadToubaodan(uploadMultifileDTO);
        return ApiResponse.success(null);
    }
    @ApiOperation("签署申请单")
    @GetMapping("/getSignLink")
    @RequiresPermissions("business:unionapply:query")
    public ApiResponse getSignLink(@RequestParam Integer id) {
        unionApplyService.getSignLink(id);
        return ApiResponse.success(null);
    }
    @ApiOperation("上传保险单")
    @PostMapping("/uploadBXD")
    @RequiresPermissions("business:unionchange:query")
    public ApiResponse uploadBXD(@RequestBody UnionApplyBXDDTO unionApplyBXDDTO) {
        unionApplyService.uploadBXD(unionApplyBXDDTO);
        return ApiResponse.success(null);
    }
}
server/company/src/main/java/com/doumee/api/business/UnionChangeController.java
@@ -90,40 +90,4 @@
        return ApiResponse.success(unionChangeService.findById(id));
    }
    @PreventRepeat
    @ApiOperation("创建合并单")
    @PostMapping("/merge")
    @RequiresPermissions("business:unionchange:create")
    public ApiResponse merge(@RequestBody SaveUnionChangeDTO saveUnionChangeDTO) {
        return ApiResponse.success(unionChangeService.merge(saveUnionChangeDTO));
    }
    @ApiOperation("关闭合并单")
    @GetMapping("/close")
    @RequiresPermissions("business:unionchange:close")
    public ApiResponse close(@RequestParam Integer id) {
        unionChangeService.cancelMerge(id);
        return ApiResponse.success(null);
    }
    @ApiOperation("签署申请单")
    @GetMapping("/getSignLink")
    @RequiresPermissions("business:unionchange:query")
    public ApiResponse getSignLink(@RequestParam Integer id) {
        unionChangeService.getSignLink(id);
        return ApiResponse.success(null);
    }
    @ApiOperation("上传保险单")
    @PostMapping("/uploadBXD")
    @RequiresPermissions("business:unionchange:query")
    public ApiResponse uploadBXD(@RequestBody UnionChangeBXDDTO unionChangeBXDDTO) {
        unionChangeService.uploadBXD(unionChangeBXDDTO);
        return ApiResponse.success(null);
    }
}
server/service/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java
@@ -3,10 +3,8 @@
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.utils.Constants;
import com.doumee.dao.business.model.ApplyChagneDetail;
import com.doumee.dao.business.model.ApplyChange;
import com.doumee.dao.business.model.ApplyDetail;
import com.doumee.dao.business.model.InsuranceApply;
import com.doumee.dao.business.model.*;
import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
@@ -26,6 +24,7 @@
import java.nio.charset.Charset;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
 * Excel导出实现
@@ -1278,4 +1277,376 @@
        private Field field;
    }
    /**
     * å¯¼å‡º åˆå¹¶å• æ¢åŽ‚ ç”³è¯·è¯¦å•
     * @param data æ•°æ®
     * @param sheetName Sheet名称
     */
    public String exportUnionChangeOtherUnitExcelToPdf (UnionChange data, String sheetName) {
        SXSSFWorkbook sxssfWorkbook;
        try {
            sxssfWorkbook = new SXSSFWorkbook();
            Sheet sheet = sxssfWorkbook.createSheet(sheetName);
            for (int i = 0; i < 8; 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));
            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++) {
                if(i>0){
                    title.createCell(i).setCellValue("");
                }
                configTitleCell(sxssfWorkbook,title.getCell(i));
            }
            Row header1 = sheet.createRow(1);
            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("保险生效止期");
            header1.createCell(7).setCellValue("换厂人数");
            header1.createCell(8).setCellValue("期望批单生效期");
            for (int i = 0; i < 9; i++) {
                configFirstCell(sxssfWorkbook,header1.getCell(i));
            }
            sheet.addMergedRegion(new CellRangeAddress(1  ,1,1,3));
            Row header2 = sheet.createRow(2);
            header2.createCell(0).setCellValue(data.getShopName());
            header2.createCell(1).setCellValue(data.getSolutionsName());
            header2.createCell(2).setCellValue("");
            header2.createCell(3).setCellValue("");
            header2.createCell(4).setCellValue(data.getApplyCode());
            header2.createCell(5).setCellValue(com.doumee.core.utils.DateUtil.getPlusTime2(data.getStartTime()));
            header2.createCell(6).setCellValue(com.doumee.core.utils.DateUtil.getPlusTime2(data.getEndTime()));
            header2.createCell(7).setCellValue(data.getApplyChagneDetailList().stream().filter(i->i.getType().equals(Constants.TWO)).collect(Collectors.toList()).size());
            header2.createCell(8).setCellValue(com.doumee.core.utils.DateUtil.getPlusTime2(data.getApplyStartTime()));
            sheet.addMergedRegion(new CellRangeAddress(2  ,2,1,3));
            for (int i = 0; i < 9; i++) {
                configDataCell(sxssfWorkbook,header2.getCell(i));
            }
            Row header3 = sheet.createRow(3);
            header3.createCell(0).setCellValue("被保险人");
            header3.createCell(1).setCellValue(data.getCompanyNames());
            header3.createCell(2).setCellValue("");
            header3.createCell(3).setCellValue("");
            header3.createCell(4).setCellValue("");
            header3.createCell(5).setCellValue("");
            header3.createCell(6).setCellValue("");
            header3.createCell(7).setCellValue("");
            header3.createCell(8).setCellValue("");
            for (int i = 0; i < 9; i++) {
                configFirstCell(sxssfWorkbook,header3.getCell(i));
            }
            sheet.addMergedRegion(new CellRangeAddress(3  ,3,1,8));
            Row header4 = sheet.createRow(4);
            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.createCell(7).setCellValue("更改后派遣单位");
            header4.createCell(8).setCellValue("更改后所属工种");
            for (int i = 0; i < 9; i++) {
                configFirstCell(sxssfWorkbook,header4.getCell(i));
            }
            List<ApplyChagneDetail> otherChangeDetailList = data.getApplyChagneDetailList().stream().filter(i->i.getType().equals(Constants.TWO)).collect(Collectors.toList());
            Integer row = 4;
            if(CollectionUtils.isNotEmpty(otherChangeDetailList)){
                row = row + 1;
                Row header5 = sheet.createRow(row);
                header5.createCell(0).setCellValue("序号");
                header5.createCell(1).setCellValue("员工姓名");
                header5.createCell(2).setCellValue("性别");
                header5.createCell(3).setCellValue("身份证号");
                header5.createCell(4).setCellValue("被保险人");
                header5.createCell(5).setCellValue("原派遣单位");
                header5.createCell(6).setCellValue("原所属工种");
                header5.createCell(7).setCellValue("更改后派遣单位");
                header5.createCell(8).setCellValue("更改后所属工种");
                for (int i = 0; i < 9; i++) {
                    configFirstCell(sxssfWorkbook,header5.getCell(i));
                }
                for (int rowIndex = 0; rowIndex < otherChangeDetailList.size(); rowIndex++) {
                    row = row + 1;
                    Row header6 = sheet.createRow(row);
                    ApplyChagneDetail applyChagneDetail = otherChangeDetailList.get(rowIndex);
                    header6.createCell(0).setCellValue(rowIndex + 1);
                    header6.createCell(1).setCellValue(applyChagneDetail.getMemberName());
                    header6.createCell(2).setCellValue(Constants.equalsInteger(applyChagneDetail.getSex(),0)?"男":(Constants.equalsInteger(applyChagneDetail.getSex(),1)?"女":"-"));
                    header6.createCell(3).setCellValue(applyChagneDetail.getIdcardNo());
                    header6.createCell(4).setCellValue(applyChagneDetail.getCompanyName());
                    header6.createCell(5).setCellValue(applyChagneDetail.getOldDuName());
                    header6.createCell(6).setCellValue(applyChagneDetail.getOldWorkTypeName());
                    header6.createCell(7).setCellValue(applyChagneDetail.getDuName());
                    header6.createCell(8).setCellValue(applyChagneDetail.getWorkTypeName());
                    for (int i = 0; i < 9; i++) {
                        configFirstCell(sxssfWorkbook,header6.getCell(i));
                    }
                }
            }
            int rowIndex =  row + 1 ;
            Row header6= sheet.createRow(rowIndex);
            header6.createCell(0).setCellValue("投保企业申明:\n" +
                    "1、在申请书上填写的一切内容属实,否则本企业承担一切法律责任。\n" +
                    "2、由于变更受益人产生的法律纠纷本企业愿承担一切法律责任。\n" +
                    "3、本申请表的签章为本企业亲自签署,如由此产生的法律纠纷本企业愿承担一切法律责任。\n");
            for (int i = 1; i < 9; i++) {
                header6.createCell(i).setCellValue("");
            }
            for (int i =0; i < 9; i++) {
                if(i>0){
                    header6.createCell(i).setCellValue("");
                }
                configInfoCell(sxssfWorkbook,header6.getCell(i),HorizontalAlignment.LEFT);
            }
            header6.setHeight((short) 2000);
            sheet.addMergedRegion(new CellRangeAddress(rowIndex ,rowIndex,0,8));
            Row header7= sheet.createRow(rowIndex+1);
            header7.setHeight((short) 3000);
            header7.createCell(0).setCellValue("投保人签章 ï¼š                            \n \n \n" +"日期:     å¹´     æœˆ     æ—¥    ");
            for (int i =0; i < 9; i++) {
                if(i>0){
                    header7.createCell(i).setCellValue("");
                }
                configInfoCell(sxssfWorkbook,header7.getCell(i),HorizontalAlignment.RIGHT);
            }
            sheet.addMergedRegion(new CellRangeAddress(rowIndex+1 ,rowIndex+1,0,8));
            //临时缓冲区
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            //创建临时文件
            sxssfWorkbook.write(out);
            byte [] bookByteAry = out.toByteArray();
            InputStream     in = new ByteArrayInputStream(bookByteAry);
            String tempExcel = saveIsToFile(in);
            String tempPdf =System.getProperty("java.io.tmpdir")+File.separator+UUID.randomUUID().toString()+".pdf";
//            ExcelToPdfTool.excelToPdf(in,tempPdf);//转PDF
            ExcelToPdfTool.excelToPdf(tempExcel,tempPdf);//转PDF
            File f = new File(tempPdf);
            if(f!=null && f.isFile() && f.length()>0){
                return tempPdf;
            }
        } catch (Exception e) {
            // throw new BusinessException(ResponseStatus.EXPORT_EXCEL_ERROR, e);
        }
        return null;
    }
    /**
     * å¯¼å‡º åˆå¹¶å•加减保申请详单
     * @param data æ•°æ®
     * @param sheetName Sheet名称
     */
    public String exportUnionChangeExcelToPdf (UnionChange data, String sheetName) {
        SXSSFWorkbook sxssfWorkbook;
        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);
            }
            sheet.createFreezePane(0, 1);
            sheet.addMergedRegion(new CellRangeAddress(0   ,0,0,11));
            Row title = sheet.createRow(0);
            title.setHeight((short) 2000);
            for (int i = 0; i < 12; i++) {
                title.createCell(i).setCellValue(i==0?sheetName:"");
                configTitleCell(sxssfWorkbook,title.getCell(i));
            }
            Row header1 = sheet.createRow(1);
            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("减保人数");
            header1.createCell(7).setCellValue("期望批单生效期");
            for (int i = 0; i < 8; i++) {
                configFirstCell(sxssfWorkbook,header1.getCell(i));
            }
            Row header2 = sheet.createRow(2);
            header2.createCell(0).setCellValue(data.getShopName());
            header2.createCell(1).setCellValue(data.getSolutionsName());
            header2.createCell(2).setCellValue(data.getApplyCode());
            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.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()));
            for (int i = 0; i < 8; i++) {
                configDataCell(sxssfWorkbook,   header2.getCell(i));
            }
            Row header3 = sheet.createRow(3);
            header3.createCell(0).setCellValue("被保险人");
            header3.createCell(1).setCellValue(data.getCompanyNames());
            header3.createCell(2).setCellValue("");
            header3.createCell(3).setCellValue("");
            header3.createCell(4).setCellValue("");
            header3.createCell(5).setCellValue("");
            header3.createCell(6).setCellValue("");
            header3.createCell(7).setCellValue("");
            for (int i = 0; i < 8; i++) {
                configFirstCell(sxssfWorkbook,header3.getCell(i));
            }
            sheet.addMergedRegion(new CellRangeAddress(3  ,3,1,7));
            Integer row = 4;
            List<ApplyChagneDetail> addChangeDetailList = data.getApplyChagneDetailList().stream().filter(i->i.getType().equals(Constants.ZERO)).collect(Collectors.toList());
            if(CollectionUtils.isNotEmpty(addChangeDetailList)){
                Row header4 = sheet.createRow(row);
                header4.createCell(0).setCellValue("加保人员");
                for (int i = 0; i < 8; i++) {
                    configFirstCell(sxssfWorkbook,   header4.getCell(i));
                }
                sheet.addMergedRegion(new CellRangeAddress(row  ,row,0,7));
                row = row + 1;
                Row header5 = sheet.createRow(row);
                header5.createCell(0).setCellValue("序号");
                header5.createCell(1).setCellValue("员工姓名");
                header5.createCell(2).setCellValue("性别");
                header5.createCell(3).setCellValue("身份证号");
                header5.createCell(4).setCellValue("被保险人");
                header5.createCell(5).setCellValue("派遣单位");
                header5.createCell(6).setCellValue("");
                header5.createCell(7).setCellValue("所属工种");
                for (int i = 0; i < 8; i++) {
                    configFirstCell(sxssfWorkbook,header5.getCell(i));
                }
                sheet.addMergedRegion(new CellRangeAddress(row  ,row,5,6));
                for (int rowIndex = 0; rowIndex < addChangeDetailList.size(); rowIndex++) {
                    row = row + 1 ;
                    Row header6 = sheet.createRow(row);
                    ApplyChagneDetail applyChagneDetail = addChangeDetailList.get(rowIndex);
                    header6.createCell(0).setCellValue(rowIndex + 1);
                    header6.createCell(1).setCellValue(applyChagneDetail.getMemberName());
                    header6.createCell(2).setCellValue(Constants.equalsInteger(applyChagneDetail.getSex(),0)?"男":(Constants.equalsInteger(applyChagneDetail.getSex(),1)?"女":"-"));
                    header6.createCell(3).setCellValue(applyChagneDetail.getIdcardNo());
                    header6.createCell(4).setCellValue(applyChagneDetail.getCompanyName());
                    header6.createCell(5).setCellValue(applyChagneDetail.getDuName());
                    header6.createCell(6).setCellValue("");
                    header6.createCell(7).setCellValue(applyChagneDetail.getWorkTypeName());
                    for (int i = 0; i < 8; i++) {
                        configFirstCell(sxssfWorkbook,header6.getCell(i));
                    }
                    sheet.addMergedRegion(new CellRangeAddress(row  ,row,5,6));
                }
            }
            List<ApplyChagneDetail> reduceChangeDetailList = data.getApplyChagneDetailList().stream().filter(i->i.getType().equals(Constants.ONE)).collect(Collectors.toList());
            row = row + 1;
            if(CollectionUtils.isNotEmpty(reduceChangeDetailList)){
                Row header4 = sheet.createRow(row);
                header4.createCell(0).setCellValue("减保人员");
                for (int i = 0; i < 8; i++) {
                    configFirstCell(sxssfWorkbook,   header4.getCell(i));
                }
                sheet.addMergedRegion(new CellRangeAddress(row  ,row,0,7));
                row = row + 1;
                Row header5 = sheet.createRow(row);
                header5.createCell(0).setCellValue("序号");
                header5.createCell(1).setCellValue("员工姓名");
                header5.createCell(2).setCellValue("性别");
                header5.createCell(3).setCellValue("身份证号");
                header5.createCell(4).setCellValue("被保险人");
                header5.createCell(5).setCellValue("派遣单位");
                header5.createCell(6).setCellValue("");
                header5.createCell(7).setCellValue("所属工种");
                for (int i = 0; i < 8; i++) {
                    configFirstCell(sxssfWorkbook,header5.getCell(i));
                }
                sheet.addMergedRegion(new CellRangeAddress(row  ,row,5,6));
                row = row + 1 ;
                for (int rowIndex = 0; rowIndex < reduceChangeDetailList.size(); rowIndex++) {
                    row = row + rowIndex;
                    Row header6 = sheet.createRow(row);
                    ApplyChagneDetail applyChagneDetail = reduceChangeDetailList.get(rowIndex);
                    header6.createCell(0).setCellValue(rowIndex + 1);
                    header6.createCell(1).setCellValue(applyChagneDetail.getMemberName());
                    header6.createCell(2).setCellValue(Constants.equalsInteger(applyChagneDetail.getSex(),0)?"男":(Constants.equalsInteger(applyChagneDetail.getSex(),1)?"女":"-"));
                    header6.createCell(3).setCellValue(applyChagneDetail.getIdcardNo());
                    header6.createCell(4).setCellValue(applyChagneDetail.getCompanyName());
                    header6.createCell(5).setCellValue(applyChagneDetail.getDuName());
                    header6.createCell(6).setCellValue("");
                    header6.createCell(7).setCellValue(applyChagneDetail.getWorkTypeName());
                    for (int i = 0; i < 8; i++) {
                        configFirstCell(sxssfWorkbook,header6.getCell(i));
                    }
                    sheet.addMergedRegion(new CellRangeAddress(row  ,row,5,6));
                }
            }
            int rowIndex = row + 1;
            Row header6= sheet.createRow(rowIndex);
            header6.createCell(0).setCellValue("投保企业申明:\n" +
                    "1、在申请书上填写的一切内容属实,否则本企业承担一切法律责任。\n" +
                    "2、由于变更受益人产生的法律纠纷本企业愿承担一切法律责任。\n" +
                    "3、本申请表的签章为本企业亲自签署,如由此产生的法律纠纷本企业愿承担一切法律责任。\n");
            for (int i = 1; i < 8; i++) {
                header6.createCell(i).setCellValue("");
            }
            for (int i =0; i < 8; i++) {
                if(i>0){
                    header6.createCell(i).setCellValue("");
                }
                configInfoCell(sxssfWorkbook,header6.getCell(i),HorizontalAlignment.LEFT);
            }
            header6.setHeight((short) 2000);
            sheet.addMergedRegion(new CellRangeAddress(rowIndex ,rowIndex,0,11));
            Row header7= sheet.createRow(rowIndex+1);
            header7.setHeight((short) 3000);
            header7.createCell(0).setCellValue("投保人签章 ï¼š                            \n \n \n" +"日期:     å¹´     æœˆ     æ—¥    ");
            for (int i =0; i < 8; i++) {
                if(i>0){
                    header7.createCell(i).setCellValue("");
                }
                configInfoCell(sxssfWorkbook,header7.getCell(i),HorizontalAlignment.RIGHT);
            }
            sheet.addMergedRegion(new CellRangeAddress(rowIndex+1 ,rowIndex+1,0,11));
            //临时缓冲区
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            //创建临时文件
            sxssfWorkbook.write(out);
            byte [] bookByteAry = out.toByteArray();
            InputStream     in = new ByteArrayInputStream(bookByteAry);
            String tempExcel = saveIsToFile(in);
            String tempPdf =System.getProperty("java.io.tmpdir")+File.separator+UUID.randomUUID().toString()+".pdf";
//            ExcelToPdfTool.excelToPdf(in,tempPdf);//转PDF
            ExcelToPdfTool.excelToPdf(tempExcel,tempPdf);//转PDF
            File f = new File(tempPdf);
            if(f!=null && f.isFile() && f.length()>0){
                return tempPdf;
            }
        } catch (Exception e) {
            e.printStackTrace();
            // throw new BusinessException(ResponseStatus.EXPORT_EXCEL_ERROR, e);
        }
        return null;
    }
}
server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -27,7 +27,8 @@
    public static final int ZERO = 0 ;
    public static final int ONE = 1 ;
    public static final int TWO = 2 ;
    public static final int THREE = 3 ;
    public static final int
            THREE = 3 ;
    public static final int SEVEN = 7 ;
    public static final String ACCESS_ID="ACCESS_ID";
    public static final String BUCKETNAME = "BUCKETNAME";
@@ -441,17 +442,14 @@
        HBD_BD_APPLY_PDF(15, "合并单-保单申请表PDF ", "合并单-保单申请表PDF "),
        HBD_BD_SIGNED_PDF(16, "合并单-签署后保单申请表PDF", "合并单-签署后保单申请表PDF"),
        COMPANY_TBD_SIGNED_PDF(17, "合并单-投保单-商户提交(企业签署)", "合并单-签署后保单申请表PDF"),
        SOLUTIONS_CONFIRMATION_LATTER(18, "委托保 - æŠ•保方案确认书", "委托保 - æ–¹æ¡ˆç¡®è®¤ä¹¦"),
        MEMBER_LIST_LATTER(19, "委托保 - æŠ•保人员名单", "委托保 - æ–¹æ¡ˆç¡®è®¤ä¹¦"),
        CHANGE_MEMBER_LIST_LATTER(20, "委托保 - åŠ å‡ä¿äººå‘˜åå•", "委托保 - æ–¹æ¡ˆç¡®è®¤ä¹¦"),
        COMPANY_TBD_SIGNED(17, "合并单-投保单-商户提交", "合并单-投保单-商户提交"),
        SOLUTIONS_CONFIRMATION_LATTER(18, "投保方案确认书", "投保方案确认书"),
        MEMBER_LIST_LATTER(19, "委托保 - æŠ•保人员名单", "委托保 - æŠ•保人员名单"),
        CHANGE_MEMBER_LIST_LATTER(20, "委托保 - åŠ å‡ä¿äººå‘˜åå•", "委托保 - åŠ å‡ä¿äººå‘˜åå•"),
        WTB_BD_DONE_PDF(21, "委托投保单 - åˆå¹¶å•最终保单", "委托投保单 - åˆå¹¶å•最终保单"),
        COMPANY_TBD_SIGNED_PDF(22, "合并单-投保单-商户提交(企业签署)PDF", "合并单-投保单-商户提交(企业签署)PDF"),
        WTB_CA_DONE_PDF(23, "委托加减保/换厂业务 - åˆå¹¶å•最终保单", "委托加减保/换厂业务 - åˆå¹¶å•最终保单"),
        WTB_CONFIRMATION_LATTER(24, "委托保 - æŠ•保方案确认书", "委托保 - æŠ•保方案确认书"),
        ;
        // æˆå‘˜å˜é‡
        private String name;
@@ -709,6 +707,14 @@
        THSQZ(5, "申请退回"),
        YGB(6, "已关闭"),
        DQYQZ(7, "待签署"),
        WTBDQS(28, "待签署"),
        WTBDSH(22, "待审核"),
        WTBDCD(23, "待出单"),
        WTBYTH(24, "已退回"),
        WTBYGB(25, "已关闭"),
        WTBTBZ(26, "投保中"),
        WTBBZZ(27, "保障中"),
        ;
        // æˆå‘˜å˜é‡
        private String name;
@@ -780,6 +786,17 @@
        CA_JIAJIAN_APPLY_SIGN(23, "加减保申请企业签章","",1),
        CA_CHANGUNIT_APPLY_SIGN(24, "换厂申请企业签章","",1),
        CA_UPLOAD_AGAIN(25, "再次投保","",1),
        WTB_FINISH_FAQRS(26, "委托保 - ä¼ä¸šå®Œæˆç­¾ç½²æ–¹æ¡ˆç¡®è®¤ä¹¦","",0),
        WTB_FINISH_MEMBER_LIST(27, "委托保 - ä¼ä¸šå®Œæˆç­¾ç½²äººå‘˜åå•","",0),
        CA_WTB_FINISH_MEMBER_LIST(28, "委托保 - åŠ å‡ä¿ç­¾ç½²äººå‘˜åå•","",1),
        ;
        // æˆå‘˜å˜é‡
        private String name;
@@ -954,24 +971,22 @@
    public  enum UnionChangeStatus {
        MERGE(0, "待签署申请单","",0),
        UPLOAD_INSURANCE_POLICY(1, "待上传保单","",0),
        FINISH(2, "保障中","",0),
        CLOSE(3, "关闭","",0),
        MERGE(0, "待签署申请单",""),
        UPLOAD_INSURANCE_POLICY(1, "待上传保单",""),
        FINISH(2, "保障中",""),
        CLOSE(3, "关闭",""),
        ;
        // æˆå‘˜å˜é‡
        private String name;
        private String info;
        private int key;
        private int collectStatus;
        // æž„造方法
        UnionChangeStatus(int key, String name,String info,int collectStatus) {
        UnionChangeStatus(int key, String name,String info) {
            this.name = name;
            this.key = key;
            this.info = info;
            this.collectStatus = collectStatus;
        }
        // æ™®é€šæ–¹æ³•
@@ -979,25 +994,6 @@
            for (UnionChangeStatus c : UnionChangeStatus.values()) {
                if (c.getKey() == index) {
                    return c.name;
                }
            }
            return null;
        }
        public static List<Integer> getKesByStatus(Integer collectStatus) {
            List<Integer>  list = new ArrayList<>();
            if(collectStatus!=null){
                for (UnionChangeStatus c : UnionChangeStatus.values()) {
                    if (Constants.equalsInteger(c.getCollectStatus() ,collectStatus)) {
                        list.add(c.getKey());
                    }
                }
            }
            return list;
        }
        public static Integer getCollectStatus(Integer index) {
            for (UnionChangeStatus c : UnionChangeStatus.values()) {
                if (Constants.equalsInteger(c.getKey() , index)) {
                    return c.collectStatus;
                }
            }
            return null;
@@ -1035,14 +1031,6 @@
        public void setInfo(String info) {
            this.info = info;
        }
        public int getCollectStatus() {
            return collectStatus;
        }
        public void setCollectStatus(int collectStatus) {
            this.collectStatus = collectStatus;
        }
    }
    public  enum InsuranceApplyStatus {
@@ -1058,8 +1046,18 @@
        CLOSE(9, "订单关闭","",6),
        PLATFORM_CHECK_PASS(10,"平台投保审核通过","提交意见:${param}",0),
        COMPANY_BACK_APPLY_PASS(11, "企业申请退回(平台投保审核通过)","提交意见:${param}",5),
        COMPANY_APPLY_SIGNATURE(12, "委托保-企业已签署投保确认书","提交意见:${param}",5),
        COMPANY_MEMBER_LIST_SIGNATURE(13, "委托保-企业已签署人员名单","提交意见:${param}",5),
        WTB_UPLOAD(20, "提交投保","",28),
        WTB_COMPANY_APPLY_SIGNATURE(21, "委托保-企业已签署投保确认书","提交意见:${param}",28),
        WTB_COMPANY_MEMBER_LIST_SIGNATURE(22, "委托保-企业已签署人员名单","提交意见:${param}",22),
        WTB_BUSINESS_CHECK_PASS(23,"商户投保审核通过","提交意见:${param}",23),
        WTB_RETURN(24, "已退回","提交意见:${param}",24),
        WTB_CLOSED(25, "已关闭","提交意见:${param}",25),
        WTB_TOUBAOING(26, "投保中","提交意见:${param}",26),
        WTB_DONE(27, "保障中","提交意见:${param}",27),
        ;
        // æˆå‘˜å˜é‡
        private String name;
server/service/src/main/java/com/doumee/dao/business/dto/ApplyDetailPageDTO.java
@@ -50,6 +50,8 @@
    private Integer applyId;
    @ApiModelProperty(value = "加减保主键")
    private Integer applyChangeId;
    @ApiModelProperty(value = "合并单主键")
    private Integer unionApplyId;
    @ApiModelProperty(value = "类型:0=加保;1=减保;2=换厂 ")
    private List<Integer> types;
server/service/src/main/java/com/doumee/dao/business/dto/SmsCheckDTO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
package com.doumee.dao.business.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
 * @author RenKang
 */
@Data
public class SmsCheckDTO {
    @ApiModelProperty(value = "业务主键", example = "1")
    private Integer businessId;
    @ApiModelProperty(value = "验证码")
    private String code;
}
server/service/src/main/java/com/doumee/dao/business/dto/UnionChangeBXDDTO.java
@@ -1,5 +1,6 @@
package com.doumee.dao.business.dto;
import com.doumee.dao.business.model.Multifile;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -27,9 +28,12 @@
    private Date applyDate;
    @ApiModelProperty(value = "保单文件地址")
    private String fileUrl;
    private String fileurl;
    @ApiModelProperty(value = "保单文件名称")
    private String fileName;
    private String name;
    @ApiModelProperty(value = "加减保 ä¿å•文件数据")
    private List<Multifile> applyChangeBXDList;
}
server/service/src/main/java/com/doumee/dao/business/dto/UploadMultifileDTO.java
@@ -1,7 +1,10 @@
package com.doumee.dao.business.dto;
import com.doumee.dao.business.model.Multifile;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
 * Created by IntelliJ IDEA.
@@ -16,10 +19,13 @@
    @ApiModelProperty(value = "业务主键")
    private Integer businessId;
    @ApiModelProperty(value = "文件路径")
    private String filePath;
    @ApiModelProperty(value = "文件路径 ")
    private String fileurl;
    @ApiModelProperty(value = "文件名称")
    private String fileName;
    private String name;
    @ApiModelProperty(value = "企业保单 - ä¿é™©å•")
    private List<Multifile> multifileList;
}
server/service/src/main/java/com/doumee/dao/business/join/UnionChangeJoinMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
package com.doumee.dao.business.join;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.doumee.dao.business.model.UnionChange;
import com.github.yulichang.base.mapper.MPJJoinMapper;
/**
 * @author æ±Ÿè¹„蹄
 * @date 2024/03/12 11:34
 */
public interface UnionChangeJoinMapper extends MPJJoinMapper<UnionChange> {
}
server/service/src/main/java/com/doumee/dao/business/model/ApplyChagneDetail.java
@@ -147,6 +147,10 @@
    @TableField(exist = false)
    private Integer solutionId;
    @ApiModelProperty(value = "员工企业名称")
    @TableField(exist = false)
    private String companyName;
    @ApiModelProperty(value = "年龄")
    @TableField(exist = false)
    private long age;
server/service/src/main/java/com/doumee/dao/business/model/ApplyChange.java
@@ -220,6 +220,12 @@
    @ApiModelProperty(value = "方案类型 0直保 1委托投保")
    @TableField(exist = false)
    private Integer solutionType;
    @ApiModelProperty(value = "合并单主键(保单)")
    @TableField(exist = false)
    private Integer unionApplyId;
    public TaxesInvoicingVO toTaxesInvoicingVO(){
        TaxesInvoicingVO taxesInvoicingVO = new TaxesInvoicingVO();
        taxesInvoicingVO.setId(this.getId());
server/service/src/main/java/com/doumee/dao/business/model/ApplyDetail.java
@@ -143,4 +143,8 @@
    @TableField(exist = false)
    private String workTypeName;
    @ApiModelProperty(value = "企业名称")
    @TableField(exist = false)
    private String companyName;
}
server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java
@@ -108,8 +108,12 @@
    @ExcelColumn(name="合并单编码(关联union_apply)")
    private Integer unionApplyId;
    @ApiModelProperty(value = "合并单-投保单状态 0=未上传;1=已上传;2=已签署", example = "1")
    @ApiModelProperty(value = "合并单-投保单状态 0=未上传;1=已上传;2=已签署;3=已上传保险单", example = "1")
    private Integer unionApplyTbdStatus;
    @ApiModelProperty(value = "委托保-投保单合同号 ï¼ˆå•†æˆ·ä¸Šä¼ ï¼Œä¼ä¸šç­¾ç½²ï¼‰")
    @ExcelColumn(name="委托保-投保单合同号 ï¼ˆå•†æˆ·ä¸Šä¼ ï¼Œä¼ä¸šç­¾ç½²ï¼‰")
    private String applyTbdNo;
    @ApiModelProperty(value = "单号")
    @ExcelColumn(name="单号")
@@ -118,7 +122,8 @@
    @ExcelColumn(name="在线签章合同号")
    private String signApplyNo;
    @ApiModelProperty(value = "状态 0待审核 1平台退回保单(已退回) 2已上传代签申请表待企业签章(待签署)  3已签章待上传保险单(待出单) 4保单出具失败退回(已退回) 5已上传保单(保障中)6企业申请退回中 7平台同意退回(已退回) 8企业关闭  ï¼ˆå·²å…³é—­ï¼‰", example = "1")
    @ApiModelProperty(value = "状态 0待审核 1平台退回保单(已退回) 2已上传代签申请表待企业签章(待签署)  3已签章待上传保险单(待出单) 4保单出具失败退回(已退回) 5已上传保单(保障中)6企业申请退回中 7平台同意退回(已退回) 8企业关闭  ï¼ˆå·²å…³é—­ï¼‰;" +
            " ã€å§”托投保】 0提交投保 12已签署方案确认书 13已签署名单 10审核通过 5保障中", example = "1")
    @ExcelColumn(name="状态 0待审核 1平台退回保单(已退回) 2已上传代签申请表待企业签章(待签署)  3已签章待上传保险单(待出单) 4保单出具失败退回(已退回) 5已上传保单(保障中)6企业申请退回中 7平台同意退回(已退回) 8企业关闭  ï¼ˆå·²å…³é—­ï¼‰")
    private Integer status;
@@ -190,6 +195,13 @@
    @TableField(exist = false)
    private Multifile baoxiandanFile;
    @ApiModelProperty(value = "申请单对象")
    @TableField(exist = false)
    private Multifile shenqingdanFile;
    @ApiModelProperty(value = "签署后方案确认书对象")
    @TableField(exist = false)
    private Multifile fanganFile;
    @ApiModelProperty(value = "日志记录")
    @TableField(exist = false)
    private List<ApplyLog> applyLogList;
@@ -207,7 +219,6 @@
    @TableField(exist = false)
    private Date lastChangeDate;
    @ApiModelProperty(value = "最低年龄", example = "1")
    @TableField(exist = false)
    private Integer minAge;
@@ -215,7 +226,6 @@
    @ApiModelProperty(value = "最高年龄", example = "1")
    @TableField(exist = false)
    private Integer maxAge;
    @ApiModelProperty(value = "保险费用(人/天)", example = "1")
    @TableField(exist = false)
server/service/src/main/java/com/doumee/dao/business/model/Solutions.java
@@ -177,5 +177,8 @@
    @ApiModelProperty(value = "委托商户名称", example = "1")
    @TableField(exist = false)
    private String shopName;
    @ApiModelProperty(value = "方案确认书对象", example = "1")
    @TableField(exist = false)
    private Multifile fanganFile;
}
server/service/src/main/java/com/doumee/dao/business/model/UnionApply.java
@@ -1,5 +1,6 @@
package com.doumee.dao.business.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.doumee.core.annotation.excel.ExcelColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -62,17 +63,14 @@
    @ApiModelProperty(value = "实际保险生效止期")
    @ExcelColumn(name="实际保险生效止期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endTime;
    @ApiModelProperty(value = "实际保险生效起期")
    @ExcelColumn(name="实际保险生效起期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startTime;
    @ApiModelProperty(value = "最近操作时间")
    @ExcelColumn(name="最近操作时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date checkDate;
    @ApiModelProperty(value = "最近操作备注")
@@ -107,4 +105,25 @@
    @ExcelColumn(name="方案编码(关联solutions)")
    private Integer solutionId;
    @ApiModelProperty(value = "商户名称", example = "1")
    @TableField(exist = false)
    private String companyName;
    @ApiModelProperty(value = "方案名称", example = "1")
    @TableField(exist = false)
    private String solutionName;
    @ApiModelProperty(value = "查询开始日期", example = "1")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date queryStartTime;
    @ApiModelProperty(value = "查询结束日期", example = "1")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date queryEndTime;
    @ApiModelProperty(value = "服务天数")
    @TableField(exist = false)
    private Integer serviceDays;
}
server/service/src/main/java/com/doumee/dao/business/model/UnionChange.java
@@ -1,5 +1,6 @@
package com.doumee.dao.business.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.doumee.core.annotation.excel.ExcelColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -8,7 +9,10 @@
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
 * åŠ å‡ä¿æ¢åŽ‚åˆå¹¶å•ä¿¡æ¯è¡¨
@@ -93,4 +97,56 @@
    @ExcelColumn(name="合并保单主键")
    private Integer unionApplyId;
    @ApiModelProperty(value = "商户名称")
    @TableField(exist = false)
    private String shopName;
    @ApiModelProperty(value = "方案名称")
    @TableField(exist = false)
    private String solutionsName;
    @ApiModelProperty(value = "合并单编号")
    @TableField(exist = false)
    private String applyCode;
    @ApiModelProperty(value = "实际保险生效止期")
    @TableField(exist = false)
    private Date endTime;
    @ApiModelProperty(value = "实际保险生效起期")
    @TableField(exist = false)
    private Date startTime;
    @ApiModelProperty(value = "企业名称 ,分割")
    @TableField(exist = false)
    private String companyNames;
    @ApiModelProperty(value = "查询开始日期", example = "1")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date queryStartTime;
    @ApiModelProperty(value = "查询结束日期", example = "1")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date queryEndTime;
    @ApiModelProperty(value = "明细行记录")
    @TableField(exist = false)
    private List<ApplyChagneDetail> applyChagneDetailList;
    @ApiModelProperty(value = "加保人数")
    @TableField(exist = false)
    private Integer addNum;
    @ApiModelProperty(value = "减保人数")
    @TableField(exist = false)
    private Integer delNum;
    @ApiModelProperty(value = "换厂人数")
    @TableField(exist = false)
    private Integer changeNum;
}
server/service/src/main/java/com/doumee/service/business/ApplyChangeService.java
@@ -4,6 +4,7 @@
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.dto.ApplyChangeCyclePriceDTO;
import com.doumee.dao.business.dto.ApplyChangeOptDTO;
import com.doumee.dao.business.dto.SmsCheckDTO;
import com.doumee.dao.business.model.ApplyChange;
import com.doumee.dao.business.model.InsuranceApply;
import com.doumee.dao.business.vo.CountCyclePriceVO;
@@ -28,6 +29,7 @@
    Integer back(ApplyChange param);
    Integer dealBackApply(ApplyChange param);
    Integer uploadPidan(ApplyChange insuranceApply);
    Integer check(ApplyChange applyChange);
    /**
     * ä¸»é”®åˆ é™¤
     *
@@ -124,9 +126,9 @@
    /**
     * å§”托保 äººå‘˜åå•签署
     * @param applyChangeId
     * @param smsCheckDTO
     * @return
     */
    String getChangeMemberListOnlineSignLink(Integer applyChangeId);
    String getChangeMemberListOnlineSignLink(SmsCheckDTO smsCheckDTO);
}
server/service/src/main/java/com/doumee/service/business/InsuranceApplyService.java
@@ -5,6 +5,7 @@
import com.doumee.dao.business.dto.CountCyclePriceDTO;
import com.doumee.dao.business.dto.InsuranceApplyOptDTO;
import com.doumee.dao.business.dto.InsuranceApplyQueryDTO;
import com.doumee.dao.business.dto.SmsCheckDTO;
import com.doumee.dao.business.model.InsuranceApply;
import com.doumee.dao.business.vo.CountCyclePriceVO;
import com.jzq.common.bean.sign.NotifyDataReq;
@@ -143,16 +144,23 @@
    /**
     * å§”托保 æŠ•保确认书签章业务
     * @param applyId
     * @param smsCheckDTO
     * @return
     */
    String getSignTBQRSLink(Integer applyId);
    String getSignTBQRSLink(SmsCheckDTO smsCheckDTO);
    /**
     * äººå‘˜åå•签章
     * @param applyId
     * @param smsCheckDTO
     * @return
     */
    String getMemberListOnlineSignLink(Integer applyId);
    String getMemberListOnlineSignLink(SmsCheckDTO smsCheckDTO);
    /**
     * å§”托保 æŠ•保申请签署
     * @param smsCheckDTO
     * @return
     */
    String getSignWTBTBDLink(SmsCheckDTO smsCheckDTO);
}
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.SaveUnionApplyDTO;
import com.doumee.dao.business.dto.SmsCheckDTO;
import com.doumee.dao.business.dto.UnionApplyBXDDTO;
import com.doumee.dao.business.dto.UploadMultifileDTO;
import com.doumee.dao.business.model.UnionApply;
@@ -118,10 +119,10 @@
    /**
     * åˆå¹¶å• ä¿å•签署
     * @param id
     * @param smsCheckDTO
     * @return
     */
    String getSignLink(Integer id);
    String getSignLink(SmsCheckDTO smsCheckDTO);
    /**
     * ä¸Šä¼ ä¿é™©å•
@@ -129,4 +130,5 @@
     */
    void uploadBXD(UnionApplyBXDDTO unionApplyBXDDTO);
    UnionApply detail(Integer applyId);
}
server/service/src/main/java/com/doumee/service/business/UnionChangeService.java
@@ -3,6 +3,7 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.dto.SaveUnionChangeDTO;
import com.doumee.dao.business.dto.SmsCheckDTO;
import com.doumee.dao.business.dto.UnionChangeBXDDTO;
import com.doumee.dao.business.model.UnionChange;
import java.util.List;
@@ -113,10 +114,10 @@
    /**
     * åˆå¹¶å•(加减保/换厂) - æŠ•保申请签署
     * @param id
     * @param smsCheckDTO
     * @return
     */
    String getSignLink(Integer id);
    String getSignLink(SmsCheckDTO smsCheckDTO);
    /**
@@ -125,5 +126,10 @@
     */
    void uploadBXD(UnionChangeBXDDTO unionChangeBXDDTO);
    /**
     * æŸ¥è¯¢è¯¦æƒ…
     * @param id
     * @return
     */
    UnionChange getDetail(Integer id);
}
server/service/src/main/java/com/doumee/service/business/impl/ApplyChagneDetailServiceImpl.java
@@ -189,6 +189,7 @@
        MPJLambdaWrapper<ApplyChagneDetail> queryWrapper = new MPJLambdaWrapper<>();
        Utils.MP.blankToNull(pageWrap.getModel());
        queryWrapper.selectAll(ApplyChagneDetail.class);
        queryWrapper.selectAs(Company::getName,ApplyChagneDetail::getCompanyName);
        queryWrapper.select("t2.name",ApplyChagneDetail::getWorkTypeName);
        queryWrapper.select("t3.name",ApplyChagneDetail::getDuName);
        queryWrapper.select("t4.name",ApplyChagneDetail::getOldWorkTypeName);
@@ -201,6 +202,7 @@
        queryWrapper.leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyChagneDetail::getDuId);
        queryWrapper.leftJoin(Worktype.class,Worktype::getId,ApplyChagneDetail::getOldWorktypeId);
        queryWrapper.leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyChagneDetail::getOldDuId);
        queryWrapper.leftJoin(Company.class,Company::getId,Member::getCompanyId);
        ApplyDetailPageDTO applyDetailPageDTO = pageWrap.getModel();
        queryWrapper.exists(!Objects.isNull(applyDetailPageDTO.getApplyId()),
                " select 1 from apply_change ac where ac.isdeleted = 0 and ac.status in (1,2)  and ac.apply_id = "+applyDetailPageDTO.getApplyId()+" and ac.id = t.apply_change_id  ");
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
@@ -12,10 +12,7 @@
import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.*;
import com.doumee.dao.business.dto.ApplyChangeCyclePriceDTO;
import com.doumee.dao.business.dto.ApplyChangeOptDTO;
import com.doumee.dao.business.dto.CountCyclePriceDTO;
import com.doumee.dao.business.dto.InsuranceApplyOptDTO;
import com.doumee.dao.business.dto.*;
import com.doumee.dao.business.join.*;
import com.doumee.dao.business.model.*;
import com.doumee.dao.business.vo.CountCyclePriceVO;
@@ -25,6 +22,7 @@
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.doumee.service.business.SmsEmailService;
import com.doumee.service.business.third.SignService;
import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
@@ -104,6 +102,8 @@
    @Autowired
    private SolutionsMapper solutionsMapper;
    @Autowired
    private SmsEmailService smsEmailService;
    @Autowired
    private NoticesMapper noticesMapper;
    /**
@@ -1465,7 +1465,7 @@
                .in(!Objects.isNull(model.getStatus())&&model.getStatus().equals(Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey()),ApplyChange::getStatus,
                        Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey(),
                        Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())
//                .eq(!Objects.isNull(model.getCompanyId()),InsuranceApply::getCompanyId,model.getCompanyId())
                .eq(!Objects.isNull(model.getUnionApplyId()),InsuranceApply::getUnionApplyId,model.getUnionApplyId())
//                .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())
@@ -1967,8 +1967,18 @@
     * äººå‘˜åå•签章
     */
    @Override
    public String getChangeMemberListOnlineSignLink(Integer applyChangeId) {
        ApplyChange model = this.queryApplyChangeData(applyChangeId);
    public String getChangeMemberListOnlineSignLink(SmsCheckDTO smsCheckDTO) {
        if(Objects.isNull(smsCheckDTO)
                || Objects.isNull(smsCheckDTO.getBusinessId())
                || StringUtils.isBlank(smsCheckDTO.getCode())
        ){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        //验证 éªŒè¯ç 
        if(!debugModel){
            smsEmailService.validateCode(smsCheckDTO.getCode());
        }
        ApplyChange model = this.queryApplyChangeData(smsCheckDTO.getBusinessId());
        if(Objects.isNull(model)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询加减保信息");
        }
@@ -2020,6 +2030,57 @@
    @Override
    @Transactional(rollbackFor = {Exception.class,BusinessException.class})
    public Integer check(ApplyChange applyChange) {
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if(!user.getType().equals(Constants.TWO)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户端无法进行该操作");
        }
        if(applyChange.getId() == null){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        ApplyChange model = applyChangeJoinMapper.selectJoinOne(ApplyChange.class,
                new MPJLambdaWrapper<ApplyChange>()
                        .selectAll(ApplyChange.class)
                        .selectAs(InsuranceApply::getSolutionId,ApplyChange::getSolutionsId)
                        .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId)
                        .eq(ApplyChange::getId,applyChange.getId())
                        .last(" limit 1")
        );
        if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
            throw  new BusinessException(ResponseStatus.DATA_EMPTY);
        }
        Solutions solutions = solutionsMapper.selectById(model.getSolutionsId());
        if(Objects.isNull(solutions)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询方案信息");
        }
        if(solutions.getType().equals(Constants.ZERO)){
           throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"直保单据无法进行该操作");
        }else{
            if(!Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.COMPANY_SIGN.getKey())){
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~");
            }
        }
        ApplyChange update = new ApplyChange();
        update.setEditDate(new Date());
        update.setEditor(user.getId());
        update.setCheckDate(update.getEditDate());
        update.setCheckInfo(applyChange.getCheckInfo());
        update.setCheckUserId(user.getId());
        update.setId(model.getId());
        if(applyChange.getDealBackApply() ==1){
            //如果是不通过
            update.setStatus(Constants.ApplyChangeStatus.PALTFORM_CHECK_PASS_NO.getKey());
        }else{
            update.setStatus(Constants.ApplyChangeStatus.PALTFORM_CHECK_PASS.getKey());
        }
        applyChangeJoinMapper.updateById(update);
        return  1;
    }
}
server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java
@@ -201,12 +201,14 @@
        queryWrapper.selectAs(Member::getIdcardNo,ApplyDetail::getIdcardNo);
        queryWrapper.selectAs(Member::getName,ApplyDetail::getMemberName);
        queryWrapper.selectAs(Solutions::getName,ApplyDetail::getSolutionName);
        queryWrapper.selectAs(Company::getName,ApplyDetail::getCompanyName);
        queryWrapper.selectAs(InsuranceApply::getStatus,ApplyDetail::getSolutionName);
        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(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId);
        queryWrapper.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId);
        queryWrapper.leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId);
        ApplyDetailPageDTO applyDetailPageDTO = pageWrap.getModel();
@@ -225,6 +227,7 @@
        queryWrapper.eq(!Objects.isNull(applyDetailPageDTO.getDuId()),ApplyDetail::getDuId,applyDetailPageDTO.getDuId());
        queryWrapper.eq(!Objects.isNull(applyDetailPageDTO.getWorkTypeId()),ApplyDetail::getWorktypeId,applyDetailPageDTO.getWorkTypeId());
        queryWrapper.eq(!Objects.isNull(applyDetailPageDTO.getUnionApplyId()),ApplyDetail::getUnionApplyId,applyDetailPageDTO.getUnionApplyId());
        queryWrapper.like(StringUtils.isNotBlank(applyDetailPageDTO.getMemberName()),Member::getName,applyDetailPageDTO.getMemberName());
        queryWrapper.ge(StringUtils.isNotBlank(applyDetailPageDTO.getStartTimeS()),ApplyDetail::getStartTime,applyDetailPageDTO.getStartTimeS()+" 00:00:00.0");
        queryWrapper.le(StringUtils.isNotBlank(applyDetailPageDTO.getStartTimeE()),ApplyDetail::getStartTime,applyDetailPageDTO.getStartTimeE()+" 23:59:59.0");
server/service/src/main/java/com/doumee/service/business/impl/DispatchUnitServiceImpl.java
@@ -156,7 +156,8 @@
            newVersion = dispatchUnitMapper.selectOne(new QueryWrapper<DispatchUnit>().lambda()
                    .eq(DispatchUnit::getIsdeleted,Constants.ZERO)
                    .eq(DispatchUnit::getDataType,Constants.TWO)
                    .eq(DispatchUnit::getBaseId,model.getId()).last(" limit 1"));
                    .eq(DispatchUnit::getBaseId,model.getId())
                    .last(" limit 1"));
        }
        if(Objects.isNull(newVersion)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到派遣单位最新版本");
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -16,6 +16,7 @@
import com.doumee.dao.business.dto.CountCyclePriceDTO;
import com.doumee.dao.business.dto.InsuranceApplyOptDTO;
import com.doumee.dao.business.dto.InsuranceApplyQueryDTO;
import com.doumee.dao.business.dto.SmsCheckDTO;
import com.doumee.dao.business.join.*;
import com.doumee.dao.business.model.*;
import com.doumee.dao.business.vo.CountCyclePriceVO;
@@ -514,7 +515,7 @@
        InsuranceApply update = new InsuranceApply();
        update.setEditDate(new Date());
        update.setEditor(model.getCreator());
        update.setStatus(Constants.InsuranceApplyStatus.COMPANY_APPLY_SIGNATURE.getKey());
        update.setStatus(Constants.InsuranceApplyStatus.WTB_COMPANY_APPLY_SIGNATURE.getKey());
        update.setCheckDate(update.getEditDate());
        update.setCheckInfo("企业完成签署方案确认书");
        update.setCheckUserId(model.getCreator());
@@ -526,13 +527,56 @@
        f.setCreator(model.getCreator());
        f.setObjId(update.getId());
        f.setCreateDate(update.getEditDate());
        f.setObjType(Constants.MultiFile.SOLUTIONS_CONFIRMATION_LATTER.getKey());
        f.setObjType(Constants.MultiFile.WTB_CONFIRMATION_LATTER.getKey());
        f.setType(Constants.TWO);
        f.setFileurl(fileurl);
        f.setFileurlFull(fullUrl);
        f.setInfo("企业完成签署方案确认书");
        f.setName("方案确认书.pdf");
        multifileMapper.insert(f);
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.WTB_FINISH_FAQRS;
        ApplyLog log = new ApplyLog(update,applyLogType.getName(), null
                ,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update));
        applyLogMapper.insert(log);
        return  f;
    }
    /**
     * å§”托保  ä¼ä¸šç­¾ç½²æŠ•保申请书
     * @param model
     * @param fileurl
     * @param fullUrl
     * @return
     */
    public Multifile   uploadTBSQSSignedFileDo(InsuranceApply model,String fileurl,String fullUrl) {
        InsuranceApply update = new InsuranceApply();
        update.setEditDate(new Date());
        update.setEditor(model.getCreator());
        update.setUnionApplyTbdStatus(Constants.TWO);
        update.setCheckDate(update.getEditDate());
        update.setCheckInfo("委托保企业完成签署投保申请书");
        update.setCheckUserId(model.getCreator());
        update.setId(model.getId());
        insuranceApplyMapper.updateById(update);
        Multifile f = new Multifile();
        f.setIsdeleted(Constants.ZERO);
        f.setCreator(model.getCreator());
        f.setObjId(update.getId());
        f.setCreateDate(update.getEditDate());
        f.setObjType(Constants.MultiFile.COMPANY_TBD_SIGNED_PDF.getKey());
        f.setType(Constants.TWO);
        f.setFileurl(fileurl);
        f.setFileurlFull(fullUrl);
        f.setInfo("委托保企业完成签署投保申请书");
        f.setName("投保申请书.pdf");
        multifileMapper.insert(f);
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.SIGNATURE;
        ApplyLog log = new ApplyLog(update,applyLogType.getName(), null
                ,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update));
        applyLogMapper.insert(log);
        return  f;
    }
@@ -547,7 +591,7 @@
        InsuranceApply update = new InsuranceApply();
        update.setEditDate(new Date());
        update.setEditor(model.getCreator());
        update.setStatus(Constants.InsuranceApplyStatus.COMPANY_MEMBER_LIST_SIGNATURE.getKey());
        update.setStatus(Constants.InsuranceApplyStatus.WTB_COMPANY_MEMBER_LIST_SIGNATURE.getKey());
        update.setCheckDate(update.getEditDate());
        update.setCheckInfo("企业完成签署人员名单");
        update.setCheckUserId(model.getCreator());
@@ -566,6 +610,12 @@
        f.setInfo("企业完成签署人员名单");
        f.setName("人员名单.pdf");
        multifileMapper.insert(f);
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.WTB_FINISH_MEMBER_LIST;
        ApplyLog log = new ApplyLog(update,applyLogType.getName(), null
                ,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update));
        applyLogMapper.insert(log);
        return  f;
    }
    
@@ -608,6 +658,7 @@
        f.setInfo("企业申请表签署文件");
        f.setName("签章申请表.pdf");
        multifileMapper.insert(f);
        Constants.ApplyLogType applyLogType =Constants.equalsInteger(Constants.ZERO,model.getType())? Constants.ApplyLogType.CA_JIAJIAN_APPLY_SIGN: Constants.ApplyLogType.CA_CHANGUNIT_APPLY_SIGN;
        ApplyLog log = new ApplyLog(update,applyLogType.getName(), null,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update));
        applyLogMapper.insert(log);
@@ -640,6 +691,10 @@
        f.setInfo("企业完成签署人员名单");
        f.setName("签章人员名单.pdf");
        multifileMapper.insert(f);
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_WTB_FINISH_MEMBER_LIST;
        ApplyLog log = new ApplyLog(update,applyLogType.getName(), null,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update));
        applyLogMapper.insert(log);
        return f;
    }
@@ -737,10 +792,10 @@
                String fileUrl = uploadSignFile(link);
                if(StringUtils.isBlank(fileUrl)){
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                    continue;
                }
                uploadSignedFileDo(model,fileUrl,path+fileUrl);
                return;
//                return;
            }
        }
        //委托保 ä¼ä¸šç­¾ç½²æŠ•保确认书
@@ -752,7 +807,7 @@
                        .selectAs(Company::getName,InsuranceApply::getCompanyName)
                        .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
                        .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId)
                        .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD.getKey())
                        .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.WTB_UPLOAD.getKey())
                        .eq(Solutions::getType,Constants.ONE)
                        .isNotNull(InsuranceApply::getSignQrsNo));
        if(applyList !=null && applyList.size()>0 ){
@@ -765,10 +820,10 @@
                String fileUrl = uploadSignFile(link);
                if(StringUtils.isBlank(fileUrl)){
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                    continue;
                }
                uploadFAQRSSignedFileDo(model,fileUrl,path+fileUrl);
                return;
//                return;
            }
        }
@@ -781,7 +836,7 @@
                        .selectAs(Company::getName,InsuranceApply::getCompanyName)
                        .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
                        .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId)
                        .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.COMPANY_APPLY_SIGNATURE.getKey())
                        .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.WTB_COMPANY_APPLY_SIGNATURE.getKey())
                        .eq(Solutions::getType,Constants.ONE)
                        .isNotNull(InsuranceApply::getSignMemberListNo));
        if(applyList !=null && applyList.size()>0 ){
@@ -794,12 +849,44 @@
                String fileUrl = uploadSignFile(link);
                if(StringUtils.isBlank(fileUrl)){
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                    continue;
                }
                uploadApplyMemberListSignedFileDo(model,fileUrl,path+fileUrl);
                return;
//                return;
            }
        }
        //委托保企业签署投保申请单
        applyList = insuranceApplyJoinMapper.selectJoinList(InsuranceApply.class,
                new MPJLambdaWrapper<InsuranceApply>()
                        .selectAll(InsuranceApply.class)
                        .selectAs(Solutions::getName,InsuranceApply::getSolutionsName)
                        .selectAs(Solutions::getEmail,InsuranceApply::getSolutionEmail)
                        .selectAs(Company::getName,InsuranceApply::getCompanyName)
                        .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
                        .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId)
                        .eq(InsuranceApply::getUnionApplyTbdStatus,Constants.ONE)
                        .eq(Solutions::getType,Constants.ONE)
                        .isNotNull(InsuranceApply::getApplyTbdNo));
        if(applyList !=null && applyList.size()>0 ){
            for(InsuranceApply model : applyList){
                String status = signService.linkFileStatus(model.getApplyTbdNo());
                if(!StringUtils.equals(status,"3")){
                    continue;
                }
                String link = signService.linkFile(model.getApplyTbdNo());
                String fileUrl = uploadSignFile(link);
                if(StringUtils.isBlank(fileUrl)){
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    continue;
                }
                uploadTBSQSSignedFileDo(model,fileUrl,path+fileUrl);
//                return;
            }
        }
        List<ApplyChange> chagneList = applyChangeMapper.selectJoinList(ApplyChange.class,
                new MPJLambdaWrapper<ApplyChange>()
@@ -824,10 +911,10 @@
                String fileUrl = uploadSignFile(link);
                if(StringUtils.isBlank(fileUrl)){
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                    continue;
                }
                uploadChangeSignedFileDo(model,fileUrl,path+fileUrl);
                return;
//                return;
            }
        }
@@ -854,10 +941,10 @@
                String fileUrl = uploadSignFile(link);
                if(StringUtils.isBlank(fileUrl)){
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                    continue;
                }
                uploadChangeMemberListSignedFileDo(model,fileUrl,path+fileUrl);
                return;
//                return;
            }
        }
@@ -881,12 +968,16 @@
                String fileUrl = uploadSignFile(link);
                if(StringUtils.isBlank(fileUrl)){
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                    continue;
                }
                uploadUnionApplySignedFileDo(model,fileUrl,path+fileUrl);
                return;
//                return;
            }
        }
    }
    @Override
@@ -933,7 +1024,7 @@
                            .eq(Solutions::getType,Constants.ONE)
                            .eq(InsuranceApply::getSignQrsNo,data.getApplyNo())
                            .last("limit 1" ));
            if(modelTBQRS != null && Constants.equalsInteger(modelTBQRS.getStatus(),Constants.InsuranceApplyStatus.UPLOAD.getKey())){
            if(modelTBQRS != null && Constants.equalsInteger(modelTBQRS.getStatus(),Constants.InsuranceApplyStatus.WTB_UPLOAD.getKey())){
                //完成签署已完成操作
                String link = signService.linkFile(data.getApplyNo());
                String fileUrl = uploadSignFile(link);
@@ -944,6 +1035,9 @@
                uploadFAQRSSignedFileDo(modelTBQRS,fileUrl,path+fileUrl);
                return;
            }
            //委托保 ä¼ä¸šç­¾ç½²äººå‘˜åå•
            InsuranceApply modelMemberList = insuranceApplyJoinMapper.selectJoinOne(InsuranceApply.class,
                    new MPJLambdaWrapper<InsuranceApply>()
@@ -956,7 +1050,7 @@
                            .eq(Solutions::getType,Constants.ONE)
                            .eq(InsuranceApply::getSignMemberListNo,data.getApplyNo())
                            .last("limit 1" ));
            if(modelMemberList != null && Constants.equalsInteger(modelMemberList.getStatus(),Constants.InsuranceApplyStatus.COMPANY_APPLY_SIGNATURE.getKey())){
            if(modelMemberList != null && Constants.equalsInteger(modelMemberList.getStatus(),Constants.InsuranceApplyStatus.WTB_COMPANY_APPLY_SIGNATURE.getKey())){
                //完成签署已完成操作
                String link = signService.linkFile(data.getApplyNo());
                String fileUrl = uploadSignFile(link);
@@ -965,6 +1059,31 @@
                    return;
                }
                uploadApplyMemberListSignedFileDo(modelMemberList,fileUrl,path+fileUrl);
                return;
            }
            //委托保 æŠ•保申请书签署
            InsuranceApply modelTBQSQ = insuranceApplyJoinMapper.selectJoinOne(InsuranceApply.class,
                    new MPJLambdaWrapper<InsuranceApply>()
                            .selectAll(InsuranceApply.class)
                            .selectAs(Solutions::getName,InsuranceApply::getSolutionsName)
                            .selectAs(Solutions::getEmail,InsuranceApply::getSolutionEmail)
                            .selectAs(Company::getName,InsuranceApply::getCompanyName)
                            .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
                            .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId)
                            .eq(Solutions::getType,Constants.ONE)
                            .eq(InsuranceApply::getApplyTbdNo,data.getApplyNo())
                            .last("limit 1" ));
            if(modelTBQRS != null && Constants.equalsInteger(modelTBQSQ.getUnionApplyTbdStatus(),Constants.ONE)){
                //完成签署已完成操作
                String link = signService.linkFile(data.getApplyNo());
                String fileUrl = uploadSignFile(link);
                if(StringUtils.isBlank(fileUrl)){
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                }
                uploadTBSQSSignedFileDo(modelTBQSQ,fileUrl,path+fileUrl);
                return;
            }
@@ -1129,6 +1248,7 @@
    @Override
    @Transactional(rollbackFor = {Exception.class,BusinessException.class})
    public Integer check(InsuranceApply insuranceApply) {
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if(insuranceApply.getId() == null){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
@@ -1137,31 +1257,35 @@
        if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
            throw  new BusinessException(ResponseStatus.DATA_EMPTY);
        }
        if(!Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.UPLOAD.getKey())){
            throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~");
        }
        Solutions solutions = solutionsMapper.selectById(model.getSolutionId());
        if(Objects.isNull(solutions)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询方案信息");
        }
        if(solutions.getType().equals(Constants.ZERO)){
            if(!Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.UPLOAD.getKey())){
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~");
            }
        }else{
            if(!user.getType().equals(Constants.TWO)){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户端无法进行该操作");
            }
            if(!Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_RETURN.getKey())){
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~");
            }
        }
        Constants.ApplyLogType applyLogType = null;
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        InsuranceApply update = new InsuranceApply();
        update.setEditDate(new Date());
        update.setEditor(user.getId());
        update.setCheckDate(update.getEditDate());
        update.setCheckInfo(insuranceApply.getCheckInfo());
        update.setCheckUserId(user.getId());
        update.setId(model.getId());
        Constants.NoticeType noticeType = Constants.NoticeType.ONE;
        update.setId(model.getId());
        if(insuranceApply.getDealBackApply() ==1){
            //如果是不通过
            applyLogType = Constants.ApplyLogType.PLATFORM_RETURN ;
            update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_RETURN.getKey());
            noticeType = Constants.NoticeType.FOUR;
        }else{
            applyLogType = Constants.ApplyLogType.PLATFORM_CHECK_PASS;
            update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey());
@@ -1173,10 +1297,7 @@
        //删除其他待办
        noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey())
                .ne(Notices::getType,Constants.NoticeType.SIX.getStatus())
                .eq(Notices::getObjId,model.getId()));
//        Notices notices = new Notices(noticeObjectType,Constants.ONE,model.getId(),solutions.getName(),model.getCompanyId(),noticeType);
//        noticesMapper.insert(notices);
                .eq(Notices::getObjId,model.getId()));
        String info =applyLogType.getInfo();
        if(StringUtils.isNotBlank(update.getCheckInfo())){
            info = info.replace("${param}", update.getCheckInfo());
@@ -1220,6 +1341,9 @@
            throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"员工信息存在重复信息");
        }
        Constants.InsuranceApplyStatus insuranceApplyStatus = Constants.InsuranceApplyStatus.UPLOAD;
        if(solutions.getType().equals(Constants.ONE)){
            insuranceApplyStatus = Constants.InsuranceApplyStatus.WTB_UPLOAD;
        }
        insuranceApply.setCreateDate(new Date());
        insuranceApply.setCreator(loginUserInfo.getId());
        insuranceApply.setEditor(loginUserInfo.getId());
@@ -1522,13 +1646,37 @@
        QueryWrapper<InsuranceApply> wrapper = new QueryWrapper<>(insuranceApply);
        return insuranceApplyMapper.selectList(wrapper);
    }
    public List<Integer> getCollectStatus(Integer collectStatus){
        if(collectStatus ==null){
            return  new ArrayList<>();
        }
        List<Integer> statusList = Constants.InsuranceApplyStatus.getKesByStatus(collectStatus);
        if(collectStatus.equals(Constants.ApplyCollectStatus.DCD)){
            statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBDCD.getKey()));
        }else if(collectStatus.equals(Constants.ApplyCollectStatus.DSP)){
            statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBDSH.getKey()));
        }else if(collectStatus.equals(Constants.ApplyCollectStatus.BZZ)){
            statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBBZZ.getKey()));
        }else if(collectStatus.equals(Constants.ApplyCollectStatus.YTH)){
            statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBYTH.getKey()));
        }else if(collectStatus.equals(Constants.ApplyCollectStatus.YGB)){
            statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBYGB.getKey()));
        }else if(collectStatus.equals(Constants.ApplyCollectStatus.DQYQZ)){
            statusList.addAll(Constants.InsuranceApplyStatus.getKesByStatus(Constants.ApplyCollectStatus.WTBDQS.getKey()));
        }
        return statusList;
    }
  
    @Override
    public PageData<InsuranceApply> findPage(PageWrap<InsuranceApplyQueryDTO> pageWrap) {
        IPage<InsuranceApply> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
        MPJLambdaWrapper<InsuranceApply> queryWrapper = new MPJLambdaWrapper<>();
        Utils.MP.blankToNull(pageWrap.getModel());
        List<Integer> statusList = Constants.InsuranceApplyStatus.getKesByStatus(pageWrap.getModel().getStatusCollect());
        List<Integer> statusList = this.getCollectStatus(pageWrap.getModel().getStatusCollect());
        queryWrapper.selectAll(InsuranceApply.class);
        queryWrapper.selectAs(Company::getName,InsuranceApply::getCompanyName);
        queryWrapper.selectAs(Solutions::getName,InsuranceApply::getSolutionsName);
@@ -1806,11 +1954,14 @@
    private void initImgData(InsuranceApply model) {
        List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda()
                .eq(Multifile::getObjId,Constants.equalsInteger(model.getSolutionType(),Constants.ZERO)? model.getId():model.getUnionApplyId())
                .eq(Multifile::getObjId, model.getId())
                .in(Multifile::getObjType,Arrays.asList(new Integer[]{Constants.MultiFile.BD_APPLY_PDF.getKey()
                        ,Constants.MultiFile.BD_SIGNED_PDF.getKey()
                        ,Constants.MultiFile.WTB_CONFIRMATION_LATTER.getKey()
                        ,Constants.MultiFile.MEMBER_LIST_LATTER.getKey()
                        ,Constants.MultiFile.BD_DONE_PDF.getKey()}))
                .eq(Multifile::getIsdeleted,Constants.ZERO));
                .eq(Multifile::getIsdeleted,Constants.ZERO)
                .orderByAsc(Multifile::getId));
        if(multifiles!=null){
            String path = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()
                    +systemDictDataBiz.queryByCode(Constants.OSS,Constants.APPLY_FILE).getCode();
@@ -1828,6 +1979,12 @@
                }else if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.BD_DONE_PDF.getKey())){
                    //最終保险单
                    model.setBaoxiandanFile(f);
                }else if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.MEMBER_LIST_LATTER.getKey())){
                    //申请单
                    model.setShenqingdanFile(f);
                }else if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.WTB_CONFIRMATION_LATTER.getKey())){
                    //签署后确认书
                    model.setFanganFile(f);
                }
//                if(model.getStatus().equals(Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){
@@ -2053,21 +2210,26 @@
    /**
     * å§”托宝 æŠ•保确认书
     * @param id
     * @param smsCheckDTO
     * @return
     */
    @Override
    public  String getSignTBQRSLink(Integer id) {
        if(id == null ){
    public  String getSignTBQRSLink(SmsCheckDTO smsCheckDTO) {
        if(Objects.isNull(smsCheckDTO)
            || Objects.isNull(smsCheckDTO.getBusinessId())
                || StringUtils.isBlank(smsCheckDTO.getCode())
        ){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        if(!debugModel){
            smsEmailService.validateCode(smsCheckDTO.getCode());
        }
        MPJLambdaWrapper wrapper=  new MPJLambdaWrapper<InsuranceApply>()
                .selectAll(InsuranceApply.class)
                .selectAs(Solutions::getSignKeyword,InsuranceApply::getSignKeyword)
                .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
                .eq(InsuranceApply::getId,id)
                .eq(InsuranceApply::getId,smsCheckDTO.getBusinessId())
                .last("limit 1");
        InsuranceApply model = insuranceApplyJoinMapper.selectJoinOne(InsuranceApply.class,wrapper);
        if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
            throw  new BusinessException(ResponseStatus.DATA_EMPTY);
@@ -2076,14 +2238,14 @@
        if(Objects.isNull(solutions)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询方案信息");
        }
        if(solutions.getType().equals(Constants.ZERO)){
        if(Constants.equalsInteger(solutions.getType(),(Constants.ZERO))){
            throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,非委托保方案保单!");
        }
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        Constants.ApplyLogType applyLogType = null;
        String info = "";
        //如果是驳回,只能可驳回已签章状态下的退回申请状态进行操作
        if(!Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.UPLOAD.getKey())){
        if(!Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_UPLOAD.getKey())){
            throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~");
        }
        Company company = user.getCompany();
@@ -2120,6 +2282,8 @@
        return  link;
    }
    @Override
    public  InsuranceApply  queryApplyDetail(Integer applyId){
        InsuranceApply model = findDetail(applyId);
@@ -2146,15 +2310,25 @@
     * äººå‘˜åå•签章
     */
    @Override
    public String getMemberListOnlineSignLink(Integer applyId) {
        InsuranceApply model = this.queryApplyDetail(applyId);
    public String getMemberListOnlineSignLink(SmsCheckDTO smsCheckDTO) {
        if(Objects.isNull(smsCheckDTO)
                || Objects.isNull(smsCheckDTO.getBusinessId())
                || StringUtils.isBlank(smsCheckDTO.getCode())
        ){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        //验证 éªŒè¯ç 
        if(!debugModel){
            smsEmailService.validateCode(smsCheckDTO.getCode());
        }
        InsuranceApply model = this.queryApplyDetail(smsCheckDTO.getBusinessId());
        if(Objects.isNull(model)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询保单信息");
        }
        if(Objects.isNull(model) ||! Constants.equalsInteger(Constants.ZERO,model.getIsdeleted())){
            throw new BusinessException(ResponseStatus.DATA_EMPTY);
        }
        if(!Constants.equalsInteger(Constants.ZERO,model.getStatus())){
        if(!Constants.equalsInteger(Constants.InsuranceApplyStatus.WTB_COMPANY_APPLY_SIGNATURE.getKey(),model.getStatus())){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,该申请状态已流转,当前不支持签章操作!");
        }
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
@@ -2193,6 +2367,83 @@
    }
    /**
     * å§”托保 æŠ•保申请签署
     * @param smsCheckDTO
     * @return
     */
    @Override
    public  String getSignWTBTBDLink(SmsCheckDTO smsCheckDTO) {
        if(Objects.isNull(smsCheckDTO)
                || Objects.isNull(smsCheckDTO.getBusinessId())
                || StringUtils.isBlank(smsCheckDTO.getCode())
        ){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        //验证 éªŒè¯ç 
        if(!debugModel){
            smsEmailService.validateCode(smsCheckDTO.getCode());
        }
        MPJLambdaWrapper wrapper=  new MPJLambdaWrapper<InsuranceApply>()
                .selectAll(InsuranceApply.class)
                .selectAs(Solutions::getSignKeyword,InsuranceApply::getSignKeyword)
                .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
                .eq(InsuranceApply::getId,smsCheckDTO.getBusinessId())
                .last("limit 1");
        InsuranceApply model = insuranceApplyJoinMapper.selectJoinOne(InsuranceApply.class,wrapper);
        if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
            throw  new BusinessException(ResponseStatus.DATA_EMPTY);
        }
        Solutions solutions = solutionsMapper.selectById(model.getSolutionId());
        if(Objects.isNull(solutions)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询方案信息");
        }
        if(solutions.getType().equals(Constants.ZERO)){
            throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,非委托保方案保单!");
        }
        if(!model.getUnionApplyTbdStatus().equals(Constants.ONE)){
            throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,商户未上传或已签署");
        }
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        Constants.ApplyLogType applyLogType = null;
        String info = "";
        //如果是驳回,只能可驳回已签章状态下的退回申请状态进行操作
        if(!Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WTB_UPLOAD.getKey())){
            throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~");
        }
        Company company = user.getCompany();
        if(debugModel){
            company = companyMapper.selectById(model.getCompanyId());
        }
        if(company== null || StringUtils.isBlank( company.getEmail()) || !Constants.equalsInteger(company.getSignStatus(),Constants.THREE)){
            throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,企业尚未具备在线签章条件,请联系平台管理员确认~");
        }
        Multifile f = multifileMapper.selectOne(new QueryWrapper<Multifile>().lambda()
                .eq(Multifile::getObjId,model.getId())
                .eq(Multifile::getObjType,Constants.MultiFile.COMPANY_TBD_SIGNED.getKey())
                .eq(Multifile::getIsdeleted,Constants.ZERO).last("limit 1"));
        if(f == null || StringUtils.isBlank(f.getFileurl())){
            throw  new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对不起,获取确认书文件失败,请联系商户确认投保申请书是否正确!");
        }
        String url = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()+systemDictDataBiz.queryByCode(Constants.OSS,Constants.APPLY_FILE).getCode()+f.getFileurl();
        String notifyUrl = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.SIGN_DONE_NOTIFY_URL).getCode();
        notifyUrl = notifyUrl.replace("${type}","0").replace("${id}",model.getId().toString());
        String applyNo = signService.applySign(company.getName(),url,company.getName(),company.getCode(),company.getEmail(),model.getSignKeyword(),company.getSignId(),notifyUrl);
        if(StringUtils.isBlank(applyNo) ){
            throw  new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对不起,获取在线签章地址失败,请稍后重试!");
        }
        String link = signService.signLink(applyNo,company.getName(),company.getCode());
        if(StringUtils.isBlank(link) ){
            throw  new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对不起,获取在线签章地址失败,请稍后重试!");
        }
        InsuranceApply update= new InsuranceApply();
        update.setId(model.getId());
        update.setEditor(user.getId());
        update.setEditDate(new Date());
        update.setApplyTbdNo(applyNo);
        insuranceApplyMapper.updateById(update);
        return  link;
    }
}
server/service/src/main/java/com/doumee/service/business/impl/SmsEmailServiceImpl.java
@@ -46,6 +46,8 @@
    private EmayService emayService;
    @Autowired
    private EmailService emailService;
    @Value("${debug_model}")
    private boolean debugModel;
    public static void isCaptcheValide(SmsEmailMapper smsEmailMapper, String phone, String captche) {
        SmsEmail model = smsEmailMapper.selectOne(new QueryWrapper<SmsEmail>().lambda()
@@ -137,6 +139,9 @@
        if(StringUtils.isBlank(code)){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        if(debugModel){
            return;
        }
        LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if(!loginUserInfo.getType().equals(Constants.ONE)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"用户类别错误");
server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
@@ -1,5 +1,6 @@
package com.doumee.service.business.impl;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.LoginUserInfo;
@@ -27,10 +28,7 @@
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
import java.util.*;
/**
 * ä¿é™©æ–¹æ¡ˆä¿¡æ¯è¡¨Service实现
@@ -40,6 +38,10 @@
@Service
public class SolutionsServiceImpl implements SolutionsService {
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
    @Autowired
    private MultifileMapper multifileMapper;
    @Autowired
    private SolutionsMapper solutionsMapper;
    @Autowired
@@ -87,6 +89,22 @@
        solutionsMapper.insert(newModel);
        dealWorkType(solutions,newModel,solutions.getWorktypeIdList(),true);
        if(Constants.equalsObject(solutions.getType(),Constants.ONE) ){
           if  (solutions.getFanganFile()==null || StringUtils.isBlank(solutions.getFanganFile().getFileurl())){
             throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"请上传方案确认书!");
            }
            Multifile file = solutions.getFanganFile();
            file.setIsdeleted(Constants.ZERO);
            file.setCreateDate(new Date());
            file.setCreator(user.getId());
            file.setObjId(solutions.getId());
            file.setObjType(Constants.MultiFile.SOLUTIONS_CONFIRMATION_LATTER.getKey());
            file.setType(Constants.formatIntegerNum(file.getType()));
            multifileMapper.insert(file);
           file.setObjId(newModel.getId());
            multifileMapper.insert(file);
        }
        return solutions.getId();
    }
@@ -216,7 +234,27 @@
                .lambda()
                .eq(SolutionWorktype::getSolutionId,solutions.getId())
        );
        if(Constants.equalsObject(solutions.getType(),Constants.ONE) ){
            if  (solutions.getFanganFile()!=null && StringUtils.isNotBlank(solutions.getFanganFile().getFileurl())){
                multifileMapper.update(null,new UpdateWrapper<Multifile>().lambda()
                                .set(Multifile::getIsdeleted,Constants.ONE)
                                .set(Multifile::getEditDate,solutions.getEditDate())
                                .set(Multifile::getEditor,solutions.getEditor())
                                .eq(Multifile::getObjId,solutions.getId())
                                .eq(Multifile::getIsdeleted,Constants.ZERO)
                                .eq(Multifile::getObjType,Constants.MultiFile.SOLUTIONS_CONFIRMATION_LATTER.getKey()));
                Multifile file = solutions.getFanganFile();
                file.setIsdeleted(Constants.ZERO);
                file.setCreateDate(solutions.getEditDate());
                file.setCreator(solutions.getEditor());
                file.setObjId(solutions.getId());
                file.setObjType(Constants.MultiFile.SOLUTIONS_CONFIRMATION_LATTER.getKey());
                file.setType(Constants.formatIntegerNum(file.getType()));
                multifileMapper.insert(file);
                file.setObjId(newModel.getId());
                multifileMapper.insert(file);
            }
        }
        solutionsMapper.update(null,new UpdateWrapper<Solutions>()
                .lambda()
@@ -303,6 +341,16 @@
        wrapper.orderByAsc(SolutionWorktype::getSortnum);
        List<SolutionWorktype> worktypeList = solutionWorktypeJoinMapper.selectJoinList(SolutionWorktype.class,wrapper);
        model.setWorktypeList(worktypeList);
        Multifile f = multifileMapper.selectOne(new QueryWrapper<Multifile>().lambda()
                .eq(Multifile::getObjId,model.getId())
                .eq(Multifile::getObjType,Constants.MultiFile.SOLUTIONS_CONFIRMATION_LATTER.getKey())
                .eq(Multifile::getIsdeleted,Constants.ZERO)
                .last("limit 1"));
        if(f!=null && StringUtils.isNotBlank(f.getFileurl())){
            String url = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()+systemDictDataBiz.queryByCode(Constants.OSS,Constants.APPLY_FILE).getCode()+f.getFileurl();
            f.setFileurlFull(url);
            model.setFanganFile(f);//方案确认书
        }
        return model;
    }
server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java
@@ -14,14 +14,12 @@
import com.doumee.dao.business.MultifileMapper;
import com.doumee.dao.business.SolutionsMapper;
import com.doumee.dao.business.UnionApplyMapper;
import com.doumee.dao.business.dto.SaveUnionApplyDTO;
import com.doumee.dao.business.dto.UnionApplyBXDDDetailTO;
import com.doumee.dao.business.dto.UnionApplyBXDDTO;
import com.doumee.dao.business.dto.UploadMultifileDTO;
import com.doumee.dao.business.dto.*;
import com.doumee.dao.business.join.ApplyDetailJoinMapper;
import com.doumee.dao.business.join.InsuranceApplyJoinMapper;
import com.doumee.dao.business.join.UnionApplyJoinMapper;
import com.doumee.dao.business.model.*;
import com.doumee.service.business.SmsEmailService;
import com.doumee.service.business.UnionApplyService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -33,9 +31,10 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.ArrayList;
@@ -78,6 +77,12 @@
    @Autowired
    private SignService signService;
    @Autowired
    private SmsEmailService smsEmailService;
    @Value("${debug_model}")
    private boolean debugModel;
    @Override
    public Integer create(UnionApply unionApply) {
@@ -139,69 +144,81 @@
    @Override
    public PageData<UnionApply> findPage(PageWrap<UnionApply> pageWrap) {
        IPage<UnionApply> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
        QueryWrapper<UnionApply> queryWrapper = new QueryWrapper<>();
        MPJLambdaWrapper<UnionApply> queryWrapper = new MPJLambdaWrapper<>();
        Utils.MP.blankToNull(pageWrap.getModel());
        queryWrapper.selectAll(UnionApply.class);
        queryWrapper.leftJoin(Solutions.class,Solutions::getId,UnionApply::getSolutionId);
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if(user.getType().equals(Constants.TWO)){
            queryWrapper.eq(UnionApply::getCompanyId, pageWrap.getModel().getCompanyId());
        }
        if (pageWrap.getModel().getId() != null) {
            queryWrapper.lambda().eq(UnionApply::getId, pageWrap.getModel().getId());
            queryWrapper.eq(UnionApply::getId, pageWrap.getModel().getId());
        }
        if (pageWrap.getModel().getCreator() != null) {
            queryWrapper.lambda().eq(UnionApply::getCreator, pageWrap.getModel().getCreator());
            queryWrapper.eq(UnionApply::getCreator, pageWrap.getModel().getCreator());
        }
        if (pageWrap.getModel().getQueryStartTime() != null) {
            queryWrapper.ge(UnionApply::getCreateDate, pageWrap.getModel().getQueryStartTime() +" 00:00:00" );
        }
        if (pageWrap.getModel().getQueryEndTime() != null) {
            queryWrapper.le(UnionApply::getCreateDate, pageWrap.getModel().getQueryEndTime() +" 23:59:59");
        }
        if (pageWrap.getModel().getCreateDate() != null) {
            queryWrapper.lambda().ge(UnionApply::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate()));
            queryWrapper.lambda().le(UnionApply::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate()));
            queryWrapper.ge(UnionApply::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate()));
            queryWrapper.le(UnionApply::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate()));
        }
        if (pageWrap.getModel().getEditor() != null) {
            queryWrapper.lambda().eq(UnionApply::getEditor, pageWrap.getModel().getEditor());
            queryWrapper.eq(UnionApply::getEditor, pageWrap.getModel().getEditor());
        }
        if (pageWrap.getModel().getEditDate() != null) {
            queryWrapper.lambda().ge(UnionApply::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate()));
            queryWrapper.lambda().le(UnionApply::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate()));
            queryWrapper.ge(UnionApply::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate()));
            queryWrapper.le(UnionApply::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate()));
        }
        if (pageWrap.getModel().getIsdeleted() != null) {
            queryWrapper.lambda().eq(UnionApply::getIsdeleted, pageWrap.getModel().getIsdeleted());
            queryWrapper.eq(UnionApply::getIsdeleted, pageWrap.getModel().getIsdeleted());
        }
        if (pageWrap.getModel().getRemark() != null) {
            queryWrapper.lambda().eq(UnionApply::getRemark, pageWrap.getModel().getRemark());
            queryWrapper.eq(UnionApply::getRemark, pageWrap.getModel().getRemark());
        }
        if (pageWrap.getModel().getSortnum() != null) {
            queryWrapper.lambda().eq(UnionApply::getSortnum, pageWrap.getModel().getSortnum());
            queryWrapper.eq(UnionApply::getSortnum, pageWrap.getModel().getSortnum());
        }
        if (pageWrap.getModel().getCompanyId() != null) {
            queryWrapper.lambda().eq(UnionApply::getCompanyId, pageWrap.getModel().getCompanyId());
            queryWrapper.eq(UnionApply::getCompanyId, pageWrap.getModel().getCompanyId());
        }
        if (pageWrap.getModel().getEndTime() != null) {
            queryWrapper.lambda().ge(UnionApply::getEndTime, Utils.Date.getStart(pageWrap.getModel().getEndTime()));
            queryWrapper.lambda().le(UnionApply::getEndTime, Utils.Date.getEnd(pageWrap.getModel().getEndTime()));
            queryWrapper.ge(UnionApply::getEndTime, Utils.Date.getStart(pageWrap.getModel().getEndTime()));
            queryWrapper.le(UnionApply::getEndTime, Utils.Date.getEnd(pageWrap.getModel().getEndTime()));
        }
        if (pageWrap.getModel().getStartTime() != null) {
            queryWrapper.lambda().ge(UnionApply::getStartTime, Utils.Date.getStart(pageWrap.getModel().getStartTime()));
            queryWrapper.lambda().le(UnionApply::getStartTime, Utils.Date.getEnd(pageWrap.getModel().getStartTime()));
            queryWrapper.ge(UnionApply::getStartTime, Utils.Date.getStart(pageWrap.getModel().getStartTime()));
            queryWrapper.le(UnionApply::getStartTime, Utils.Date.getEnd(pageWrap.getModel().getStartTime()));
        }
        if (pageWrap.getModel().getCheckDate() != null) {
            queryWrapper.lambda().ge(UnionApply::getCheckDate, Utils.Date.getStart(pageWrap.getModel().getCheckDate()));
            queryWrapper.lambda().le(UnionApply::getCheckDate, Utils.Date.getEnd(pageWrap.getModel().getCheckDate()));
            queryWrapper.ge(UnionApply::getCheckDate, Utils.Date.getStart(pageWrap.getModel().getCheckDate()));
            queryWrapper.le(UnionApply::getCheckDate, Utils.Date.getEnd(pageWrap.getModel().getCheckDate()));
        }
        if (pageWrap.getModel().getCheckInfo() != null) {
            queryWrapper.lambda().eq(UnionApply::getCheckInfo, pageWrap.getModel().getCheckInfo());
            queryWrapper.eq(UnionApply::getCheckInfo, pageWrap.getModel().getCheckInfo());
        }
        if (pageWrap.getModel().getCheckUserId() != null) {
            queryWrapper.lambda().eq(UnionApply::getCheckUserId, pageWrap.getModel().getCheckUserId());
            queryWrapper.eq(UnionApply::getCheckUserId, pageWrap.getModel().getCheckUserId());
        }
        if (pageWrap.getModel().getCode() != null) {
            queryWrapper.lambda().eq(UnionApply::getCode, pageWrap.getModel().getCode());
            queryWrapper.eq(UnionApply::getCode, pageWrap.getModel().getCode());
        }
        if (pageWrap.getModel().getStatus() != null) {
            queryWrapper.lambda().eq(UnionApply::getStatus, pageWrap.getModel().getStatus());
            queryWrapper.eq(UnionApply::getStatus, pageWrap.getModel().getStatus());
        }
        if (pageWrap.getModel().getCurrentFee() != null) {
            queryWrapper.lambda().eq(UnionApply::getCurrentFee, pageWrap.getModel().getCurrentFee());
            queryWrapper.eq(UnionApply::getCurrentFee, pageWrap.getModel().getCurrentFee());
        }
        if (pageWrap.getModel().getFee() != null) {
            queryWrapper.lambda().eq(UnionApply::getFee, pageWrap.getModel().getFee());
            queryWrapper.eq(UnionApply::getFee, pageWrap.getModel().getFee());
        }
        if (pageWrap.getModel().getSignApplyNo() != null) {
            queryWrapper.lambda().eq(UnionApply::getSignApplyNo, pageWrap.getModel().getSignApplyNo());
            queryWrapper.eq(UnionApply::getSignApplyNo, pageWrap.getModel().getSignApplyNo());
        }
        for(PageWrap.SortData sortData: pageWrap.getSorts()) {
            if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) {
@@ -210,7 +227,8 @@
                queryWrapper.orderByAsc(sortData.getProperty());
            }
        }
        return PageData.from(unionApplyMapper.selectPage(page, queryWrapper));
        PageData<UnionApply> pageData = PageData.from(unionApplyJoinMapper.selectJoinPage(page,UnionApply.class, queryWrapper));
        return pageData;
    }
    @Override
@@ -220,10 +238,44 @@
    }
    @Override
    public UnionApply detail(Integer applyId){
        UnionApply unionApply = unionApplyJoinMapper.selectJoinOne(UnionApply.class,
                new MPJLambdaWrapper<UnionApply>()
                        .selectAll(UnionApply.class)
                        .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")
                        .leftJoin(Solutions.class,Solutions::getId,UnionApply::getSolutionId)
                        .leftJoin(Company.class,Company::getId,UnionApply::getCompanyId)
                        .eq(UnionApply::getId,applyId)
                        .last(" limit 1 ")
        );
        unionApply.setServiceDays(Constants.ZERO);
        if(unionApply.getStatus().equals(Constants.UnionApplyStatus.FINISH.getKey())){
            //如果当前时间大于结束日期 åˆ™ä½¿ç”¨ç»“束日期对比开始日期
            if(DateUtil.compareDate(new Date(),unionApply.getEndTime())>=Constants.ZERO){
                unionApply.setServiceDays(
                        DateUtil.daysBetweenDates(unionApply.getEndTime(),unionApply.getStartTime())+1
                );
            }else if(DateUtil.compareDate(unionApply.getStartTime(),new Date())>=Constants.ZERO){
                //未开始
                unionApply.setServiceDays(Constants.ZERO);
            }else{
                unionApply.setServiceDays(DateUtil.daysBetweenDates(new Date(),unionApply.getStartTime())+1);
            }
        }
        return unionApply;
    }
    @Override
    public Integer merge(SaveUnionApplyDTO saveUnionApplyDTO){
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if(user.getType().equals(Constants.TWO)){
        if(!user.getType().equals(Constants.TWO)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户用户,无法进行该操作");
        }
        if(Objects.isNull(saveUnionApplyDTO)
@@ -240,7 +292,7 @@
                        .selectAs(InsuranceApply::getSolutionBaseId,Solutions::getBaseId)
                        .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
                        .eq(InsuranceApply::getIsdeleted, Constants.ZERO)
                        .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.COMPANY_MEMBER_LIST_SIGNATURE.getKey())
                        .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.WTB_BUSINESS_CHECK_PASS.getKey())
                        .eq(Solutions::getBaseId,saveUnionApplyDTO.getBaseSolutionId())
                        .in(InsuranceApply::getId,saveUnionApplyDTO.getApplyIds())
                        .isNull(InsuranceApply::getUnionApplyId)
@@ -271,6 +323,7 @@
                .set(InsuranceApply::getUnionApplyId,unionApply.getId())
                .set(InsuranceApply::getCheckDate,new Date())
                .set(InsuranceApply::getCheckUserId,user.getId())
                .set(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.WTB_TOUBAOING.getKey())
                .in(InsuranceApply::getId,saveUnionApplyDTO.getApplyIds()));
        applyDetailJoinMapper.update(null,new UpdateWrapper<ApplyDetail>().lambda()
@@ -290,7 +343,7 @@
    @Transactional(rollbackFor = {Exception.class,BusinessException.class})
    public void cancelMerge(Integer id){
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if(user.getType().equals(Constants.TWO)){
        if(!user.getType().equals(Constants.TWO)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户用户,无法进行该操作!");
        }
        UnionApply unionApply = unionApplyMapper.selectById(id);
@@ -316,6 +369,7 @@
                .set(InsuranceApply::getUnionApplyId,null)
                .set(InsuranceApply::getCheckDate,new Date())
                .set(InsuranceApply::getCheckUserId,user.getId())
                .set(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.WTB_BUSINESS_CHECK_PASS.getKey())
                .eq(InsuranceApply::getUnionApplyId,unionApply.getId()));
        applyDetailJoinMapper.update(null,new UpdateWrapper<ApplyDetail>().lambda()
@@ -335,11 +389,14 @@
    @Transactional(rollbackFor = {Exception.class,BusinessException.class})
    public void uploadToubaodan(UploadMultifileDTO uploadMultifileDTO){
        if(uploadMultifileDTO.getBusinessId() == null
                ||StringUtils.isBlank( uploadMultifileDTO.getFilePath())
                ||StringUtils.isBlank( uploadMultifileDTO.getFileName())){
                ||StringUtils.isBlank( uploadMultifileDTO.getFileurl())
                ||StringUtils.isBlank( uploadMultifileDTO.getName())){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if(!user.getType().equals(Constants.TWO)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户用户,无法进行该操作!");
        }
        UnionApply unionApply = unionApplyMapper.selectById(uploadMultifileDTO.getBusinessId());
        if(Objects.isNull(unionApply)||!Constants.equalsInteger(unionApply.getIsdeleted(),Constants.ZERO)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY);
@@ -353,6 +410,41 @@
        if(unionApply.getStatus().equals(Constants.UnionApplyStatus.MERGE.getKey())){
            throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"对不起,合并单业务已流转,您无法进行该操作!");
        }
        if(CollectionUtils.isNotEmpty(uploadMultifileDTO.getMultifileList())){
            List<Multifile> multifileList = uploadMultifileDTO.getMultifileList();
            for (Multifile multifile:multifileList) {
                if(Objects.isNull(multifile.getObjId())
                    ||Objects.isNull(multifile.getName())
                    ||Objects.isNull(multifile.getFileurl())){
                    throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"企业投保单附件参数错误");
                }
                InsuranceApply insuranceApply = insuranceApplyJoinMapper.selectOne(new QueryWrapper<InsuranceApply>().lambda()
                        .eq(InsuranceApply::getId,multifile.getObjId())
                        .eq(InsuranceApply::getUnionApplyId,uploadMultifileDTO.getBusinessId())
                );
                if(Objects.isNull(insuranceApply)){
                    throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"企业投保单未查询到");
                }
                multifile.setIsdeleted(Constants.ZERO);
                multifile.setCreator(user.getId());
                multifile.setCreateDate(new Date());
                multifile.setCreateDate(new Date());
                multifile.setObjType(Constants.MultiFile.COMPANY_TBD_SIGNED.getKey());
                multifile.setType(Constants.TWO);
                multifileMapper.insert(multifile);
                insuranceApplyJoinMapper.update(null,new UpdateWrapper<InsuranceApply>().lambda()
                        .set(InsuranceApply::getUnionApplyTbdStatus,Constants.ONE)
                        .set(InsuranceApply::getEditDate,new Date())
                        .set(InsuranceApply::getEditor,user.getId())
                        .eq(InsuranceApply::getId,multifile.getObjId())
                );
            }
        }
        unionApply.setCheckDate(new Date());
        unionApply.setCheckUserId(user.getId());
@@ -369,9 +461,12 @@
        multifile.setCreateDate(new Date());
        multifile.setObjType(Constants.MultiFile.HBD_BD_SIGNED_PDF.getKey());
        multifile.setType(Constants.TWO);
        multifile.setFileurl(uploadMultifileDTO.getFilePath());
        multifile.setName(uploadMultifileDTO.getFileName());
        multifile.setFileurl(uploadMultifileDTO.getFileurl());
        multifile.setName(uploadMultifileDTO.getName());
        multifileMapper.insert(multifile);
    }
@@ -383,12 +478,22 @@
     */
    @Override
    @Transactional(rollbackFor = {Exception.class,BusinessException.class})
    public  String getSignLink(Integer id) {
        if(id == null ){
    public  String getSignLink(SmsCheckDTO smsCheckDTO) {
        if(Objects.isNull(smsCheckDTO)
                || Objects.isNull(smsCheckDTO.getBusinessId())
                || StringUtils.isBlank(smsCheckDTO.getCode())
        ){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        //验证 éªŒè¯ç 
        if(!debugModel){
            smsEmailService.validateCode(smsCheckDTO.getCode());
        }
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        UnionApply unionApply = unionApplyJoinMapper.selectById(id);
        if(!user.getType().equals(Constants.TWO)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户用户,无法进行该操作!");
        }
        UnionApply unionApply = unionApplyJoinMapper.selectById(smsCheckDTO.getBusinessId());
        if(unionApply == null ||!Constants.equalsInteger(unionApply.getIsdeleted(),Constants.ZERO)){
            throw  new BusinessException(ResponseStatus.DATA_EMPTY);
        }
@@ -451,6 +556,9 @@
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if(!user.getType().equals(Constants.TWO)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户用户,无法进行该操作!");
        }
        UnionApply unionApply = unionApplyJoinMapper.selectById(unionApplyBXDDTO.getId());
        if(unionApply == null ||!Constants.equalsInteger(unionApply.getIsdeleted(),Constants.ZERO)){
            throw  new BusinessException(ResponseStatus.DATA_EMPTY);
@@ -507,7 +615,7 @@
                multifile.setCreator(user.getId());
                multifile.setCreateDate(new Date());
                multifile.setObjId(insuranceApply.getId());
                multifile.setObjType(Constants.MultiFile.COMPANY_TBD_SIGNED_PDF.getKey());
                multifile.setObjType(Constants.MultiFile.BD_DONE_PDF.getKey());
                multifile.setType(Constants.TWO);
                multifile.setFileurl(unionApplyBXDDDetailTO.getFileUrl());
                multifile.setName(unionApplyBXDDDetailTO.getFileName());
@@ -522,7 +630,8 @@
                            new BigDecimal(applyDetails.size())
                            .multiply(price)
                    )
                    .set(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())
                    .set(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.WTB_DONE.getKey())
                    .set(InsuranceApply::getUnionApplyTbdStatus,3)
                    .set(InsuranceApply::getFee,price.multiply(new BigDecimal(applyDetails.size())).multiply(new BigDecimal(maxDays)))
                    .set(InsuranceApply::getCurrentFee,currentFee.multiply(new BigDecimal(applyDetails.size())))
                    .set(InsuranceApply::getStartTime,unionApplyBXDDTO.getStartTime())
@@ -564,16 +673,12 @@
            multifile.setCreator(user.getId());
            multifile.setCreateDate(new Date());
            multifile.setObjId(unionApply.getId());
            multifile.setObjType(Constants.MultiFile.HBD_BD_APPLY_PDF.getKey());
            multifile.setObjType(Constants.MultiFile.WTB_BD_DONE_PDF.getKey());
            multifile.setType(Constants.TWO);
            multifile.setFileurl(unionApplyBXDDTO.getFileUrl());
            multifile.setName(unionApplyBXDDTO.getFileName());
            multifileMapper.insert(multifile);
        }
    }
server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java
@@ -13,13 +13,12 @@
import com.doumee.dao.business.*;
import com.doumee.dao.business.dto.SaveUnionApplyDTO;
import com.doumee.dao.business.dto.SaveUnionChangeDTO;
import com.doumee.dao.business.dto.SmsCheckDTO;
import com.doumee.dao.business.dto.UnionChangeBXDDTO;
import com.doumee.dao.business.join.ApplyChagneDetailJoinMapper;
import com.doumee.dao.business.join.ApplyChangeJoinMapper;
import com.doumee.dao.business.join.ApplyDetailJoinMapper;
import com.doumee.dao.business.join.MemberInsuranceJoinMapper;
import com.doumee.dao.business.join.*;
import com.doumee.dao.business.model.*;
import com.doumee.dao.business.vo.CountCyclePriceVO;
import com.doumee.service.business.SmsEmailService;
import com.doumee.service.business.UnionChangeService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@@ -31,10 +30,12 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Objects;
@@ -50,6 +51,9 @@
    @Autowired
    private UnionChangeMapper unionChangeMapper;
    @Autowired
    private UnionChangeJoinMapper unionChangeJoinMapper;
    @Autowired
    private ApplyChangeJoinMapper applyChangeJoinMapper;
@@ -80,6 +84,13 @@
    @Autowired
    private InsuranceApplyMapper insuranceApplyMapper;
    @Value("${debug_model}")
    private boolean debugModel;
    @Autowired
    private SmsEmailService smsEmailService;
    @Autowired
    private MultifileMapper multifileMapper;
    @Override
    public Integer create(UnionChange unionChange) {
@@ -126,6 +137,31 @@
        return unionChangeMapper.selectById(id);
    }
    @Override
    public UnionChange getDetail(Integer id){
        UnionChange unionChange = unionChangeJoinMapper.selectJoinOne(UnionChange.class,
                new MPJLambdaWrapper<UnionChange>()
                        .selectAll(UnionChange.class)
                 .selectAs(UnionApply::getCode,UnionChange::getApplyCode)
                .selectAs(Solutions::getName,UnionChange::getSolutionsName)
                .selectAs(UnionApply::getStartTime,UnionChange::getStartTime)
                .selectAs(UnionApply::getEndTime,UnionChange::getEndTime)
                .selectAs(Company::getName,UnionChange::getShopName)
                .select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 0  )",UnionChange::getAddNum)
                .select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 1  )",UnionChange::getDelNum)
                .select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 2  )",UnionChange::getChangeNum)
                .leftJoin(UnionApply.class,UnionApply::getId,UnionChange::getUnionApplyId)
                .leftJoin(Solutions.class,Solutions::getId,UnionApply::getSolutionId)
                .leftJoin(Company.class,Company::getId,UnionChange::getShopId)
                        .eq(UnionChange::getId,id)
                        .last(" limit 1 ")
        );
        return unionChange;
    }
    @Override
    public UnionChange findOne(UnionChange unionChange) {
        QueryWrapper<UnionChange> wrapper = new QueryWrapper<>(unionChange);
@@ -141,59 +177,78 @@
    @Override
    public PageData<UnionChange> findPage(PageWrap<UnionChange> pageWrap) {
        IPage<UnionChange> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
        QueryWrapper<UnionChange> queryWrapper = new QueryWrapper<>();
        MPJLambdaWrapper<UnionChange> queryWrapper = new MPJLambdaWrapper<>();
        queryWrapper.selectAll(UnionChange.class);
        queryWrapper.selectAs(UnionApply::getCode,UnionChange::getApplyCode)
        .select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 0  )",UnionChange::getAddNum)
        .select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 1  )",UnionChange::getDelNum)
        .select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 2  )",UnionChange::getChangeNum);
        queryWrapper.leftJoin(UnionApply.class,UnionApply::getId,UnionChange::getUnionApplyId);
        queryWrapper.leftJoin(Solutions.class,Solutions::getId,UnionApply::getSolutionId);
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if(user.getType().equals(Constants.TWO)){
            queryWrapper.eq(UnionChange::getShopId, pageWrap.getModel().getShopId());
        }
        Utils.MP.blankToNull(pageWrap.getModel());
        if (pageWrap.getModel().getId() != null) {
            queryWrapper.lambda().eq(UnionChange::getId, pageWrap.getModel().getId());
            queryWrapper.eq(UnionChange::getId, pageWrap.getModel().getId());
        }
        if (pageWrap.getModel().getCreator() != null) {
            queryWrapper.lambda().eq(UnionChange::getCreator, pageWrap.getModel().getCreator());
            queryWrapper.eq(UnionChange::getCreator, pageWrap.getModel().getCreator());
        }
        if (pageWrap.getModel().getQueryStartTime() != null) {
            queryWrapper.ge(UnionChange::getCreateDate, pageWrap.getModel().getQueryStartTime() +" 00:00:00" );
        }
        if (pageWrap.getModel().getQueryEndTime() != null) {
            queryWrapper.le(UnionChange::getCreateDate, pageWrap.getModel().getQueryEndTime() +" 23:59:59");
        }
        if (pageWrap.getModel().getCreateDate() != null) {
            queryWrapper.lambda().ge(UnionChange::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate()));
            queryWrapper.lambda().le(UnionChange::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate()));
            queryWrapper.ge(UnionChange::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate()));
            queryWrapper.le(UnionChange::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate()));
        }
        if (pageWrap.getModel().getEditor() != null) {
            queryWrapper.lambda().eq(UnionChange::getEditor, pageWrap.getModel().getEditor());
            queryWrapper.eq(UnionChange::getEditor, pageWrap.getModel().getEditor());
        }
        if (pageWrap.getModel().getEditDate() != null) {
            queryWrapper.lambda().ge(UnionChange::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate()));
            queryWrapper.lambda().le(UnionChange::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate()));
            queryWrapper.ge(UnionChange::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate()));
            queryWrapper.le(UnionChange::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate()));
        }
        if (pageWrap.getModel().getIsdeleted() != null) {
            queryWrapper.lambda().eq(UnionChange::getIsdeleted, pageWrap.getModel().getIsdeleted());
            queryWrapper.eq(UnionChange::getIsdeleted, pageWrap.getModel().getIsdeleted());
        }
        if (pageWrap.getModel().getRemark() != null) {
            queryWrapper.lambda().eq(UnionChange::getRemark, pageWrap.getModel().getRemark());
            queryWrapper.eq(UnionChange::getRemark, pageWrap.getModel().getRemark());
        }
        if (pageWrap.getModel().getSortnum() != null) {
            queryWrapper.lambda().eq(UnionChange::getSortnum, pageWrap.getModel().getSortnum());
            queryWrapper.eq(UnionChange::getSortnum, pageWrap.getModel().getSortnum());
        }
        if (pageWrap.getModel().getShopId() != null) {
            queryWrapper.lambda().eq(UnionChange::getShopId, pageWrap.getModel().getShopId());
            queryWrapper.eq(UnionChange::getShopId, pageWrap.getModel().getShopId());
        }
        if (pageWrap.getModel().getCode() != null) {
            queryWrapper.lambda().eq(UnionChange::getCode, pageWrap.getModel().getCode());
            queryWrapper.eq(UnionChange::getCode, pageWrap.getModel().getCode());
        }
        if (pageWrap.getModel().getApplyStartTime() != null) {
            queryWrapper.lambda().ge(UnionChange::getApplyStartTime, Utils.Date.getStart(pageWrap.getModel().getApplyStartTime()));
            queryWrapper.lambda().le(UnionChange::getApplyStartTime, Utils.Date.getEnd(pageWrap.getModel().getApplyStartTime()));
            queryWrapper.ge(UnionChange::getApplyStartTime, Utils.Date.getStart(pageWrap.getModel().getApplyStartTime()));
            queryWrapper.le(UnionChange::getApplyStartTime, Utils.Date.getEnd(pageWrap.getModel().getApplyStartTime()));
        }
        if (pageWrap.getModel().getStatus() != null) {
            queryWrapper.lambda().eq(UnionChange::getStatus, pageWrap.getModel().getStatus());
            queryWrapper.eq(UnionChange::getStatus, pageWrap.getModel().getStatus());
        }
        if (pageWrap.getModel().getValidTime() != null) {
            queryWrapper.lambda().ge(UnionChange::getValidTime, Utils.Date.getStart(pageWrap.getModel().getValidTime()));
            queryWrapper.lambda().le(UnionChange::getValidTime, Utils.Date.getEnd(pageWrap.getModel().getValidTime()));
            queryWrapper.ge(UnionChange::getValidTime, Utils.Date.getStart(pageWrap.getModel().getValidTime()));
            queryWrapper.le(UnionChange::getValidTime, Utils.Date.getEnd(pageWrap.getModel().getValidTime()));
        }
        if (pageWrap.getModel().getValidCode() != null) {
            queryWrapper.lambda().eq(UnionChange::getValidCode, pageWrap.getModel().getValidCode());
            queryWrapper.eq(UnionChange::getValidCode, pageWrap.getModel().getValidCode());
        }
        if (pageWrap.getModel().getType() != null) {
            queryWrapper.lambda().eq(UnionChange::getType, pageWrap.getModel().getType());
            queryWrapper.eq(UnionChange::getType, pageWrap.getModel().getType());
        }
        if (pageWrap.getModel().getSignApplyNo() != null) {
            queryWrapper.lambda().eq(UnionChange::getSignApplyNo, pageWrap.getModel().getSignApplyNo());
            queryWrapper.eq(UnionChange::getSignApplyNo, pageWrap.getModel().getSignApplyNo());
        }
        for(PageWrap.SortData sortData: pageWrap.getSorts()) {
            if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) {
@@ -202,7 +257,8 @@
                queryWrapper.orderByAsc(sortData.getProperty());
            }
        }
        return PageData.from(unionChangeMapper.selectPage(page, queryWrapper));
        PageData<UnionChange> pageData = PageData.from(unionChangeJoinMapper.selectJoinPage(page,UnionChange.class, queryWrapper));
        return pageData;
    }
    @Override
@@ -233,7 +289,7 @@
                        .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId)
                        .eq(ApplyChange::getIsdeleted, Constants.ZERO)
                        .eq(InsuranceApply::getUnionApplyId,saveUnionChangeDTO.getUnionApplyId())
                        .eq(ApplyChange::getStatus,Constants.ApplyChangeStatus.COMPANY_SIGN.getKey())
                        .eq(ApplyChange::getStatus,Constants.ApplyChangeStatus.PALTFORM_CHECK_PASS.getKey())
                        .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())
                        .eq(ApplyChange::getType,saveUnionChangeDTO.getBusinessType())
                        .in(ApplyChange::getId,saveUnionChangeDTO.getApplyIds())
@@ -315,19 +371,77 @@
    }
    public UnionChange unionChangeDetail(Integer unionChangeId){
        UnionChange unionChange = unionChangeJoinMapper.selectJoinOne(UnionChange.class,
                new MPJLambdaWrapper<UnionChange>()
                        .selectAll(UnionChange.class)
                        .selectAs(Company::getName,UnionChange::getShopName)
                        .selectAs(Solutions::getName,UnionChange::getSolutionsName)
                        .selectAs(UnionApply::getCode,UnionChange::getApplyCode)
                        .selectAs(UnionApply::getStartTime,UnionChange::getStartTime)
                        .selectAs(UnionApply::getEndTime,UnionChange::getEndTime)
                        .leftJoin(UnionApply.class,UnionApply::getId,UnionChange::getUnionApplyId)
                        .leftJoin(Company.class,Company::getId,UnionChange::getShopId)
                        .leftJoin(Solutions.class,Solutions::getId,UnionApply::getSolutionId)
                        .eq(UnionChange::getId,unionChangeId)
                        .last(" limit 1 ")
        );
        //企业名称
        List<ApplyChange> applyChangeList = applyChangeJoinMapper.selectJoinList(ApplyChange.class,new MPJLambdaWrapper<ApplyChange>()
                .selectAs(Company::getName,ApplyChange::getCompanyName)
                .leftJoin(Company.class,Company::getId,ApplyChange::getCompanyId)
                .eq(ApplyChange::getUnionChangeId,unionChangeId)
        );
        String companyNames = String.join(",",applyChangeList.stream().map(m->m.getCompanyName()).collect(Collectors.toList()));
        List<ApplyChagneDetail> applyChagneDetailList = applyChagneDetailJoinMapper.selectJoinList(ApplyChagneDetail.class,new MPJLambdaWrapper<ApplyChagneDetail>()
                .selectAll(ApplyChagneDetail.class)
                .selectAs(Member::getName,ApplyChagneDetail::getMemberName)
                .selectAs(Member::getIdcardNo,ApplyChagneDetail::getIdcardNo)
                .selectAs(Member::getSex,ApplyChagneDetail::getSex)
                .selectAs(Company::getName,ApplyChagneDetail::getCompanyName)
                .select("t2.name",ApplyChagneDetail::getWorkTypeName)
                .select("t3.name",ApplyChagneDetail::getDuName)
                .select("t4.name",ApplyChagneDetail::getOldWorkTypeName)
                .select("t5.name",ApplyChagneDetail::getOldDuName)
                .leftJoin(Member.class,Member::getId,ApplyChagneDetail::getMemberId)
                .leftJoin(Worktype.class,Worktype::getId,ApplyChagneDetail::getWorktypeId)
                 .leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyChagneDetail::getDuId)
                 .leftJoin(Worktype.class,Worktype::getId,ApplyChagneDetail::getOldWorktypeId)
                 .leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyChagneDetail::getOldDuId)
                .leftJoin(Company.class,Company::getId,Member::getCompanyId)
                .eq(ApplyChagneDetail::getUnionChangeId,unionChangeId)
        );
        unionChange.setCompanyNames(companyNames);
        unionChange.setApplyChagneDetailList(applyChagneDetailList);
        return unionChange;
    }
    /**
     * åˆå¹¶å•(加减保/换厂) - æŠ•保申请签署
     * @param id
     * @param smsCheckDTO
     * @return
     */
    @Override
    @Transactional(rollbackFor = {Exception.class,BusinessException.class})
    public  String getSignLink(Integer id) {
        if(id == null ){
    public  String getSignLink(SmsCheckDTO smsCheckDTO) {
        if(Objects.isNull(smsCheckDTO)
                || Objects.isNull(smsCheckDTO.getBusinessId())
                || StringUtils.isBlank(smsCheckDTO.getCode())
        ){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        //验证 éªŒè¯ç 
        if(!debugModel){
            smsEmailService.validateCode(smsCheckDTO.getCode());
        }
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        UnionChange unionChange = unionChangeMapper.selectById(id);
        UnionChange unionChange = this.unionChangeDetail(smsCheckDTO.getBusinessId());
        if(Objects.isNull(unionChange)||!Constants.equalsInteger(unionChange.getIsdeleted(),Constants.ZERO)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY);
        }
@@ -350,11 +464,10 @@
        String fileUrl = null;
        if(Constants.equalsObject(unionChange.getType(), Constants.ONE)){
//            fileUrl = ExcelExporter.build(ApplyChange.class).exportChangeUnitExcelToPdf(model,"换厂申请表","被保险人");
            fileUrl = ExcelExporter.build(UnionChange.class).exportUnionChangeOtherUnitExcelToPdf(unionChange,"换厂申请表");
        }else{
//            fileUrl = ExcelExporter.build(ApplyChange.class).exportJiajianBaoExcelToPdf(model,"加减保申请表","被保险人");
            fileUrl = ExcelExporter.build(UnionChange.class).exportUnionChangeExcelToPdf(unionChange,"加减保申请表");
        }
        String notifyUrl = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.SIGN_DONE_NOTIFY_URL).getCode();
        notifyUrl = notifyUrl.replace("${type}","0").replace("${id}",unionChange.getId().toString());
        String applyNo = signService.applySignLocalFile(company.getName(),company.getName(),fileUrl,company.getCode(),company.getEmail(),"合并单(加减保/换厂)申请签署",company.getSignId(),notifyUrl);
@@ -383,8 +496,8 @@
        if(Objects.isNull(unionChangeBXDDTO)
            || Objects.isNull(unionChangeBXDDTO.getId())
                || Objects.isNull(unionChangeBXDDTO.getApplyDate())
                || StringUtils.isBlank(unionChangeBXDDTO.getFileName())
                || StringUtils.isBlank(unionChangeBXDDTO.getFileUrl())
                || StringUtils.isBlank(unionChangeBXDDTO.getName())
                || StringUtils.isBlank(unionChangeBXDDTO.getFileurl())
                || StringUtils.isBlank(unionChangeBXDDTO.getCode())
        ){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
@@ -414,14 +527,60 @@
                        .selectAs(InsuranceApply::getCode,ApplyChange::getApplyCode)
                        .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId)
                        .eq(ApplyChange::getUnionChangeId,unionChange.getId()));
        //存储合并单保险单
        Multifile multifile = new Multifile();
        multifile.setIsdeleted(Constants.ZERO);
        multifile.setCreator(user.getId());
        multifile.setCreateDate(new Date());
        multifile.setObjId(unionChangeBXDDTO.getId());
        multifile.setCreateDate(new Date());
        multifile.setObjType(Constants.MultiFile.WTB_CA_DONE_PDF.getKey());
        multifile.setType(Constants.TWO);
        multifile.setFileurl(unionChangeBXDDTO.getFileurl());
        multifile.setName(unionChangeBXDDTO.getName());
        multifileMapper.insert(multifile);
        if(CollectionUtils.isNotEmpty(unionChangeBXDDTO.getApplyChangeBXDList())){
            //查询是否不存在当前合并单的数据
            if(applyChangeJoinMapper.selectCount(new QueryWrapper<ApplyChange>()
                    .lambda().ne(ApplyChange::getUnionChangeId,unionChangeBXDDTO.getId())
                    .in(ApplyChange::getId,
                            unionChangeBXDDTO.getApplyChangeBXDList().stream().map(m->m.getObjId()).collect(Collectors.toList())
                    )
            )>Constants.ZERO){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"批单明细记录存在非本合并单数据");
            };
            for (Multifile m:unionChangeBXDDTO.getApplyChangeBXDList()) {
                if(Objects.isNull(m.getObjId())
                        ||StringUtils.isBlank(m.getFileurl())
                        ||StringUtils.isBlank(m.getName())
                ){
                    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);
            }
        }
        if(CollectionUtils.isNotEmpty(applyChangeList)){
            for (ApplyChange applyChange:applyChangeList) {
                applyChange.setApplyStartTime(unionChangeBXDDTO.getApplyDate());
                applyChange.setValidTime(unionChangeBXDDTO.getApplyDate());
                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()));
                this.dealApplyChangeDetail(applyChange,allList);
                applyChange.setCode(unionChangeBXDDTO.getCode());
                applyChange.setCheckUserId(user.getId());
                applyChangeJoinMapper.updateById(applyChange);
            }
        }
        unionChangeMapper.update(null,new UpdateWrapper<UnionChange>().lambda()
server/service/src/main/java/com/doumee/service/business/third/SignService.java
@@ -304,7 +304,6 @@
    /**
     * å‘起签约
     * @param name
     * @param fileUrl
     * @param file
     * @param creditCoe
     * @param email
@@ -318,7 +317,7 @@
          params.put("serverCa",1); //使用云证书
          params.put("file",new File(file));
          params.put("dealType",5); //指定合同文件签署方式 5 ä¸ºéƒ¨åˆ†è‡ªåŠ¨ç­¾
          params.put("positionType",2); //指定通过表单域方式设置签字位置
          params.put("positionType",0); //指定通过表单域方式设置签字位置
          params.put("fileType",0);
          params.put("needQifengSign",1);
          params.put("notifyUrl",notifyUrl);
@@ -330,7 +329,7 @@
          sReq.setEmail(email); //在君子签注册认证的邮箱
//        sReq.setChapteJson("[{\"page\":0,\"chaptes\":[{\"offsetX\":0.12,\"offsetY\":0.23}]},{\"page\":1,\"chaptes\":[{\"offsetX\":0.45,\"offsetY\":0.67}]}]");
//          sReq.setChapteJson(postionJson);
          sReq.setSearchKey(postionJson);
//          sReq.setSearchKey(postionJson);
          sReq.setSignId(singId);
          sReq.setSearchConvertExtend("{\"fixX\":-80,\"fixY\":-80}");
          sReq.setNoNeedVerify(1);
server/shop/src/main/java/com/doumee/api/business/ApplyChangeController.java
@@ -7,6 +7,7 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.ApplyChange;
import com.doumee.dao.business.model.InsuranceApply;
import com.doumee.service.business.ApplyChangeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -140,4 +141,12 @@
    public ApiResponse<ApplyChange> findById(@PathVariable Integer id) {
        return ApiResponse.success(applyChangeService.findDetail(id));
    }
    @ApiOperation("商户审核 - å§”托保业务")
    @PostMapping("/check")
    @RequiresPermissions("business:applychange:check")
    public ApiResponse check(@RequestBody ApplyChange model) {
        return ApiResponse.success(applyChangeService.check(model));
    }
}
server/shop/src/main/java/com/doumee/api/business/UnionApplyController.java
@@ -6,6 +6,10 @@
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.dto.SaveUnionApplyDTO;
import com.doumee.dao.business.dto.SmsCheckDTO;
import com.doumee.dao.business.dto.UnionApplyBXDDTO;
import com.doumee.dao.business.dto.UploadMultifileDTO;
import com.doumee.dao.business.model.UnionApply;
import com.doumee.service.business.UnionApplyService;
import io.swagger.annotations.Api;
@@ -81,10 +85,56 @@
        ExcelExporter.build(UnionApply.class).export(unionApplyService.findPage(pageWrap).getRecords(), "合并投保单信息表", response);
    }
    @ApiOperation("根据ID查询")
    @GetMapping("/{id}")
    @RequiresPermissions("business:unionapply:query")
    public ApiResponse findById(@PathVariable Integer id) {
        return ApiResponse.success(unionApplyService.findById(id));
    public ApiResponse<UnionApply> findById(@PathVariable Integer id) {
        return ApiResponse.success(unionApplyService.detail(id));
    }
    @PreventRepeat
    @ApiOperation("创建合并单")
    @PostMapping("/merge")
    @RequiresPermissions("business:unionapply:create")
    public ApiResponse merge(@RequestBody SaveUnionApplyDTO saveUnionApplyDTO) {
        return ApiResponse.success(unionApplyService.merge(saveUnionApplyDTO));
    }
    @ApiOperation("关闭合并单")
    @GetMapping("/close")
    @RequiresPermissions("business:unionapply:close")
    public ApiResponse close(@RequestParam Integer id) {
        unionApplyService.cancelMerge(id);
        return ApiResponse.success(null);
    }
    @PreventRepeat
    @ApiOperation("上传投保单")
    @PostMapping("/uploadToubaodan")
    @RequiresPermissions("business:unionapply:create")
    public ApiResponse uploadToubaodan(@RequestBody UploadMultifileDTO uploadMultifileDTO) {
        unionApplyService.uploadToubaodan(uploadMultifileDTO);
        return ApiResponse.success(null);
    }
    @ApiOperation("签署申请单")
    @PostMapping("/getSignLink")
    @RequiresPermissions("business:unionapply:query")
    public ApiResponse getSignLink(@RequestBody SmsCheckDTO smsCheckDTO) {
        unionApplyService.getSignLink(smsCheckDTO);
        return ApiResponse.success(null);
    }
    @ApiOperation("上传保险单")
    @PostMapping("/uploadBXD")
    @RequiresPermissions("business:unionchange:query")
    public ApiResponse uploadBXD(@RequestBody UnionApplyBXDDTO unionApplyBXDDTO) {
        unionApplyService.uploadBXD(unionApplyBXDDTO);
        return ApiResponse.success(null);
    }
}
server/shop/src/main/java/com/doumee/api/business/UnionChangeController.java
@@ -6,6 +6,9 @@
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.dto.SaveUnionChangeDTO;
import com.doumee.dao.business.dto.SmsCheckDTO;
import com.doumee.dao.business.dto.UnionChangeBXDDTO;
import com.doumee.dao.business.model.UnionChange;
import com.doumee.service.business.UnionChangeService;
import io.swagger.annotations.Api;
@@ -85,6 +88,40 @@
    @GetMapping("/{id}")
    @RequiresPermissions("business:unionchange:query")
    public ApiResponse findById(@PathVariable Integer id) {
        return ApiResponse.success(unionChangeService.findById(id));
        return ApiResponse.success(unionChangeService.getDetail(id));
    }
    @PreventRepeat
    @ApiOperation("创建合并单")
    @PostMapping("/merge")
    @RequiresPermissions("business:unionchange:create")
    public ApiResponse merge(@RequestBody SaveUnionChangeDTO saveUnionChangeDTO) {
        return ApiResponse.success(unionChangeService.merge(saveUnionChangeDTO));
    }
    @ApiOperation("关闭合并单")
    @GetMapping("/close")
    @RequiresPermissions("business:unionchange:close")
    public ApiResponse close(@RequestParam Integer id) {
        unionChangeService.cancelMerge(id);
        return ApiResponse.success(null);
    }
    @ApiOperation("签署申请单")
    @PostMapping("/getSignLink")
    @RequiresPermissions("business:unionchange:query")
    public ApiResponse getSignLink(@RequestBody SmsCheckDTO smsCheckDTO) {
        unionChangeService.getSignLink(smsCheckDTO);
        return ApiResponse.success(null);
    }
    @ApiOperation("上传保险单")
    @PostMapping("/uploadBXD")
    @RequiresPermissions("business:unionchange:query")
    public ApiResponse uploadBXD(@RequestBody UnionChangeBXDDTO unionChangeBXDDTO) {
        unionChangeService.uploadBXD(unionChangeBXDDTO);
        return ApiResponse.success(null);
    }
}