From 8b46c471e28fbf0b71efbe363facf0bf05d8f6f8 Mon Sep 17 00:00:00 2001
From: nidapeng <jp@doumee.com>
Date: 星期四, 14 三月 2024 18:12:30 +0800
Subject: [PATCH] aaa

---
 company/src/components/business/OperaSolutionsDescWindow.vue                                  |   45 ++
 company/src/views/business/solutions.vue                                                      |  111 +++--
 server/service/src/main/java/com/doumee/dao/business/model/Solutions.java                     |    6 
 server/service/src/main/java/com/doumee/service/business/impl/CompanySolutionServiceImpl.java |    3 
 company/src/components/business/OperaCompanyDescWindow.vue                                    |   11 
 server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java         |   56 +-
 company/src/api/business/company.js                                                           |    3 
 company/src/components/business/modification.vue                                              |  230 +++++++------
 server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java       |    4 
 company/src/components/business/OperaSolutionsWindow.vue                                      |  393 ++++++++++++----------
 company/src/components/business/OperaShopDescWindow.vue                                       |   76 ----
 company/src/components/business/OperaShopWindow.vue                                           |   50 ++
 server/service/src/main/java/com/doumee/dao/business/model/CompanySolution.java               |    3 
 company/src/components/business/OperaCompanyWindow.vue                                        |   28 +
 14 files changed, 566 insertions(+), 453 deletions(-)

diff --git a/company/src/api/business/company.js b/company/src/api/business/company.js
index 27d8e6f..dba1e13 100644
--- a/company/src/api/business/company.js
+++ b/company/src/api/business/company.js
@@ -11,6 +11,9 @@
 export function create (data) {
     return request.post('/business/company/create', data)
 }
