aaa
nidapeng
2024-03-14 8b46c471e28fbf0b71efbe363facf0bf05d8f6f8
aaa
已修改14个文件
317 ■■■■■ 文件已修改
company/src/api/business/company.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaCompanyDescWindow.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaCompanyWindow.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaShopDescWindow.vue 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaShopWindow.vue 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaSolutionsDescWindow.vue 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaSolutionsWindow.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/modification.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/business/solutions.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/CompanySolution.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/Solutions.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/CompanySolutionServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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) {
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
                }
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) {
@@ -300,6 +321,7 @@
      this.form.solutionList.push({
        solutionId:null,
        solution: {},
        shopId: null,
        canAdd: '',
        canReduce: ''
      })
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 () {
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,
@@ -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) {
company/src/components/business/OperaSolutionsDescWindow.vue
@@ -23,12 +23,17 @@
                    <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">{{form.minAge}}至{{form.maxAge}}</div>
                <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">平台投保</div>
                    <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>
@@ -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]
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>
@@ -146,6 +156,7 @@
    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,
@@ -153,11 +164,11 @@
        data () {
            var validType = (rule, value, callback) => {
                if (this.form.validType === 0 && !value) {
                    return callback(new Error('延迟天数不能为空'));
        return callback(new Error('延迟天数不能为空'))
                } else if (this.form.validType === 0 && !/^[0-9]*[1-9][0-9]*$/.test(value)) {
                    return callback(new Error('延迟天数只能为正整数'));
        return callback(new Error('延迟天数只能为正整数'))
                }
                callback();
      callback()
            }
            return {
                // 表单数据
@@ -172,6 +183,7 @@
                    maxAge: '',
                    price: '',
                    timeUnit: '',
        shopId: null,
                    insureCycle: '',
                    insureCycleUnit: '',
                    email: '',
@@ -207,11 +219,12 @@
                    ],
                    type: [
                        { required: true, message: '请选择投保类型' }
                    ],
        ]
                    // signKeyword: [
                    //     { required: false, message: '请输入投保单签章关键字' }
                    // ]
                },
      shops: [],
                company: [],
                typeWork: []
            }
@@ -230,7 +243,7 @@
            },
            // 确认新建/修改
            confirm () {
                let data = JSON.parse(JSON.stringify(this.form))
      const data = JSON.parse(JSON.stringify(this.form))
                data.worktypeIdList = data.worktypeIdList.map(item => item.worktypeId)
                this.$refs.form.validate((valid) => {
                    if (!valid) {
@@ -276,6 +289,7 @@
                this.visible = true
                this.form.worktypeIdList = [{ worktypeId: '' }]
                this.allCompany()
      this.allShops()
                // 新建
                if (target == null) {
                    this.$nextTick(() => {
@@ -316,6 +330,13 @@
                        this.company = res
                    })
            },
    allShops () {
      shopList({ type: 1, status: 0 })
        .then(res => {
          console.log(res)
          this.shops = res
        })
    },
            add() {
                this.form.worktypeIdList.push({ worktypeId: '' })
            },
company/src/components/business/modification.vue
@@ -36,6 +36,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>
@@ -57,9 +71,9 @@
<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 { all, listForCompany } from '@/api/business/solutions'
import { updateSolutions, pageAll as shopList } from '@/api/business/company'
    export default {
        name: 'modification',
@@ -84,7 +98,8 @@
                        { required: true, message: '请输入公司账号' }
                    ]
                },
                programme: []
      programme: [],
      shops: []
            }
        },
        created () {
@@ -124,9 +139,14 @@
                    .then(res => {
                        this.programme = res
                    })
      shopList({ type: 1, status: 0 })
        .then(res => {
          console.log(res)
          this.shops = res
        })
            },
            open (title, target) {
                var that = this;
      var that = this
                this.title = title
                for (const key in this.form) {
                    this.form[key] = target[key]
@@ -137,6 +157,7 @@
                        that.form.solutionList = resa.map(item => {
                            return {
                                solution: {id: item.solutionId, baseId: item.solutionBaseId },
              shopId: item.shopId,
                                canAdd: item.canAdd,
                                canReduce: item.canReduce
                            }
@@ -148,6 +169,7 @@
            add() {
                this.form.solutionList.push({
                    solution: { id: null, baseId: null },
        shopId: null,
                    canAdd: '',
                    canReduce: ''
                })
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>
@@ -53,6 +59,12 @@
                        <span v-if="row.timeUnit === 1">半月</span>
                        <span v-if="row.timeUnit === 2">月</span>
                        <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">
@@ -113,7 +125,8 @@
                // 搜索
                searchForm: {
                    name: '',
                    status: ''
        status: '',
        type: ''
                }
            }
        },
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 = "方案主键(关联solutions)", example = "1")
    @ExcelColumn(name="方案主键(关联solutions)")
    private Integer solutionId;
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 = "委托商户编码(关联company)", example = "1")
    @ExcelColumn(name="委托商户编码(关联company)")
    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;
}
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(),"对不起,该企业【名称】【统一信用代码】【邮箱】或者【手机号】已存在,请确认后重新提交!");
            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,该商户【名称】【统一信用代码】【邮箱】或者【手机号】已存在,请确认后重新提交!");
        }
        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,6 +781,10 @@
        QueryWrapper<Company> wrapper = new QueryWrapper<>(company);
        company.setIsdeleted(Constants.ZERO);
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if(Constants.equalsInteger(company.getType(),Constants.ONE)){
        }else {
            //如果查询企业数据
        if(company.getQueryFlag() == 0){
            //只能看权限范围内
            if(user.getCompanyIdList() == null || user.getCompanyIdList().size() == 0){
@@ -793,6 +796,8 @@
            //查詢是否有查看權限
            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,6 +808,10 @@
        Utils.MP.blankToNull(pageWrap.getModel());
        pageWrap.getModel().setIsdeleted(Constants.ZERO);
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        if(Constants.formatIntegerNum(pageWrap.getModel().getType()) == Constants.ONE) {
        }else{
            //如果查询企业数据,只能看权限范围内
        if(pageWrap.getModel().getQueryFlag() == 0){
            //只能看权限范围内
            if(user.getCompanyIdList() == null || user.getCompanyIdList().size() == 0){
@@ -815,6 +824,7 @@
            //查詢是否有查看權限
            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());
        }
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);
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"));