From 831cafdd72242d89fcc1f5e447c919a31e129f51 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 29 一月 2024 17:43:43 +0800
Subject: [PATCH] 开发业务接口
---
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java | 2
server/dianziqian/src/main/java/com/jzq/common/bean/sign/NotifyReq.java | 7
company/src/api/business/insuranceApply.js | 19 +
company/src/components/business/OperaInsuranceApplyWindow.vue | 57 ++++-
server/service/src/main/java/com/doumee/config/shiro/ShiroConfig.java | 1
company/src/components/business/OperaInsuranceApplyCheckWindow.vue | 257 ++++++++++++++++--------
company/src/views/business/insuranceApply.vue | 11
server/platform/src/main/java/com/doumee/api/common/PublicController.java | 25 +-
server/dianziqian/src/main/java/com/jzq/common/bean/sign/NotifyDataReq.java | 10
server/service/src/main/java/com/doumee/core/utils/Constants.java | 7
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java | 41 ++-
server/service/src/main/java/com/doumee/service/business/third/SignService.java | 5
company/src/components/business/InsuranceDetails.vue | 4
server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java | 6
server/platform/src/main/java/com/doumee/api/business/InsuranceApplyController.java | 9
company/src/components/common/UploadFile.vue | 124 ++++++++++++
company/src/plugins/messagebox.js | 8
company/.env.development | 5
18 files changed, 444 insertions(+), 154 deletions(-)
diff --git a/company/.env.development b/company/.env.development
index 81d95d5..11666cc 100644
--- a/company/.env.development
+++ b/company/.env.development
@@ -3,9 +3,6 @@
# VUE_APP_API = 'http://192.168.0.104:10023/'
-<<<<<<< HEAD
-VUE_APP_API = 'http://192.168.0.134:10023/'
-=======
+#VUE_APP_API = 'http://192.168.0.134:10023/'
VUE_APP_API = 'http://localhost:10023/'
# VUE_APP_API = 'http://192.168.0.134:10023/'
->>>>>>> c6c95a49be6194989c124b8fd316fb5d434bd153
diff --git a/company/src/api/business/insuranceApply.js b/company/src/api/business/insuranceApply.js
index 4271b19..7235962 100644
--- a/company/src/api/business/insuranceApply.js
+++ b/company/src/api/business/insuranceApply.js
@@ -14,6 +14,22 @@
export function check (data) {
return request.post('/business/insuranceApply/check', data)
}
+export function back (data) {
+ return request.post('/business/insuranceApply/back', data)
+}
+
+export function uploadToubaodan (data) {
+ return request.post('/business/insuranceApply/uploadToubaodan', data)
+}
+export function uploadBaoxiandan(data) {
+ return request.post('/business/insuranceApply/uploadBaoxiandan', data)
+}
+export function editBaoxiandan(data) {
+ return request.post('/business/insuranceApply/editBaoxiandan', data)
+}
+export function dealBackApply(data) {
+ return request.post('/business/insuranceApply/dealBackApply', data)
+}
export function exportDetailExcel (data) {
return request.post('/business/insuranceApply/exportDetailExcel', data, {
@@ -24,6 +40,9 @@
export function getDetail (id) {
return request.get(`business/insuranceApply/${id}`)
}
+export function getSignLink (id) {
+ return request.get(`business/insuranceApply/getSignLink/${id}`)
+}
export function getDetailList (data) {
return request.post('/business/applyDetail/list', data, {
trim: true
diff --git a/company/src/components/business/InsuranceDetails.vue b/company/src/components/business/InsuranceDetails.vue
index 00dd1c0..e378b58 100644
--- a/company/src/components/business/InsuranceDetails.vue
+++ b/company/src/components/business/InsuranceDetails.vue
@@ -83,7 +83,7 @@
</div>
<template v-if="type==1" v-slot:footer>
<el-button type="primary" :loading="isWorking.export" @click="check(0)">鎻愪氦閫氳繃</el-button>
- <el-button type="danger" :loading="isWorking.export" @click="check(1)">瀹℃牳涓嶉�氳繃</el-button>
+<!-- <el-button type="danger" :loading="isWorking.export" @click="check(1)">瀹℃牳涓嶉�氳繃</el-button>-->
<el-button @click="visible=false">鍙栨秷</el-button>
</template>
<template v-else v-slot:footer>
@@ -165,7 +165,7 @@
},
check(type){
this.form.dealBackApply = type;
- this.$dialog.exportConfirm('纭杩涜璇ユ搷浣滃悧锛�')
+ this.$dialog.messageConfirm('纭杩涜璇ユ搷浣滃悧锛�')
.then(() => {
this.isWorking = true
check(this.form)
diff --git a/company/src/components/business/OperaInsuranceApplyCheckWindow.vue b/company/src/components/business/OperaInsuranceApplyCheckWindow.vue
index 54808ea..3117104 100644
--- a/company/src/components/business/OperaInsuranceApplyCheckWindow.vue
+++ b/company/src/components/business/OperaInsuranceApplyCheckWindow.vue
@@ -11,7 +11,7 @@
<div class="form_item">
<div class="form_item_label"><span>*</span>濉啓閫�鍥炶鏄庯細</div>
<div class="form_item_val">
- <textarea placeholder="璇疯緭鍏�"></textarea>
+ <textarea v-model="form.backCheckInfo" placeholder="璇疯緭鍏�"></textarea>
</div>
</div>
</div>
@@ -20,18 +20,7 @@
<div class="form_item">
<div class="form_item_label">涓婁紶鎶曚繚鍗曪細</div>
<div class="form_item_val">
- <el-upload
- class="upload-demo"
- action="https://locahost:10023/public/upload"
- :on-preview="handlePreview"
- :on-remove="handleRemove"
- :before-remove="beforeRemove"
- :limit="1"
- :on-exceed="handleExceed"
- :file-list="fileList">
- <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
- <div slot="tip" class="el-upload__tip">鍙兘涓婁紶pdf鏂囦欢锛屼笖涓嶈秴杩�5mb</div>
- </el-upload>
+ <UploadFile :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileList="form.fileList" @uploadSuccess="toubaoFileUploaded" />
</div>
</div>
</div>
@@ -39,14 +28,14 @@
<div v-if="visible3==true" class="form">
<div class="form_item">
<div class="form_item_label">瀹㈡埛鏈熸湜淇濋櫓鐢熸晥璧锋湡锛�</div>
- <div class="form_item_val">2023-10-01 00:00:00</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="radio">
- <el-radio :label="0">涓庝繚鍗曚竴鑷�</el-radio>
- <el-radio :label="1">涓庝繚鍗曚笉涓�鑷�</el-radio>
+ <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>
@@ -54,81 +43,52 @@
<div class="form_item_label"><span>*</span>淇濋櫓鐢熸晥璧锋湡锛�</div>
<div class="form_item_val">
<el-date-picker
- v-model="value1"
+ 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">2023-10-01 00:00:00</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 placeholder="璇疯緭鍏�"></el-input>
+ <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">
- <el-upload
- class="upload-demo"
- action="https://jsonplaceholder.typicode.com/posts/"
- :on-preview="handlePreview"
- :on-remove="handleRemove"
- :before-remove="beforeRemove"
- multiple
- :limit="1"
- :on-exceed="handleExceed"
- :file-list="fileList">
- <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
- <div slot="tip" class="el-upload__tip">鍙兘涓婁紶pdf鏂囦欢锛屼笖涓嶈秴杩�5mb</div>
- </el-upload>
+ <UploadFile :uploadData="{ folder: 'apply',fileType:'.pdf' }" :fileList="form.fileList1" @uploadSuccess="baoxianFileUploaded" />
</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">
- <el-date-picker
- v-model="value1"
- type="date"
- placeholder="閫夋嫨鏃ユ湡">
- </el-date-picker>
- </div>
+ <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 placeholder="璇疯緭鍏�"></el-input>
+ <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">
- <el-upload
- class="upload-demo"
- action="https://jsonplaceholder.typicode.com/posts/"
- :on-preview="handlePreview"
- :on-remove="handleRemove"
- :before-remove="beforeRemove"
- multiple
- :limit="1"
- :on-exceed="handleExceed"
- :file-list="fileList">
- <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
- <div slot="tip" class="el-upload__tip">鍙兘涓婁紶pdf鏂囦欢锛屼笖涓嶈秴杩�5mb</div>
- </el-upload>
+ <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="璇疯緭鍏�"></el-input>
+ <el-input placeholder="璇疯緭鍏�" v-model="form.editCheckInfo" ></el-input>
</div>
</div>
</div>
@@ -137,12 +97,21 @@
<div class="form_item">
<div class="form_item_label"><span>*</span>濉啓璇存槑锛�</div>
<div class="form_item_val">
- <textarea placeholder="璇疯緭鍏�"></textarea>
+ <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>
<template v-slot:footer>
- <el-button type="primary" @click="visible=false">纭� 瀹�</el-button>
+ <el-button type="primary" @click="doSubmit">纭� 瀹�</el-button>
<el-button @click="visible=false">鍙栨秷</el-button>
</template>
</GlobalWindow>
@@ -151,47 +120,46 @@
<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";
export default {
name: 'OperaInsuranceApplyCheckWindow',
extends: BaseOpera,
- components: { GlobalWindow },
+ components: {UploadFile, GlobalWindow },
data () {
return {
// 琛ㄥ崟鏁版嵁
model: {},
+ falg :0,
form: {
id: null,
- editDate: ''
- },
- // 楠岃瘉瑙勫垯
- rules: {
- },
- formInline: {
- user: '',
- region: ''
+ 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,
- reverse: true,
- radio: 0,
- fileList: [
- ],
- activities: [{
- content: '娲诲姩鎸夋湡寮�濮�',
- timestamp: '2018-04-15'
- }, {
- content: '閫氳繃瀹℃牳',
- timestamp: '2018-04-13'
- }, {
- content: '鍒涘缓鎴愬姛',
- timestamp: '2018-04-11'
- }],
- tableData: [],
- activeName: 'first',
- currentPage: 1
}
},
created () {
@@ -204,12 +172,15 @@
open(title,target,flag){
this.visible=true
this.model=target
+ this.form.startTime=this.model.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
}
@@ -225,11 +196,119 @@
if(flag == 5){
this.visible5 = true
}
+ if(flag == 6){
+ this.visible6 = true
+ }
},
- getDetail(){
- getDetail(this.dataId).then(res => {
- }).catch(err => {
- })
+ doSubmit(){
+ if (this.flag == 1) {
+ this.backDo()
+ } else if (this.flag == 2) {
+ this.uploadToubaodan()
+ } else if (this.flag == 3) {
+ this.uploadBaoxiandan()
+ } else if (this.flag == 4) {
+ this.editBaoxiandan()
+ } else if (this.flag == 5) {
+ this.dealBackApply(1)
+ } else if (this.flag == 6) {
+ this.dealBackApply(0)
+ }
+ },
+ selectChange(){
+ if(this.form.selectRadio == 0){
+ this.form.startTime = this.model.startTime
+ }else{
+
+ }
+ },
+ 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,checkInfo:this.form.backCheckInfo,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.backCheckInfo,code:this.form.editCode,baoxiandanFile:this.form.editBaoxianFile})
+ .then(response => {
+ this.visible = false
+ this.$emit('success')
+ }).catch(err => {
+ this.$tip.apiFailed(err)
+ })
+ })
+ },
+ backeditBaoxiandan(){
+ this.$dialog.messageConfirm('纭杩涜璇ユ搷浣滃悧锛�')
+ .then(() => {
+ this.isWorking = true
+ editBaoxiandan({id:this.model.id,checkInfo:this.form.backCheckInfo})
+ .then(response => {
+ this.visible = false
+ this.$emit('success')
+ }).catch(err => {
+ this.$tip.apiFailed(err)
+ })
+ })
},
handleRemove(file, fileList) {
console.log(file, fileList);
diff --git a/company/src/components/business/OperaInsuranceApplyWindow.vue b/company/src/components/business/OperaInsuranceApplyWindow.vue
index 0d61b41..bff0dfe 100644
--- a/company/src/components/business/OperaInsuranceApplyWindow.vue
+++ b/company/src/components/business/OperaInsuranceApplyWindow.vue
@@ -11,18 +11,21 @@
<div class="desc_item_label">
<div class="desc_item_label_left">
<span>鎶曚繚浼佷笟锛歿{ model.companyName }}</span>
- <span>淇濆崟鐘舵�侊細{{ model.statusInfo }}{{model.statusCollect}}</span>
+ <span>淇濆崟鐘舵�侊細{{ model.statusInfo }}</span>
<span>鎻愪氦鏃堕棿锛歿{ model.createDate }}</span>
</div>
- <div class="desc_item_label_right">
- <el-button type="primary" @click="$refs.InsuranceDetails.open('鎶曚繚璇︽儏鍗�',model,0)">瀵煎嚭璇﹀崟</el-button>
- <el-button v-if="model.statusCollect == 1 " type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('涓婁紶鎶曚繚鍗�',model,2)">涓婁紶鎶曚繚鍗�</el-button>
- <el-button v-if="model.statusCollect == 3 " type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('涓婁紶淇濋櫓鍗�',model,3)">涓婁紶淇濋櫓鍗�</el-button>
- <el-button v-if="model.statusCollect == 6 || model.status == 7|| model.status == 8" type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('澶勭悊閫�鍥炵敵璇�',model,5)">澶勭悊閫�鍥炵敵璇�</el-button>
- <el-button v-if="model.statusCollect == 0 " type="primary" @click="$refs.InsuranceDetails.open('鎶曚繚瀹℃牳',model,1)">鎶曚繚瀹℃牳</el-button>
- <el-button v-if="model.statusCollect != 5 " type="danger" @click="$refs.OperaInsuranceApplyCheckWindow.open('閫�鍥炴姇淇�',model,1)">閫�鍥炴姇淇�</el-button>
- <el-button v-if="model.statusCollect == 5 " type="danger" @click="$refs.OperaInsuranceApplyCheckWindow.open('淇敼淇濋櫓鍗�',model,4)">淇敼淇濋櫓鍗�</el-button>
- </div>
+ <div class="desc_item_label_right">
+ <el-button type="primary" @click="$refs.InsuranceDetails.open('鎶曚繚璇︽儏鍗�',model,0)">瀵煎嚭璇﹀崟</el-button>
+ <el-button v-if="model.status == 2 ||model.status == 3 ||model.status == 5 ||model.status == 7 ||model.status == 8 " 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 == 2 " type="primary" @click="goSign">浼佷笟绛剧珷</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>
+ </div>
</div>
<div class="desc_item_from">
<el-table
@@ -31,35 +34,43 @@
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>
@@ -199,7 +210,7 @@
import GlobalWindow from '@/components/common/GlobalWindow'
import InsuranceDetails from '@/components/business/InsuranceDetails'
import OperaInsuranceApplyCheckWindow from '@/components/business/OperaInsuranceApplyCheckWindow'
-import {getDetail} from "@/api/business/insuranceApply";
+import {getDetail, getSignLink} from "@/api/business/insuranceApply";
import {all as solutionAll} from "@/api/business/solutions";
export default {
name: 'OperaInsuranceApplyWindow',
@@ -256,20 +267,42 @@
open(title,target){
this.visible=true;
this.dataId=target.id
- this.getDetail();
+ this.getDetail()
},
+ goSign(){
+ getSignLink(this.dataId).then(res => {
+ window.open(res)
+ }).catch(err => {
+ this.$tip.apiFailed(err)
+ })
+ },
+ viewToubaodan(){
+ if(this.model.toubaodanSignedFile && this.model.toubaodanSignedFile.fileurlFull){
+ window.open(this.model.toubaodanSignedFile.fileurlFull)
+ } else if(this.model.toubaodanFile && this.model.toubaodanFile.fileurlFull){
+ window.open(this.model.toubaodanFile.fileurlFull)
+ }
+ },
+ viewBaoxiandan(){
+ if(this.model.baoxiandanFile && this.model.baoxiandanFile.fileurlFull){
+ window.open(this.model.baoxiandanFile.fileurlFull)
+ }
+ },
handleSizeChange(){
},
handleCurrentChange(){
},
+ 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 => {
})
diff --git a/company/src/components/common/UploadFile.vue b/company/src/components/common/UploadFile.vue
new file mode 100644
index 0000000..565bb40
--- /dev/null
+++ b/company/src/components/common/UploadFile.vue
@@ -0,0 +1,124 @@
+<template>
+ <div>
+ <el-upload
+ class="upload-demo"
+ :accept="uploadData.fileTyp"
+ :action="uploadImgUrl"
+ :limit="1"
+ :on-exceed="handleExceed"
+ :on-success="handleFileSuccess"
+ :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-upload>
+ </div>
+
+</template>
+
+<script>
+export default {
+ props: {
+ file: {
+ type: Object,
+ default: () => {}
+ },
+ tipsLabel: '',
+ customStyle: {
+ type: String,
+ default: 'width: 190px; height: 190px;'
+ },
+ uploadData: Object
+ },
+ data() {
+ return {
+ uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/upload?folder='+this.uploadData.folder
+ }
+ },
+
+ methods: {
+ // 涓婁紶鍥剧墖
+ 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 })
+ } else {
+ this.$tip.apiFailed('涓婁紶澶辫触')
+ }
+ this.$emit('uploadEnd')
+ },
+ uploadError() {
+ this.$tip.apiFailed('涓婁紶澶辫触')
+ this.$emit('endUpload')
+ },
+ // // 鎷︽埅
+ beforeFileUpload(file) {
+ this.$emit('uploadBegin')
+ return true
+ }
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+$image-width: 100px;
+.avatar-uploader {
+ width: $image-width;
+ height: $image-width;
+}
+::v-deep .el-upload {
+ border: 1px dashed #d9d9d9;
+ border-radius: 6px;
+ cursor: pointer;
+ position: relative;
+ width: $image-width;
+ height: $image-width;
+ overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+ border-color: #409EFF;
+}
+.avatar-uploader-icon {
+ line-height: 90px;
+ font-size: 28px;
+ color: #8c939d;
+ width: $image-width;
+ height: $image-width;
+ text-align: center;
+}
+.avatar {
+ width: $image-width;
+ height: $image-width;
+ display: block;
+}
+.tips-style {
+ height: 13px;
+ font-size: 13px;
+ font-weight: 400;
+ color: #999999;
+ line-height: 13px;
+}
+</style>
+<style lang="scss" scoped>
+::v-deep .el-upload--picture-card{
+ width: 90px !important;
+ height: 90px !important;
+}
+::v-deep .el-upload-list__item {
+ width: 90px !important;
+ height: 90px !important;
+}
+.icon {
+ -webkit-transform: translate(-50%,-50%);
+ -ms-transform: translate(-50%,-50%);
+ transform: translate(0%, -85%);
+}
+::v-deep .el-upload-list__item {
+ width: 90px !important;
+ height: 90px !important;
+}
+</style>
+
diff --git a/company/src/plugins/messagebox.js b/company/src/plugins/messagebox.js
index be2c47b..c7a6b80 100644
--- a/company/src/plugins/messagebox.js
+++ b/company/src/plugins/messagebox.js
@@ -49,6 +49,14 @@
type: 'warning'
})
},
+ // 闂嵎纭疄鎻愰啋
+ messageConfirm (message, confirmText='纭畾', cancelText='鍙栨秷') {
+ return MessageBox.confirm(message, "鎿嶄綔纭", {
+ confirmButtonText: confirmText,
+ cancelButtonText: cancelText,
+ type: 'warning'
+ })
+ },
// 纭鏄惁鏈嶅姟璇ヤ紒涓�
cancelOrder (message) {
return MessageBox.confirm(message, '鍙栨秷鎻愮ず', {
diff --git a/company/src/views/business/insuranceApply.vue b/company/src/views/business/insuranceApply.vue
index 8dfed6c..5c4cae4 100644
--- a/company/src/views/business/insuranceApply.vue
+++ b/company/src/views/business/insuranceApply.vue
@@ -6,11 +6,12 @@
<el-select v-model="searchForm.statusCollect" placeholder="璇烽�夋嫨" @keypress.enter.native="search">
<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="4"></el-option>
- <el-option label="閫�鍥炵敵璇蜂腑" value="5"></el-option>
- <el-option label="宸插叧闂�" value="6"></el-option>
+ <el-option label="寰呯绔�" value="7"></el-option>
+ <el-option label="淇濋殰涓�" value="2"></el-option>
+ <el-option label="宸茶繃鏈�" value="3"></el-option>
+ <el-option label="宸查��鍥�" value="4"></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="companyId">
diff --git a/server/dianziqian/src/main/java/com/jzq/common/bean/sign/NotifyDataReq.java b/server/dianziqian/src/main/java/com/jzq/common/bean/sign/NotifyDataReq.java
index 59ca4ce..baecf09 100644
--- a/server/dianziqian/src/main/java/com/jzq/common/bean/sign/NotifyDataReq.java
+++ b/server/dianziqian/src/main/java/com/jzq/common/bean/sign/NotifyDataReq.java
@@ -3,15 +3,17 @@
import io.swagger.annotations.ApiModel;
import lombok.Data;
+import java.io.Serializable;
+
@Data
@ApiModel("绛剧害鏂逛俊鎭�")
-public class NotifyDataReq {
+public class NotifyDataReq implements Serializable {
private String applyNo;//绛剧害缂栧彿 * post string
- private String identityType;// 璇佷欢绫诲瀷 1韬唤璇�, 2鎶ょ収, 3鍙拌優璇�, 4娓境灞呮皯鏉ュ線鍐呭湴閫氳璇�, 11钀ヤ笟鎵х収, 12缁熶竴绀句細淇$敤浠g爜, 99鍏朵粬 * post int
+ private int identityType;// 璇佷欢绫诲瀷 1韬唤璇�, 2鎶ょ収, 3鍙拌優璇�, 4娓境灞呮皯鏉ュ線鍐呭湴閫氳璇�, 11钀ヤ笟鎵х収, 12缁熶竴绀句細淇$敤浠g爜, 99鍏朵粬 * post int
private String fullName;// 鍚嶇О * post string
private String identityCard ;//璇佷欢鍙� * post string
- private Long optTime;//鎿嶄綔鏃堕棿(姣) * post long
- private Integer signStatus;// 1绛剧害瀹屾垚2鎷掔3宸蹭繚鍏紙1銆佺绾﹀畬鎴愭槸鎸囩敤鎴风缃叉枃浠舵垚鍔燂紱2銆佹嫆绛炬槸鎸囩敤鎴峰湪绛剧害椤甸潰鐐逛簡鎷掔鎸夐挳锛岄渶瑕佽繘鍏ュ埌绛剧讲椤甸潰鐢ㄦ埛鎵嬪姩绛剧讲鎵嶄細鍑虹幇鎷掔鎸夐挳锛�3銆佸凡淇濆叏鏄寚鐢ㄦ埛瀹屾垚绛剧讲鍚庯紝鍚涘瓙绛句細绔嬪嵆鑷姩瀵圭敤鎴风缃茶繃绋嬬殑鎿嶄綔浠ュ強鍚堝悓鏂囦欢淇℃伅杩涜涓婇摼瀛樿瘉鍥哄寲锛屽凡淇濆叏鏄悎鍚岀殑鏈�缁堢姸鎬侊紝濡傛灉闇�瑕佷笅杞藉悎鍚岃浠ュ凡淇濆叏鐘舵�佷负鍑嗐�傦級 * post int
+ private long optTime;//鎿嶄綔鏃堕棿(姣) * post long
+ private int signStatus;// 1绛剧害瀹屾垚2鎷掔3宸蹭繚鍏紙1銆佺绾﹀畬鎴愭槸鎸囩敤鎴风缃叉枃浠舵垚鍔燂紱2銆佹嫆绛炬槸鎸囩敤鎴峰湪绛剧害椤甸潰鐐逛簡鎷掔鎸夐挳锛岄渶瑕佽繘鍏ュ埌绛剧讲椤甸潰鐢ㄦ埛鎵嬪姩绛剧讲鎵嶄細鍑虹幇鎷掔鎸夐挳锛�3銆佸凡淇濆叏鏄寚鐢ㄦ埛瀹屾垚绛剧讲鍚庯紝鍚涘瓙绛句細绔嬪嵆鑷姩瀵圭敤鎴风缃茶繃绋嬬殑鎿嶄綔浠ュ強鍚堝悓鏂囦欢淇℃伅杩涜涓婇摼瀛樿瘉鍥哄寲锛屽凡淇濆叏鏄悎鍚岀殑鏈�缁堢姸鎬侊紝濡傛灉闇�瑕佷笅杞藉悎鍚岃浠ュ凡淇濆叏鐘舵�佷负鍑嗐�傦級 * post int
}
diff --git a/server/dianziqian/src/main/java/com/jzq/common/bean/sign/NotifyReq.java b/server/dianziqian/src/main/java/com/jzq/common/bean/sign/NotifyReq.java
index 7f979b3..d9d673b 100644
--- a/server/dianziqian/src/main/java/com/jzq/common/bean/sign/NotifyReq.java
+++ b/server/dianziqian/src/main/java/com/jzq/common/bean/sign/NotifyReq.java
@@ -3,13 +3,16 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
+
+import java.io.Serializable;
+
@Data
@ApiModel("绛剧害鏂逛俊鎭�")
-public class NotifyReq {
+public class NotifyReq implements Serializable {
private String method ;//涓氬姟绫诲瀷 * post
private String version ;//鐗堟湰 * post
- private Long timestamp ;//鏃堕棿鎴筹紙绮剧‘鍒版绉掞級 * post
+ private long timestamp ;//鏃堕棿鎴筹紙绮剧‘鍒版绉掞級 * post
private NotifyDataReq data ;//JSONObject缁撴灉 * post
private String sign;// 绛惧悕sign(sha1瀵瑰墠闈㈢殑鍙傛暟绛惧悕) * post
private String appkey;// appkey * post
diff --git a/server/platform/src/main/java/com/doumee/api/business/InsuranceApplyController.java b/server/platform/src/main/java/com/doumee/api/business/InsuranceApplyController.java
index 43a5be6..7e726d2 100644
--- a/server/platform/src/main/java/com/doumee/api/business/InsuranceApplyController.java
+++ b/server/platform/src/main/java/com/doumee/api/business/InsuranceApplyController.java
@@ -57,6 +57,15 @@
public ApiResponse uploadToubaodan(@RequestBody InsuranceApply insuranceApply) {
return ApiResponse.success(insuranceApplyService.uploadToubaodan(insuranceApply));
}
+
+ @ApiOperation("鏍规嵁ID鏌ヨ")
+ @GetMapping("/getSignLink/{id}")
+ @RequiresPermissions("business:insuranceapply:query")
+ public ApiResponse<String> getSignLink(@PathVariable Integer id) {
+ return ApiResponse.success(insuranceApplyService.getSignLink(id));
+ }
+
+
@ApiOperation("骞冲彴涓婁紶淇濋櫓鍗�")
@PostMapping("/uploadBaoxiandan")
@RequiresPermissions("business:insuranceapply:uploadBaoxiandan")
diff --git a/server/platform/src/main/java/com/doumee/api/common/PublicController.java b/server/platform/src/main/java/com/doumee/api/common/PublicController.java
index 4904bc8..24111aa 100644
--- a/server/platform/src/main/java/com/doumee/api/common/PublicController.java
+++ b/server/platform/src/main/java/com/doumee/api/common/PublicController.java
@@ -1,6 +1,7 @@
package com.doumee.api.common;
import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
import com.doumee.api.BaseController;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.annotation.trace.Trace;
@@ -16,6 +17,7 @@
import com.doumee.service.business.InsuranceApplyService;
import com.doumee.service.business.InterfaceLogService;
import com.doumee.service.business.third.SignService;
+import com.jzq.common.bean.sign.NotifyDataReq;
import com.jzq.common.bean.sign.NotifyReq;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -26,10 +28,7 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
@@ -39,6 +38,7 @@
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
+import java.lang.reflect.Field;
import java.util.*;
/**
@@ -57,33 +57,31 @@
private InsuranceApplyService insuranceApplyService;
@Autowired
public InterfaceLogService interfaceLogService = null;
-
@ApiOperation("鍚涘瓙绛剧绾﹀洖璋冮�氱煡")
@PostMapping("/signNotify")
- public void updateStatus(@RequestBody NotifyReq request,HttpServletResponse response) {
+ public void updateStatus(@RequestParam Map<String,String> req, HttpServletResponse response) {
Map<String, Object> context = new HashMap<>();
context.put("success",true);
InterfaceLog log=new InterfaceLog();
log.setType(1);
log.setCreateDate(new Date());
log.setIsdeleted(0);
- log.setRequest(JSONObject.toJSONString(request));
-
+ log.setRequest(JSONObject.toJSONString(req));
log.setName("鍚涘瓙绛剧绾﹀洖璋冮�氱煡");
log.setUrl(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.SIGN_DONE_NOTIFY_URL).getCode());
-
try {
String appKey = systemDictDataBiz.queryByCode(Constants.SIGN,Constants.SIGN_APPKEY).getCode();
String appSecret = systemDictDataBiz.queryByCode(Constants.SIGN,Constants.SIGN_APPSECRET).getCode();
- if(!StringUtils.equals(appKey,request.getAppkey())){
+ if(!StringUtils.equals(appKey,req.get("appkey"))){
throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"appkey涓嶅尮閰�");
}
- String sign = DigestUtils.sha1Hex("data"+JSONObject.toJSONString(request.getData())+"method"+request.getMethod()+"version"+request.getVersion()+"timestamp"+request.getTimestamp()
+ String sign = DigestUtils.sha1Hex("data"+ req.get("data")+"method"+req.get("method")+"version"+req.get("version")+"timestamp"+req.get("timestamp")
+"appKey"+appKey+"appSecret"+appSecret);
- if(!StringUtils.equals(sign,request.getSign())){
+ if(!StringUtils.equals(sign,req.get("sign"))){
throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"楠岀涓嶉�氳繃");
}
- insuranceApplyService.dealSignResult(request.getData());
+ NotifyDataReq data = JSONObject.parseObject(req.get("data"), NotifyDataReq.class);
+ insuranceApplyService.dealSignResult(data);
}catch (Exception e){
log.setRepose("澶勭悊寮傚父锛�"+e.getMessage());
context.put("success",false);
@@ -92,7 +90,6 @@
}finally {
interfaceLogService.create(log);
}
-
writerJson(response, context);
}
diff --git a/server/service/src/main/java/com/doumee/config/shiro/ShiroConfig.java b/server/service/src/main/java/com/doumee/config/shiro/ShiroConfig.java
index 680ae76..96eabc4 100644
--- a/server/service/src/main/java/com/doumee/config/shiro/ShiroConfig.java
+++ b/server/service/src/main/java/com/doumee/config/shiro/ShiroConfig.java
@@ -92,6 +92,7 @@
map.put("/system/logout", "anon");
map.put("/common/captcha", "anon");
map.put("/business/smsEmail/sendSms", "anon");
+ map.put("/public/signNotify", "anon");
map.put("/business/areas/*", "anon");
// - 鏀捐swagger
map.put("/doc.html", "anon");
diff --git a/server/service/src/main/java/com/doumee/core/utils/Constants.java b/server/service/src/main/java/com/doumee/core/utils/Constants.java
index 624e0a1..2b41ebe 100644
--- a/server/service/src/main/java/com/doumee/core/utils/Constants.java
+++ b/server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -665,8 +665,9 @@
BZZ(2, "淇濋殰涓�"),
YGQ(3, "宸茶繃鏈�"),
YTH(4, "宸查��鍥�"),
- THSQZ(5, "閫�鍥炵敵璇蜂腑"),
+ THSQZ(5, "鐢宠閫�鍥�"),
YGB(6, "宸插叧闂�"),
+ DQYQZ(7, "寰呯缃�"),
;
// 鎴愬憳鍙橀噺
private String name;
@@ -795,9 +796,9 @@
public enum InsuranceApplyStatus {
UPLOAD(0, "鎻愪氦鎶曚繚","",0),
PLATFORM_RETURN(1, "瀹℃牳涓嶉�氳繃","鎻愪氦鎰忚锛�${param}",4),
- WAIT_SIGNATURE(2, "宸蹭笂浼犱唬绛剧敵璇疯〃寰呬紒涓氱绔�","",1),
+ WAIT_SIGNATURE(2, "宸蹭笂浼犱唬绛剧敵璇疯〃寰呬紒涓氱绔�","",7),
SIGNATURE(3, "宸茬绔犲緟涓婁紶淇濋櫓鍗�","",1),
- FAIL_RETURN(4, "淇濆崟鍑哄叿澶辫触閫�鍥�","",0),
+ FAIL_RETURN(4, "淇濆崟鍑哄叿澶辫触閫�鍥�","",4),
UPLOAD_INSURANCE(5, "淇濆崟瀹屾垚","淇濋櫓鐢熸晥璧锋湡锛�${param}鍙樻洿涓�${param1}",2),
COMPANY_BACK_APPLY_UPLOAD(6, "浼佷笟鐢宠閫�鍥�(鎻愪氦鎶曚繚)","鎻愪氦鎰忚锛�${param}",5),
COMPANY_BACK_APPLY_WAIT_SIGNATURE(7, "浼佷笟鐢宠閫�鍥�(寰呯绔�)","鎻愪氦鎰忚锛�${param}",5),
diff --git a/server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java b/server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java
index 847604b..0afb25a 100644
--- a/server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java
+++ b/server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java
@@ -77,12 +77,10 @@
@ApiModelProperty(value = "鏈熸湜淇濋櫓鐢熸晥璧锋湡")
@ExcelColumn(name="鏈熸湜淇濋櫓鐢熸晥璧锋湡")
-
private Date applyStartTime;
@ApiModelProperty(value = "瀹為檯淇濋櫓鐢熸晥姝㈡湡")
@ExcelColumn(name="瀹為檯淇濋櫓鐢熸晥姝㈡湡")
-
private Date endTime;
@ApiModelProperty(value = "瀹為檯淇濋櫓鐢熸晥璧锋湡")
@@ -128,6 +126,9 @@
@ApiModelProperty(value = "鏂规鍚嶇О")
@TableField(exist = false)
private String solutionsName;
+ @ApiModelProperty(value = "绛剧珷鍏抽敭瀛�")
+ @TableField(exist = false)
+ private String signKeyword;
@ApiModelProperty(value = "浜哄憳淇℃伅")
@TableField(exist = false)
@@ -188,7 +189,6 @@
taxesInvoicingVO.setType(Constants.ZERO);
return taxesInvoicingVO;
}
-
@ApiModelProperty(value = "鍦ㄧ嚎绛剧珷鍦板潃")
@TableField(exist = false)
private String signLink;
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
index d43ad88..ad61a06 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
@@ -994,7 +994,7 @@
if(StringUtils.isBlank(applyNo) ){
throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"瀵逛笉璧凤紝鑾峰彇鍦ㄧ嚎绛剧珷鍦板潃澶辫触锛岃绋嶅悗閲嶈瘯锛�");
}
- String link = signService.signLink(applyNo,company.getEmail(),company.getCode());
+ String link = signService.signLink(applyNo,company.getName(),company.getCode());
if(StringUtils.isBlank(link) ){
throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"瀵逛笉璧凤紝鑾峰彇鍦ㄧ嚎绛剧珷鍦板潃澶辫触锛岃绋嶅悗閲嶈瘯锛�");
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
index e13e60a..70ba94a 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -32,6 +32,7 @@
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;
@@ -46,6 +47,8 @@
*/
@Service
public class InsuranceApplyServiceImpl implements InsuranceApplyService {
+ @Value("${debug_model}")
+ private boolean debugModel;
@Autowired
private InsuranceApplyMapper insuranceApplyMapper;
@@ -56,6 +59,8 @@
private SystemDictDataBiz systemDictDataBiz;
@Autowired
private InsuranceApplyJoinMapper insuranceApplyJoinMapper;
+ @Autowired
+ private CompanyMapper companyMapper;
@Autowired
private ApplyDetailMapper applyDetailMapper;
@@ -135,11 +140,11 @@
if(!Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.SIGNATURE.getKey())){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ敵璇风姸鎬佸凡娴佽浆锛屽綋鍓嶄笉鏀寔璇ユ搷浣渵");
}
- if(model.getApplyEndTime()== null || insuranceApply.getStartTime().getTime()>insuranceApply.getApplyEndTime().getTime() ){
+ if(model.getApplyEndTime()== null || model.getStartTime().getTime()>model.getApplyEndTime().getTime() ){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ敵璇风敓鏁堝懆鏈熸椂闂翠笉绗﹀悎瑕佹眰锛岃纭鍚庝慨鏀归噸璇晘");
}
//璁$畻瀹為檯鎴鏃堕棿
- Date actEndTime = new Date(insuranceApply.getApplyEndTime().getTime() + (insuranceApply.getStartTime().getTime() - model.getApplyStartTime().getTime()));
+ Date actEndTime = new Date(model.getApplyEndTime().getTime() + (insuranceApply.getStartTime().getTime() - model.getApplyStartTime().getTime()));
LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
InsuranceApply update = new InsuranceApply();
update.setEditDate(new Date());
@@ -156,7 +161,7 @@
insuranceApply.getBaoxiandanFile().setIsdeleted(Constants.ZERO);
insuranceApply.getBaoxiandanFile().setCreator(user.getId());
- insuranceApply.getToubaodanFile().setObjId(update.getId());
+ insuranceApply.getBaoxiandanFile().setObjId(update.getId());
insuranceApply.getBaoxiandanFile().setCreateDate(update.getEditDate());
insuranceApply.getBaoxiandanFile().setObjType(Constants.MultiFile.BD_DONE_PDF.getKey());
insuranceApply.getBaoxiandanFile().setType(Constants.TWO);
@@ -219,7 +224,7 @@
param.getBaoxiandanFile().setObjType(Constants.MultiFile.BD_DONE_PDF.getKey());
param.getBaoxiandanFile().setType(Constants.TWO);
multifileMapper.insert(param.getBaoxiandanFile());
-
+ update.setStatus(model.getStatus());
Constants.ApplyLogType applyLogType = Constants.ApplyLogType.PALTFORM_EDIT_BD;
String info = applyLogType.getInfo();
info = info.replace("${param}",param.getCheckInfo());
@@ -289,7 +294,14 @@
if(id == null ){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
- InsuranceApply model = insuranceApplyMapper.selectById(id);
+ MPJLambdaWrapper wrapper= new MPJLambdaWrapper<InsuranceApply>()
+ .selectAll(InsuranceApply.class)
+ .selectAs(Solutions::getSignKeyword,InsuranceApply::getSignKeyword)
+ .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
+ .eq(InsuranceApply::getId,id)
+ .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);
}
@@ -298,11 +310,14 @@
Constants.ApplyLogType applyLogType = null;
String info = "";
//濡傛灉鏄┏鍥�,鍙兘鍙┏鍥炲凡绛剧珷鐘舵�佷笅鐨勯��鍥炵敵璇风姸鎬佽繘琛屾搷浣�
- if(!Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_WAIT_SIGNATURE.getKey())){
+ if(!Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WAIT_SIGNATURE.getKey())){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ敵璇风姸鎬佸凡娴佽浆锛屽綋鍓嶄笉鏀寔璇ユ搷浣渵");
}
Company company = user.getCompany();
- if(company== null || StringUtils.isBlank( company.getEmail()) || !Constants.equalsInteger(company.getSignStatus(),Constants.ONE)){
+ 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(),"瀵逛笉璧凤紝浼佷笟灏氭湭鍏峰鍦ㄧ嚎绛剧珷鏉′欢锛岃鑱旂郴骞冲彴绠$悊鍛樼‘璁");
}
@@ -316,11 +331,11 @@
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(),null,company.getSignId(),notifyUrl);
+ 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.getEmail(),company.getCode());
+ String link = signService.signLink(applyNo,company.getName(),company.getCode());
if(StringUtils.isBlank(link) ){
throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"瀵逛笉璧凤紝鑾峰彇鍦ㄧ嚎绛剧珷鍦板潃澶辫触锛岃绋嶅悗閲嶈瘯锛�");
}
@@ -358,7 +373,7 @@
InsuranceApply update = new InsuranceApply();
update.setEditDate(new Date());
update.setEditor(model.getCreator());
- update.setStatus(Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey());
+ update.setStatus(Constants.InsuranceApplyStatus.SIGNATURE.getKey());
update.setCheckDate(update.getEditDate());
update.setCheckInfo("浼佷笟瀹屾垚绛剧讲");
update.setCheckUserId(model.getCreator());
@@ -449,7 +464,7 @@
if(Constants.equalsInteger(data.getSignStatus(), Constants.THREE )){
//濡傛灉宸蹭繚鍏�,鍙笅杞界绾﹂檮浠�
InsuranceApply model = insuranceApplyMapper.selectOne(new QueryWrapper<InsuranceApply>().lambda().eq(InsuranceApply::getSignApplyNo,data.getApplyNo()).last("limit 1" ));
- if(model != null && Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_WAIT_SIGNATURE.getKey())){
+ if(model != null && Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WAIT_SIGNATURE.getKey())){
//瀹屾垚绛剧讲宸插畬鎴愭搷浣�
String link = signService.linkFile(data.getApplyNo());
String fileUrl = uploadSignFile(link);
@@ -522,7 +537,7 @@
Constants.ApplyLogType applyLogType = Constants.ApplyLogType.WAIT_SIGNATURE;
String info =applyLogType.getInfo();
- info = info.replace("${param}", update.getCheckInfo());
+// info = info.replace("${param}", update.getCheckInfo());
ApplyLog log = new ApplyLog(update,applyLogType.getName(),StringUtils.isNotBlank(update.getCheckInfo())?info:"",update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update));
applyLogMapper.insert(log);
return 1;
@@ -981,7 +996,7 @@
f.setFileurlFull(path+f.getFileurl());
if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.BD_APPLY_PDF.getKey())){
//绛剧讲鍓嶇殑鎶曚繚鍗�
- model.setBaoxiandanFile(f);
+ model.setToubaodanFile(f);
}else if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.BD_SIGNED_PDF.getKey())){
//绛剧讲鍚庣殑鎶曚繚鍗�
model.setToubaodanSignedFile(f);
diff --git a/server/service/src/main/java/com/doumee/service/business/third/SignService.java b/server/service/src/main/java/com/doumee/service/business/third/SignService.java
index 9289e06..a5c52aa 100644
--- a/server/service/src/main/java/com/doumee/service/business/third/SignService.java
+++ b/server/service/src/main/java/com/doumee/service/business/third/SignService.java
@@ -269,7 +269,7 @@
// params.put("file",file);
params.put("url",fileUrl);
params.put("dealType",5); //鎸囧畾鍚堝悓鏂囦欢绛剧讲鏂瑰紡 5 涓洪儴鍒嗚嚜鍔ㄧ
- params.put("positionType",1); //鎸囧畾閫氳繃琛ㄥ崟鍩熸柟寮忚缃瀛椾綅缃�
+ params.put("positionType",2); //鎸囧畾閫氳繃琛ㄥ崟鍩熸柟寮忚缃瀛椾綅缃�
params.put("fileType",1);
params.put("needQifengSign",1);
params.put("notifyUrl",notifyUrl);
@@ -286,7 +286,7 @@
sReq.setNoNeedVerify(1);
signatories.add(sReq);
params.put("signatories",signatories.toJSONString());
- System.out.println(signatories.toJSONString());
+ System.out.println("================"+JSONObject.toJSONString(params));
String str= HttpClientUtils.init().getPost(url,null,params,true);
System.out.println(str);
saveInterfaceLog(url,"銆愮數瀛愮銆戝彂璧风绾�",JSONObject.toJSONString(params),str);
@@ -331,6 +331,7 @@
// sReq.setChapteJson(postionJson);
sReq.setSearchKey(postionJson);
sReq.setSignId(singId);
+ sReq.setSearchConvertExtend("{\"fixX\":10,\"fixY\":-50}");
sReq.setNoNeedVerify(1);
signatories.add(sReq);
params.put("signatories",signatories.toJSONString());
--
Gitblit v1.9.3