MrShi
2024-02-01 27e41b5c21b4ba13178b2184c76c4d8cba0952b6
Mr.Shi
已添加1个文件
已修改24个文件
1224 ■■■■■ 文件已修改
company/src/components/business/OperaApplyChangeDetailWindow.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaApplyChangeUnitDetailWindow.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaCompanyWindow.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaInsuranceApplyCheckWindow.vue 246 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaInsuranceApplyWindow.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaSettleClaimsCheckWindow.vue 482 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaTaxesWindow.vue 106 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/business/applyChange.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/business/switchCourt.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/business/taxes.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/pom.xml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/core/utils/Constants.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/ApplyChange.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/SmsEmail.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/SmsEmailService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java 100 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/SettleClaimsServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/SmsEmailServiceImpl.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/third/EmailService.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/third/EmayService.java 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/resources/application-dev.yml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/resources/application-pro.yml 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/resources/application-test.yml 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaApplyChangeDetailWindow.vue
@@ -12,8 +12,13 @@
                    <div class="desc_item_label_left">
                        <span>投保企业:{{ apply.companyName }}</span>
                      <span v-if="model.status === 0">保单状态:待签署</span>
<<<<<<< HEAD
                      <span v-if="model.status === 1">保单状态:待审核</span>
                      <span v-if="model.status === 2">保单状态:已上传批单</span>
=======
                      <span v-if="model.status === 1">保单状态:已签章</span>
                      <span v-if="model.status === 2">保单状态:已生效</span>
>>>>>>> 35bd55ad951fe8c5fb997dfa7bd836ad53db96fe
                      <span v-if="model.status === 3 || model.status === 4">保单状态:退回申请</span>
                      <span v-if="model.status === 5 || model.status === 8">保单状态:已退回</span>
                      <span v-if="model.status === 7 || model.status === 6">保单状态:已关闭</span>
company/src/components/business/OperaApplyChangeUnitDetailWindow.vue
@@ -12,8 +12,13 @@
                    <div class="desc_item_label_left">
                        <span>投保企业:{{ apply.companyName }}</span>
                      <span v-if="model.status === 0">保单状态:待签署</span>
<<<<<<< HEAD
                      <span v-if="model.status === 1">保单状态:待审核</span>
                      <span v-if="model.status === 2">保单状态:已上传批单</span>
=======
                      <span v-if="model.status === 1">保单状态:已签章</span>
                      <span v-if="model.status === 2">保单状态:已生效</span>
>>>>>>> 35bd55ad951fe8c5fb997dfa7bd836ad53db96fe
                      <span v-if="model.status === 3 || model.status === 4">保单状态:退回申请</span>
                      <span v-if="model.status ===5 || model.status === 8">保单状态:已退回</span>
                      <span v-if="model.status ===7">保单状态:已关闭</span>
company/src/components/business/OperaCompanyWindow.vue
@@ -1,7 +1,7 @@
<template>
    <GlobalWindow
        :title="title"
        width="50%"
        width="60%"
        :visible.sync="visible"
        :confirm-working="isWorking"
        @confirm="confirm"
company/src/components/business/OperaInsuranceApplyCheckWindow.vue
@@ -7,109 +7,65 @@
        @confirm="confirm"
    >
        <!--    é€€å›žæŠ•保    -->
            <div v-if="visible1==true"  class="form">
                <div class="form_item">
                    <div class="form_item_label"><span>*</span>填写退回说明:</div>
                    <div class="form_item_val">
                        <textarea  v-model="form.backCheckInfo" placeholder="请输入"></textarea>
                    </div>
                </div>
            </div>
        <!--    ä¸Šä¼ æŠ•保单    -->
            <div v-if="visible2==true" class="form">
                <div class="form_item">
                    <div class="form_item_label">上传投保单:</div>
                    <div class="form_item_val">
                      <UploadFile :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileList="form.fileList" @uploadSuccess="toubaoFileUploaded" />
                    </div>
                </div>
            </div>
        <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 :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileList="form.fileList" @uploadSuccess="toubaoFileUploaded" />
          </el-form-item>
        </el-form>
        <!--    ä¸Šä¼ ä¿é™©å•    -->
            <div v-if="visible3==true" class="form">
                <div class="form_item">
                    <div class="form_item_label">客户期望保险生效起期:</div>
                    <div class="form_item_val">{{ model.applyStartTime }}</div>
                </div>
                <div class="form_item">
                    <div class="form_item_label">保险生效起期是否一致:</div>
                    <div class="form_item_val">
                        <el-radio-group v-model="form.selectRadio" @change="selectChange">
                            <el-radio :label="0"  >与保单一致</el-radio>
                            <el-radio :label="1" >与保单不一致</el-radio>
                        </el-radio-group>
                    </div>
                </div>
                <div class="form_item">
                    <div class="form_item_label"><span>*</span>保险生效起期:</div>
                    <div class="form_item_val">
                        <el-date-picker
                            v-model="form.startTime"
                            type="date"
                            value-format="yyyy-MM-dd HH:mm:ss"
                            placeholder="选择日期">
                        </el-date-picker>
                    </div>
                </div>
                <div class="form_item">
                    <div class="form_item_label">保险生效起期:</div>
                    <div class="form_item_val">{{ form.startTime }}</div>
                </div>
                <div class="form_item">
                    <div class="form_item_label"><span>*</span>保单号:</div>
                    <div class="form_item_val" >
                        <el-input v-model="form.code" placeholder="请输入"></el-input>
                    </div>
                </div>
                <div class="form_item">
                    <div class="form_item_label">上传保险单:</div>
                    <div class="form_item_val">
                      <UploadFile :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileList="form.fileList1" @uploadSuccess="baoxianFileUploaded" />
                    </div>
                </div>
            </div>
              <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" >
                  <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>
        <!--    ä¿®æ”¹ä¿é™©å•    -->
            <div v-if="visible4==true" class="form">
                <div class="form_item">
                  <div class="form_item_label">保险生效起期:</div>
                  <div class="form_item_val">{{ model.startTime }}</div>
                </div>
                <div class="form_item">
                    <div class="form_item_label"><span>*</span>保单号:</div>
                    <div class="form_item_val">
                        <el-input v-model="form.editCode" placeholder="请输入"></el-input>
                    </div>
                </div>
                <div class="form_item">
                    <div class="form_item_label"><span>*</span>上传保险单:</div>
                    <div class="form_item_val">
                      <UploadFile :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileList="form.fileList2" @uploadSuccess="editBaoxianFileUploaded" />
                    </div>
                </div>
                <div class="form_item">
                    <div class="form_item_label"><span>*</span>修改原因:</div>
                    <div class="form_item_val">
                        <el-input placeholder="请输入" v-model="form.editCheckInfo" ></el-input>
                    </div>
                </div>
            </div>
        <!--    é©³å›žé€€å›žç”³è¯·    -->
        <div v-if="visible5==true" class="form">
            <div class="form_item">
                <div class="form_item_label"><span>*</span>填写说明:</div>
                <div class="form_item_val">
                    <textarea v-model="form.dealBackInfo"  placeholder="请输入"></textarea>
                </div>
            </div>
        </div>
        <!--    åŒæ„é€€å›žç”³è¯·    -->
        <div v-if="visible6==true" class="form">
            <div class="form_item">
                <div class="form_item_label"><span>*</span>同意退回说明:</div>
                <div class="form_item_val">
                    <textarea  v-model="form.dealBackInfo"  placeholder="请输入"></textarea>
                </div>
            </div>
        </div>
      <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>
