From 788a8db820cddeef9d99ecf408716f2a0d3c3217 Mon Sep 17 00:00:00 2001
From: nidapeng <jp@doumee.com>
Date: 星期三, 03 四月 2024 17:11:30 +0800
Subject: [PATCH] 提交一把

---
 company/src/components/business/OpearaUnionChange.vue                                     |  391 ++++++++++++++++++++++++++++++++++++++++++++++++
 company/src/views/business/unionChange.vue                                                |   10 
 server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java |    2 
 company/src/components/business/InsuranceDetailsWtb.vue                                   |    3 
 company/src/api/business/applyChange.js                                                   |    5 
 company/src/components/business/OperaWtbApplyShopWindow.vue                               |    6 
 company/src/api/business/insuranceApply.js                                                |    5 
 server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java |    3 
 company/src/components/business/InsuranceDetails.vue                                      |    3 
 company/src/api/business/unionChange.js                                                   |    4 
 company/src/components/business/ApplyChangeDetails.vue                                    |    3 
 company/src/components/business/OpearaUnionApply.vue                                      |   16 -
 12 files changed, 430 insertions(+), 21 deletions(-)

diff --git a/company/src/api/business/applyChange.js b/company/src/api/business/applyChange.js
index 715195c..90664a8 100644
--- a/company/src/api/business/applyChange.js
+++ b/company/src/api/business/applyChange.js
@@ -6,6 +6,11 @@
         trim: true
     })
 }
+export function listAll (data) {
+    return request.post('/business/applyChange/list', data, {
+        trim: true
+    })
+}
 export function getChangeMemberListOnlineSignLink (data) {
     return request.post('business/applyChange/getChangeMemberListOnlineSignLink', data, {
         trim: true
diff --git a/company/src/api/business/insuranceApply.js b/company/src/api/business/insuranceApply.js
index e0270eb..226a224 100644
--- a/company/src/api/business/insuranceApply.js
+++ b/company/src/api/business/insuranceApply.js
@@ -6,6 +6,11 @@
         trim: true
     })
 }
+export function findAllApply(data) {
+    return request.post('/business/insuranceApply/findListByDTO', data, {
+        trim: true
+    })
+}
 
 // 淇敼
 export function updateById (data) {
diff --git a/company/src/api/business/unionChange.js b/company/src/api/business/unionChange.js
index 687ef00..76f4895 100644
--- a/company/src/api/business/unionChange.js
+++ b/company/src/api/business/unionChange.js
@@ -12,6 +12,10 @@
     return request.post('/business/unionChange/create', data)
 }
 
