| | |
| | | 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) { |
| | |
| | | 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}"> |
| | |
| | | </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"> |
| | |
| | | </el-image> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | </div> |
| | | </div> |
| | | <!-- 新建/修改 --> |
| | |
| | | that.form.solutionList = resa.map(item => { |
| | | return { |
| | | solutionBaseId: item.solutionBaseId, |
| | | shopId: item.shopId, |
| | | canAdd: item.canAdd, |
| | | canReduce: item.canReduce |
| | | } |
| | |
| | | that.form.solutionListName = resa.map(item => { |
| | | return { |
| | | solutionName: item.solutionName, |
| | | shopName: item.shopName, |
| | | canAdd: item.canAdd, |
| | | canReduce: item.canReduce |
| | | } |
| | |
| | | </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> |
| | |
| | | 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, |
| | |
| | | solutionList: [ |
| | | { |
| | | solution: null, |
| | | shop: null, |
| | | canAdd: 0, |
| | | canReduce: 0 |
| | | } |
| | |
| | | { required: true, message: '请输入公司账号' } |
| | | ] |
| | | }, |
| | | programme: [] |
| | | programme: [], |
| | | shops:[] |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | methods: { |
| | | changeSolution(row,index){ |
| | | this.form.solutionList[index].solution=row |
| | | // console.log(this.form.solutionList) |
| | | }, |
| | | send () { |
| | | if (!this.form.phone) { |
| | |
| | | .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) { |
| | |
| | | this.form.solutionList.push({ |
| | | solutionId:null, |
| | | solution: {}, |
| | | shopId: null, |
| | | canAdd: '', |
| | | canReduce: '' |
| | | }) |
| | |
| | | > |
| | | <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"> |
| | |
| | | <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> |
| | |
| | | </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"/> |
| | | <!-- 修改手机号 --> |
| | |
| | | <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: { |
| | |
| | | }, 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 |
| | |
| | | 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 () { |
| | |
| | | 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"> |
| | |
| | | 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, |
| | |
| | | file3: { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | }, |
| | | } |
| | | }, |
| | | form: {}, |
| | | timer: null, |
| | |
| | | } |
| | | }, |
| | | 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) { |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <el-table-column |
| | | prop="worktypeName" |
| | | align="center" |
| | | label="所属工种"> |
| | | label="工种名称"> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="info_agree"> |
| | |
| | | price: '', |
| | | timeUnit: '', |
| | | insureCycle: '', |
| | | shopName:'', |
| | | insureCycleUnit: '', |
| | | validTypeNum: '', |
| | | email: '', |
| | |
| | | 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] |
| | |
| | | <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> |
| | |
| | | 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, |
| | |
| | | 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 { |
| | | // 表单数据 |
| | |
| | | maxAge: '', |
| | | price: '', |
| | | timeUnit: '', |
| | | shopId: null, |
| | | insureCycle: '', |
| | | insureCycleUnit: '', |
| | | email: '', |
| | |
| | | ], |
| | | type: [ |
| | | { required: true, message: '请选择投保类型' } |
| | | ], |
| | | ] |
| | | // signKeyword: [ |
| | | // { required: false, message: '请输入投保单签章关键字' } |
| | | // ] |
| | | }, |
| | | shops: [], |
| | | company: [], |
| | | typeWork: [] |
| | | } |
| | |
| | | }, |
| | | // 确认新建/修改 |
| | | 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) { |
| | |
| | | this.visible = true |
| | | this.form.worktypeIdList = [{ worktypeId: '' }] |
| | | this.allCompany() |
| | | this.allShops() |
| | | // 新建 |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | |
| | | this.company = res |
| | | }) |
| | | }, |
| | | allShops () { |
| | | shopList({ type: 1, status: 0 }) |
| | | .then(res => { |
| | | console.log(res) |
| | | this.shops = res |
| | | }) |
| | | }, |
| | | add() { |
| | | this.form.worktypeIdList.push({ worktypeId: '' }) |
| | | }, |
| | |
| | | </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> |
| | |
| | | <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', |
| | |
| | | { required: true, message: '请输入公司账号' } |
| | | ] |
| | | }, |
| | | programme: [] |
| | | programme: [], |
| | | shops: [] |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | .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] |
| | |
| | | that.form.solutionList = resa.map(item => { |
| | | return { |
| | | solution: {id: item.solutionId, baseId: item.solutionBaseId }, |
| | | shopId: item.shopId, |
| | | canAdd: item.canAdd, |
| | | canReduce: item.canReduce |
| | | } |
| | |
| | | add() { |
| | | this.form.solutionList.push({ |
| | | solution: { id: null, baseId: null }, |
| | | shopId: null, |
| | | canAdd: '', |
| | | canReduce: '' |
| | | }) |
| | |
| | | <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> |
| | |
| | | <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"> |
| | |
| | | // 搜索 |
| | | searchForm: { |
| | | name: '', |
| | | status: '' |
| | | status: '', |
| | | type: '' |
| | | } |
| | | } |
| | | }, |
| | |
| | | @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; |
| | |
| | | @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="最低年龄") |
| | |
| | | @ApiModelProperty(value = "总周期费用", example = "1") |
| | | @TableField(exist = false) |
| | | private BigDecimal cyclePrice; |
| | | @ApiModelProperty(value = "委托商户名称", example = "1") |
| | | @TableField(exist = false) |
| | | private String shopName; |
| | | |
| | | } |
| | |
| | | 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()); |
| | |
| | | .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()); |
| | |
| | | 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); |
| | |
| | | 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; |
| | |
| | | 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() ); |
| | |
| | | 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){ |
| | |
| | | //查詢是否有查看權限 |
| | | 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); |
| | | } |
| | | |
| | |
| | | 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){ |
| | |
| | | //查詢是否有查看權限 |
| | | 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()); |
| | | } |
| | |
| | | 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; |
| | |
| | | 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); |
| | |
| | | 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)){ |
| | |
| | | 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")); |