+export function createShop (data) {
+    return request.post('/business/company/createShop', data)
+}
 
 // 淇敼
 export function updateById (data) {
diff --git a/company/src/components/business/OperaCompanyDescWindow.vue b/company/src/components/business/OperaCompanyDescWindow.vue
index a0632f9..8eba06f 100644
--- a/company/src/components/business/OperaCompanyDescWindow.vue
+++ b/company/src/components/business/OperaCompanyDescWindow.vue
@@ -82,6 +82,11 @@
                     label="淇濋櫓鏂规">
                 </el-table-column>
                 <el-table-column
+                    prop="shopName"
+                    align="center"
+                    label="濮旀墭鍟嗘埛">
+                </el-table-column>
+                <el-table-column
                     align="center"
                     label="鍔犲噺淇濆姛鑳�">
                     <template slot-scope="{row}">
@@ -127,7 +132,7 @@
                         </div>
                     </div>
                 </div>
-                <div class="info_list_item">
+<!--                <div class="info_list_item">
                     <div class="info_list_item_label" style="width: 100px;">浼佷笟绛剧珷锛�</div>
                     <div class="info_list_item_val">
                         <div class="image" v-if="form.signImg && form.signImg.fileurlFull">
@@ -139,7 +144,7 @@
                           </el-image>
                         </div>
                     </div>
-                </div>
+                </div>-->
             </div>
         </div>
         <!-- 鏂板缓/淇敼 -->
@@ -321,6 +326,7 @@
               that.form.solutionList = resa.map(item => {
                 return {
                   solutionBaseId: item.solutionBaseId,
+                  shopId: item.shopId,
                   canAdd: item.canAdd,
                   canReduce: item.canReduce
                 }
@@ -328,6 +334,7 @@
               that.form.solutionListName = resa.map(item => {
                 return {
                   solutionName: item.solutionName,
+                  shopName: item.shopName,
                   canAdd: item.canAdd,
                   canReduce: item.canReduce
                 }
diff --git a/company/src/components/business/OperaCompanyWindow.vue b/company/src/components/business/OperaCompanyWindow.vue
index 37f7315..f5e35b1 100644
--- a/company/src/components/business/OperaCompanyWindow.vue
+++ b/company/src/components/business/OperaCompanyWindow.vue
@@ -98,6 +98,20 @@
             </el-table-column>
             <el-table-column
                 align="center"
+                label="濮旀墭鍟嗘埛">
+                <template slot-scope="scope">
+                  <el-select  v-model="scope.row.shopId" clearable="true" value-key="id" placeholder="璇烽�夋嫨" >
+                    <el-option
+                        v-for="item in shops"
+                        :key="item.id"
+                        :label="item.name"
+                        :value="item.id">
+                    </el-option>
+                  </el-select>
+                </template>
+            </el-table-column>
+            <el-table-column
+                align="center"
                 label="鍔犲噺淇濆姛鑳�">
                 <template slot-scope="{row}">
                     <el-checkbox :true-label="1" :false-label="0" v-model="row.canAdd">鍔犱繚</el-checkbox>
@@ -122,6 +136,7 @@
 import UploadAvatarImage from '@/components/common/UploadAvatarImage'
 import { all } from '@/api/business/solutions'
 import { sendSms } from '@/api/business/smsEmail'
+import { pageAll as shopList } from '@/api/business/company'
 export default {
   name: 'OperaCompanyWindow',
   extends: BaseOpera,
@@ -156,6 +171,7 @@
         solutionList: [
           {
             solution: null,
+            shop: null,
             canAdd: 0,
             canReduce: 0
           }
@@ -218,7 +234,8 @@
           { required: true, message: '璇疯緭鍏ュ叕鍙歌处鍙�' }
         ]
       },
-      programme: []
+      programme: [],
+      shops:[]
     }
   },
   created () {
@@ -240,7 +257,6 @@
   methods: {
     changeSolution(row,index){
      this.form.solutionList[index].solution=row
-   //   console.log(this.form.solutionList)
     },
     send () {
       if (!this.form.phone) {
@@ -288,6 +304,11 @@
         .then(res => {
           this.programme = res
         })
+      shopList({ type: 1, status: 0 })
+          .then(res => {
+            console.log(res)
+            this.shops = res
+          })
     },
     dele (index) {
       if (this.form.solutionList.length === 1) {
@@ -298,8 +319,9 @@
     },
     add () {
       this.form.solutionList.push({
-        solutionId:null,
+        solutionId: null,
         solution: {},
+        shopId: null,
         canAdd: '',
         canReduce: ''
       })
diff --git a/company/src/components/business/OperaShopDescWindow.vue b/company/src/components/business/OperaShopDescWindow.vue
index a0632f9..3bd45eb 100644
--- a/company/src/components/business/OperaShopDescWindow.vue
+++ b/company/src/components/business/OperaShopDescWindow.vue
@@ -9,15 +9,14 @@
     >
         <div class="info">
             <div class="info_label">
-                <span>浼佷笟璇︽儏</span>
+                <span>鍟嗘埛璇︽儏</span>
                 <div>
-                    <el-button type="primary" @click="$refs.modification.open('淇敼淇濋櫓鏂规', form)">鏇存敼淇濋櫓鏂规</el-button>
-                    <el-button type="primary" @click="$refs.operaCompanyWindow.open('缂栬緫浼佷笟淇℃伅', form)">淇敼浼佷笟淇℃伅</el-button>
+                    <el-button type="primary" @click="$refs.operaCompanyWindow.open('缂栬緫鍟嗘埛淇℃伅', form)">淇敼鍟嗘埛淇℃伅</el-button>
                 </div>
             </div>
             <div class="info_list">
                 <div class="info_list_item">
-                    <div class="info_list_item_label">浼佷笟鍚嶇О锛�</div>
+                    <div class="info_list_item_label">鍟嗘埛鍚嶇О锛�</div>
                     <div class="info_list_item_val">{{form.name || '-'}}</div>
                 </div>
                 <div class="info_list_item">
@@ -64,32 +63,6 @@
                     <div class="info_list_item_val">{{form.invoiceAddr || '-'}}</div>
                 </div>
             </div>
-            <el-table
-                :data="form.solutionListName"
-                border
-                style="width: 100%; margin-bottom: 20px;">
-                <el-table-column
-                    label="搴忓彿"
-                    align="center"
-                    width="80">
-                    <template slot-scope="scope">
-                        <span>{{scope.$index + 1}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                    prop="solutionName"
-                    align="center"
-                    label="淇濋櫓鏂规">
-                </el-table-column>
-                <el-table-column
-                    align="center"
-                    label="鍔犲噺淇濆姛鑳�">
-                    <template slot-scope="{row}">
-                        <el-checkbox :true-label="1" :false-label="0" disabled v-model="row.canAdd">鍔犱繚</el-checkbox>
-                        <el-checkbox :true-label="1" :false-label="0" disabled v-model="row.canReduce">鍑忎繚</el-checkbox>
-                    </template>
-                </el-table-column>
-            </el-table>
             <div class="info_list" v-if="JSON.stringify(form) !== '{}'">
                 <div class="info_list_item">
                     <div class="info_list_item_label" style="width: 100px;">钀ヤ笟鎵х収锛�</div>
@@ -127,23 +100,10 @@
                         </div>
                     </div>
                 </div>
-                <div class="info_list_item">
-                    <div class="info_list_item_label" style="width: 100px;">浼佷笟绛剧珷锛�</div>
-                    <div class="info_list_item_val">
-                        <div class="image" v-if="form.signImg && form.signImg.fileurlFull">
-                          <el-image
-                              v-if="form.signImg.fileurlFull!=null"
-                              style="width: 90px; height: 90px"
-                              :src="form.signImg.fileurlFull"
-                              :preview-src-list="[form.signImg.fileurlFull]">
-                          </el-image>
-                        </div>
-                    </div>
-                </div>
             </div>
         </div>
         <!-- 鏂板缓/淇敼 -->
-        <OperaCompanyWindow ref="operaCompanyWindow" @success="callback"/>
+        <OperaShopWindow ref="operaCompanyWindow" @success="callback"/>
         <!-- 淇敼淇濋櫓鏂规 -->
         <modification ref="modification" @success="callback"/>
         <!-- 淇敼鎵嬫満鍙� -->
@@ -182,15 +142,14 @@
 <script>
 import BaseOpera from '@/components/base/BaseOpera'
 import GlobalWindow from '@/components/common/GlobalWindow'
-import OperaCompanyWindow from '@/components/business/OperaCompanyWindow'
+import OperaShopWindow from '@/components/business/OperaShopWindow'
 import modification from '@/components/business/modification'
 import { getById, updatePhone } from '@/api/business/company'
-import { listForCompany } from '@/api/business/solutions'
 import { sendSms } from '@/api/business/smsEmail'
 export default {
   name: 'OperaCompanyDescWindow',
   extends: BaseOpera,
-  components: { GlobalWindow, OperaCompanyWindow, modification },
+  components: { GlobalWindow, OperaShopWindow, modification },
   data () {
     return {
       ruleForm: {
@@ -267,17 +226,16 @@
       }, 1000)
     },
     open (title, target) {
-      const that = this
       this.title = title
       this.dataId = target.id
       this.phone = ''
       this.code = ''
+      this.visible=true
       clearInterval(this.timer)
       this.num = 0
       this.getDetail()
     },
     getDetail () {
-      var that = this
       getById(this.dataId)
         .then(res => {
           this.form = res
@@ -315,26 +273,6 @@
             this.form.file3.imgurl = res.signImg.fileurl
             this.form.file3.imgurlfull = res.signImg.fileurlFull
           }
-
-          listForCompany({ companyId: this.dataId })
-            .then(resa => {
-              that.form.solutionList = resa.map(item => {
-                return {
-                  solutionBaseId: item.solutionBaseId,
-                  canAdd: item.canAdd,
-                  canReduce: item.canReduce
-                }
-              })
-              that.form.solutionListName = resa.map(item => {
-                return {
-                  solutionName: item.solutionName,
-                  canAdd: item.canAdd,
-                  canReduce: item.canReduce
-                }
-              })
-              console.log(that.form)
-              that.visible = true
-            })
         })
     },
     callback () {
diff --git a/company/src/components/business/OperaShopWindow.vue b/company/src/components/business/OperaShopWindow.vue
index ced1965..e90e15b 100644
--- a/company/src/components/business/OperaShopWindow.vue
+++ b/company/src/components/business/OperaShopWindow.vue
@@ -4,7 +4,7 @@
         width="60%"
         :visible.sync="visible"
         :confirm-working="isWorking"
-        @confirm="confirm"
+        @confirm="confirmShop"
     >
         <el-form :model="form" ref="form" :rules="rules" style="width: 50%;">
             <el-form-item label="鍟嗘埛鍚嶇О" prop="name">
@@ -78,6 +78,7 @@
 import UploadAvatarImage from '@/components/common/UploadAvatarImage'
 import { all } from '@/api/business/solutions'
 import { sendSms } from '@/api/business/smsEmail'
+import {updateById} from "@/api/business/company";
 export default {
   name: 'OperaCompanyWindow',
   extends: BaseOpera,
@@ -85,7 +86,7 @@
   data () {
     return {
       // 琛ㄥ崟鏁版嵁
-      initParam:{
+      initParam: {
         id: null,
         name: '',
         code: '',
@@ -133,7 +134,7 @@
         file3: {
           imgurl: '',
           imgurlfull: ''
-        },
+        }
       },
       form: {},
       timer: null,
@@ -195,9 +196,42 @@
     }
   },
   methods: {
-    changeSolution(row,index){
-     this.form.solutionList[index].solution=row
-   //   console.log(this.form.solutionList)
+    confirmShop () {
+      this.$refs.form.validate((valid) => {
+        // debugger
+        if (!valid) {
+          return
+        }
+        // 璋冪敤鏂板缓鎺ュ彛
+        this.isWorking = true
+        if (this.form.id == null || this.form.id === '') {
+          this.api.createShop(this.form)
+            .then(() => {
+              this.visible = false
+              this.$tip.apiSuccess('鏂板缓鎴愬姛')
+              this.$emit('success')
+            })
+            .catch(e => {
+              this.$tip.apiFailed(e)
+            })
+            .finally(() => {
+              this.isWorking = false
+            })
+        } else {
+          this.api.updateById(this.form)
+            .then(() => {
+              this.visible = false
+              this.$tip.apiSuccess('鏂板缓鎴愬姛')
+              this.$emit('success')
+            })
+            .catch(e => {
+              this.$tip.apiFailed(e)
+            })
+            .finally(() => {
+              this.isWorking = false
+            })
+        }
+      })
     },
     send () {
       if (!this.form.phone) {
@@ -219,7 +253,7 @@
         }
       }, 1000)
     },
-    open (title, target,type) {
+    open (title, target, type) {
       this.title = title
       this.visible = true
       this.form = this.initParam
@@ -255,7 +289,7 @@
     },
     add () {
       this.form.solutionList.push({
-        solutionId:null,
+        solutionId: null,
         solution: {},
         canAdd: '',
         canReduce: ''
diff --git a/company/src/components/business/OperaSolutionsDescWindow.vue b/company/src/components/business/OperaSolutionsDescWindow.vue
index c0d9bc0..b6d2413 100644
--- a/company/src/components/business/OperaSolutionsDescWindow.vue
+++ b/company/src/components/business/OperaSolutionsDescWindow.vue
@@ -22,13 +22,18 @@
                     <div class="info_list_item_label">鎵夸繚鍏徃锛�</div>
                     <div class="info_list_item_val">{{form.companyName}}</div>
                 </div>
+              <div class="info_list_item">
+                <div class="info_list_item_label">鎶曚繚绫诲瀷锛�</div>
+                <div class="info_list_item_val" v-if="form.type === 0 "> 鐩翠繚</div>
+                <div class="info_list_item_val" v-if="form.type === 1">濮旀墭鎶曚繚</div>
+              </div>
+              <div class="info_list_item" v-if="form.type === 1">
+                <div class="info_list_item_label">濮旀墭鍟嗘埛锛�</div>
+                <div class="info_list_item_val" > {{form.shopName}}</div>
+              </div>
                 <div class="info_list_item">
                     <div class="info_list_item_label">鎶曚繚骞撮緞锛�</div>
                     <div class="info_list_item_val">{{form.minAge}}鑷硔{form.maxAge}}</div>
-                </div>
-                <div class="info_list_item">
-                    <div class="info_list_item_label">鎶曚繚绫诲瀷锛�</div>
-                    <div class="info_list_item_val">骞冲彴鎶曚繚</div>
                 </div>
                 <div class="info_list_item">
                     <div class="info_list_item_label">淇濋櫓璐圭敤锛�</div>
@@ -54,10 +59,7 @@
                     <div class="info_list_item_label">鐢熸晥鏃堕棿锛�</div>
                     <div class="info_list_item_val">{{form.validType === 0 ? form.validTypeNum + '鏃ュ悗鐢熸晥' : '娆℃湀鐢熸晥'}}</div>
                 </div>
-                <div class="info_list_item">
-                    <div class="info_list_item_label">鎶曚繚绫诲瀷锛�</div>
-                    <div class="info_list_item_val">{{form.type === 0 ? '鐩翠繚' : '濮旀墭鎶曚繚'}}</div>
-                </div>
+
                 <div class="info_list_item">
                     <div class="info_list_item_label">鎺ユ敹鏂囦欢閭锛�</div>
                     <div class="info_list_item_val">{{form.email}}</div>
@@ -78,7 +80,7 @@
                 <el-table-column
                     prop="worktypeName"
                     align="center"
-                    label="鎵�灞炲伐绉�">
+                    label="宸ョ鍚嶇О">
                 </el-table-column>
             </el-table>
             <div class="info_agree">
@@ -117,6 +119,7 @@
                     price: '',
                     timeUnit: '',
                     insureCycle: '',
+                    shopName:'',
                     insureCycleUnit: '',
                     validTypeNum: '',
                     email: '',
@@ -143,6 +146,30 @@
             open (title, target) {
                 this.title = title
                 this.visible = true
+              this.form = {
+                    id: null,
+                    name: '',
+                    companyName: '',
+                    insuranceId: '',
+                    validType: 0,
+                    type: 0,
+                    minAge: '',
+                    maxAge: '',
+                    price: '',
+                    timeUnit: '',
+                    insureCycle: '',
+                    shopName:'',
+                    insureCycleUnit: '',
+                    validTypeNum: '',
+                    email: '',
+                    specialAgreement: '',
+                    specialInfo: '',
+                    ortherInfo: '',
+                    insuranceName: '',
+                    signKeyword: '',
+                    worktypeList: [],
+                    worktypeIdList: []
+              }
                 this.$nextTick(() => {
                     for (const key in this.form) {
                         this.form[key] = target[key]
diff --git a/company/src/components/business/OperaSolutionsWindow.vue b/company/src/components/business/OperaSolutionsWindow.vue
index 82eca81..b123011 100644
--- a/company/src/components/business/OperaSolutionsWindow.vue
+++ b/company/src/components/business/OperaSolutionsWindow.vue
@@ -85,6 +85,16 @@
                     <el-radio :label="1">濮旀墭鎶曚繚</el-radio>
                 </el-radio-group>
             </el-form-item>
+          <el-form-item label="濮旀墭鍟嗘埛" prop="shopId" v-if="form.type =='1'">
+            <el-select v-model="form.shopId"  placeholder="璇烽�夋嫨濮旀墭鍟嗘埛">
+              <el-option
+                  v-for="item in shops"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id">
+              </el-option>
+            </el-select>
+          </el-form-item>
             <el-form-item label="鎺ユ敹鏂囦欢閭" prop="email">
                 <el-input v-model="form.email" placeholder="璇疯緭鍏�" v-trim/>
             </el-form-item>
@@ -141,191 +151,202 @@
 </template>
 
 <script>
-    import BaseOpera from '@/components/base/BaseOpera'
-    import GlobalWindow from '@/components/common/GlobalWindow'
-    import { all } from '@/api/business/insurance'
-    import { all as allWorktype } from '@/api/business/worktype'
-    import { solutionsId } from '@/api/business/solutions'
-    export default {
-        name: 'OperaSolutionsWindow',
-        extends: BaseOpera,
-        components: { GlobalWindow },
-        data () {
-            var validType = (rule, value, callback) => {
-                if (this.form.validType === 0 && !value) {
-                    return callback(new Error('寤惰繜澶╂暟涓嶈兘涓虹┖'));
-                } else if (this.form.validType === 0 && !/^[0-9]*[1-9][0-9]*$/.test(value)) {
-                    return callback(new Error('寤惰繜澶╂暟鍙兘涓烘鏁存暟'));
-                }
-                callback();
-            }
-            return {
-                // 琛ㄥ崟鏁版嵁
-                form: {
-                    id: null,
-                    name: '',
-                    companyName: '',
-                    insuranceId: '',
-                    validType: 0,
-                    type: 0,
-                    minAge: '',
-                    maxAge: '',
-                    price: '',
-                    timeUnit: '',
-                    insureCycle: '',
-                    insureCycleUnit: '',
-                    email: '',
-                    specialAgreement: '',
-                    specialInfo: '',
-                    ortherInfo: '',
-                    signKeyword: '',
-                    validTypeNum: '',
-                    worktypeIdList: [{ worktypeId: '' }]
-                },
-                // 楠岃瘉瑙勫垯
-                rules: {
-                    name: [
-                        { required: true, message: '璇疯緭鍏ユ柟妗堝悕绉�' }
-                    ],
-                    insuranceId: [
-                        { required: true, message: '璇烽�夋嫨淇濋櫓鍏徃' }
-                    ],
-                    companyName: [
-                        { required: true, message: '璇疯緭鍏ユ壙淇濆叕鍙�' }
-                    ],
-                    minAge: [
-                        { required: true, message: '璇烽�夋嫨鎶曚繚骞撮緞' }
-                    ],
-                    price: [
-                        { required: true, message: '璇疯緭鍏ヤ繚闄╄垂鐢�' }
-                    ],
-                    insureCycle: [
-                        { required: true, message: '璇疯緭鍏ユ姇淇濆懆鏈�' }
-                    ],
-                    validTypeNum: [
-                        { required: true, validator: validType }
-                    ],
-                    type: [
-                        { required: true, message: '璇烽�夋嫨鎶曚繚绫诲瀷' }
-                    ],
-                    // signKeyword: [
-                    //     { required: false, message: '璇疯緭鍏ユ姇淇濆崟绛剧珷鍏抽敭瀛�' }
-                    // ]
-                },
-                company: [],
-                typeWork: []
-            }
-        },
-        created () {
-            this.config({
-                api: '/business/solutions',
-                'field.id': 'id'
-            })
-        },
-        methods: {
-            // 鍒囨崲鍏徃
-            getAllWorktype1() {
-                this.form.worktypeIdList = [{ worktypeId: '' }]
-                this.getAllWorktype()
-            },
-            // 纭鏂板缓/淇敼
-            confirm () {
-                let data = JSON.parse(JSON.stringify(this.form))
-                data.worktypeIdList = data.worktypeIdList.map(item => item.worktypeId)
-                this.$refs.form.validate((valid) => {
-                    if (!valid) {
-                        return
-                    }
-                    // 璋冪敤鏂板缓鎺ュ彛
-                    this.isWorking = true
-                    if (data.id == null || data.id === '') {
-                        this.api.create(data)
-                            .then(() => {
-                                this.visible = false
-                                this.$tip.apiSuccess('鏂板缓鎴愬姛')
-                                this.$emit('success')
-                            })
-                            .catch(e => {
-                                this.$tip.apiFailed(e)
-                            })
-                            .finally(() => {
-                                this.isWorking = false
-                            })
-                    } else {
-                        this.api.updateById(data)
-                            .then(() => {
-                                this.visible = false
-                                this.$tip.apiSuccess('淇敼鎴愬姛')
-                                this.$emit('success')
-                            })
-                            .catch(e => {
-                                this.$tip.apiFailed(e)
-                            })
-                            .finally(() => {
-                                this.isWorking = false
-                            })
-                    }
-                })
-            },
-            open (title, target) {
-                this.title = title
-                this.form.maxAge = ''
-                this.form.timeUnit = ''
-                this.form.insureCycleUnit = ''
-                this.form.validTypeNum = ''
-                this.visible = true
-                this.form.worktypeIdList = [{ worktypeId: '' }]
-                this.allCompany()
-                // 鏂板缓
-                if (target == null) {
-                    this.$nextTick(() => {
-                        this.$refs.form.resetFields()
-                        this.form[this.configData['field.id']] = null
-                    })
-                    return
-                }
-                // 缂栬緫
-                this.$nextTick(() => {
-                    solutionsId(target.id)
-                        .then(res => {
-                            for (const key in this.form) {
-                                this.form[key] = res[key]
-                            }
-                            this.form.worktypeIdList = res.worktypeList.map(item => {
-                                return {
-                                    worktypeId: item.worktypeId
-                                }
-                            })
-                            this.getAllWorktype()
-                        })
-                })
-            },
-            // 鏌ヨ淇濋櫓鍏徃涓嬪叏閮ㄥ伐绉�
-            getAllWorktype() {
-                allWorktype({
-                    insuranceId: this.form.insuranceId
-                }).then(res => {
-                    this.typeWork = res
-                })
-            },
-            // 鏌ヨ鍏ㄩ儴淇濋櫓鍏徃
-            allCompany() {
-                all({ dataType: 2, status: 0 })
-                    .then(res => {
-                        console.log(res)
-                        this.company = res
-                    })
-            },
-            add() {
-                this.form.worktypeIdList.push({ worktypeId: '' })
-            },
-            dele(index) {
-                if (this.form.worktypeIdList.length === 1) {
-                    this.$message.warning('鑷冲皯瑕佷繚鐣欎竴椤�')
-                    return
-                }
-                this.form.worktypeIdList.splice(index, 1)
-            }
-        }
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import { all } from '@/api/business/insurance'
+import { all as allWorktype } from '@/api/business/worktype'
+import { solutionsId } from '@/api/business/solutions'
+import { pageAll as shopList } from '@/api/business/company'
+export default {
+  name: 'OperaSolutionsWindow',
+  extends: BaseOpera,
+  components: { GlobalWindow },
+  data () {
+    var validType = (rule, value, callback) => {
+      if (this.form.validType === 0 && !value) {
+        return callback(new Error('寤惰繜澶╂暟涓嶈兘涓虹┖'))
+      } else if (this.form.validType === 0 && !/^[0-9]*[1-9][0-9]*$/.test(value)) {
+        return callback(new Error('寤惰繜澶╂暟鍙兘涓烘鏁存暟'))
+      }
+      callback()
     }
+    return {
+      // 琛ㄥ崟鏁版嵁
+      form: {
+        id: null,
+        name: '',
+        companyName: '',
+        insuranceId: '',
+        validType: 0,
+        type: 0,
+        minAge: '',
+        maxAge: '',
+        price: '',
+        timeUnit: '',
+        shopId: null,
+        insureCycle: '',
+        insureCycleUnit: '',
+        email: '',
+        specialAgreement: '',
+        specialInfo: '',
+        ortherInfo: '',
+        signKeyword: '',
+        validTypeNum: '',
+        worktypeIdList: [{ worktypeId: '' }]
+      },
+      // 楠岃瘉瑙勫垯
+      rules: {
+        name: [
+          { required: true, message: '璇疯緭鍏ユ柟妗堝悕绉�' }
+        ],
+        insuranceId: [
+          { required: true, message: '璇烽�夋嫨淇濋櫓鍏徃' }
+        ],
+        companyName: [
+          { required: true, message: '璇疯緭鍏ユ壙淇濆叕鍙�' }
+        ],
+        minAge: [
+          { required: true, message: '璇烽�夋嫨鎶曚繚骞撮緞' }
+        ],
+        price: [
+          { required: true, message: '璇疯緭鍏ヤ繚闄╄垂鐢�' }
+        ],
+        insureCycle: [
+          { required: true, message: '璇疯緭鍏ユ姇淇濆懆鏈�' }
+        ],
+        validTypeNum: [
+          { required: true, validator: validType }
+        ],
+        type: [
+          { required: true, message: '璇烽�夋嫨鎶曚繚绫诲瀷' }
+        ]
+        // signKeyword: [
+        //     { required: false, message: '璇疯緭鍏ユ姇淇濆崟绛剧珷鍏抽敭瀛�' }
+        // ]
+      },
+      shops: [],
+      company: [],
+      typeWork: []
+    }
+  },
+  created () {
+    this.config({
+      api: '/business/solutions',
+      'field.id': 'id'
+    })
+  },
+  methods: {
+    // 鍒囨崲鍏徃
+    getAllWorktype1 () {
+      this.form.worktypeIdList = [{ worktypeId: '' }]
+      this.getAllWorktype()
+    },
+    // 纭鏂板缓/淇敼
+    confirm () {
+      const data = JSON.parse(JSON.stringify(this.form))
+      data.worktypeIdList = data.worktypeIdList.map(item => item.worktypeId)
+      this.$refs.form.validate((valid) => {
+        if (!valid) {
+          return
+        }
+        // 璋冪敤鏂板缓鎺ュ彛
+        this.isWorking = true
+        if (data.id == null || data.id === '') {
+          this.api.create(data)
+            .then(() => {
+              this.visible = false
+              this.$tip.apiSuccess('鏂板缓鎴愬姛')
+              this.$emit('success')
+            })
+            .catch(e => {
+              this.$tip.apiFailed(e)
+            })
+            .finally(() => {
+              this.isWorking = false
+            })
+        } else {
+          this.api.updateById(data)
+            .then(() => {
+              this.visible = false
+              this.$tip.apiSuccess('淇敼鎴愬姛')
+              this.$emit('success')
+            })
+            .catch(e => {
+              this.$tip.apiFailed(e)
+            })
+            .finally(() => {
+              this.isWorking = false
+            })
+        }
+      })
+    },
+    open (title, target) {
+      this.title = title
+      this.form.maxAge = ''
+      this.form.timeUnit = ''
+      this.form.insureCycleUnit = ''
+      this.form.validTypeNum = ''
+      this.visible = true
+      this.form.worktypeIdList = [{ worktypeId: '' }]
+      this.allCompany()
+      this.allShops()
+      // 鏂板缓
+      if (target == null) {
+        this.$nextTick(() => {
+          this.$refs.form.resetFields()
+          this.form[this.configData['field.id']] = null
+        })
+        return
+      }
+      // 缂栬緫
+      this.$nextTick(() => {
+        solutionsId(target.id)
+          .then(res => {
+            for (const key in this.form) {
+              this.form[key] = res[key]
+            }
+            this.form.worktypeIdList = res.worktypeList.map(item => {
+              return {
+                worktypeId: item.worktypeId
+              }
+            })
+            this.getAllWorktype()
+          })
+      })
+    },
+    // 鏌ヨ淇濋櫓鍏徃涓嬪叏閮ㄥ伐绉�
+    getAllWorktype () {
+      allWorktype({
+        insuranceId: this.form.insuranceId
+      }).then(res => {
+        this.typeWork = res
+      })
+    },
+    // 鏌ヨ鍏ㄩ儴淇濋櫓鍏徃
+    allCompany () {
+      all({ dataType: 2, status: 0 })
+        .then(res => {
+          console.log(res)
+          this.company = res
+        })
+    },
+    allShops () {
+      shopList({ type: 1, status: 0 })
+        .then(res => {
+          console.log(res)
+          this.shops = res
+        })
+    },
+    add () {
+      this.form.worktypeIdList.push({ worktypeId: '' })
+    },
+    dele (index) {
+      if (this.form.worktypeIdList.length === 1) {
+        this.$message.warning('鑷冲皯瑕佷繚鐣欎竴椤�')
+        return
+      }
+      this.form.worktypeIdList.splice(index, 1)
+    }
+  }
+}
 </script>
diff --git a/company/src/components/business/modification.vue b/company/src/components/business/modification.vue
index d832b5f..b0e28c8 100644
--- a/company/src/components/business/modification.vue
+++ b/company/src/components/business/modification.vue
@@ -34,6 +34,20 @@
                     </el-select>
                 </template>
             </el-table-column>
+          <el-table-column
+              align="center"
+              label="濮旀墭鍟嗘埛">
+            <template slot-scope="scope">
+              <el-select  v-model="scope.row.shopId" clearable="true" value-key="id" placeholder="璇烽�夋嫨">
+                <el-option
+                    v-for="item in shops"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.id">
+                </el-option>
+              </el-select>
+            </template>
+          </el-table-column>
             <el-table-column
                 align="center"
                 label="鍔犲噺淇濆姛鑳�">
@@ -55,110 +69,118 @@
 </template>
 
 <script>
-    import BaseOpera from '@/components/base/BaseOpera'
-    import GlobalWindow from '@/components/common/GlobalWindow'
-    import { all } from '@/api/business/solutions'
-    import { listForCompany } from '@/api/business/solutions'
-    import { updateSolutions } from '@/api/business/company'
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import { all, listForCompany } from '@/api/business/solutions'
 
-    export default {
-        name: 'modification',
-        extends: BaseOpera,
-        components: { GlobalWindow },
-        data () {
-            return {
-                // 琛ㄥ崟鏁版嵁
-                form: {
-                    id: null,
-                    solutionList: [
-                        {
-                            solution: { id: null, baseId: null },
-                            canAdd: 0,
-                            canReduce: 0
-                        }
-                    ]
-                },
-                // 楠岃瘉瑙勫垯
-                rules: {
-                    solutionList: [
-                        { required: true, message: '璇疯緭鍏ュ叕鍙歌处鍙�' }
-                    ]
-                },
-                programme: []
-            }
-        },
-        created () {
-            this.config({
-                api: '/business/company',
-                'field.id': 'id'
-            })
-        },
-        methods: {
-            changeSolution(e, index) {
-                let baseId = ''
-                this.programme.forEach(item => {
-                    if (item.id === e) {
-                        baseId = item.baseId
-                    }
-                })
-                this.form.solutionList[index].solution.baseId = baseId
-            },
-            confirm() {
-                this.isWorking = true
-                updateSolutions(this.form)
-                    .then(res => {
-                        this.visible = false
-                        this.$tip.apiSuccess('鏂板缓鎴愬姛')
-                        this.$emit('success')
-                    })
-                    .catch(e => {
-                        this.$tip.apiFailed(e)
-                    })
-                    .finally(() => {
-                        this.isWorking = false
-                    })
-            },
-            // 鑾峰彇鍏ㄩ儴鏂规
-            getAll() {
-                all({ dataType: 2 })
-                    .then(res => {
-                        this.programme = res
-                    })
-            },
-            open (title, target) {
-                var that = this;
-                this.title = title
-                for (const key in this.form) {
-                    this.form[key] = target[key]
-                }
-                this.getAll()
-                listForCompany({ companyId: target.id })
-                    .then(resa => {
-                        that.form.solutionList = resa.map(item => {
-                            return {
-                                solution: {id: item.solutionId, baseId: item.solutionBaseId },
-                                canAdd: item.canAdd,
-                                canReduce: item.canReduce
-                            }
-                        })
-                        console.log(that.form.solutionList)
-                        that.visible = true
-                    })
-            },
-            add() {
-                this.form.solutionList.push({
-                    solution: { id: null, baseId: null },
-                    canAdd: '',
-                    canReduce: ''
-                })
-            },
-            dele(index) {
-                if (this.form.solutionList.length === 1) {
-                    this.$message.warning('鑷冲皯淇濈暀涓�椤�')
-                    return
-                }
-                this.form.solutionList.splice(index, 1)
-            }
-        }
+import { updateSolutions, pageAll as shopList } from '@/api/business/company'
+
+export default {
+  name: 'modification',
+  extends: BaseOpera,
+  components: { GlobalWindow },
+  data () {
+    return {
+      // 琛ㄥ崟鏁版嵁
+      form: {
+        id: null,
+        solutionList: [
+          {
+            solution: { id: null, baseId: null },
+            canAdd: 0,
+            canReduce: 0
+          }
+        ]
+      },
+      // 楠岃瘉瑙勫垯
+      rules: {
+        solutionList: [
+          { required: true, message: '璇疯緭鍏ュ叕鍙歌处鍙�' }
+        ]
+      },
+      programme: [],
+      shops: []
     }
+  },
+  created () {
+    this.config({
+      api: '/business/company',
+      'field.id': 'id'
+    })
+  },
+  methods: {
+    changeSolution (e, index) {
+      let baseId = ''
+      this.programme.forEach(item => {
+        if (item.id === e) {
+          baseId = item.baseId
+        }
+      })
+      this.form.solutionList[index].solution.baseId = baseId
+    },
+    confirm () {
+      this.isWorking = true
+      updateSolutions(this.form)
+        .then(res => {
+          this.visible = false
+          this.$tip.apiSuccess('鏂板缓鎴愬姛')
+          this.$emit('success')
+        })
+        .catch(e => {
+          this.$tip.apiFailed(e)
+        })
+        .finally(() => {
+          this.isWorking = false
+        })
+    },
+    // 鑾峰彇鍏ㄩ儴鏂规
+    getAll () {
+      all({ dataType: 2 })
+        .then(res => {
+          this.programme = res
+        })
+      shopList({ type: 1, status: 0 })
+        .then(res => {
+          console.log(res)
+          this.shops = res
+        })
+    },
+    open (title, target) {
+      var that = this
+      this.title = title
+      for (const key in this.form) {
+        this.form[key] = target[key]
+      }
+      this.getAll()
+      listForCompany({ companyId: target.id })
+        .then(resa => {
+          that.form.solutionList = resa.map(item => {
+            return {
+              solution: { id: item.solutionId, baseId: item.solutionBaseId },
+              shopId: item.shopId,
+              canAdd: item.canAdd,
+              canReduce: item.canReduce
+            }
+          })
+          console.log(that.form.solutionList)
+          that.visible = true
+        })
+    },
+    add () {
+      this.form.solutionList.push({
+        solution: { id: null, baseId: null },
+        shopId: null,
+        canAdd: '',
+        canReduce: ''
+      })
+    },
+    dele (index) {
+      if (this.form.solutionList.length === 1) {
+        this.$message.warning('鑷冲皯淇濈暀涓�椤�')
+        return
+      }
+      this.form.solutionList.splice(index, 1)
+    }
+  }
+}
 </script>
diff --git a/company/src/views/business/solutions.vue b/company/src/views/business/solutions.vue
index 03873fc..9090df9 100644
--- a/company/src/views/business/solutions.vue
+++ b/company/src/views/business/solutions.vue
@@ -11,6 +11,12 @@
                     <el-option label="绂佺敤" value="1"></el-option>
                 </el-select>
             </el-form-item>
+            <el-form-item label="绫诲瀷" prop="type" >
+                <el-select v-model="searchForm.type" placeholder="璇烽�夋嫨" @keypress.enter.native="search">
+                    <el-option label="鐩翠繚" value="0"></el-option>
+                    <el-option label="濮旀墭鎶曚繚" value="1"></el-option>
+                </el-select>
+            </el-form-item>
             <section>
                 <el-button type="primary" @click="search">鎼滅储</el-button>
                 <el-button @click="reset">閲嶇疆</el-button>
@@ -55,6 +61,12 @@
                         <span v-if="row.timeUnit === 3">骞�</span>
                     </template>
                 </el-table-column>
+                <el-table-column label="濮旀墭绫诲瀷" min-width="100px">
+                    <template slot-scope="{row}">
+                        <span v-if="row.type === 0">鐩翠繚</span>
+                        <span v-if="row.type === 1">濮旀墭锛�<span style="color: blue" >{{row.shopName||'-'}}</span></span>
+                    </template>
+                </el-table-column>
                 <el-table-column prop="status" label="鍚敤鐘舵��" min-width="100px" v-if="userInfo.type !== 1">
                     <template slot-scope="{row}">
                         <el-switch
@@ -97,54 +109,55 @@
 </template>
 
 <script>
-    import BaseTable from '@/components/base/BaseTable'
-    import TableLayout from '@/layouts/TableLayout'
-    import Pagination from '@/components/common/Pagination'
-    import OperaSolutionsWindow from '@/components/business/OperaSolutionsWindow'
-    import OperaSolutionsDescWindow from '@/components/business/OperaSolutionsDescWindow'
-    import { updateStatus } from '@/api/business/solutions'
-    import { mapState } from 'vuex'
-    export default {
-        name: 'Solutions',
-        extends: BaseTable,
-        components: { TableLayout, Pagination, OperaSolutionsWindow, OperaSolutionsDescWindow },
-        data () {
-            return {
-                // 鎼滅储
-                searchForm: {
-                    name: '',
-                    status: ''
-                }
-            }
-        },
-        computed: {
-            ...mapState(['userInfo'])
-        },
-        created () {
-            this.config({
-                module: '淇濋櫓鏂规淇℃伅琛�',
-                api: '/business/solutions',
-                'field.id': 'id',
-                'field.main': 'id'
-            })
-            if (this.userInfo.type === 1) {
-                this.searchForm.status = '0'
-            } else {
-                this.searchForm.status = ''
-            }
-            this.search()
-        },
-        methods: {
-            // 淇敼鐘舵��
-            changeStatus(status, row) {
-                updateStatus({ id: row.id, status })
-                    .then(res => {
-                        this.search()
-                    })
-                    .catch(err => {
-                        row.status = row.status === 0 ? 1 : 0
-                    })
-            }
-        }
+import BaseTable from '@/components/base/BaseTable'
+import TableLayout from '@/layouts/TableLayout'
+import Pagination from '@/components/common/Pagination'
+import OperaSolutionsWindow from '@/components/business/OperaSolutionsWindow'
+import OperaSolutionsDescWindow from '@/components/business/OperaSolutionsDescWindow'
+import { updateStatus } from '@/api/business/solutions'
+import { mapState } from 'vuex'
+export default {
+  name: 'Solutions',
+  extends: BaseTable,
+  components: { TableLayout, Pagination, OperaSolutionsWindow, OperaSolutionsDescWindow },
+  data () {
+    return {
+      // 鎼滅储
+      searchForm: {
+        name: '',
+        status: '',
+        type: ''
+      }
     }
+  },
+  computed: {
+    ...mapState(['userInfo'])
+  },
+  created () {
+    this.config({
+      module: '淇濋櫓鏂规淇℃伅琛�',
+      api: '/business/solutions',
+      'field.id': 'id',
+      'field.main': 'id'
+    })
+    if (this.userInfo.type === 1) {
+      this.searchForm.status = '0'
+    } else {
+      this.searchForm.status = ''
+    }
+    this.search()
+  },
+  methods: {
+    // 淇敼鐘舵��
+    changeStatus (status, row) {
+      updateStatus({ id: row.id, status })
+        .then(res => {
+          this.search()
+        })
+        .catch(err => {
+          row.status = row.status === 0 ? 1 : 0
+        })
+    }
+  }
+}
 </script>
diff --git a/server/service/src/main/java/com/doumee/dao/business/model/CompanySolution.java b/server/service/src/main/java/com/doumee/dao/business/model/CompanySolution.java
index 962ef21..28ae473 100644
--- a/server/service/src/main/java/com/doumee/dao/business/model/CompanySolution.java
+++ b/server/service/src/main/java/com/doumee/dao/business/model/CompanySolution.java
@@ -79,6 +79,9 @@
     @ApiModelProperty(value = "鏂规鍚嶇О" )
     @TableField(exist = false)
     private String solutionName  ;
+    @ApiModelProperty(value = "濮旀墭鍟嗘埛鍚嶇О" )
+    @TableField(exist = false)
+    private String shopName  ;
     @ApiModelProperty(value = "鏂规涓婚敭锛堝叧鑱攕olutions锛�", example = "1")
     @ExcelColumn(name="鏂规涓婚敭锛堝叧鑱攕olutions锛�")
     private Integer solutionId;
diff --git a/server/service/src/main/java/com/doumee/dao/business/model/Solutions.java b/server/service/src/main/java/com/doumee/dao/business/model/Solutions.java
index 1643578..4d6f9d5 100644
--- a/server/service/src/main/java/com/doumee/dao/business/model/Solutions.java
+++ b/server/service/src/main/java/com/doumee/dao/business/model/Solutions.java
@@ -77,6 +77,9 @@
     @ApiModelProperty(value = "绫诲瀷 0鐩翠繚 1濮旀墭鎶曚繚", example = "1")
     @ExcelColumn(name="绫诲瀷 0鐩翠繚 1濮旀墭鎶曚繚")
     private Integer type;
+    @ApiModelProperty(value = "濮旀墭鍟嗘埛缂栫爜锛堝叧鑱攃ompany)", example = "1")
+    @ExcelColumn(name="濮旀墭鍟嗘埛缂栫爜锛堝叧鑱攃ompany)")
+    private Integer shopId;
 
     @ApiModelProperty(value = "鏈�浣庡勾榫�", example = "1")
     @ExcelColumn(name="鏈�浣庡勾榫�")
@@ -170,5 +173,8 @@
     @ApiModelProperty(value = "鎬诲懆鏈熻垂鐢�", example = "1")
     @TableField(exist = false)
     private BigDecimal cyclePrice;
+    @ApiModelProperty(value = "濮旀墭鍟嗘埛鍚嶇О", example = "1")
+    @TableField(exist = false)
+    private String shopName;
 
 }
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java
index 6bf7765..3a539a9 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java
@@ -88,7 +88,6 @@
         company.setStatus(Constants.ZERO);
         company.setType(Constants.ZERO);
         company.setSignStatus(Constants.ZERO);
-        company.setType(Constants.ZERO);
         company.setSignIdStatus(Constants.ZERO);
         companyMapper.insert(company);
         company.setEditDate(company.getCreateDate());
@@ -111,7 +110,7 @@
                .or().eq(Company::getEmail,company.getEmail())
                .or().eq(Company::getUsername,company.getUsername())
                 .or().eq(Company::getName,company.getName()))>0){
-            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝璇ヤ紒涓氥�愬悕绉般�戙�愮粺涓�淇$敤浠g爜銆戙�愰偖绠便�戞垨鑰呫�愭墜鏈哄彿銆戝凡瀛樺湪锛岃纭鍚庨噸鏂版彁浜わ紒");
+            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝璇ュ晢鎴枫�愬悕绉般�戙�愮粺涓�淇$敤浠g爜銆戙�愰偖绠便�戞垨鑰呫�愭墜鏈哄彿銆戝凡瀛樺湪锛岃纭鍚庨噸鏂版彁浜わ紒");
         }
         LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
         company.setCreator(user.getId());
@@ -119,7 +118,6 @@
         company.setType(Constants.ONE);
         company.setIsdeleted(Constants.ZERO);
         company.setStatus(Constants.ZERO);
-        company.setType(Constants.ZERO);
         company.setSignStatus(Constants.ZERO);
         company.setSignIdStatus(Constants.ZERO);
         companyMapper.insert(company);
@@ -257,6 +255,7 @@
         List<Integer> sIds = new ArrayList<>();
         List<CompanySolution> list = new ArrayList<>();
         int num =0;
+        Date date = new Date();
         for(CompanySolution s :company.getSolutionList()){
             if(Objects.isNull(s.getSolution())){
                 continue;
@@ -274,7 +273,7 @@
             s.setIsdeleted(Constants.ZERO);
             s.setCanAdd(Constants.formatIntegerNum(s.getCanAdd()));
             s.setCanReduce(Constants.formatIntegerNum(s.getCanReduce()));
-            s.setCreateDate(company.getCreateDate());
+            s.setCreateDate(date);
             s.setCreator(company.getCreator());
             s.setSortnum(num++);
             s.setSolutionBaseId( s.getSolution().getBaseId() );
@@ -782,17 +781,23 @@
         QueryWrapper<Company> wrapper = new QueryWrapper<>(company);
         company.setIsdeleted(Constants.ZERO);
         LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
-        if(company.getQueryFlag() == 0){
-            //鍙兘鐪嬫潈闄愯寖鍥村唴
-            if(user.getCompanyIdList() == null || user.getCompanyIdList().size() == 0){
-                wrapper.lambda().eq(Company::getId,-1);//璁剧疆鏃犳晥璁块棶
-            }else {
-                wrapper.lambda().in(Company::getId, user.getCompanyIdList());
+        if(Constants.equalsInteger(company.getType(),Constants.ONE)){
+
+        }else {
+            //濡傛灉鏌ヨ浼佷笟鏁版嵁
+            if(company.getQueryFlag() == 0){
+                //鍙兘鐪嬫潈闄愯寖鍥村唴
+                if(user.getCompanyIdList() == null || user.getCompanyIdList().size() == 0){
+                    wrapper.lambda().eq(Company::getId,-1);//璁剧疆鏃犳晥璁块棶
+                }else {
+                    wrapper.lambda().in(Company::getId, user.getCompanyIdList());
+                }
+            } else if (company.getQueryFlag() == 1 && company.getUserId()!=null) {
+                //鏌ヨ鏄惁鏈夋煡鐪嬫瑠闄�
+                wrapper.select("*,(select count(1) from company_permission b where b.user_id="+company.getUserId()+" and b.isdeleted=0 and b.company_id=company.id) as hasPerimission");
             }
-        } else if (company.getQueryFlag() == 1 && company.getUserId()!=null) {
-            //鏌ヨ鏄惁鏈夋煡鐪嬫瑠闄�
-            wrapper.select("*,(select count(1) from company_permission b where b.user_id="+company.getUserId()+" and b.isdeleted=0 and b.company_id=company.id) as hasPerimission");
         }
+
         return companyMapper.selectList(wrapper);
     }
 
@@ -803,17 +808,22 @@
         Utils.MP.blankToNull(pageWrap.getModel());
         pageWrap.getModel().setIsdeleted(Constants.ZERO);
         LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
-        if(pageWrap.getModel().getQueryFlag() == 0){
-            //鍙兘鐪嬫潈闄愯寖鍥村唴
-            if(user.getCompanyIdList() == null || user.getCompanyIdList().size() == 0){
-                queryWrapper.lambda().eq(Company::getId,-1);//璁剧疆鏃犳晥璁块棶
-            }else {
-                queryWrapper.lambda().in(Company::getId, user.getCompanyIdList());
-            }
+        if(Constants.formatIntegerNum(pageWrap.getModel().getType()) == Constants.ONE) {
+
+        }else{
+            //濡傛灉鏌ヨ浼佷笟鏁版嵁锛屽彧鑳界湅鏉冮檺鑼冨洿鍐�
+            if(pageWrap.getModel().getQueryFlag() == 0){
+                //鍙兘鐪嬫潈闄愯寖鍥村唴
+                if(user.getCompanyIdList() == null || user.getCompanyIdList().size() == 0){
+                    queryWrapper.lambda().eq(Company::getId,-1);//璁剧疆鏃犳晥璁块棶
+                }else {
+                    queryWrapper.lambda().in(Company::getId, user.getCompanyIdList());
+                }
 //            queryWrapper.exists("select b.id from company_permission b where b.user_id="+user.getId()+" and b.isdeleted=0 and b.company_id=company.id");
-        } else if (pageWrap.getModel().getQueryFlag() == 1) {
-            //鏌ヨ鏄惁鏈夋煡鐪嬫瑠闄�
-            queryWrapper.select("*,(select count(1) from company_permission b where b.user_id="+user.getId()+" and b.isdeleted=0 and b.company_id=company.id) as hasPerimission");
+            } else if (pageWrap.getModel().getQueryFlag() == 1) {
+                //鏌ヨ鏄惁鏈夋煡鐪嬫瑠闄�
+                queryWrapper.select("*,(select count(1) from company_permission b where b.user_id="+user.getId()+" and b.isdeleted=0 and b.company_id=company.id) as hasPerimission");
+            }
         }
         if (pageWrap.getModel().getId() != null) {
             queryWrapper.lambda().eq(Company::getId, pageWrap.getModel().getId());
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/CompanySolutionServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/CompanySolutionServiceImpl.java
index 45572e8..297395d 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/CompanySolutionServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/CompanySolutionServiceImpl.java
@@ -6,6 +6,7 @@
 import com.doumee.core.utils.Utils;
 import com.doumee.dao.business.CompanySolutionMapper;
 import com.doumee.dao.business.join.CompanySolutionJoinMapper;
+import com.doumee.dao.business.model.Company;
 import com.doumee.dao.business.model.CompanySolution;
 import com.doumee.dao.business.model.Solutions;
 import com.doumee.service.business.CompanySolutionService;
@@ -88,7 +89,9 @@
         MPJLambdaWrapper<CompanySolution> csWrapper = new MPJLambdaWrapper<>();
         csWrapper.selectAll(CompanySolution.class);
         csWrapper.selectAs(Solutions::getName,CompanySolution::getSolutionName);
+        csWrapper.selectAs(Company::getName,CompanySolution::getShopName);
         csWrapper.leftJoin(Solutions.class,Solutions::getId,CompanySolution::getSolutionBaseId);
+        csWrapper.leftJoin(Company.class, Company::getId,CompanySolution::getShopId);
         csWrapper.eq(CompanySolution::getCompanyId,companySolution.getCompanyId());
         csWrapper.eq(CompanySolution::getIsdeleted, Constants.ZERO);
         csWrapper.eq(Solutions::getIsdeleted, Constants.ZERO);
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
index 3f3a8e3..7ad77ab 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
@@ -286,7 +286,9 @@
         MPJLambdaWrapper<Solutions> queryWrapper = new MPJLambdaWrapper<>();
         queryWrapper.selectAll(Solutions.class);
         queryWrapper.selectAs(Insurance::getName,Solutions::getInsuranceName);
+        queryWrapper.selectAs(Company::getName,Solutions::getShopName);
         queryWrapper.leftJoin(Insurance.class,Insurance::getId,Solutions::getInsuranceId);
+        queryWrapper.leftJoin(Company.class,Company::getId,Solutions::getShopId);
         queryWrapper.eq(Solutions::getId,id);
         Solutions model = solutionsJoinMapper.selectJoinOne(Solutions.class,queryWrapper);
         if(model == null  || !Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
@@ -331,7 +333,9 @@
         Utils.MP.blankToNull(pageWrap.getModel());
         queryWrapper.selectAll(Solutions.class);
         queryWrapper.selectAs(Insurance::getName,Solutions::getInsuranceName);
+        queryWrapper.selectAs(Company::getName,Solutions::getShopName);
         queryWrapper.leftJoin(Insurance.class,Insurance::getId,Solutions::getInsuranceId);
+        queryWrapper.leftJoin(Company.class,Company::getId,Solutions::getShopId);
         LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
         if(user.getType().equals(Constants.ONE)){
             queryWrapper.exists(("select 1 from company_solution b where b.isdeleted=0 and b.company_id="+user.getCompanyId()+" and b.SOLUTION_BASE_ID = t.id"));

--
Gitblit v1.9.3