+export function merge (data) {
+    return request.post('/business/unionChange/merge', data)
+}
+
 // 淇敼
 export function updateById (data) {
     return request.post('/business/unionChange/updateById', data)
diff --git a/company/src/components/business/ApplyChangeDetails.vue b/company/src/components/business/ApplyChangeDetails.vue
index be7d96c..1587990 100644
--- a/company/src/components/business/ApplyChangeDetails.vue
+++ b/company/src/components/business/ApplyChangeDetails.vue
@@ -80,6 +80,9 @@
 <!--            <el-button type="danger"  :loading="isWorking.export" @click="check(1)">瀹℃牳涓嶉�氳繃</el-button>-->
             <el-button @click="visible=false">鍙栨秷</el-button>
         </template>
+        <template v-else-if="type==2" v-slot:footer>
+            <el-button @click="visible=false">杩斿洖</el-button>
+        </template>
         <template v-else v-slot:footer>
             <el-button type="primary"  :loading="isWorking.export" @click="exportComFilesDo">浼佷笟璇佷欢</el-button>
             <el-button type="primary"  :loading="isWorking.export" @click="exportDetail">瀵煎嚭璇﹀崟</el-button>
diff --git a/company/src/components/business/InsuranceDetails.vue b/company/src/components/business/InsuranceDetails.vue
index 52bb12c..19d6027 100644
--- a/company/src/components/business/InsuranceDetails.vue
+++ b/company/src/components/business/InsuranceDetails.vue
@@ -86,7 +86,7 @@
 <!--            <el-button type="danger"  :loading="isWorking.export" @click="check(1)">瀹℃牳涓嶉�氳繃</el-button>-->
             <el-button @click="visible=false">鍙栨秷</el-button>
         </template>
-        <template v-if="type==2" v-slot:footer>
+        <template v-else-if="type==2" v-slot:footer>
             <el-button @click="visible=false">杩斿洖</el-button>
         </template>
         <template v-else v-slot:footer>
@@ -94,6 +94,7 @@
             <el-button type="primary"  :loading="isWorking.export" @click="exportDetail">瀵煎嚭璇﹀崟</el-button>
             <el-button @click="visible=false">鍙栨秷</el-button>
         </template>
+      </div>
     </GlobalWindow>
 </template>
 
diff --git a/company/src/components/business/InsuranceDetailsWtb.vue b/company/src/components/business/InsuranceDetailsWtb.vue
index 06ae5f7..495870a 100644
--- a/company/src/components/business/InsuranceDetailsWtb.vue
+++ b/company/src/components/business/InsuranceDetailsWtb.vue
@@ -64,6 +64,9 @@
 <!--            <el-button type="danger"  :loading="isWorking.export" @click="check(1)">瀹℃牳涓嶉�氳繃</el-button>-->
             <el-button @click="visible=false">鍙栨秷</el-button>
         </template>
+      <template v-else-if="type==2" v-slot:footer>
+        <el-button @click="visible=false">杩斿洖</el-button>
+      </template>
         <template v-else v-slot:footer>
             <el-button type="primary"  :loading="isWorking.export" @click="exportDetail">瀵煎嚭璇﹀崟</el-button>
             <el-button @click="visible=false">鍙栨秷</el-button>
diff --git a/company/src/components/business/OpearaUnionApply.vue b/company/src/components/business/OpearaUnionApply.vue
index 6ae3352..b76e31c 100644
--- a/company/src/components/business/OpearaUnionApply.vue
+++ b/company/src/components/business/OpearaUnionApply.vue
@@ -107,7 +107,7 @@
         <selectApplicationForm ref="selectApplicationForm" @success="getValue" />
         <!--    鎶曚繚鍛樺伐鍚嶅崟    -->
         <employeeList ref="employeeList" />
-      <InsuranceDetails ref="InsuranceDetails" @success="successEvent" />
+      <InsuranceDetails ref="InsuranceDetails" @success="getValue" />
     </GlobalWindow>
 </template>
 
@@ -117,11 +117,11 @@
 import selectApplicationForm from '@/components/business/selectApplicationForm'
 import employeeList from '@/components/business/employeeList'
 import { all } from '@/api/business/solutions'
-import { fetchList } from '@/api/business/insuranceApply'
+import { findAllApply } from '@/api/business/insuranceApply'
 import InsuranceDetails from '@/components/business/InsuranceDetails'
 import { merge } from '@/api/business/unionApply'
 export default {
-  name: 'factoryChange',
+  name: 'OpearaUnionApply',
   extends: BaseOpera,
   components: { GlobalWindow, InsuranceDetails,selectApplicationForm, employeeList },
   data () {
@@ -251,16 +251,12 @@
       this.getList()
     },
     getList () {
-      fetchList({
-        capacity: 10,
-        page: this.currentPage,
-        model: {
+      findAllApply({
           baseSolutionId: this.form.baseSolutionId,
           status: 23
-        }
       }).then(res => {
-        this.list = res.records
-        this.total = res.total
+        this.list = res
+        this.total=this.list ?this.list.length:0
         this.$nextTick(() => {
           if (this.$refs.table && this.$refs.table.doLayout) {
             this.$refs.table.doLayout()
diff --git a/company/src/components/business/OpearaUnionChange.vue b/company/src/components/business/OpearaUnionChange.vue
new file mode 100644
index 0000000..c5b6de0
--- /dev/null
+++ b/company/src/components/business/OpearaUnionChange.vue
@@ -0,0 +1,391 @@
+<template>
+  <GlobalWindow
+      :title="title"
+      width="100%"
+      text="鍔犲噺淇濈敵璇�"
+      :visible.sync="visible"
+      :confirm-working="isWorking"
+      @confirm="confirm"
+  >
+    <div class="list">
+      <el-form :inline="true" ref="form" :model="form" :rules="rules" class="demo-form-inline">
+        <el-form-item label=" " prop="unionApplyId" >
+          <div style=" display: flex; flex-direction: column;">
+            <el-button type="primary" size="small" @click="selectBaoxiandan"> 閫夋嫨淇濋櫓鍗�</el-button>
+            <span style="color: #F95601; font-size: 14px;">锛�1. 璇烽�夋嫨淇濋櫓鍗曞悗杩涜鎿嶄綔锛�</span>
+          </div>
+        </el-form-item>
+        <el-form-item label="鎵瑰崟鐢熸晥璧锋湡锛�" prop="applyDate" style="margin-left: 40px">
+          <div style="display: flex; flex-direction: column;">
+            <el-date-picker
+                v-model="form.applyDate"
+                type="date"
+                format="yyyy 骞� MM 鏈� dd 鏃�"
+                value-format="yyyy-MM-dd" />
+            <span style="color: #F95601; font-size: 14px;">锛�2. 娆℃棩鐢熸晥鎶曚繚璇蜂簬17:30鍓嶆彁浜わ紝瓒呮椂鎻愪氦浠ヤ繚闄╁崟涓哄噯锛�</span>
+          </div>
+        </el-form-item>
+        <el-form-item label="璐圭敤" v-if="model">
+          <span>{{model.price}}鍏�</span>
+          <span v-if="model.timeUnit === 0">/澶�</span>
+          <span v-if="model.timeUnit === 1">/鍗婃湀</span>
+          <span v-if="model.timeUnit === 2">/鏈�</span>
+          <span v-if="model.timeUnit === 3">/骞�</span>
+          <span>/浜�</span>
+        </el-form-item>
+        <el-form-item label="鎶曚繚骞撮緞" v-if="item">
+          <span>{{model.minAge}} 鑷� {{model.maxAge}}</span>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div style="display: block;margin:0 0 30px 30px " v-if="model">
+      <div style="display: inline-block;width: 300px">淇濋櫓鏂规锛歿{model.solutionName}}</div>
+      <div style="display: inline-block">淇濆崟鍙凤細{{model.code}}</div>
+    </div>
+    <el-table
+        :data="list"
+        border
+        ref="multipleTable"
+        @row-click="rowselect"
+        @selection-change="handleSelectionChange"
+        style="width: 100%;margin-bottom: 15px;">
+      <el-table-column
+          type="selection"
+          width="55">
+      </el-table-column>
+      <el-table-column label="搴忓彿" width="80px">
+        <template slot-scope="scope">
+          <span>{{scope.$index + 1}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+          prop="companyName"
+          label="琚繚闄╀汉">
+      </el-table-column>
+      <el-table-column
+          prop="applyStartTime"
+          label="鏈熸湜淇濋櫓鐢熸晥璧锋湡">
+      </el-table-column>
+      <el-table-column
+          prop="addNum"
+          label="鍔犱繚浜烘暟">
+      </el-table-column>
+      <el-table-column
+          prop="delNum"
+          label="鍑忎繚浜烘暟">
+      </el-table-column>
+      <el-table-column
+          prop="fee"
+          label="璐圭敤鍙樻洿">
+      </el-table-column>
+      <el-table-column  label="鎿嶄綔">
+        <template slot-scope="{row}">
+          <el-button type="text" @click="checkDetial(row)">鏌ョ湅鍚嶅崟</el-button>
+          <!--                    <el-button type="text" style="color: #ff0000;">鍒犻櫎</el-button>-->
+        </template>
+      </el-table-column>
+    </el-table>
+    <div style="color: #F95601; font-size: 14px;width: 100%;text-align: left">锛�3. 璇峰厛閫夋嫨鑷冲皯涓�鏉$敵璇峰悗鎻愪氦鎶曚繚鐢宠锛�</div>
+    <div class="info" v-if="model">
+      <span v-if="model.specialAgreement">{{model.specialAgreement}}</span>
+      <span v-if="model.specialInfo">{{model.specialInfo}}</span>
+      <span v-if="model.ortherInfo">{{model.ortherInfo}}</span>
+    </div>
+    <!--    閫夋嫨鐢宠鍗�    -->
+    <ApplyChangeDetails ref="ApplyChangeDetails" @success="getValue" />
+    <el-dialog
+        title="閫夋嫨淇濋櫓鍗�"
+        :visible.sync="visibleSelect"
+        width="70%"
+        :modal="true"
+        :show-close="false"
+        append-to-body
+        center>
+      <div class="desc_item_from">
+        <el-table
+            ref="multipleTable1"
+            v-loading="isWorking.search"
+            :data="tableData.list"
+            @row-click="rowselect1"
+            row-key="id"
+            @selection-change="handleSelectionChange1"
+            stripe
+        >
+         <el-table-column
+            type="selection"
+            width="55">
+        </el-table-column>
+          <el-table-column label="搴忓彿" width="80px">
+            <template slot-scope="scope">
+              <span>{{scope.$index + 1}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="statusInfo" label="鐘舵��" min-width="100px">
+            <template slot-scope="{row}">
+              <span :class="'union-apply-status'+row.status"  >{{ row.statusInfo}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="code" label="淇濆崟鍙�" min-width="100px"></el-table-column>
+          <el-table-column prop="solutionName" label="淇濋櫓鏂规" min-width="100px"></el-table-column>
+          <el-table-column prop="insureNum" label="鎶曚繚浜烘暟" min-width="100px"></el-table-column>
+          <el-table-column prop="fee" label="鎬昏垂鐢紙鍏冿級" min-width="100px"></el-table-column>
+          <el-table-column prop="createDate" label="鎻愪氦鏃堕棿" min-width="100px"></el-table-column>
+        </el-table>
+        <div class="desc_item_from_page">
+          <el-pagination
+              @current-change="handleCurrentChange"
+              :current-page="currentPage"
+              :page-size="10"
+              layout="total, prev, pager, next, jumper"
+              :total="tableTotal">
+          </el-pagination>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+                <el-button type="primary" @click="selectDo()">纭�  瀹�</el-button>
+                <el-button @click="model=null;visibleSelect=false">鍙� 娑�</el-button>
+            </span>
+    </el-dialog>
+
+  </GlobalWindow>
+</template>
+
+<script>
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import selectApplicationForm from '@/components/business/selectApplicationForm'
+import { listAll } from '@/api/business/applyChange'
+import { merge } from '@/api/business/unionChange'
+import ApplyChangeDetails from '@/components/business/ApplyChangeDetails'
+import { fetchList as pageUnionList } from '@/api/business/unionApply'
+import {getDetail} from "@/api/business/insuranceApply";
+export default {
+  name: 'add_subtract_entrust',
+  extends: BaseOpera,
+  components: { GlobalWindow, ApplyChangeDetails,selectApplicationForm },
+  data () {
+    return {
+      form: {
+        unionApplyId: null,
+        applyIds: [],
+        applyDate: null,
+        businessType: 0
+      },
+      visibleSelect:false,
+      solutions: [],
+      currentPage:0,
+      list: [],
+      tableData:[],
+      tableTotal:0,
+      endTime: '',
+      item: null,
+      model: null,
+      time: [],
+      // 楠岃瘉瑙勫垯
+      rules: {
+        unionApplyId: [
+          { required: true, message: '璇烽�夋嫨淇濋櫓鍗�' }
+        ],
+        applyDate: [
+          { required: true, message: '璇烽�夋嫨淇濋櫓鐢熸晥璧锋湡' }
+        ]
+      }
+    }
+  },
+  created () {
+    this.config({
+      api: '/business/insuranceApply',
+      'field.id': 'id'
+    })
+  },
+  methods: {
+    rowselect(row){
+      this.$refs.multipleTable.toggleRowSelection(row,true);
+    },
+    rowselect1(row){
+      this.$refs.multipleTable1.toggleRowSelection(row,true);
+    },
+    checkDetial(row){
+      getDetail(row.applyId).then(res => {
+        // this.apply = res
+        this.$refs.ApplyChangeDetails.open('鍔犲噺淇濅汉鍛樺悕鍗�',res, row,2)
+      }).catch(err => {
+      })
+    },
+    handleSelectionChange(rows){
+      this.form.applyIds = []
+      // 鍋囪鍙栧嚭 id 瀛楁
+      rows.forEach(item => {
+        const id = item.id
+        if ( this.form.applyIds.indexOf(id) === -1) {
+          this.form.applyIds.push(id)
+        }
+      })
+    },
+    handleSelectionChange1 (rows) {
+      console.log(rows)
+      if (rows.length > 1) {
+        // clearSelection 鐢ㄤ簬澶氶�夎〃鏍硷紝娓呯┖鐢ㄦ埛鐨勯�夋嫨
+        this.$refs.multipleTable1.clearSelection();
+        this.$refs.multipleTable1.toggleRowSelection(rows[rows.length-1]);
+      }
+     if (rows.length >= 1) {
+        // 閫変腑鐨勮瀵瑰儚鏀捐繘鏁扮粍锛屾柟渚垮悗缁鏁版嵁杩涜鎿嶄綔
+        this.model =rows[rows.length-1]
+      } else if (rows.length === 0) {
+        this.model = null
+      }
+    },
+    selectDo(){
+      if(!this.model){
+        this.$tip.apiFailed({
+          type: 'error',
+          message: '璇烽�夋嫨鑷冲皯涓�鏉$敵璇疯褰曡繘琛屾搷浣�'
+        })
+        return
+      }
+      this.visibleSelect=false
+      this.form.unionApplyId = this.model.id
+      this.getList();
+    },
+    confirm () {
+      this.$refs.form.validate((valid) => {
+        // debugger
+        if (!valid) {
+          return
+        }
+        if(this.form.applyIds == null || this.form.applyIds.length ===0){
+          this.$tip.apiFailed({
+            type: 'error',
+            message: '璇烽�夋嫨鑷冲皯涓�鏉$敵璇疯褰曡繘琛屾姇淇濈敵璇凤紒!'
+          })
+          return;
+        }
+        this.$confirm('纭鎻愪氦锛岃浠旂粏鏍稿淇℃伅銆�', '鎻愮ず', {
+          confirmButtonText: '纭畾',
+          cancelButtonText: '鍙栨秷',
+          type: 'warning',
+          center: true
+        }).then(() => {
+          merge(this.form)
+              .then(response => {
+                this.$message({
+                  type: 'success',
+                  message: '鎻愪氦鎴愬姛!'
+                })
+                this.visible = false
+                this.$emit('success')
+              }).catch(err => {
+            this.$tip.apiFailed(err)
+          })
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '鍙栨秷'
+          })
+        })
+      })
+    },
+    open (title, target) {
+      this.title = title
+      this.model= null
+      this.list= []
+      this.visibleSelect=false
+      this.tableData=[]
+      this.tableTotal=0
+      this.item= null
+      if (target) {
+        this.$nextTick(() => {
+          this.$refs.form.resetFields()
+        })
+      } else {
+        this.$nextTick(() => {
+          this.$refs.form.resetFields()
+          this.form[this.configData['field.id']] = null
+        })
+      }
+      // this.getUnionApplyList()
+      this.visible = true
+    },
+    getValue(){
+
+    },
+    selectBaoxiandan(){
+      this.currentPage = 1
+      this.visibleSelect=true
+      this.$refs.multipleTable.clearSelection();
+      this.getUnionApplyList()
+    },
+    getUnionApplyList(){
+      pageUnionList({
+        capacity: 10,
+        page: this.currentPage,
+        model: {
+          status: 3,
+        }
+      }).then(res => {
+        this.tableData.list = res.records
+        this.tableTotal = res.total
+        this.$nextTick(() => {
+          console.log(this.$refs.multipleTable1)
+          if (this.$refs.multipleTable1 && this.$refs.multipleTable1.doLayout) {
+            this.$refs.multipleTable1.doLayout()
+          }
+        })
+      })
+    },
+    getList () {
+      listAll({
+          solutionType:1,
+          unionApplyId: this.model.id,
+          status: 7
+      }).then(res => {
+        this.list = res
+        this.$nextTick(() => {
+          if (this.$refs.multipleTable && this.$refs.multipleTable.doLayout) {
+            this.$refs.multipleTable.doLayout()
+          }
+        })
+      })
+    },
+    handleCurrentChange (val) {
+      this.currentPage = val
+      this.getUnionApplyList()
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.list {
+  width: 100%;
+}
+.btns {
+  width: 100%;
+  margin-bottom: 15px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  .btns_item {
+    display: flex;
+    align-items: center;
+  }
+}
+.submit {
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-bottom: 15px;
+}
+.desc_item_cate {
+  width: 100%;
+  margin-bottom: 10px;
+}
+.info {
+  margin-top: 30px;
+  width: 100%;
+  font-size: 14px;
+  color: black;
+}
+</style>
diff --git a/company/src/components/business/OperaWtbApplyShopWindow.vue b/company/src/components/business/OperaWtbApplyShopWindow.vue
index 510190d..52fc424 100644
--- a/company/src/components/business/OperaWtbApplyShopWindow.vue
+++ b/company/src/components/business/OperaWtbApplyShopWindow.vue
@@ -439,9 +439,9 @@
           :title="signTitle"
           :visible.sync="visiblePhone"
           width="500px"
-          :modal="false"
-          :show-close="false"
-          :close-on-click-modal="false"
+          :modal="true"
+          :show-close="true"
+          append-to-body
           center>
         <el-form :model="form" ref="form" :rules="rules">
           <el-form-item label="鎵嬫満鍙�" prop="phone">
diff --git a/company/src/views/business/unionChange.vue b/company/src/views/business/unionChange.vue
index ef9fd4c..2e704cd 100644
--- a/company/src/views/business/unionChange.vue
+++ b/company/src/views/business/unionChange.vue
@@ -32,8 +32,8 @@
         </el-form>
         <!-- 琛ㄦ牸鍜屽垎椤� -->
         <template v-slot:table-wrap>
-            <ul class="toolbar" v-permissions="['business:insurance:create']">
-                <li><el-button type="primary" @click="$refs.add_subtract_entrust.open('鍔犲噺淇濈敵璇�')" v-permissions="['business:insurance:create']">鎻愪氦鐢宠</el-button></li>
+            <ul class="toolbar" v-permissions="['business:unionchange:create']">
+                <li><el-button type="primary" @click="$refs.OpearaUnionChange.open('鍔犲噺淇濈敵璇�')" v-permissions="['business:unionchange:create']">鎻愪氦鐢宠</el-button></li>
             </ul>
             <el-table
                 v-loading="isWorking.search"
@@ -76,7 +76,7 @@
             </pagination>
         </template>
         <!--    鎻愪氦鐢宠    -->
-        <add_subtract_entrust ref="add_subtract_entrust" />
+        <OpearaUnionChange ref="OpearaUnionChange" />
     </TableLayout>
 </template>
 
@@ -84,11 +84,11 @@
     import BaseTable from '@/components/base/BaseTable'
     import TableLayout from '@/layouts/TableLayout'
     import Pagination from '@/components/common/Pagination'
-    import add_subtract_entrust from '@/components/business/add_subtract_entrust'
+    import OpearaUnionChange from '@/components/business/OpearaUnionChange'
     export default {
         name: 'unionChange',
         extends: BaseTable,
-        components: { TableLayout, Pagination, add_subtract_entrust },
+        components: { TableLayout, Pagination, OpearaUnionChange },
         data () {
             return {
                 // 鎼滅储
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 bcdb428..3f93b3f 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
@@ -1554,7 +1554,7 @@
             }else if(model.getSolutionType()!=null && model.getSolutionType() ==1){
                 queryWrapper.eq(Solutions::getShopId,loginUserInfo.getCompanyId());
             }else{
-                queryWrapper.apply("((t1.type=0 and exists(select cs.id from company_solution cs where cs.isdeleted=0 and cs.company_id=t1.company_id and cs.shop_id="+loginUserInfo.getCompanyId()+")) or (" +
+                queryWrapper.apply("((t2.type=0 and exists(select cs.id from company_solution cs where cs.isdeleted=0 and cs.company_id=t1.company_id and cs.shop_id="+loginUserInfo.getCompanyId()+")) or (" +
                         "t2.type=1 and t2.shop_id="+loginUserInfo.getCompanyId()+"))") ;
             }
         }else{
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java
index 59baf20..cc8e40f 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java
@@ -292,6 +292,7 @@
 
 
     @Override
+    @Transactional(rollbackFor = {BusinessException.class,Exception.class})
     public Integer merge(SaveUnionChangeDTO saveUnionChangeDTO){
         LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
         if(!user.getType().equals(Constants.TWO)){
@@ -312,7 +313,7 @@
                         .eq(ApplyChange::getIsdeleted, Constants.ZERO)
                         .eq(InsuranceApply::getUnionApplyId,saveUnionChangeDTO.getUnionApplyId())
                         .eq(ApplyChange::getStatus,Constants.ApplyChangeStatus.CHECHED_PASSED.getKey())
-                        .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())
+                        .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.WTB_DONE.getKey())
                         .eq(ApplyChange::getType,saveUnionChangeDTO.getBusinessType())
                         .in(ApplyChange::getId,saveUnionChangeDTO.getApplyIds())
                         .isNull(ApplyChange::getUnionChangeId)

--
Gitblit v1.9.3