@@ -129,6 +85,7 @@
  check
} from "@/api/business/insuranceApply";
import UploadFile from "@/components/common/UploadFile";
import {remark} from "@/api/business/settleClaims";
export default {
  name: 'OperaChangeApplyCheckWindow',
  extends: BaseOpera,
@@ -138,6 +95,43 @@
      // è¡¨å•数据
      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:'',
@@ -221,17 +215,53 @@
     },
    doSubmit(){
      if (this.flag == 1) {
        this.backDo()
      } else  if (this.flag == 2) {
        this.uploadToubaodan()
        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.uploadBaoxiandan()
        this.$refs.form3.validate((valid) => {
          // debugger
          if (!valid) {
            return
          }
          this.uploadBaoxiandan()
        })
      } else if (this.flag == 4) {
        this.editBaoxiandan()
        this.$refs.form4.validate((valid) => {
          // debugger
          if (!valid) {
            return
          }
          this.editBaoxiandan()
        })
      } else if (this.flag == 5) {
        this.dealBackApply(1)
        this.$refs.form5.validate((valid) => {
          // debugger
          if (!valid) {
            return
          }
          this.dealBackApply(1)
        })
      } else if (this.flag == 6) {
        this.dealBackApply(0)
        this.$refs.form5.validate((valid) => {
          // debugger
          if (!valid) {
            return
          }
          this.dealBackApply(0)
        })
      }
    },
    selectChange(){
company/src/components/business/OperaInsuranceApplyWindow.vue
@@ -31,16 +31,17 @@
                          <el-button v-if="model.status == 5" type="primary" @click="viewBaoxiandan">查看保险单</el-button>
                          <el-button v-if="model.status == 2" type="primary" @click="goSign">签署投保单</el-button>
                      </template>
                      <template v-else>
                            <el-button type="primary" @click="$refs.InsuranceDetails.open('投保详情单',model,0)">导出详单</el-button>
                        <el-button v-if="[2, 3, 5, 7, 8].includes(model.status)" type="primary" @click="viewToubaodan">查看投保单</el-button>
                        <el-button v-if="model.status == 5" type="primary" @click="viewBaoxiandan">查看保险单</el-button>
                        <el-button v-if="model.status == 10" type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('上传投保单',model,2)">上传投保单</el-button>
                        <el-button v-if="model.status == 3" type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('上传保险单',model,3)">上传保险单</el-button>
                        <el-button  v-if="model.status == 6 || model.status == 7|| model.status == 8" type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('驳回退回申请',model,5)">驳回退回申请</el-button>
                        <el-button v-if="model.status != 5 && model.status != 4 && model.status != 1" type="danger" @click="$refs.OperaInsuranceApplyCheckWindow.open('退回投保',model,1)">退回投保</el-button>
                        <el-button v-if="model.status == 5" type="danger" @click="$refs.OperaInsuranceApplyCheckWindow.open('修改保险单',model,4)">修改保险单</el-button>
                      </template>
                    <template v-else>
                      <el-button type="primary" @click="$refs.InsuranceDetails.open('投保详情单',model,0)">导出详单</el-button>
                      <el-button v-if="[2, 3, 5, 7, 8].includes(model.status)" type="primary" @click="viewToubaodan">查看投保单</el-button>
                      <el-button v-if="model.status == 5" type="primary" @click="viewBaoxiandan">查看保险单</el-button>
                      <el-button v-if="model.status == 10" type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('上传投保单',model,2)">上传投保单</el-button>
                      <el-button v-if="model.status == 3" type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('上传保险单',model,3)">上传保险单</el-button>
                      <el-button  v-if="model.status == 6 || model.status == 7|| model.status == 8" type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('驳回退回申请',model,5)">驳回退回申请</el-button>
                      <el-button v-if="model.status == 0" type="primary" @click="$refs.InsuranceDetails.open('投保审核',model,1)">投保审核</el-button>
                      <el-button v-if="model.status != 5 && model.status != 4 && model.status != 1" type="danger" @click="$refs.OperaInsuranceApplyCheckWindow.open('退回投保',model,1)">退回投保</el-button>
                      <el-button v-if="model.status == 5" type="danger" @click="$refs.OperaInsuranceApplyCheckWindow.open('修改保险单',model,4)">修改保险单</el-button>
                    </template>
                  </div>
                </div>
                <div class="desc_item_from">
company/src/components/business/OperaSettleClaimsCheckWindow.vue
@@ -6,92 +6,51 @@
        :confirm-working="isWorking"
        @confirm="confirm"
    >
            <div v-if="visible1==true" class="form">
                <div class="form_item">
                    <div class="form_item_label">
                        <span>*</span>报案号:
                    </div>
                    <div class="form_item_val">
                        <input type="text" v-model="form.reportNum" placeholder="请输入">
                    </div>
                </div>
            </div>
            <div  v-if="visible2==true" class="form">
                <div class="form_item">
                    <div class="form_item_label">
                        <span>*</span>处理进展:
                    </div>
                    <div class="form_item_val">
                        <textarea v-model="form.bizInfo" placeholder="请输入"></textarea>
                    </div>
                </div>
            </div>
            <div  v-if="visible3==true" class="form">
                <div class="form_item">
                    <div class="form_item_label">
                        <span>*</span>填写撤销说明:
                    </div>
                    <div class="form_item_val">
                        <textarea v-model="form.backInfo" placeholder="请输入"></textarea>
                    </div>
                </div>
            </div>
            <div  v-if="visible4==true" class="form">
                <div class="form_item">
                    <div class="form_item_label">
                        <span>*</span>结案内容:
                    </div>
                    <div class="form_item_val">
                        <textarea v-model="form.doneInfo" placeholder="请输入"></textarea>
                    </div>
                </div>
                <div class="form_item">
                    <div class="form_item_label">
                         åŒ»ç–—理赔:
                    </div>
                    <div class="form_item_val">
                        <input v-model="form.ylClaimAccount" placeholder="请输入" />
                    </div>
                </div>
                <div class="form_item">
                    <div class="form_item_label">
                        è¯¯å·¥ç†èµ”:
                    </div>
                    <div class="form_item_val">
                        <input v-model="form.wgClaimAccount" placeholder="请输入" />
                    </div>
                </div>
                <div class="form_item">
                    <div class="form_item_label">
                        ä¼¤æ®‹ç†èµ”:
                    </div>
                    <div class="form_item_val">
                        <input v-model="form.scClaimAccount" placeholder="请输入" />
                    </div>
                </div>
                <div class="form_item">
                    <div class="form_item_label">
                         æ­»äº¡ç†èµ”:
                    </div>
                    <div class="form_item_val">
                        <input v-model="form.swClaimAccount" placeholder="请输入" />
                    </div>
                </div>
            </div>
              <el-form v-if="visible1==true" :model="form" ref="form1" :rules="rules1" style="width: 100%;">
                <el-form-item label="报案号:" prop="reportNum">
                  <el-input v-model="form.reportNum" 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="bizInfo">
                  <el-input type="textarea" v-model="form.bizInfo" placeholder="请输入" v-trim/>
                </el-form-item>
              </el-form>
              <el-form v-if="visible3==true" :model="form" ref="form3" :rules="rules3" style="width: 100%;">
                <el-form-item label="撤销说明:" prop="backInfo">
                  <el-input type="textarea" v-model="form.backInfo" placeholder="请输入" v-trim/>
                </el-form-item>
              </el-form>
              <el-form v-if="visible4==true" :model="form" ref="form4" :rules="rules4" style="width: 100%;">
                <el-form-item label="结案内容:" prop="doneInfo">
                  <el-input type="textarea" v-model="form.doneInfo" @change="changeAccount" placeholder="请输入" v-trim/>
                </el-form-item>
                <el-form-item label="医疗理赔(元):" prop="ylClaimAccount">
                  <el-input type="number" v-model="form.ylClaimAccount"  @change="changeAccount" placeholder="请输入" v-trim/>
                </el-form-item>
                <el-form-item label="误工理赔(元):" prop="wgClaimAccount">
                  <el-input type="number" v-model="form.wgClaimAccount" @change="changeAccount"  placeholder="请输入" v-trim/>
                </el-form-item>
                <el-form-item label="伤残理赔(元):" prop="scClaimAccount">
                  <el-input type="number" v-model="form.scClaimAccount" @change="changeAccount"  placeholder="请输入" v-trim/>
                </el-form-item>
                <el-form-item label="死亡理赔(元):" prop="swClaimAccount">
                  <el-input type="number" v-model="form.swClaimAccount"  @change="changeAccount"  placeholder="请输入" v-trim/>
                </el-form-item>
                <el-form-item label="总金额:"  >
                  <el-input type="number" readonly v-model="form.totalAccount" placeholder="请输入" v-trim/>
                </el-form-item>
              </el-form>
            <div v-if="visible5 ==true"  class="form">
                <div class="form_span" v-for="(item,index) in remarkLogList" :key="index">
                    <span>理赔员-{{ item.creatorName }} {{item.createDate }}</span>
                    <span>{{item.content }}</span>
                </div>
                <div class="form_item">
                    <div class="form_item_label">
                        <span>*</span>填写备注标签:
                    </div>
                    <div class="form_item_val">
                        <textarea v-model="form.remarkInfo" placeholder="请输入"></textarea>
                    </div>
                </div>
                <el-form :model="form" ref="form5" :rules="rules5" style="width: 100%;">
                  <el-form-item label="填写备注标签:" prop="remarkInfo">
                    <el-input type="textarea" v-model="form.remarkInfo" placeholder="请输入" v-trim/>
                  </el-form-item>
                </el-form>
            </div>
      <template v-slot:footer>
        <el-button type="primary" @click="doSubmit">确定</el-button>
@@ -101,155 +60,220 @@
</template>
<script>
    import BaseOpera from '@/components/base/BaseOpera'
    import GlobalWindow from '@/components/common/GlobalWindow'
    import {addCode, back, dealBiz,doneCommit, remark} from "@/api/business/settleClaims";
    export default {
        name: 'OperaSettleClaimsCheckWindow',
        extends: BaseOpera,
        components: { GlobalWindow },
        data () {
            return {
              remarkLogList:[],
              type:0,
                // è¡¨å•数据
              form: {
                id: null,
                checkInfo: null,
                bizInfo: null,
                doneInfo: null,
                backInfo: null,
                remarkInfo: null,
                ylClaimAccount: null,
                wgClaimAccount: null,
                swClaimAccount: null,
                scClaimAccount: null,
                reportNum: null,
              },
              model:{},
                activeName: 'first',
                reverse: true,
                tableData: [],
                visible1: false,
                visible2: false,
                visible3: false,
                visible4: false,
                visible5: false
            }
        },
        created () {
            this.config({
                api: '/business/settleClaims',
                'field.id': 'id'
            })
        },
        methods: {
          open(title,target,target1,type){
            this.model ={}
            this.model = target
            this.title=title
            this.visible=true
            this.type=type
            this.remarkLogList= target1
            this.visible1=false,
            this.visible2= false,
            this.visible3=false,
            this. visible4= false,
            this. visible5= false
            this.form=target
            this. form= {
              id: null,
               checkInfo: null,
              doneInfo: null,
              remarkInfo: null,
              bizInfo: null,
              backInfo: null,
              ylClaimAccount: null,
              wgClaimAccount: null,
              swClaimAccount: null,
              scClaimAccount: null,
               reportNum: null,
            }
            if(type==1){
              this.visible1=true
            }
            if(type==2){
              this.visible2=true
            }
            if(type==3){
              this.visible3=true
            }
            if(type==4){
              this.visible4=true
            }
            if(type==5){
              this.visible5=true
            }
       },
            doSubmit(type) {
              var that =this
              if(this.type ===5){
                // this.isWorking = true
                remark({id:that.model.id,checkInfo:that.form.remarkInfo})
                    .then(response => {
                      this.visible=false
                      this.$emit('success')
                    }).catch(err => {
                  this.$tip.apiFailed(err)
                })
              }else if(this.type === 4){
                // this.isWorking = true
                doneCommit({id: that.model.id, checkInfo: that.form.doneInfo,
                  ylClaimAccount: that.form.ylClaimAccount,
                  wgClaimAccount: that.form.wgClaimAccount,
                  swClaimAccount: that.form.swClaimAccount,
                  scClaimAccount: that.form.scClaimAccount})
                    .then(response => {
                      this.visible=false
                      this.$emit('success')
                    }).catch(err => {
                  this.$tip.apiFailed(err)
                })
              }else if(this.type===2){
                //理赔处理
                dealBiz({ id: that.model.id, checkInfo:that.form.bizInfo })
                    .then(response => {
                      this.visible=false
                      this.$emit('success')
                    }).catch(err => {
                  console.log(err)
                  this.$tip.apiFailed(err)
                }).finally(() => {
                  this.isWorking = false
                })
              }else if(this.type===3){
                //理赔处理
                back({ id: that.model.id, checkInfo:that.form.backInfo })
                    .then(response => {
                      this.visible=false
                      this.$emit('success')
                    }).catch(err => {
                  console.log(err)
                  this.$tip.apiFailed(err)
                }).finally(() => {
                  this.isWorking = false
                })
              }else if(this.type===1){
                //添加备案号
                addCode({ id: that.model.id, reportNum:that.form.reportNum })
                    .then(response => {
                      this.visible=false
                      this.$emit('success')
                    }).catch(err => {
                      console.log(err)
                      this.$tip.apiFailed(err)
                    }).finally(() => {
                      this.isWorking = false
                    })
              }
            }
        }
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
import { addCode, back, dealBiz, doneCommit, remark } from '@/api/business/settleClaims'
export default {
  name: 'OperaSettleClaimsCheckWindow',
  extends: BaseOpera,
  components: { GlobalWindow },
  data () {
    return {
      remarkLogList: [],
      type: 0,
      // è¡¨å•数据
      form: {
        id: null,
        checkInfo: null,
        bizInfo: null,
        doneInfo: null,
        backInfo: null,
        remarkInfo: null,
        ylClaimAccount: 0,
        wgClaimAccount: 0,
        swClaimAccount: 0,
        scClaimAccount: 0,
        reportNum: null,
        totalAccount:0
      },
      model: {},
      activeName: 'first',
      reverse: true,
      tableData: [],
      visible1: false,
      visible2: false,
      visible3: false,
      visible4: false,
      visible5: false,
      rules1: {
        reportNum: [
          { required: true, message: '请输入' }
        ]
      },
      rules2: {
        bizInfo: [
          { required: true, message: '请输入' }
        ]
      },
      rules3: {
        backInfo: [
          { required: true, message: '请输入' }
        ]
      },
      rules5: {
        remarkInfo: [
          { required: true, message: '请输入' }
        ]
      },
      rules4: {
        doneInfo: [
          { required: true, message: '请输入' }
        ]
      }
    }
  },
  created () {
    this.config({
      api: '/business/settleClaims',
      'field.id': 'id'
    })
  },
  methods: {
    open (title, target, target1, type) {
      this.model = {}
      this.model = target
      this.title = title
      this.visible = true
      this.type = type
      this.remarkLogList = target1
      this.visible1 = false,
      this.visible2 = false,
      this.visible3 = false,
      this.visible4 = false,
      this.visible5 = false
      this.form = target
      this.form = {
        id: null,
        checkInfo: null,
        doneInfo: null,
        remarkInfo: null,
        bizInfo: null,
        backInfo: null,
        ylClaimAccount: 0,
        wgClaimAccount: 0,
        swClaimAccount: 0,
        scClaimAccount: 0,
        reportNum: null,
        totalAccount:0
      }
      if (type == 1) {
        this.visible1 = true
      }
      if (type == 2) {
        this.visible2 = true
      }
      if (type == 3) {
        this.visible3 = true
      }
      if (type == 4) {
        this.visible4 = true
      }
      if (type == 5) {
        this.visible5 = true
      }
    },
     changeAccount(){
       this.form.swClaimAccount = parseFloat(this.form.swClaimAccount).toFixed(2)
       this.form.scClaimAccount = parseFloat(this.form.scClaimAccount).toFixed(2)
       this.form.wgClaimAccount = parseFloat(this.form.wgClaimAccount).toFixed(2)
       this.form.ylClaimAccount = parseFloat(this.form.ylClaimAccount).toFixed(2)
      this.form.totalAccount = parseFloat( this.form.scClaimAccount || 0) + parseFloat( this.form.swClaimAccount || 0)
         + parseFloat( this.form.wgClaimAccount|| 0)
         + parseFloat( this.form.ylClaimAccount|| 0)
     },
    doSubmit (type) {
      var that = this
      if (this.type === 5) {
        this.$refs.form5.validate((valid) => {
          // debugger
          if (!valid) {
            return
          }
          remark({ id: that.model.id, checkInfo: that.form.remarkInfo })
            .then(response => {
              this.visible = false
              this.$emit('success')
            }).catch(err => {
              this.$tip.apiFailed(err)
            })
        })
      } else if (this.type === 4) {
        this.$refs.form4.validate((valid) => {
          // debugger
          if (!valid) {
            return
          }
          doneCommit({
            id: that.model.id,
            checkInfo: that.form.doneInfo,
            ylClaimAccount: that.form.ylClaimAccount,
            wgClaimAccount: that.form.wgClaimAccount,
            swClaimAccount: that.form.swClaimAccount,
            scClaimAccount: that.form.scClaimAccount
          }).then(response => {
            this.visible = false
            this.$emit('success')
          }).catch(err => {
            this.$tip.apiFailed(err)
          })
        })
      } else if (this.type === 2) {
        this.$refs.form2.validate((valid) => {
          // debugger
          if (!valid) {
            return
          }
          // ç†èµ”处理
          dealBiz({ id: that.model.id, checkInfo: that.form.bizInfo })
            .then(response => {
              this.visible = false
              this.$emit('success')
            }).catch(err => {
              console.log(err)
              this.$tip.apiFailed(err)
            }).finally(() => {
              this.isWorking = false
            })
        })
      } else if (this.type === 3) {
        this.$refs.form3.validate((valid) => {
          // debugger
          if (!valid) {
            return
          }
          back({ id: that.model.id, checkInfo: that.form.backInfo })
            .then(response => {
              this.visible = false
              this.$emit('success')
            }).catch(err => {
              console.log(err)
              this.$tip.apiFailed(err)
            }).finally(() => {
              this.isWorking = false
            })
        })
      } else if (this.type === 1) {
        // æ·»åŠ å¤‡æ¡ˆå·
        this.$refs.form1.validate((valid) => {
          // debugger
          if (!valid) {
            return
          }
          addCode({ id: that.model.id, reportNum: that.form.reportNum })
            .then(response => {
              this.visible = false
              this.$emit('success')
            }).catch(err => {
              console.log(err)
              this.$tip.apiFailed(err)
            }).finally(() => {
              this.isWorking = false
            })
        })
      }
    }
  }
}
</script>
<style>
    .v-modal {
company/src/components/business/OperaTaxesWindow.vue
@@ -1,7 +1,7 @@
<template>
    <GlobalWindow
        :title="title"
        width="50%"
        width="100%"
        submitText="返回修改"
        :visible.sync="visible"
        :confirm-working="isWorking"
@@ -87,57 +87,59 @@
</template>
<script>
    import BaseOpera from '@/components/base/BaseOpera'
    import GlobalWindow from '@/components/common/GlobalWindow'
    export default {
        name: 'OperaCompanyWindow',
        extends: BaseOpera,
        components: { GlobalWindow },
        data () {
            return {
                // è¡¨å•数据
                form: {
                    id: null
                },
                // éªŒè¯è§„则
                rules: {},
              tableData:[]
            }
        },
        created () {
            this.config({
                api: '/business/taxes',
                'field.id': 'id'
            })
        },
        methods: {
            getSummaries(param) {
                const { columns, data } = param;
                const sums = [];
                columns.forEach((column, index) => {
                    if (index === 0) {
                        sums[index] = '合计';
                        return;
                    } else {
                        if (index == 9||index==10||index==11||index==12) {
                            const values = data.map(item => Number(item[column.property]));
                            if (!values.every(value => isNaN(value))) {
                                sums[index] = values.reduce((prev, curr) => {
                                    const value = Number(curr);
                                    if (!isNaN(value)) {
                                        return prev + curr;
                                    } else {
                                        return prev;
                                    }
                                }, 0);
                            }
                        }
                    }
                });
                return sums;
            }
        }
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
export default {
  name: 'OperaCompanyWindow',
  extends: BaseOpera,
  components: { GlobalWindow },
  data () {
    return {
      // è¡¨å•数据
      form: {
        id: null
      },
      // éªŒè¯è§„则
      rules: {},
      tableData: []
    }
  },
  created () {
    this.config({
      api: '/business/taxes',
      'field.id': 'id'
    })
  },
  methods: {
    open(title,targer){
    },
    getSummaries (param) {
      const { columns, data } = param
      const sums = []
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = '合计'
        } else {
          if (index == 9 || index == 10 || index == 11 || index == 12) {
            const values = data.map(item => Number(item[column.property]))
            if (!values.every(value => isNaN(value))) {
              sums[index] = values.reduce((prev, curr) => {
                const value = Number(curr)
                if (!isNaN(value)) {
                  return prev + curr
                } else {
                  return prev
                }
              }, 0)
            }
          }
        }
      })
      return sums
    }
  }
}
</script>
<style lang="scss" scoped>
@@ -150,7 +152,7 @@
            justify-content: space-between;
            margin-bottom: 20px;
            span {
                font-size: 18px;
                font-size: 14px;
                font-weight: 500;
                color: #000000;
            }
company/src/views/business/applyChange.vue
@@ -66,7 +66,7 @@
          <template slot-scope="{row}">
            <span v-if="row.status === 0">待签署</span>
            <span v-if="row.status === 1">已签章</span>
            <span v-if="row.status === 2">已上传批单</span>
            <span v-if="row.status === 2">已生效</span>
            <span v-if="row.status === 3 || row.status === 4">退回申请</span>
            <span v-if="row.status ===5 || row.status === 8">已退回</span>
            <span v-if="row.status ===7">已关闭</span>
company/src/views/business/switchCourt.vue
@@ -66,7 +66,7 @@
          <template slot-scope="{row}">
            <span v-if="row.status === 0">待签署</span>
            <span v-if="row.status === 1">已签章</span>
            <span v-if="row.status === 2">已上传批单</span>
            <span v-if="row.status === 2">已生效</span>
            <span v-if="row.status === 3 || row.status === 4">退回申请</span>
            <span v-if="row.status ===5 || row.status === 8">已退回</span>
            <span v-if="row.status ===7">已关闭</span>
company/src/views/business/taxes.vue
@@ -52,9 +52,9 @@
                        <span v-if="row.status === 2">平台撤回</span>
                    </template>
                </el-table-column>
                <el-table-column prop="companyId" label="申请企业" min-width="100px"></el-table-column>
                <el-table-column prop="companyId" label="申请开票时间" min-width="100px"></el-table-column>
                <el-table-column prop="companyId" label="申请人" min-width="100px"></el-table-column>
                <el-table-column prop="companyName" label="申请企业" min-width="100px"></el-table-column>
                <el-table-column prop="createDate" label="申请开票时间" min-width="100px"></el-table-column>
                <el-table-column prop="creatorName" label="申请人" min-width="100px"></el-table-column>
                <el-table-column prop="price" label="开票金额(元)" min-width="100px"></el-table-column>
                <el-table-column label="投保类型" min-width="100px">
                    <template slot-scope="{row}">
@@ -70,14 +70,14 @@
                </el-table-column>
                <el-table-column prop="type" label="发票电子版" min-width="100px">
                    <template slot-scope="{row}">
                      <img v-if="row.imgurlfull!=null" :src="row.imgurlfull"  style="width: 90px;height: 90px">
                      <img v-if="row.imgurlFull!=null" :src="row.imgurlFull"  style="width: 40px;height: 40px">
                    </template>
                </el-table-column>
                <el-table-column label="操作" min-width="100px">
                <el-table-column label="操作" min-width="180px">
                    <template slot-scope="{row}">
                        <el-button v-if="row.status==0" type="text" @click="$refs.OperaTaxesUploadWindow.open('上传发票',row)">上传发票</el-button>
                        <el-button v-if="row.status ==1 " type="text" @click="$refs.OperaTaxesUploadWindow.open('修改发票',row)">修改发票</el-button>
                        <el-button type="text">申请详情</el-button>
                        <el-button type="text"    @click="$refs.OperaTaxesWindow.open('申请详情',row)">申请详情</el-button>
                    </template>
                </el-table-column>
            </el-table>
server/pom.xml
@@ -190,7 +190,10 @@
      <artifactId>mybatis-plus-join</artifactId>
      <version>1.4.2.2</version>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-mail</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -1420,6 +1420,7 @@
                    }
                }
                zipOutputStream.closeArchiveEntry();
                file.delete();
            }
        }
    }
server/service/src/main/java/com/doumee/dao/business/model/ApplyChange.java
@@ -95,9 +95,9 @@
    @ApiModelProperty(value = "期望保险生效起期")
    @ExcelColumn(name="期望保险生效起期")
    //入参
     @DateTimeFormat(pattern = "yyyy-MM-dd")
    //出参
    @JsonFormat(pattern="yyyy-MM-dd")
//     @DateTimeFormat(pattern = "yyyy-MM-dd")
//    //出参
//    @JsonFormat(pattern="yyyy-MM-dd")
    private Date validTime;
    @ApiModelProperty(value = "批单号")
@@ -193,7 +193,9 @@
    @ApiModelProperty(value = "保险生效止期")
    @TableField(exist = false)
    private Date endTime;
    @ApiModelProperty(value = "方案邮件")
    @TableField(exist = false)
    private String solutionEmail;
    @ApiModelProperty(value = "日志记录")
    @TableField(exist = false)
    private List<ApplyLog> applyLogList;
server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java
@@ -71,26 +71,26 @@
    @ApiModelProperty(value = "期望保险生效止期")
    @ExcelColumn(name="期望保险生效止期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
     @JsonFormat(pattern="yyyy-MM-dd")
//    @DateTimeFormat(pattern = "yyyy-MM-dd")
//     @JsonFormat(pattern="yyyy-MM-dd")
    private Date applyEndTime;
    @ApiModelProperty(value = "期望保险生效起期")
    @ExcelColumn(name="期望保险生效起期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd")
//    @DateTimeFormat(pattern = "yyyy-MM-dd")
//    @JsonFormat(pattern="yyyy-MM-dd")
    private Date applyStartTime;
    @ApiModelProperty(value = "实际保险生效止期")
    @ExcelColumn(name="实际保险生效止期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd")
//    @DateTimeFormat(pattern = "yyyy-MM-dd")
//    @JsonFormat(pattern="yyyy-MM-dd")
    private Date endTime;
    @ApiModelProperty(value = "实际保险生效起期")
    @ExcelColumn(name="实际保险生效起期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd")
//    @DateTimeFormat(pattern = "yyyy-MM-dd")
//    @JsonFormat(pattern="yyyy-MM-dd")
    private Date startTime;
    @ApiModelProperty(value = "最近操作时间")
@@ -132,6 +132,9 @@
    @ApiModelProperty(value = "方案名称")
    @TableField(exist = false)
    private String solutionsName;
    @ApiModelProperty(value = "方案邮件")
    @TableField(exist = false)
    private String solutionEmail;
    @ApiModelProperty(value = "签章关键字")
    @TableField(exist = false)
    private String signKeyword;
server/service/src/main/java/com/doumee/dao/business/model/SmsEmail.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;
@@ -9,6 +10,8 @@
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * çŸ­ä¿¡é‚®ä»¶ä¿¡æ¯è¡¨
@@ -86,5 +89,8 @@
    @ApiModelProperty(value = "关联对象类型")
    @ExcelColumn(name="关联对象类型")
    private String objType;
    @ApiModelProperty(value = "附件集合")
    @TableField(exist = false)
    private   List<Map<String,Object>> fileList;
}
server/service/src/main/java/com/doumee/service/business/SmsEmailService.java
@@ -20,6 +20,7 @@
     */
    Integer create(SmsEmail smsEmail);
    Integer sendSms(SmsEmail smsEmail);
    Integer sendEmail(SmsEmail smsEmail);
    /**
     * ä¸»é”®åˆ é™¤
     *
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
@@ -522,19 +522,20 @@
            applyLogType = Constants.ApplyLogType.CA_PALTFORM_REFUSE_APPLY;
            info = applyLogType.getInfo();
            info = info.replace("${param}", param.getCheckInfo());
            update.setStatus(Constants.ApplyChangeStatus.SIGNATURE.getKey());
//
            if( Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())){
                update.setStatus(Constants.ApplyChangeStatus.SIGNATURE.getKey());
            }else if( Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey())){
                update.setStatus(Constants.ApplyChangeStatus.UPLOAD.getKey());
            }
        }else{
            //如果是同意,两种申请退回状态都可操作
            if(!(Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())
                    ||Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey()))){
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请状态已流转,当前不支持该操作~");
            }
            applyLogType = Constants.ApplyLogType.CA_PALTFORM_REFUSE_APPLY;
            if( Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())){
                update.setStatus(Constants.ApplyChangeStatus.SIGNATURE.getKey());
            }else if( Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey())){
                update.setStatus(Constants.ApplyChangeStatus.UPLOAD.getKey());
            }
            update.setStatus(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey());
            applyLogType = Constants.ApplyLogType.CA_PLATFORM_AGREE_BACK_APPLY;
        }
        update.setEditDate(new Date());
        update.setEditor(user.getId());
@@ -1320,7 +1321,7 @@
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        Company company = user.getCompany();
        if(debugModel){
company = companyMapper.selectById(model.getCompanyId());
            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(),"对不起,企业尚未具备在线签章条件,请联系平台管理员确认~");
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -24,6 +24,8 @@
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.EmailService;
import com.doumee.service.business.third.SignService;
import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
@@ -36,6 +38,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.File;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
@@ -53,7 +56,9 @@
    @Autowired
    private InsuranceApplyMapper insuranceApplyMapper;
    @Autowired
    private ApplyChangeMapper applyChangeMapper;
    private SmsEmailService smsEmailService;
    @Autowired
    private ApplyChangeJoinMapper applyChangeMapper;
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
@@ -396,14 +401,13 @@
                return tempFileName;
            }
        }catch (Exception e){
        }
        return  null;
    }
    public Integer uploadSignedFileDo(InsuranceApply model,String fileurl) {
    public Multifile   uploadSignedFileDo(InsuranceApply model,String fileurl,String fullUrl) {
        InsuranceApply update = new InsuranceApply();
        update.setEditDate(new Date());
        update.setEditor(model.getCreator());
@@ -422,15 +426,19 @@
        f.setObjType(Constants.MultiFile.BD_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  1;
        startSendEmail(f, model.getCompanyName(),model.getSolutionsName(),model.getSolutionEmail());
        return  f;
    }
    public Integer uploadChangeSignedFileDo(ApplyChange model,String fileurl) {
    public Multifile  uploadChangeSignedFileDo(ApplyChange model,String fileurl,String fullurl) {
        ApplyChange update = new ApplyChange();
        update.setEditDate(new Date());
        update.setEditor(model.getCreator());
@@ -449,19 +457,53 @@
        f.setObjType(Constants.equalsInteger(Constants.ZERO,model.getType())?Constants.MultiFile.CA_APPLY_JIAJIAN_SIGN.getKey() : Constants.MultiFile.CA_APPLY_CHANGEUNIT_SIGN.getKey());
        f.setType(Constants.TWO);
        f.setFileurl(fileurl);
        f.setFileurlFull(fullurl);
        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);
        return  1;
        startSendEmail(f,model.getCompanyName(),model.getSolutionsName(),model.getSolutionEmail());
        return f;
    }
    private void startSendEmail(Multifile f, String companyName, String solutionsName, String solutionEmail) {
        if(StringUtils.isBlank(solutionEmail) || f==null|| StringUtils.isBlank(f.getFileurl())){
            return;
        }
        SmsEmail email = new SmsEmail();
        email.setTitle(f.getInfo());
        email.setEmail(solutionEmail);
        email.setContent("来自企业【"+companyName+"】关于保险方案【"+solutionsName+"】的"+f.getInfo());
        File file = Constants.getFileByNetFile(f.getFileurlFull(),f.getName());
        if(file!=null && file.isFile()){
            Map<String,Object> files = new HashMap<>();
            files.put("name",f.getName());
            files.put("file",file);
            email.setFileList(new ArrayList<>());
            email.getFileList().add(files);
            smsEmailService.sendEmail(email);
            file.delete();//发送后删除临时文件
        }
    }
    @Override
    public   void dealWaitSignedData(){
        List<InsuranceApply> applyList = insuranceApplyMapper.selectList(new QueryWrapper<InsuranceApply>().lambda()
        List<InsuranceApply> 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::getStatus,Constants.InsuranceApplyStatus.WAIT_SIGNATURE.getKey())
                .isNotNull(InsuranceApply::getSignApplyNo));
        String path = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()+
                systemDictDataBiz.queryByCode(Constants.OSS,Constants.APPLY_FILE).getCode();
        if(applyList !=null && applyList.size()>0 ){
            for(InsuranceApply model : applyList){
                String status = signService.linkFileStatus(model.getSignApplyNo());
@@ -474,11 +516,19 @@
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                }
                uploadSignedFileDo(model,fileUrl);
                uploadSignedFileDo(model,fileUrl,path+fileUrl);
                return;
            }
        }
        List<ApplyChange> chagneList = applyChangeMapper.selectList(new QueryWrapper<ApplyChange>().lambda()
        List<ApplyChange> chagneList = applyChangeMapper.selectJoinList(ApplyChange.class,
                new MPJLambdaWrapper<ApplyChange>()
                .selectAll(ApplyChange.class)
                .selectAs(Solutions::getName,InsuranceApply::getSolutionsName)
                .selectAs(Solutions::getEmail,InsuranceApply::getSolutionEmail)
                .selectAs(Company::getName,InsuranceApply::getCompanyName)
                .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId)
                .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
                .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId)
                .eq(ApplyChange::getStatus,Constants.ApplyChangeStatus.UPLOAD.getKey())
                .isNotNull(ApplyChange::getSignApplyNo));
        if(chagneList !=null && chagneList.size()>0 ){
@@ -493,7 +543,7 @@
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                }
                uploadChangeSignedFileDo(model,fileUrl);
                uploadChangeSignedFileDo(model,fileUrl,path+fileUrl);
                return;
            }
        }
@@ -505,7 +555,18 @@
        }
        if(Constants.equalsInteger(data.getSignStatus(), Constants.THREE )){
            //如果已保全,可下载签约附件
            InsuranceApply model = insuranceApplyMapper.selectOne(new QueryWrapper<InsuranceApply>().lambda().eq(InsuranceApply::getSignApplyNo,data.getApplyNo()).last("limit 1" ));
            String path = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()+
                    systemDictDataBiz.queryByCode(Constants.OSS,Constants.APPLY_FILE).getCode();
            InsuranceApply model = 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(InsuranceApply::getSignApplyNo,data.getApplyNo())
                            .last("limit 1" ));
            if(model != null && Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WAIT_SIGNATURE.getKey())){
                //完成签署已完成操作
                String link = signService.linkFile(data.getApplyNo());
@@ -514,11 +575,19 @@
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                }
                uploadSignedFileDo(model,fileUrl);
                uploadSignedFileDo(model,fileUrl,path+fileUrl);
                return;
            }
            ApplyChange applyChange = applyChangeMapper.selectOne(new QueryWrapper<ApplyChange>().lambda().eq(ApplyChange::getSignApplyNo,data.getApplyNo()).last("limit 1" ));
            ApplyChange applyChange = applyChangeMapper.selectJoinOne(ApplyChange.class,
                    new MPJLambdaWrapper<ApplyChange>()
                            .selectAll(ApplyChange.class)
                            .selectAs(Solutions::getName,InsuranceApply::getSolutionsName)
                            .selectAs(Solutions::getEmail,InsuranceApply::getSolutionEmail)
                            .selectAs(Company::getName,InsuranceApply::getCompanyName)
                            .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId)
                            .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
                            .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId)
                            .eq(ApplyChange::getSignApplyNo,data.getApplyNo()).last("limit 1" ));
            if(applyChange != null &&Constants.equalsInteger(applyChange.getStatus(),Constants.ApplyChangeStatus.UPLOAD.getKey())){
                String link = signService.linkFile(data.getApplyNo());
                String fileUrl = uploadSignFile(link);
@@ -526,7 +595,7 @@
                    //如果下载失败,清除合同,下次签章重新生成新合同
                    return;
                }
                uploadChangeSignedFileDo(applyChange,fileUrl);
                uploadChangeSignedFileDo(applyChange,fileUrl,path+fileUrl);
            }
        }else if(Constants.equalsInteger(data.getSignStatus(), Constants.TWO )){
            //如果已拒签,清除合同,下次签章重新生成新合同
@@ -628,7 +697,6 @@
        info = info.replace("${param}", update.getCheckInfo());
        ApplyLog log = new ApplyLog(update,applyLogType.getName(),info,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update));
        applyLogMapper.insert(log);
        return  1;
    }
server/service/src/main/java/com/doumee/service/business/impl/SettleClaimsServiceImpl.java
@@ -196,7 +196,7 @@
        Constants.SettleClaimsLogType applyLogType = Constants.SettleClaimsLogType.PLATFORM_REMARK;
        String info =applyLogType.getInfo();
        info = info.replace("${param}", update.getCheckInfo());
        info = info.replace("${param}", param.getCheckInfo());
        SettleClaimsLog log = new SettleClaimsLog(update,applyLogType.getName(), info,update.getId(),applyLogType.getKey(), JSONObject.toJSONString(model), JSONObject.toJSONString(update));
        settleClaimsLogMapper.insert(log);
        return  1;
server/service/src/main/java/com/doumee/service/business/impl/SmsEmailServiceImpl.java
@@ -14,6 +14,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.third.EmailService;
import com.doumee.service.business.third.EmayService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -38,6 +39,8 @@
    private SystemDictDataBiz systemDictDataBiz;
    @Autowired
    private EmayService emayService;
    @Autowired
    private EmailService emailService;
    public static void isCaptcheValide(SmsEmailMapper smsEmailMapper, String phone, String captche) {
        SmsEmail model = smsEmailMapper.selectOne(new QueryWrapper<SmsEmail>().lambda()
@@ -69,11 +72,33 @@
        return smsEmail.getId();
    }
    @Override
    public Integer sendEmail(SmsEmail smsEmail) {
        if(StringUtils.isBlank(smsEmail.getEmail())){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        boolean result=   emailService.sendEmail(smsEmail.getEmail(),smsEmail.getTitle(),smsEmail.getContent(),smsEmail.getFileList());
        smsEmail.setRemark("邮件发生成功");
        if(!result){
            smsEmail.setRemark("邮件发生失败");
        }
        smsEmail.setIsdeleted(Constants.ZERO);
        smsEmail.setCreateDate(new Date());
        smsEmail.setStatus(Constants.ONE);
        smsEmail.setType(Constants.TWO);
        smsEmailMapper.insert(smsEmail);
        return smsEmail.getId();
    }
    @Override
    public Integer sendSms(SmsEmail smsEmail) {
        if(StringUtils.isBlank(smsEmail.getPhone())){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        String code = Constants.getRandom6Num();
        boolean result=   emayService.sendSingleSms(smsEmail.getPhone(),code);
        if(!result){
            throw  new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对不起,短信验证码发送失败,请稍后重试!");
        }
        smsEmail.setRemark(code);
        smsEmail.setIsdeleted(Constants.ZERO);
        smsEmail.setCreateDate(new Date());
@@ -84,6 +109,7 @@
        smsEmailMapper.insert(smsEmail);
        return smsEmail.getId();
    }
    @Override
server/service/src/main/java/com/doumee/service/business/third/EmailService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,49 @@
package com.doumee.service.business.third;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.core.io.FileSystemResource;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.MimeMessageHelper;
import org.springframework.stereotype.Service;
import javax.activation.DataSource;
import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
import java.io.File;
import java.util.List;
import java.util.Map;
@Service
public class EmailService {
    @Autowired
    private JavaMailSender javaMailSender;//注入JavaMailSender
    @Value("${spring.mail.username}")
    private String fromEmail;
    public boolean sendEmail(String toEmail, String title, String content, List<Map<String,Object>> fileList) {
        try {
                AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
                context.refresh();
                MimeMessage message = javaMailSender.createMimeMessage();
                MimeMessageHelper helper = new MimeMessageHelper(message, true);
                helper.setTo(toEmail);
                helper.setFrom(fromEmail);
                helper.setSubject(title);
                helper.setText(content);
                if(fileList!=null){
                    for (Map<String,Object> f : fileList){
                        // è®¾ç½®é™„ä»¶
                        helper.addAttachment((String) f.get("name"),new FileSystemResource((File) f.get("file")));
                    }
                }
            javaMailSender.send(message);
                    System.out.println("邮件发送成功!");
                    return true;
            } catch (Exception e) {
            e.printStackTrace();
                    return false;
                }
            }
    }
server/service/src/main/java/com/doumee/service/business/third/EmayService.java
@@ -61,30 +61,32 @@
        return 0;
    }
    public   boolean sendSingleSms(String mobile,String content) throws SDKParamsException {
    public   boolean sendSingleSms(String mobile,String content)  {
        try {
            client = new SmsSDKClient(ip,port,appKey,appSecret);
        } catch (SDKParamsException e) {
            throw new RuntimeException(e);
        }
        if(client == null){
            return false;
        }
        String customSmsId = "1";
        String extendedCode = "01";
        SmsSingleRequest request = new SmsSingleRequest(mobile, content, customSmsId, extendedCode, "");
        ResultModel<SmsResponse> result = client.sendSingleSms(request);
        saveInterfaceLog(ip+"/"+port,"【短信】发送", JSONObject.toJSONString(result),JSONObject.toJSONString(result));
        if (result.getCode().equals("SUCCESS")) {
            System.out.println("请求成功");
            SmsResponse response = result.getResult();
            System.out.println("sendSingleSms:" + response.toString());
            return  true;
        } else {
            System.out.println("请求失败");
            return false;
            if(client == null){
                return false;
            }
            String customSmsId = "1";
            String extendedCode = "01";
            SmsSingleRequest request = new SmsSingleRequest(mobile, content, customSmsId, extendedCode, "");
            ResultModel<SmsResponse> result = client.sendSingleSms(request);
            saveInterfaceLog(ip+"/"+port,"【短信】发送", JSONObject.toJSONString(result),JSONObject.toJSONString(result));
            if (result.getCode().equals("SUCCESS")) {
                System.out.println("请求成功");
                SmsResponse response = result.getResult();
                System.out.println("sendSingleSms:" + response.toString());
                return  true;
            } else {
                System.out.println("请求失败");
                return false;
            }
        } catch (Exception e) {
        }
        return false;
    }
server/service/src/main/resources/application-dev.yml
@@ -18,6 +18,18 @@
    password: rtjgfEr@&0c0m
    driver-class-name: com.mysql.cj.jdbc.Driver
    type: com.alibaba.druid.pool.DruidDataSource
  mail:
    host: smtp.exmail.qq.com
    username: jp@doumee.com
    password: 2Jz9HFW2U7vRnCRu
    default-encoding: UTF-8
    properties:
      mail:
        smtp:
          auth: true
        starttls:
          enable: true
          required: true
  redis:
    #    database: 0
server/service/src/main/resources/application-pro.yml
@@ -13,12 +13,22 @@
spring:
  # æ•°æ®æºé…ç½®
  datasource:
    url: jdbc:mysql://57b57595ddc66.sh.cdb.myqcloud.com:4464/yunyibao?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8
    username: test
    password: doumee@168
    url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/yunyibao?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8
    username: doumee
    password: rtjgfEr@&0c0m
    driver-class-name: com.mysql.cj.jdbc.Driver
    type: com.alibaba.druid.pool.DruidDataSource
  mail:
    host: smtp.exmail.qq.com
    username: jp@doumee.com
    password: 2Jz9HFW2U7vRnCRu
    properties:
      mail:
        smtp:
          auth: true
        starttls:
          enable: true
          required: true
  redis:
    #    database: 0
    host: 127.0.0.1
@@ -39,7 +49,6 @@
debug_model: false
captcha_check: true
# Swagger配置
swagger:
@@ -49,3 +58,6 @@
  enabled: true
  # ç¦ç”¨swagger时的重定向地址
  redirect-uri: /
project:
  imgAuthen: false
server/service/src/main/resources/application-test.yml
@@ -4,6 +4,8 @@
    enabled: true
    mime-types: application/json
  tomcat:
    max-swallow-size: -1
  servlet:
    session:
      timeout: PT3H  #表示12小时
@@ -11,22 +13,35 @@
spring:
  # æ•°æ®æºé…ç½®
  datasource:
    url: jdbc:mysql://57b57595ddc66.sh.cdb.myqcloud.com:4464/yunyibao?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8
    username: test
    password: doumee@168
    url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/yunyibao?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8
    username: doumee
    password: rtjgfEr@&0c0m
    driver-class-name: com.mysql.cj.jdbc.Driver
    type: com.alibaba.druid.pool.DruidDataSource
  mail:
    host: smtp.exmail.qq.com
    username: jp@doumee.com
    password: Jiangping0427
  redis:
    #    database: 0
    host: 127.0.0.1
    port: 6379
    password:
    timeout: 5000      # è¿žæŽ¥æ± ä¸­çš„æœ€å°ç©ºé—²è¿žæŽ¥
  jackson:
    time-zone: GMT+8
    date-format: yyyy-MM-dd HH:mm:ss
knife4j:
  enable: true
  basic:
    enable: true
    username: admin
    password: test@168.com
    password: 111111
debug_model: true
debug_model: false
captcha_check: false
# Swagger配置
swagger:
@@ -38,4 +53,4 @@
  redirect-uri: /
project:
  imgAuthenti: false
  imgAuthen: false