已添加1个文件
已删除130个文件
已修改61个文件
| | |
| | | return request.post('/business/company/updateById', data) |
| | | } |
| | | |
| | | // æ¥è¯¢å
¨é¨æ°æ®(è´¦å·åé
ä¼ä¸ä½¿ç¨) |
| | | |
| | | export function pageAll (data) { |
| | | return request.post('/business/company/list', data) |
| | | } |
| | | // æ¥è¯¢å
¨é¨æ°æ®(è´¦å·åé
ä¼ä¸ä½¿ç¨) |
| | | export function allForFp (data) { |
| | | return request.post('/business/company/pageAll', data) |
| | | } |
| | | |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import OperaCompanyWindow from '@/components/business/OperaCompanyWindow' |
| | | 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 }, |
| | | data () { |
| | | return { |
| | | ruleForm: { |
| | | phone: '', |
| | | code: '' |
| | | }, |
| | | num: 0, |
| | | timer: null, |
| | | // è¡¨åæ°æ® |
| | | form: {}, |
| | | phone: '', |
| | | code: '', |
| | | visiblePhone: false, |
| | | options: [], |
| | | tableData: [] |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/company', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | close() { |
| | | this.visiblePhone = false |
| | | this.phone = '' |
| | | this.code = '' |
| | | clearInterval(this.timer) |
| | | this.num = 0 |
| | | }, |
| | | updatePhoneEvent() { |
| | | if (!this.phone) { |
| | | this.$message.warning('请è¾å
¥ææºå·') |
| | | return |
| | | } |
| | | if (!this.code) { |
| | | this.$message.warning('请è¾å
¥éªè¯ç ') |
| | | return |
| | | } |
| | | updatePhone({ |
| | | id: this.form.id, |
| | | captche: this.code, |
| | | phone: this.phone |
| | | }).then(res => { |
| | | this.form.phone = JSON.parse(JSON.stringify(this.phone)) |
| | | this.$message.success('æä½æå') |
| | | this.visiblePhone = false |
| | | this.phone = '' |
| | | this.code = '' |
| | | clearInterval(this.timer) |
| | | this.num = 0 |
| | | }) |
| | | }, |
| | | send() { |
| | | if (!this.phone) { |
| | | this.$message.warning('请è¾å
¥ææºå·') |
| | | return |
| | | } |
| | | sendSms({ phone: this.phone }) |
| | | .then(res => { |
| | | this.num = 60 |
| | | this.setTime() |
| | | }) |
| | | }, |
| | | setTime() { |
| | | this.timer = setInterval(() => { |
| | | this.num -= 1 |
| | | if (this.num === 0) { |
| | | clearInterval(this.timer) |
| | | this.num = 0 |
| | | } |
| | | }, 1000) |
| | | }, |
| | | open (title, target) { |
| | | const that = this; |
| | | this.title = title |
| | | this.phone = '' |
| | | this.code = '' |
| | | clearInterval(this.timer) |
| | | this.num = 0 |
| | | getById(target.id) |
| | | .then(res => { |
| | | this.form = res |
| | | this.form.type = 1 |
| | | |
| | | this.form.file = { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | this.form.file1 = { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | this.form.file2 = { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | this.form.file3 = { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | |
| | | this.form.file.imgurl = res.businessImg.fileurl |
| | | this.form.file.imgurlfull = res.businessImg.fileurlFull |
| | | this.form.file1.imgurl = res.idcardImgList[0].fileurl |
| | | this.form.file1.imgurlfull = res.idcardImgList[0].fileurlFull |
| | | this.form.file2.imgurl = res.idcardImgList[1].fileurl |
| | | this.form.file2.imgurlfull = res.idcardImgList[1].fileurlFull |
| | | this.form.file3.imgurl = res.signImg.fileurl |
| | | this.form.file3.imgurlfull = res.signImg.fileurlFull |
| | | |
| | | listForCompany({ companyId: target.id }) |
| | | .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() { |
| | | this.$emit('success') |
| | | this.visible = false |
| | | } |
| | | } |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import OperaCompanyWindow from '@/components/business/OperaCompanyWindow' |
| | | 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 }, |
| | | data () { |
| | | return { |
| | | ruleForm: { |
| | | phone: '', |
| | | code: '' |
| | | }, |
| | | dataId: null, |
| | | num: 0, |
| | | timer: null, |
| | | // è¡¨åæ°æ® |
| | | form: {}, |
| | | phone: '', |
| | | code: '', |
| | | visiblePhone: false, |
| | | options: [], |
| | | tableData: [] |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/company', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | close () { |
| | | this.visiblePhone = false |
| | | this.phone = '' |
| | | this.code = '' |
| | | clearInterval(this.timer) |
| | | this.num = 0 |
| | | }, |
| | | updatePhoneEvent () { |
| | | if (!this.phone) { |
| | | this.$message.warning('请è¾å
¥ææºå·') |
| | | return |
| | | } |
| | | if (!this.code) { |
| | | this.$message.warning('请è¾å
¥éªè¯ç ') |
| | | return |
| | | } |
| | | updatePhone({ |
| | | id: this.form.id, |
| | | captche: this.code, |
| | | phone: this.phone |
| | | }).then(res => { |
| | | this.form.phone = JSON.parse(JSON.stringify(this.phone)) |
| | | this.$message.success('æä½æå') |
| | | this.visiblePhone = false |
| | | this.phone = '' |
| | | this.code = '' |
| | | clearInterval(this.timer) |
| | | this.num = 0 |
| | | }) |
| | | }, |
| | | send () { |
| | | if (!this.phone) { |
| | | this.$message.warning('请è¾å
¥ææºå·') |
| | | return |
| | | } |
| | | sendSms({ phone: this.phone }) |
| | | .then(res => { |
| | | this.num = 60 |
| | | this.setTime() |
| | | }) |
| | | }, |
| | | setTime () { |
| | | this.timer = setInterval(() => { |
| | | this.num -= 1 |
| | | if (this.num === 0) { |
| | | clearInterval(this.timer) |
| | | this.num = 0 |
| | | } |
| | | }, 1000) |
| | | }, |
| | | open (title, target) { |
| | | const that = this |
| | | this.title = title |
| | | this.dataId = target.id |
| | | this.phone = '' |
| | | this.code = '' |
| | | clearInterval(this.timer) |
| | | this.num = 0 |
| | | this.getDetail() |
| | | }, |
| | | getDetail () { |
| | | var that =this |
| | | getById(this.dataId) |
| | | .then(res => { |
| | | this.form = res |
| | | this.form.type = 1 |
| | | |
| | | this.form.file = { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | this.form.file1 = { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | this.form.file2 = { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | this.form.file3 = { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | |
| | | this.form.file.imgurl = res.businessImg.fileurl |
| | | this.form.file.imgurlfull = res.businessImg.fileurlFull |
| | | this.form.file1.imgurl = res.idcardImgList[0].fileurl |
| | | this.form.file1.imgurlfull = res.idcardImgList[0].fileurlFull |
| | | this.form.file2.imgurl = res.idcardImgList[1].fileurl |
| | | this.form.file2.imgurlfull = res.idcardImgList[1].fileurlFull |
| | | 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 () { |
| | | this.getDetail() |
| | | this.$emit('success') |
| | | // this.visible = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | <el-form-item label="纸质åç¥¨æ¥æ¶å°å" prop="invoiceAddr"> |
| | | <el-input v-model="form.invoiceAddr" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | <<<<<<< HEAD |
| | | <el-form-item label="è¥ä¸æ§ç
§" prop="businessImg"> |
| | | <div style="width: 100%; height: 100px; display: flex; align-items: center;"> |
| | | <UploadAvatarImage :uploadData="{ folder: 'company' }" :file="form.file" @uploadSuccess="result" /> |
| | | </div> |
| | | ======= |
| | | <el-form-item label="è¥ä¸æ§ç
§" prop="businessImg" style="height: 120px"> |
| | | <UploadAvatarImage :uploadData="{ folder: 'company' }" :file="form.file" @uploadSuccess="result" /> |
| | | >>>>>>> c421d2deeec5530d8060d8e06b5b86bb02e72dbf |
| | | </el-form-item> |
| | | <el-form-item label="æ³äººèº«ä»½è¯" prop="idcardImgList"> |
| | | <el-form-item label="æ³äººèº«ä»½è¯" prop="idcardImgList" style="height: 120px"> |
| | | <div style="width: 100%; display: flex; align-items: center;"> |
| | | <UploadAvatarImage :uploadData="{ folder: 'company' }" :file="form.file1" @uploadSuccess="result1" /> |
| | | <div style="width: 15px;height: 100%;"></div> |
| | | <UploadAvatarImage :uploadData="{ folder: 'company' }" :file="form.file2" @uploadSuccess="result2" /> |
| | | </div> |
| | | </el-form-item> |
| | | <<<<<<< HEAD |
| | | <el-form-item label="çµåç¾ç« " prop="signImg"> |
| | | <div style="width: 100%; height: 100px; display: flex; align-items: center;"> |
| | | <UploadAvatarImage :uploadData="{ folder: 'company' }" :file="form.file3" @uploadSuccess="result3" /> |
| | | </div> |
| | | ======= |
| | | <el-form-item label="çµåç¾ç« " prop="signImg" style="height: 120px"> |
| | | <UploadAvatarImage :uploadData="{ folder: 'company' }" :file="form.file3" @uploadSuccess="result3" /> |
| | | >>>>>>> c421d2deeec5530d8060d8e06b5b86bb02e72dbf |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-button type="primary" style="margin-bottom: 15px;" @click="add" v-if="form.type !== 1">æ·»å </el-button> |
| | |
| | | <el-table-column |
| | | align="center" |
| | | label="ä¿é©æ¹æ¡"> |
| | | <template slot-scope="{row}"> |
| | | <el-select v-model="row.solutionBaseId" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in programme" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.solution" value-key="id" placeholder="è¯·éæ©" change="changeSolution($event,scope.$index)"> |
| | | <el-option |
| | | v-for="item in programme" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | data () { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | initParam:{ |
| | | id: null, |
| | | name: '', |
| | | code: '', |
| | |
| | | }, |
| | | solutionList: [ |
| | | { |
| | | solutionBaseId: '', |
| | | solution: null, |
| | | canAdd: 0, |
| | | canReduce: 0 |
| | | } |
| | | ], |
| | | type: '', |
| | | type: '0', |
| | | file: { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | |
| | | file3: { |
| | | imgurl: '', |
| | | imgurlfull: '' |
| | | } |
| | | }, |
| | | }, |
| | | form: {}, |
| | | timer: null, |
| | | num: 0, |
| | | // éªè¯è§å |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | changeSolution(row,index){ |
| | | this.form.solutionList[index].solution=row |
| | | // console.log(this.form.solutionList) |
| | | }, |
| | | send () { |
| | | if (!this.form.phone) { |
| | | this.$message.warning('请è¾å
¥ææºå·') |
| | |
| | | } |
| | | }, 1000) |
| | | }, |
| | | open (title, target) { |
| | | open (title, target,type) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.form = this.initParam |
| | | this.getAll() |
| | | // æ°å»º |
| | | if (target == null) { |
| | |
| | | }, |
| | | add () { |
| | | this.form.solutionList.push({ |
| | | solutionName: '', |
| | | solutionId:null, |
| | | solution: {}, |
| | | canAdd: '', |
| | | canReduce: '' |
| | | }) |
| | |
| | | <template v-else> |
| | | <el-button type="primary" @click="$refs.InsuranceDetails.open('æä¿è¯¦æ
å',model,0)">导åºè¯¦å</el-button> |
| | | <el-button v-if="[2, 3, 5, 7, 8].includes(model.status)" type="primary" @click="viewToubaodan">æ¥çæä¿å</el-button> |
| | | <!-- |
| | | <el-button v-if="model.status == 2" type="primary" @click="goSign">ç¾ç½²æä¿å</el-button> |
| | | --> |
| | | <el-button v-if="model.status == 5" type="primary" @click="viewBaoxiandan">æ¥çä¿é©å</el-button> |
| | | <el-button v-if="model.status == 10" type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('ä¸ä¼ æä¿å',model,2)">ä¸ä¼ æä¿å</el-button> |
| | | <el-button v-if="model.status == 3" type="primary" @click="$refs.OperaInsuranceApplyCheckWindow.open('ä¸ä¼ ä¿é©å',model,3)">ä¸ä¼ ä¿é©å</el-button> |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="100%" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | |
| | | <el-form-item label="æ¥æ¶æä»¶é®ç®±" prop="email"> |
| | | <el-input v-model="form.email" placeholder="请è¾å
¥" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="æä¿åç¾ç« å
³é®å" prop="signKeyword"> |
| | | <el-input v-model="form.signKeyword" placeholder="å¤ä¸ªè±æéå·éå¼" v-trim/> |
| | | <el-form-item label="æä¿åç¾ç« å
³é®åï¼å¦æå¤ä¸ªå
³é®åï¼è¯·ä½¿ç¨è±æåå· ; éå¼ï¼" prop="signKeyword"> |
| | | <el-input v-model="form.signKeyword" placeholder="å¤ä¸ªè±æåå· ; éå¼" v-trim/> |
| | | </el-form-item> |
| | | <el-button type="primary" @click="add">æ·»å å·¥ç§</el-button> |
| | | <el-table |
| | |
| | | <div class="info_list_item_val" style="color:rgba(249, 86, 1, 0.996078431372549);">{{ model.price }}</div> |
| | | </div> |
| | | </div> |
| | | <<<<<<< HEAD |
| | | <el-table v-if="model.applyType == 0" |
| | | ======= |
| | | <el-table v-if="model.applyType ==0" |
| | | >>>>>>> c421d2deeec5530d8060d8e06b5b86bb02e72dbf |
| | | :data="tableData" |
| | | border |
| | | show-summary |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <<<<<<< HEAD |
| | | <el-table |
| | | v-if="model.applyType == 1" |
| | | :data="tableData1" |
| | |
| | | show-summary |
| | | :summary-method="getSummaries" |
| | | style="width: 100%; margin-bottom: 20px;"> |
| | | ======= |
| | | <el-table v-if="model.applyType ==1" |
| | | :data="tableData1" |
| | | border |
| | | show-summary |
| | | :summary-method="getSummaries" |
| | | style="width: 100%; margin-bottom: 20px;"> |
| | | >>>>>>> c421d2deeec5530d8060d8e06b5b86bb02e72dbf |
| | | <el-table-column |
| | | label="ä¿å" |
| | | align="center" |
| | |
| | | align="center" |
| | | label="ä¿é©æ¹æ¡"> |
| | | <template slot-scope="{row}"> |
| | | <el-select v-model="row.solutionBaseId" placeholder="è¯·éæ©"> |
| | | <el-select v-model="row.solution" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in programme" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | :value="{id:item.id,baseId:item.baseId}"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | |
| | | id: null, |
| | | solutionList: [ |
| | | { |
| | | solutionBaseId: '', |
| | | solution: {id: null, baseId: null }, |
| | | canAdd: 0, |
| | | canReduce: 0 |
| | | } |
| | |
| | | .then(resa => { |
| | | that.form.solutionList = resa.map(item => { |
| | | return { |
| | | solutionBaseId: item.solutionBaseId, |
| | | solution: {id: item.baseSolutionId, baseId: item.solutionId }, |
| | | canAdd: item.canAdd, |
| | | canReduce: item.canReduce |
| | | } |
| | |
| | | }, |
| | | add() { |
| | | this.form.solutionList.push({ |
| | | solutionName: '', |
| | | solution: {id: null, baseId: null }, |
| | | canAdd: '', |
| | | canReduce: '' |
| | | }) |
| | |
| | | <script> |
| | | import BasePage from '@/components/base/BasePage' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { pageAll } from '@/api/business/company' |
| | | import { allForFp } from '@/api/business/company' |
| | | import { create } from '@/api/business/companyPermission' |
| | | export default { |
| | | name: 'allocationEnterprises', |
| | |
| | | this.visible = true |
| | | this.title = title |
| | | this.user = target |
| | | pageAll({ userId: target.id }) |
| | | allForFp({ userId: target.id }) |
| | | .then(res => { |
| | | this.company = res.map(r => { |
| | | return { |
| | |
| | | companyIdList: this.selectedIds |
| | | }) |
| | | .then(() => { |
| | | this.$tip.apiSuccess('è§è²é
ç½®æåï¼ç¨æ·éæ°ç»å½åçæ') |
| | | this.$tip.apiSuccess('ä¼ä¸åé
æåï¼ç¨æ·éæ°ç»å½åçæ') |
| | | this.visible = false |
| | | this.$emit('success') |
| | | }) |
| | |
| | | <el-form-item label="ä¼ä¸åç§°" prop="name"> |
| | | <el-input v-model="searchForm.name" placeholder="请è¾å
¥ä¼ä¸åç§°" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æå±åæ·" prop="name"> |
| | | <el-input v-model="searchForm.name" placeholder="请è¾å
¥æå±åæ·" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æå±çèµå" prop="username"> |
| | | <el-input v-model="searchForm.username" placeholder="请è¾å
¥æå±çèµå" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:company:create']"> |
| | | <li><el-button type="primary" @click="$refs.operaCompanyWindow.open('æ°å»ºä¼ä¸')" v-permissions="['business:company:create']">æ°å»ºä¼ä¸</el-button></li> |
| | | <li><el-button type="primary" @click="$refs.operaCompanyWindow.open('æ°å»ºä¼ä¸',null)" v-permissions="['business:company:create']">æ°å»ºä¼ä¸</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | |
| | | <TableLayout :permissions="['business:dispatchunit:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="æå±ä¸" prop="companyId"> |
| | | <el-form-item label="æå±ä¼ä¸" prop="companyId"> |
| | | <el-select v-model="searchForm.companyId" placeholder="è¯·éæ©" @change="search"> |
| | | <el-option |
| | | v-for="item in companyList" |
| | |
| | | return request.post('/business/company/updateById', data) |
| | | } |
| | | |
| | | <<<<<<< HEAD |
| | | // æ¥è¯¢å
¨é¨æ°æ®(è´¦å·åé
ä¼ä¸ä½¿ç¨) |
| | | export function pageAll (data) { |
| | | ======= |
| | | |
| | | export function pageAll (data) { |
| | | return request.post('/business/company/list', data) |
| | | } |
| | | // æ¥è¯¢å
¨é¨æ°æ®(è´¦å·åé
ä¼ä¸ä½¿ç¨) |
| | | export function allForFp (data) { |
| | | >>>>>>> c421d2deeec5530d8060d8e06b5b86bb02e72dbf |
| | | return request.post('/business/company/pageAll', data) |
| | | } |
| | | |
| | |
| | | export function listForCompany (data) { |
| | | return request.post('/business/companySolution/listForCompany', data) |
| | | } |
| | | <<<<<<< HEAD |
| | | |
| | | // æ ¹æ®åå²çæ¬æ¥è¯¢å½åææ°å¯ç¨çæ¬ |
| | | export function getNewVersion (id) { |
| | | return request.get(`/business/solutions/getNewVersion?solutionId=${id}`) |
| | | } |
| | | ======= |
| | | >>>>>>> c421d2deeec5530d8060d8e06b5b86bb02e72dbf |
| | |
| | | * @role è§è²å¯¹è±¡ |
| | | */ |
| | | open (role) { |
| | | <<<<<<< HEAD |
| | | if (this.userInfo.type === 1) { |
| | | fetchTree1({}) |
| | | ======= |
| | | fetchMenuList({}) |
| | | >>>>>>> c421d2deeec5530d8060d8e06b5b86bb02e72dbf |
| | | .then(records => { |
| | | this.role = role |
| | | this.menus = records |
| | |
| | | <div style="height:10px;"></div> |
| | | <main> |
| | | <transition name="fade"> |
| | | <<<<<<< HEAD |
| | | <!-- <keep-alive>--> |
| | | <router-view></router-view> |
| | | <!-- </keep-alive>--> |
| | | ======= |
| | | <keep-alive> |
| | | <router-view></router-view> |
| | | </keep-alive> |
| | | >>>>>>> c421d2deeec5530d8060d8e06b5b86bb02e72dbf |
| | | </transition> |
| | | </main> |
| | | </el-main> |
| | |
| | | <TableLayout :permissions="['business:dispatchunit:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <<<<<<< HEAD |
| | | <el-form-item label="æå±ä¸" prop="companyId"> |
| | | ======= |
| | | <el-form-item label="æå±ä¼ä¸" prop="companyId"> |
| | | >>>>>>> c421d2deeec5530d8060d8e06b5b86bb02e72dbf |
| | | <el-select v-model="searchForm.companyId" placeholder="è¯·éæ©" @change="search"> |
| | | <el-option |
| | | v-for="item in companyList" |
| | |
| | | <template> |
| | | <<<<<<< HEAD |
| | | <div class="wrap"> |
| | | <div class="introduce"> |
| | | <h2>é¢éæ¸
åæ¥è¯¢ç³»ç»</h2> |
| | |
| | | </template> |
| | | </div> |
| | | <el-button :loading="loading" @click="login">ç» å½</el-button> |
| | | ======= |
| | | <div class="wrap"> |
| | | <div class="introduce"> |
| | | <h2>é¢éæ¸
åæ¥è¯¢ç³»ç»</h2> |
| | | </div> |
| | | <div class="login"> |
| | | <h1>ç³»ç»ç»å½ / LOGIN IN</h1> |
| | | <div class="info-input"> |
| | | <el-input v-model="username" placeholder="请è¾å
¥ç¨æ·å" prefix-icon="el-icon-user-solid" maxlength="50" v-trim/> |
| | | <el-input v-model="password" placeholder="请è¾å
¥å¯ç " type="password" prefix-icon="eva-icon-password" maxlength="30" show-password/> |
| | | <div class="captcha-input"> |
| | | <el-input v-model="captcha.value" placeholder="å¾çéªè¯ç " prefix-icon="eva-icon-shield" maxlength="4" @keypress.enter.native="login"/> |
| | | <img v-if="!captcha.loading" :src="captcha.uri" @click="refreshCaptcha"> |
| | | <span v-else><i class="el-icon-loading"></i></span> |
| | | >>>>>>> c421d2deeec5530d8060d8e06b5b86bb02e72dbf |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | min-width="270" |
| | | fixed="right" |
| | | > |
| | | <<<<<<< HEAD |
| | | <!-- v-if="isAdmin || (row.code !== adminCode && userInfo.roles.findIndex(code => code === row.code) === -1)"--> |
| | | <template slot-scope="{row}"> |
| | | ======= |
| | | <template v-if="isAdmin || (row.code !== adminCode && userInfo.roles.findIndex(code => code === row.code) === -1)" slot-scope="{row}"> |
| | | >>>>>>> c421d2deeec5530d8060d8e06b5b86bb02e72dbf |
| | | <el-button type="text" @click="$refs.operaRoleWindow.open('ç¼è¾è§è²', row)" icon="el-icon-edit" v-permissions="['system:role:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="$refs.permissionConfigWindow.open(row)" v-permissions="['system:role:createRolePermission']">é
ç½®æé</el-button> |
| | | <el-button type="text" @click="$refs.menuConfigWindow.open(row)" icon="el-icon-menu" v-permissions="['system:role:createRoleMenu']">ææèå</el-button> |
| | |
| | | // const outputDir = process.env.VUE_APP_CONTEXT_PATH.substring(1, process.env.VUE_APP_CONTEXT_PATH.length) |
| | | module.exports = { |
| | | publicPath: './', |
| | | <<<<<<< HEAD |
| | | outputDir: 'yyb_web', |
| | | ======= |
| | | outputDir: 'dest', |
| | | >>>>>>> c421d2deeec5530d8060d8e06b5b86bb02e72dbf |
| | | assetsDir: 'static', |
| | | lintOnSave: false, |
| | | devServer: { |
| | |
| | | return ApiResponse.success(applyDetailService.findListForCompany(applyDetailPageDTO)); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢å
¨é¨") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:applydetail:query") |
| | | public ApiResponse<List<ApplyDetail>> list (@RequestBody ApplyDetail pageWrap) { |
| | | return ApiResponse.success(applyDetailService.findList(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºå¨ä¿äººå详åExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:applydetail:exportExcel") |
| | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | |
| | | @RequiresPermissions("business:company:create") |
| | | public ApiResponse create(@RequestBody Company company) { |
| | | companyService.create(company); |
| | | companyService.startSignAuth(company.getId()); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | |
| | | return ApiResponse.success(companyService.findById(id)); |
| | | } |
| | | |
| | | @ApiOperation("ä¼ä¸è¯ä»¶ä¸è½½") |
| | | @PostMapping("/exportFiles") |
| | | @RequiresPermissions("business:company:exportExcel") |
| | | public void exportFiles(@RequestBody Company company,HttpServletResponse response) { |
| | | if(company.getId() == null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | companyService.exportFiles(company.getId(),response); |
| | | } |
| | | } |
| | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.dto.DispatchUnitQueryDTO; |
| | | import com.doumee.dao.business.dto.SaveDispatchUnitDTO; |
| | | import com.doumee.dao.business.model.DispatchUnit; |
| | |
| | | @PostMapping("/findListByDTO") |
| | | @RequiresPermissions("business:dispatchunit:query") |
| | | public ApiResponse<List<DispatchUnit>> findListByDTO (@RequestBody DispatchUnitQueryDTO dispatchUnitQueryDTO) { |
| | | dispatchUnitQueryDTO.setDataType(Constants.TWO); |
| | | return ApiResponse.success(dispatchUnitService.findByDTO(dispatchUnitQueryDTO)); |
| | | } |
| | | |
| | |
| | | |
| | | @ApiOperation("æµè¯å®é
éé¢") |
| | | @GetMapping("/testFee") |
| | | public ApiResponse testFee(@RequestParam Integer id) { |
| | | public ApiResponse testFee(Integer id) { |
| | | insuranceApplyService.updateApplyCurrentFee(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æµè¯çæå¾
ç»ä¿éç¥") |
| | | @GetMapping("/generateNotice") |
| | | public ApiResponse generateNotice() { |
| | | insuranceApplyService.generateNotice(); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | } |
| | |
| | | @PostMapping("/findList") |
| | | @RequiresPermissions("business:memberinsurance:query") |
| | | public ApiResponse<List<MemberInsurance>> findList (@RequestBody MemberInsurance memberInsurance) { |
| | | return ApiResponse.success(memberInsuranceService.findList(memberInsurance)); |
| | | return ApiResponse.success(memberInsuranceService.getList(memberInsurance)); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:memberinsurance:exportExcel") |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.Notices; |
| | | import com.doumee.dao.business.vo.ApplyNoticeVO; |
| | | import com.doumee.service.business.NoticesService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(noticesService.findById(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ¥è¯¢æä¿åæéæ°é") |
| | | @GetMapping("/getApplyNotice") |
| | | public ApiResponse<ApplyNoticeVO> getApplyNotice() { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | return ApiResponse.success(noticesService.getApplyNotice(loginUserInfo.getCompanyId())); |
| | | } |
| | | |
| | | @ApiOperation("æä¿åå
³éæé") |
| | | @GetMapping("/closeApplyNotice") |
| | | public ApiResponse closeApplyNotice(@RequestParam Integer type) { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | noticesService.closeApplyNotice(loginUserInfo.getCompanyId(),type); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.Solutions; |
| | | import com.doumee.service.business.SolutionsService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | |
| | | @ApiOperation("å表æ¥è¯¢") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:solutions:query") |
| | | public ApiResponse<List<Solutions>> findList () { |
| | | return ApiResponse.success(solutionsService.findListForCompany()); |
| | | public ApiResponse<List<Solutions>> findList (Solutions solutions) { |
| | | Integer dateType = Constants.TWO; |
| | | if(!Objects.isNull(solutions)&&!Objects.isNull(solutions.getDataType())){ |
| | | dateType = solutions.getDataType(); |
| | | } |
| | | return ApiResponse.success(solutionsService.findListForCompany(dateType)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®åå²çæ¬æ¥è¯¢å½åææ°å¯ç¨çæ¬") |
| | | @GetMapping("/getNewVersion") |
| | | public ApiResponse<Solutions> getNewVersion (@RequestParam Integer solutionId) { |
| | | return ApiResponse.success(solutionsService.getNewVersion(solutionId)); |
| | | } |
| | | |
| | | |
| | | // @ApiOperation("å表æ¥è¯¢") |
| | | // @PostMapping("/page") |
| | | // public ApiResponse<List<Solutions>> findPage (@RequestBody Solutions solutions) { |
| | |
| | | return ApiResponse.success(systemMenuBiz.findTree(loginUserInfo.getId(),loginUserInfo.getType())); |
| | | } |
| | | |
| | | // @ApiOperation("æ¥è¯¢å表æ ") |
| | | // @PostMapping("/treeList") |
| | | // @RequiresPermissions("system:menu:query") |
| | | // public ApiResponse<List<SystemMenuListVO>> findTree () { |
| | | // LoginUserInfo loginUserInfo = this.getLoginUser(); |
| | | // return ApiResponse.success(systemMenuBiz.findTreeByType(loginUserInfo.getType())); |
| | | // } |
| | | |
| | | |
| | | @ApiOperation("æ¥è¯¢å表æ ") |
| | | @PostMapping("/treeList") |
| | | @PostMapping("/treeList/{type}") |
| | | @RequiresPermissions("system:menu:query") |
| | | public ApiResponse<List<SystemMenuListVO>> findTree () { |
| | | LoginUserInfo loginUserInfo = this.getLoginUser(); |
| | | return ApiResponse.success(systemMenuBiz.findTreeByType(loginUserInfo.getType())); |
| | | public ApiResponse<List<SystemMenuListVO>> treeList (@PathVariable Integer type) { |
| | | return ApiResponse.success(systemMenuBiz.findTreeByType(type)); |
| | | } |
| | | |
| | | @PreventRepeat |
| | |
| | | # env: production |
| | | server: |
| | | # port: 10022 |
| | | port: 10025 |
| | | port: 10031 |
| | | |
| | | spring: |
| | | # application:git |
| | |
| | | applyChagneDetailService.updateById(applyChagneDetail); |
| | | return ApiResponse.success(null); |
| | | } |
| | | // |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:applychagnedetail:query") |
| | | public ApiResponse<PageData<ApplyChagneDetail>> findPage (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap) { |
| | | return ApiResponse.success(applyChagneDetailService.findPageForCompany(pageWrap)); |
| | | } |
| | | // |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:applychagnedetail:query") |
| | | public ApiResponse<PageData<ApplyChagneDetail>> findPage (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap) { |
| | | return ApiResponse.success(applyChagneDetailService.findPageForCompany(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/list") |
| | |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:applydetail:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(ApplyDetail.class).exportWithFirstAndEnd(applyDetailService.findPageForCompany(pageWrap).getRecords(), pageWrap.getModel().getCompanyName()+"_"+pageWrap.getModel().getSolutionName()+".xlsx","å¨ä¿äººååå",null, response); |
| | | ExcelExporter.build(ApplyDetail.class).exportWithFirstAndEnd(applyDetailService.findPageForCompany(pageWrap).getRecords(), |
| | | pageWrap.getModel().getSolutionName(),"å¨ä¿äººååå",null, response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | |
| | | pageWrap.setQueryFlag(Constants.ONE);//æ¥è¯¢å
¨é¨ |
| | | return ApiResponse.success(companyService.findList(pageWrap)); |
| | | } |
| | | @ApiOperation("æ¥è¯¢å
¨é¨æ°æ®") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:company:query") |
| | | public ApiResponse<List<Company>> findList (@RequestBody Company pageWrap) { |
| | | pageWrap.setQueryFlag(Constants.ZERO);//æ¥è¯¢å
¨é¨æéèå´å
|
| | | return ApiResponse.success(companyService.findList(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | |
| | | return ApiResponse.success(memberInsuranceService.findPage(pageWrap)); |
| | | } |
| | | |
| | | // @ApiOperation("导åºExcel") |
| | | // @PostMapping("/exportExcel") |
| | | // @RequiresPermissions("business:memberinsurance:exportExcel") |
| | | // public void exportExcel (@RequestBody PageWrap<MemberInsurance> pageWrap, HttpServletResponse response) { |
| | | // ExcelExporter.build(MemberInsurance.class).export(memberInsuranceService.findPage(pageWrap).getRecords(), "åå·¥æä¿æç»è®°å½", response); |
| | | // } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:memberinsurance:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<MemberInsurance> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(MemberInsurance.class).export(memberInsuranceService.findPage(pageWrap).getRecords(), "åå·¥æä¿æç»è®°å½", response); |
| | | List<MemberInsurance> list = memberInsuranceService.findPage(pageWrap).getRecords(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | MemberInsurance memberInsurance = list.get(i); |
| | | memberInsurance.setSn(i+1); |
| | | } |
| | | ExcelExporter.build(MemberInsurance.class).exportWithFirstAndEnd(list, |
| | | "人åæä¿è¯¦å_å§åï¼"+pageWrap.getModel().getMemberName() +"_身份è¯å·ï¼"+pageWrap.getModel().getIdcardNo(), |
| | | "人åæä¿è¯¦å_å§åï¼"+pageWrap.getModel().getMemberName() +"_身份è¯å·ï¼"+pageWrap.getModel().getIdcardNo(),null, response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 宿¶æ´æ°çæç»ä¿æé |
| | | * @throws Exception |
| | | */ |
| | | @Scheduled(cron = "0 1 00 * * ?") |
| | | public void generateNotice(){ |
| | | log.info("==============宿¶æ´æ°çæç»ä¿æé=======start======"); |
| | | insuranceApplyService.generateNotice(); |
| | | log.info("==============宿¶æ´æ°çæç»ä¿æé======end======="); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | env: development |
| | | # env: production |
| | | server: |
| | | port: 10023 |
| | | port: 10030 |
| | | |
| | | spring: |
| | | # application: |
| | |
| | | |
| | | import cn.emay.sdk.core.dto.sms.response.SmsResponse; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.biz.system.SystemUserBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | |
| | | @Autowired |
| | | private SmsEmailMapper smsEmailMapper; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @Autowired |
| | | private CompanyService companyService; |
| | | @Value("${debug_model}") |
| | |
| | | // çæå¯ç ç |
| | | String salt = RandomStringUtils.randomAlphabetic(6); |
| | | // çæå¯ç |
| | | systemUser.setPassword(Utils.Secure.encryptPassword(systemUser.getPassword(), salt)); |
| | | // systemUser.setPassword(Utils.Secure.encryptPassword(systemUser.getPassword(), salt)); |
| | | systemUser.setPassword(Utils.Secure.encryptPassword(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.DEFAULT_PASSWORD).getCode(), salt)); |
| | | systemUser.setSalt(salt); |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | systemUser.setType(loginUserInfo.getType()); |
| | |
| | | COMPANY_EDIT(10, "ä¿åä¿®æ¹","æäº¤æè§ï¼${param1}\n${param2}",0), |
| | | PLATFORM_CHECK_PASS(11, "æä¿å®¡æ ¸éè¿","",0), |
| | | UPLOAD_AGAIN(26, "忬¡æä¿","",0), |
| | | PALTFORM_EDIT_BD(22, "ä¿®æ¹ä¿å","ä¿®æ¹åå ï¼${param}",0), |
| | | |
| | | |
| | | CA_PLATFORM_CHECK_PASS_NO(12, "éåæä¿","æäº¤æè§ï¼${param}",1), |
| | |
| | | CA_COMPANY_CLOSE(19, "å
³é订å","",1), |
| | | CA_PALTFORM_REFUSE_APPLY(20, "驳åéåç³è¯·","",1), |
| | | CA_PALTFORM_EDIT_PIDAN(21, "ä¿®æ¹æ¹å","ä¿®æ¹åå ï¼${param}",1), |
| | | PALTFORM_EDIT_BD(22, "ä¿®æ¹ä¿å","ä¿®æ¹åå ï¼${param}",1), |
| | | CA_JIAJIAN_APPLY_SIGN(23, "å åä¿ç³è¯·ä¼ä¸ç¾ç« ","",1), |
| | | CA_CHANGUNIT_APPLY_SIGN(24, "æ¢åç³è¯·ä¼ä¸ç¾ç« ","",1), |
| | | CA_UPLOAD_AGAIN(25, "忬¡æä¿","",1), |
| | |
| | | TWO(2, "å¾
åºå","å¾
审æ¹","å¾
审æ¹","","",""), |
| | | THREE(3, "ç³è¯·éå","ç³è¯·éå","ç³è¯·éå","","",""), |
| | | FOUR(4, "å·²éå","å·²éå","å·²éå","","",""), |
| | | FIVE(5, "ç³è¯·é©³å","ç³è¯·é©³å","ç³è¯·é©³å","","","") |
| | | FIVE(5, "ç³è¯·é©³å","ç³è¯·é©³å","ç³è¯·é©³å","","",""), |
| | | SIX(6, "","","","","","") |
| | | ; |
| | | |
| | | // æååé |
| | |
| | | private Date createTimeE; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å¾
å®¡æ ¸ 1å¹³å°éåä¿åï¼å·²éåï¼ 2å·²ä¸ä¼ 代ç¾ç³è¯·è¡¨å¾
ä¼ä¸ç¾ç« ï¼å¾
ç¾ç½²ï¼ 3å·²ç¾ç« å¾
ä¸ä¼ ä¿é©åï¼å¾
åºåï¼ 4ä¿ååºå
·å¤±è´¥éåï¼å·²éåï¼ 5å·²ä¸ä¼ ä¿åï¼ä¿éä¸ï¼6ä¼ä¸ç³è¯·éåä¸ 7å¹³å°åæéåï¼å·²éåï¼ 8ä¼ä¸å
³é ï¼å·²å
³éï¼", example = "1") |
| | | private Integer status; |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0ç´ä¿ 1å§ææä¿") |
| | | private Integer type; |
| | |
| | | |
| | | @ApiModelProperty(value = "å³å°å¤±æè®¢åï¼0=å¦ï¼1=æ¯") |
| | | private Integer loseEfficacy; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å¾
å®¡æ ¸ 1å¾
åºå 2ä¿éä¸ 3å·²è¿æ 4å·²æ¤å 5éåç³è¯·ä¸ 6å·²å
³é", example = "1") |
| | | private Integer statusCollect; |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | |
| | | @ApiModelProperty(value = "ä¿å主é®ä¸æ°æ®" , notes = "åä¿ç³è¯·/æ¢åç³è¯·") |
| | | private Integer insuranceApplyId; |
| | | |
| | | @ApiModelProperty(value = "æ¹åæ¥æ" , notes = "åä¿ç³è¯·/æ¢åç³è¯·") |
| | | private Date validTime ; |
| | | |
| | | @ApiModelProperty(value = "ä¼ä¸ä¸»é®") |
| | | private Integer companyId; |
| | | |
| | |
| | | @ApiModelProperty(value = "æ´¾é£åä½åç§°") |
| | | @TableField(exist = false) |
| | | private String oldDuName; |
| | | @ApiModelProperty(value = "æ¹æ¡åç§°") |
| | | @TableField(exist = false) |
| | | private String solutionsName; |
| | | @ApiModelProperty(value = "ä¿åå·") |
| | | @TableField(exist = false) |
| | | private String applyCode; |
| | | |
| | | @ApiModelProperty(value = "å·¥ç§åç§°") |
| | | @TableField(exist = false) |
| | |
| | | @ExcelColumn(name="æåºç ") |
| | | private Integer sortnum; |
| | | |
| | | @ApiModelProperty(value = "æ¹æ¡ç¼ç ï¼å
³èsolutionsï¼", example = "1") |
| | | @ExcelColumn(name="æ¹æ¡ç¼ç ï¼å
³èsolutionsï¼") |
| | | @ApiModelProperty(value = "æ¹æ¡ç¼ç ï¼å
³èsolutionsï¼ åºè¡¨æ°æ®", example = "1") |
| | | @ExcelColumn(name="æ¹æ¡ç¼ç ï¼å
³èsolutionsï¼åºè¡¨æ°æ®") |
| | | private Integer solutionBaseId; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å¯å ä¿ 0å¦ 1æ¯", example = "1") |
| | |
| | | private Integer solutionId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æ¹æ¡å¯¹è±¡", example = "1") |
| | | @TableField(exist = false) |
| | | private Solutions solution; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | |
| | | @TableField(exist = false) |
| | | private String statusInfo; |
| | | |
| | | @ApiModelProperty(value = "æå䏿¬¡å åä¿/æ¢åæ¥æ") |
| | | @TableField(exist = false) |
| | | private Date lastChangeDate; |
| | | |
| | | |
| | | public TaxesInvoicingVO toTaxesInvoicingVO(){ |
| | |
| | | private Integer sortnum; |
| | | |
| | | @ApiModelProperty(value = "å§å") |
| | | @ExcelColumn(name="åå·¥åç§°",index = 2) |
| | | @ExcelColumn(name="åå·¥åç§°",index = 2,width = 6) |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "æä¿ç³è¯·ç¼ç ï¼å
³èinsurance_apply", example = "1") |
| | | private Integer applyId; |
| | | |
| | | @ApiModelProperty(value = "å®é
ä¿é©çææ¢æ") |
| | | @ExcelColumn(name="ä¿é©çææ¢æ",index = 9) |
| | | @ExcelColumn(name="ä¿é©çææ¢æ",index = 9,width = 12,dateFormat="yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | |
| | | @ApiModelProperty(value = "å®é
ä¿é©çæèµ·æ") |
| | | @ExcelColumn(name="ä¿é©çæèµ·æ",index = 8) |
| | | @ExcelColumn(name="ä¿é©çæèµ·æ",index = 8,width = 12,dateFormat="yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | |
| | | @ApiModelProperty(value = "身份è¯å·ç ") |
| | | @ExcelColumn(name="身份è¯å·",index = 3) |
| | | @ExcelColumn(name="身份è¯å·",index = 3,width = 12) |
| | | private String idcardNo; |
| | | |
| | | @ApiModelProperty(value = "ä¼ä¸ç¼ç ï¼å
³ècompanyï¼", example = "1") |
| | |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty(value = "ä¿é©æ¹æ¡åç§°") |
| | | @ExcelColumn(name="ä¿é©æ¹æ¡",index = 5) |
| | | @ExcelColumn(name="ä¿é©æ¹æ¡",index = 5,width = 10) |
| | | @TableField(exist = false) |
| | | private String solutionName; |
| | | |
| | | @ApiModelProperty(value = "æ´¾é£åä½åç§°") |
| | | @ExcelColumn(name="æ´¾é£åä½",index = 6) |
| | | @ExcelColumn(name="æ´¾é£åä½",index = 6,width = 10) |
| | | @TableField(exist = false) |
| | | private String duName; |
| | | |
| | | @ApiModelProperty(value = "æå±å·¥ç§åç§°") |
| | | @ExcelColumn(name="æå±å·¥ç§",index = 7) |
| | | @ExcelColumn(name="æå±å·¥ç§",index = 7,width = 20) |
| | | @TableField(exist = false) |
| | | private String workTypeName; |
| | | |
| | |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "ä¿é©ç¶æ:1=ä¿éä¸;2=ä¸å¨ä¿") |
| | | @ExcelColumn(name="ä¿é©ç¶æ",index = 1,valueMapping = "1=ä¿éä¸;2=ä¸å¨ä¿;") |
| | | @ExcelColumn(name="ä¿é©ç¶æ",index = 1,valueMapping = "1=ä¿éä¸;2=ä¸å¨ä¿;",width = 6) |
| | | @TableField(exist = false) |
| | | private Integer solutionsStatus; |
| | | |
| | | @ApiModelProperty(value = "å¹´é¾") |
| | | @ExcelColumn(name="å¹´é¾",index = 4) |
| | | @ExcelColumn(name="å¹´é¾",index = 4,width = 4) |
| | | @TableField(exist = false) |
| | | private Long age; |
| | | |
| | | @ApiModelProperty(value = "åºå·", example = "1") |
| | | @ExcelColumn(name="åºå·",index = 0) |
| | | @ExcelColumn(name="åºå·",index = 0,width = 4) |
| | | @TableField(exist = false) |
| | | private Integer sn; |
| | | |
| | |
| | | this.creator = sysUserId; |
| | | this.isdeleted = Constants.ZERO; |
| | | this.applyId = applyChange.getApplyId(); |
| | | this.applyChangeId = applyChange.getId(); |
| | | this.memberId = applyChangeDetail.getMemberId(); |
| | | this.endTime = applyChangeDetail.getEndTime(); |
| | | this.startTime = applyChangeDetail.getStartTime(); |
| | |
| | | this.worktypeId = applyChangeDetail.getWorktypeId(); |
| | | this.fee = applyChangeDetail.getFee(); |
| | | this.sex = applyChangeDetail.getSex(); |
| | | this.bdCode = applyChange.getApplyCode(); |
| | | this.pdCode = applyChange.getCode(); |
| | | this.solutionName = applyChange.getSolutionsName(); |
| | | this.bdCode = applyChangeDetail.getApplyCode(); |
| | | this.pdCode = applyChange.getValidCode(); |
| | | this.solutionName = applyChangeDetail.getSolutionsName(); |
| | | this.worktypeName = applyChangeDetail.getWorkTypeName(); |
| | | this.duName = applyChangeDetail.getDuName(); |
| | | // this.relationType = Constants.ONE; |
| | |
| | | private Integer memberId; |
| | | |
| | | @ApiModelProperty(value = "å®é
ä¿é©çææ¢æ") |
| | | @ExcelColumn(name="ä¿é©çææ¢æ",index = 7) |
| | | @ExcelColumn(name="ä¿é©çææ¢æ",index = 7,width = 12,dateFormat="yyyy-MM-dd HH:mm:ss") |
| | | private Date endTime; |
| | | |
| | | @ApiModelProperty(value = "å®é
ä¿é©çæèµ·æ") |
| | | @ExcelColumn(name="ä¿é©çæèµ·æ",index = 6) |
| | | @ExcelColumn(name="ä¿é©çæèµ·æ",index = 6,width = 12,dateFormat="yyyy-MM-dd HH:mm:ss") |
| | | private Date startTime; |
| | | |
| | | @ApiModelProperty(value = "身份è¯å·ç ") |
| | |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty(value = "ä¿åå·") |
| | | @ExcelColumn(name="ä¿åå·",index = 2) |
| | | @ExcelColumn(name="ä¿åå·",index = 2,width = 5) |
| | | private String bdCode; |
| | | |
| | | @ApiModelProperty(value = "æ¹åå·") |
| | | @ExcelColumn(name="æ¹åå·",index = 3) |
| | | @ExcelColumn(name="æ¹åå·",index = 3,width = 5) |
| | | private String pdCode; |
| | | |
| | | @ApiModelProperty(value = "ä¿é©æ¹æ¡åç§°") |
| | | @ExcelColumn(name="ä¿é©æ¹æ¡",index = 1) |
| | | @ExcelColumn(name="ä¿é©æ¹æ¡",index = 1,width = 6) |
| | | private String solutionName; |
| | | |
| | | @ApiModelProperty(value = "æ¹åç³è¯·ç¼ç ", example = "1") |
| | | private Integer applyChangeId; |
| | | |
| | | @ApiModelProperty(value = "å·¥ç§åç§°") |
| | | @ExcelColumn(name="å·¥ç§åç§°",index = 5) |
| | | @ExcelColumn(name="å·¥ç§åç§°",index = 5,width = 6) |
| | | private String worktypeName; |
| | | |
| | | @ApiModelProperty(value = "æ´¾é£åä½åç§°") |
| | | @ExcelColumn(name="æ´¾é£åä½",index = 4) |
| | | @ExcelColumn(name="æ´¾é£åä½",index = 4,width = 6) |
| | | private String duName; |
| | | |
| | | |
| | | @ApiModelProperty(value = "åºå·", example = "1") |
| | | @ExcelColumn(name="åºå·",index = 0) |
| | | @ExcelColumn(name="åºå·",index = 0,width = 3) |
| | | @TableField(exist = false) |
| | | private Integer sn; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "å
³èæç»ä¸»é®", example = "1") |
| | |
| | | @TableField(exist = false) |
| | | private String memberName; |
| | | |
| | | |
| | | @ApiModelProperty(value = "çéç¶æï¼0=æªå¼å§ï¼1=å·²å¼å§ï¼å
æ¬å·²è¿æï¼", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer status; |
| | | |
| | | |
| | | // @ApiModelProperty(value = "å
³èæç»ç±»åï¼0=æä¿ç³è¯·ï¼1=å åä¿/æ¢å", example = "1") |
| | | // @ExcelColumn(name="å
³èæç»ç±»åï¼0=æä¿ç³è¯·ï¼1=å åä¿/æ¢å") |
| | | // private Integer relationType; |
| | |
| | | @TableField(exist = false) |
| | | private Date baoxianEndTime; |
| | | |
| | | @ApiModelProperty(value = "èµæå®ææ¶é´") |
| | | @TableField(exist = false) |
| | | private Date finishDate; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æ¹æ¡åºè¡¨ç¼ç ï¼å
³èsolutionsï¼", example = "1") |
| | | @TableField(exist = false) |
| | |
| | | @ExcelColumn(name="ç¾ç« å
³é®åï¼å¤ä¸ªç¨è±æéå·éå¼") |
| | | private String signKeyword; |
| | | |
| | | @ApiModelProperty(value = "æå±æ¹æ¡åºè¡¨ç¼ç (solution_base_id)", example = "1") |
| | | @ExcelColumn(name="æå±æ¹æ¡åºè¡¨ç¼ç (solution_base_id)") |
| | | private Integer solutionBaseId; |
| | | |
| | | @ApiModelProperty(value = "çæ¬å·") |
| | | @ExcelColumn(name="çæ¬å·") |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/2/21 14:13 |
| | | */ |
| | | @Data |
| | | public class ApplyNoticeVO { |
| | | |
| | | @ApiModelProperty(value = "å¾
ç¾ç½²æ°é") |
| | | private Integer waitSignNum; |
| | | |
| | | @ApiModelProperty(value = "ç»ä¿æ°é") |
| | | private Integer renewalNum; |
| | | |
| | | } |
| | |
| | | void dealWaitSignedData(); |
| | | |
| | | CountCyclePriceVO getCountCyclePriceVO(CountCyclePriceDTO countCyclePriceDTO); |
| | | |
| | | void generateNotice(); |
| | | } |
| | |
| | | * @return List<MemberInsurance> |
| | | */ |
| | | List<MemberInsurance> findList(MemberInsurance memberInsurance); |
| | | |
| | | |
| | | List<MemberInsurance> getList(MemberInsurance memberInsurance); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Notices; |
| | | import com.doumee.dao.business.vo.ApplyNoticeVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return long |
| | | */ |
| | | long count(Notices notices); |
| | | |
| | | ApplyNoticeVO getApplyNotice(Integer companyId); |
| | | |
| | | void closeApplyNotice(Integer companyId,Integer type); |
| | | |
| | | |
| | | } |
| | |
| | | PageData<Solutions> findPageCom(PageWrap<Solutions> pageWrap); |
| | | |
| | | |
| | | List<Solutions> findListForCompany(); |
| | | List<Solutions> findListForCompany(Integer dataType); |
| | | |
| | | Solutions getNewVersion(Integer solutionId); |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | |
| | | public List<ApplyChagneDetail> findList(ApplyChagneDetail applyDetailPageDTO) { |
| | | MPJLambdaWrapper<ApplyChagneDetail> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(applyDetailPageDTO ); |
| | | queryWrapper.selectAll(ApplyChagneDetail.class); |
| | | queryWrapper.select("t2.name",ApplyChagneDetail::getWorkTypeName); |
| | | queryWrapper.select("t3.name",ApplyChagneDetail::getDuName); |
| | | queryWrapper.select("t4.name",ApplyChagneDetail::getOldWorkTypeName); |
| | |
| | | private MemberInsuranceJoinMapper memberInsuranceJoinMapper; |
| | | |
| | | @Autowired |
| | | private ApplyChangeDetailJoinMapper applyChangeDetailJoinMapper; |
| | | |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | |
| | | @Autowired |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼è¯¥ç³è¯·ç¶æå·²æµè½¬ï¼å½å䏿¯æè¯¥æä½~"); |
| | | } |
| | | |
| | | InsuranceApply insuranceApply = insuranceApplyMapper.selectById(model.getApplyId()); |
| | | if(Objects.isNull(insuranceApply)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°ä¿åä¿¡æ¯"); |
| | | } |
| | | |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | ApplyChange update = new ApplyChange(); |
| | | update.setEditDate(new Date()); |
| | |
| | | update.setCheckUserId(user.getId()); |
| | | update.setId(model.getId()); |
| | | update.setValidCode(param.getValidCode()); |
| | | update.setApplyStartTime(model.getApplyStartTime()); |
| | | applyChangeMapper.updateById(update); |
| | | update.setApplyStartTime(param.getApplyStartTime()); |
| | | update.setCode(model.getCode()); |
| | | |
| | | param.getPidanFile().setIsdeleted(Constants.ZERO); |
| | | param.getPidanFile().setCreator(user.getId()); |
| | |
| | | multifileMapper.insert(param.getPidanFile()); |
| | | |
| | | update.setApplyId(model.getApplyId()); |
| | | |
| | | |
| | | if(Constants.equalsInteger(model.getType(),Constants.ZERO)){ |
| | | //妿æ¯å åä¿ç³è¯· å¤çå åä¿æç»æ°æ® |
| | | dealDetailsValidTime(update); |
| | |
| | | //å¦ææ¯æ¢åç³è¯· å¤çæç»æ°æ® |
| | | dealDetailsDUdata(update); |
| | | } |
| | | |
| | | applyChangeMapper.updateById(update); |
| | | |
| | | // if(1==1){ |
| | | // throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | |
| | | .selectAll(ApplyChagneDetail.class) |
| | | .selectAs(Solutions::getTimeUnit,ApplyChagneDetail::getSolutionTimeUnit) |
| | | .selectAs(Solutions::getPrice,ApplyChagneDetail::getSolutionPrice) |
| | | .selectAs(Solutions::getName,ApplyChagneDetail::getSolutionsName) |
| | | .selectAs(Worktype::getName,ApplyChagneDetail::getWorkTypeName) |
| | | .selectAs(DispatchUnit::getName,ApplyChagneDetail::getDuName) |
| | | .leftJoin(ApplyChange.class, ApplyChange::getId, ApplyChagneDetail::getApplyChangeId) |
| | | .leftJoin(InsuranceApply.class, InsuranceApply::getId, ApplyChange::getApplyId) |
| | | .leftJoin(Solutions.class, Solutions::getId, InsuranceApply::getSolutionId) |
| | | .leftJoin(Solutions.class, Solutions::getId, ApplyChange::getSolutionsId) |
| | | .selectAs(Member::getIdcardNo,ApplyChagneDetail::getIdcardNo) |
| | | .selectAs(Member::getName, ApplyChagneDetail::getMemberName) |
| | | .selectAs(InsuranceApply::getCode,ApplyChagneDetail::getApplyCode) |
| | | .leftJoin(Member.class, Member::getId, ApplyChagneDetail::getMemberId) |
| | | .leftJoin(ApplyChange.class, ApplyChange::getId, ApplyChagneDetail::getApplyChangeId) |
| | | .leftJoin(InsuranceApply.class, InsuranceApply::getId, ApplyChange::getApplyId) |
| | | .leftJoin(Solutions.class, Solutions::getId, InsuranceApply::getSolutionId) |
| | | .leftJoin(Worktype.class,Worktype::getId,ApplyChagneDetail::getWorktypeId) |
| | | .leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyChagneDetail::getDuId) |
| | | .eq(ApplyChagneDetail::getApplyChangeId,update.getId()) |
| | | .eq(ApplyChagneDetail::getIsdeleted,Constants.ZERO) ); |
| | | |
| | | if(detailList ==null || detailList.size()==0){ |
| | | return; |
| | | } |
| | | //å®é
æ¹åçææ¥æ |
| | | Date applyStartTime = DateUtil.getMontageDate(update.getApplyStartTime(),1); |
| | | for(ApplyChagneDetail detail : detailList){ |
| | | //æ¥è¯¢åä¿äººåæ¯å¦åå¨ å²çªç ä¿åæç»æ°æ® |
| | | if(applyDetailJoinMapper.selectCount(new QueryWrapper<ApplyDetail>() |
| | | .lambda() |
| | | .eq(ApplyDetail::getApplyId,update.getApplyId()) |
| | | .eq(ApplyDetail::getIdcardNo,detail.getIdcardNo()) |
| | | .le(ApplyDetail::getStartTime,applyStartTime) |
| | | .ge(ApplyDetail::getEndTime,applyStartTime) |
| | | )<=Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "å½åä¿åä¸ï¼æ¢å人åã" + detail.getMemberName() + "ãæªæ¥è¯¢å°ç¬¦åæ¹åæ¥æçæ°æ®"); |
| | | } |
| | | |
| | | //æ¥è¯¢åå·¥æ¯å¨ä¸»åä¸ æ¯å¦åå¨çæä¸çæ°æ® |
| | | ApplyDetail oldModel = applyDetailJoinMapper.selectOne(new QueryWrapper<ApplyDetail>().lambda() |
| | | .eq(ApplyDetail::getApplyId, update.getApplyId()) |
| | | .eq(ApplyDetail::getMemberId, detail.getMemberId()) |
| | | .le(ApplyDetail::getStartTime,applyStartTime) |
| | | .ge(ApplyDetail::getEndTime,applyStartTime) |
| | | .orderByDesc(ApplyDetail::getCreateDate) |
| | | .last("limit 1")); |
| | | if(oldModel == null ){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼ç¨æ·ã"+detail.getMemberName()+"ãåä¿åä¿¡æ¯æè¯¯ï¼å½åç³è¯·ä¸æ¯æåä¿å¤çï¼"); |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼ç¨æ·ã"+detail.getMemberName()+"ãåä¿åä¿¡æ¯æè¯¯ï¼æ¹åæ¥ææªå¨ä¿åæ¥æå
ï¼"); |
| | | } |
| | | Date endDate = oldModel.getEndTime(); |
| | | //å½åæ¥æå¤§äºæ¹åæ¥æ éè¦åæ»æ°æ®å®é
æ°æ® |
| | | Boolean flag = DateUtil.getMontageDate(new Date(),2).compareTo(DateUtil.getMontageDate(update.getStartTime(),2))>0; |
| | | //æ¢åååå²è®°å½çè´¹ç¨ fee |
| | | Integer days = DateUtil.daysBetweenDates(DateUtil.getMontageDate(update.getStartTime(),2),DateUtil.getMontageDate(oldModel.getStartTime(),1)) + 1; |
| | | BigDecimal oldFee = this.getApplyPrice(update.getApplyId(),days); |
| | | BigDecimal fee = oldModel.getFee(); |
| | | BigDecimal oldCurrentFee = oldModel.getCurrentFee(); |
| | | applyDetailJoinMapper.update(null, new UpdateWrapper<ApplyDetail>().lambda() |
| | | .set(ApplyDetail::getEditor,update.getEditor()) |
| | | .set(ApplyDetail::getEditDate,update.getEditDate()) |
| | | .set(ApplyDetail::getEndTime,DateUtil.getMontageDate(update.getStartTime(),2)) |
| | | .set(ApplyDetail::getFee,oldFee) |
| | | .set(flag,ApplyDetail::getCurrentFee,oldFee) |
| | | .eq(ApplyDetail::getId,oldModel.getApplyId()) |
| | | ); |
| | | |
| | | //ä¿®æ¹ åå·¥æä¿æç»è®°å½ å岿°æ® |
| | | memberInsuranceJoinMapper.update(null,new UpdateWrapper<MemberInsurance>().lambda() |
| | | .set(MemberInsurance::getEndTime,update.getApplyStartTime()) |
| | | .set(MemberInsurance::getFee,oldFee) |
| | | .eq(MemberInsurance::getRelationId,oldModel.getId()) |
| | | ); |
| | | //妿å®é
æ¹åæ¥æ å åè®°å½æ¥æç¸ç åç´æ¥ä¿®æ¹è®°å½æ´¾é£åä½ä¸å·¥ç§ä¿¡æ¯ |
| | | if(applyStartTime.compareTo(oldModel.getStartTime())!=Constants.ZERO){ |
| | | //å½åæ¥æå¤§äºæ¹åæ¥æ éè¦åæ»æ°æ®å®é
æ°æ® |
| | | Boolean flag = DateUtil.getMontageDate(new Date(),2).compareTo(DateUtil.getMontageDate(update.getApplyStartTime(),2))>0; |
| | | //æ¢åååå²è®°å½çè´¹ç¨ fee |
| | | Integer days = DateUtil.daysBetweenDates(DateUtil.getMontageDate(update.getApplyStartTime(),3),DateUtil.getMontageDate(oldModel.getStartTime(),1))+1; |
| | | BigDecimal oldFee = this.getApplyPrice(update.getApplyId(),days); |
| | | BigDecimal fee = oldModel.getFee(); |
| | | BigDecimal oldCurrentFee = oldModel.getCurrentFee(); |
| | | |
| | | ApplyDetail applyDetail = new ApplyDetail(); |
| | | applyDetail.setApplyId(oldModel.getApplyId()); |
| | | applyDetail.setCreateDate(new Date()); |
| | | applyDetail.setCreator(update.getEditor()); |
| | | applyDetail.setMemberId(oldModel.getMemberId()); |
| | | applyDetail.setStartTime(DateUtil.getMontageDate(update.getApplyStartTime(),1)); |
| | | applyDetail.setEndTime(endDate); |
| | | applyDetail.setDuId(detail.getDuId()); |
| | | applyDetail.setWorktypeId(detail.getWorktypeId()); |
| | | applyDetail.setIdcardNo(oldModel.getIdcardNo()); |
| | | applyDetail.setFee(fee.subtract(oldFee)); |
| | | if(flag){ |
| | | applyDetail.setCurrentFee(oldCurrentFee.multiply(oldFee)); |
| | | applyDetailJoinMapper.update(null, new UpdateWrapper<ApplyDetail>().lambda() |
| | | .set(ApplyDetail::getEditor,update.getEditor()) |
| | | .set(ApplyDetail::getEditDate,update.getEditDate()) |
| | | .set(ApplyDetail::getEndTime,DateUtil.getMontageDate(update.getApplyStartTime(),3)) |
| | | .set(ApplyDetail::getFee,oldFee) |
| | | .set(flag,ApplyDetail::getCurrentFee,oldFee) |
| | | .eq(ApplyDetail::getId,oldModel.getId()) |
| | | ); |
| | | |
| | | //ä¿®æ¹ åå·¥æä¿æç»è®°å½ å岿°æ® |
| | | memberInsuranceJoinMapper.update(null,new UpdateWrapper<MemberInsurance>().lambda() |
| | | .set(MemberInsurance::getEndTime,update.getApplyStartTime()) |
| | | .set(MemberInsurance::getFee,oldFee) |
| | | .eq(MemberInsurance::getRelationId,oldModel.getId()) |
| | | ); |
| | | |
| | | ApplyDetail applyDetail = new ApplyDetail(); |
| | | applyDetail.setApplyId(oldModel.getApplyId()); |
| | | applyDetail.setCreateDate(new Date()); |
| | | applyDetail.setCreator(update.getEditor()); |
| | | applyDetail.setMemberId(oldModel.getMemberId()); |
| | | applyDetail.setIdcardNo(detail.getIdcardNo()); |
| | | applyDetail.setSex(Constants.getSexByIdCard(detail.getIdcardNo())); |
| | | applyDetail.setMemberName(detail.getMemberName()); |
| | | applyDetail.setStartTime(DateUtil.getMontageDate(update.getApplyStartTime(),1)); |
| | | applyDetail.setEndTime(endDate); |
| | | applyDetail.setDuId(detail.getDuId()); |
| | | applyDetail.setWorktypeId(detail.getWorktypeId()); |
| | | applyDetail.setIdcardNo(oldModel.getIdcardNo()); |
| | | applyDetail.setFee(fee.subtract(oldFee)); |
| | | applyDetail.setIsdeleted(Constants.ZERO); |
| | | if(flag){ |
| | | applyDetail.setCurrentFee(oldCurrentFee.multiply(oldFee)); |
| | | }else{ |
| | | applyDetail.setCurrentFee(BigDecimal.ZERO); |
| | | } |
| | | applyDetail.setSex(oldModel.getSex()); |
| | | applyDetail.setMemberName(oldModel.getMemberName()); |
| | | applyDetail.setFromId(detail.getId()); |
| | | applyDetailJoinMapper.insert(applyDetail); |
| | | |
| | | MemberInsurance memberInsurance = new MemberInsurance(applyDetail,update.getId()); |
| | | memberInsuranceJoinMapper.insert(memberInsurance); |
| | | }else{ |
| | | applyDetail.setCurrentFee(BigDecimal.ZERO); |
| | | } |
| | | applyDetail.setSex(oldModel.getSex()); |
| | | applyDetail.setMemberName(oldModel.getMemberName()); |
| | | applyDetail.setFromId(detail.getId()); |
| | | applyDetailJoinMapper.insert(applyDetail); |
| | | |
| | | MemberInsurance memberInsurance = new MemberInsurance(applyDetail,update.getId()); |
| | | memberInsuranceJoinMapper.insert(memberInsurance); |
| | | applyDetailJoinMapper.update(null, new UpdateWrapper<ApplyDetail>().lambda() |
| | | .set(ApplyDetail::getEditor,update.getEditor()) |
| | | .set(ApplyDetail::getEditDate,update.getEditDate()) |
| | | .set(ApplyDetail::getDuId,detail.getDuId()) |
| | | .set(ApplyDetail::getWorktypeId,detail.getWorktypeId()) |
| | | .eq(ApplyDetail::getId,oldModel.getId()) |
| | | ); |
| | | |
| | | //åå·¥æä¿æç»è®°å½ å岿°æ® |
| | | memberInsuranceJoinMapper.update(null,new UpdateWrapper<MemberInsurance>().lambda() |
| | | .set(MemberInsurance::getDuId,detail.getDuId()) |
| | | .set(MemberInsurance::getDuName,detail.getDuName()) |
| | | .set(MemberInsurance::getWorktypeId,detail.getWorktypeId()) |
| | | .set(MemberInsurance::getWorktypeName,detail.getWorkTypeName()) |
| | | .eq(MemberInsurance::getRelationId,oldModel.getId()) |
| | | ); |
| | | } |
| | | |
| | | Member member = memberMapper.selectById(detail.getMemberId()); |
| | | if(Objects.isNull(member)){ |
| | |
| | | member.setStartTime(detail.getStartTime()); |
| | | member.setEndTime(detail.getEndTime()); |
| | | memberMapper.updateById(member); |
| | | |
| | | applyChangeDetailJoinMapper.update(null,new UpdateWrapper<ApplyChagneDetail>().lambda() |
| | | .set(ApplyChagneDetail::getStartTime,DateUtil.getMontageDate(update.getApplyStartTime(), 1)) |
| | | .eq(ApplyChagneDetail::getId,detail.getId()) |
| | | ); |
| | | } |
| | | } |
| | | /** |
| | |
| | | List<ApplyChagneDetail> detailList = applyChagneDetailJoinMapper.selectJoinList(ApplyChagneDetail.class, |
| | | new MPJLambdaWrapper<ApplyChagneDetail>() |
| | | .selectAll(ApplyChagneDetail.class) |
| | | .selectAs(Member::getIdcardNo,ApplyChagneDetail::getIdcardNo) |
| | | .selectAs(Solutions::getTimeUnit, ApplyChagneDetail::getSolutionTimeUnit) |
| | | .selectAs(Solutions::getPrice, ApplyChagneDetail::getSolutionPrice) |
| | | .selectAs(Worktype::getName, ApplyChagneDetail::getWorkTypeName) |
| | | .selectAs(DispatchUnit::getName, ApplyChagneDetail::getDuName) |
| | | .selectAs(Member::getName, ApplyChagneDetail::getMemberName) |
| | | .selectAs(Solutions::getName,ApplyChagneDetail::getSolutionsName) |
| | | .selectAs(InsuranceApply::getCode,ApplyChagneDetail::getApplyCode) |
| | | .leftJoin(ApplyChange.class, ApplyChange::getId, ApplyChagneDetail::getApplyChangeId) |
| | | .leftJoin(Member.class, Member::getId, ApplyChagneDetail::getMemberId) |
| | | .leftJoin(InsuranceApply.class, InsuranceApply::getId, ApplyChange::getApplyId) |
| | | .leftJoin(Solutions.class, Solutions::getId, InsuranceApply::getSolutionId) |
| | | .leftJoin(Worktype.class, Worktype::getId, ApplyChagneDetail::getWorktypeId) |
| | |
| | | //æä¿è®°å½ å ä¿æ°æ®å å
¥æ°æ°æ® åä¿æ°æ® ä¿®æ¹èæ°æ® |
| | | List<MemberInsurance> memberInsuranceList = new ArrayList<>(); |
| | | |
| | | |
| | | //å ä¿ä¸å¡ 使ç¨çå ä¿éé¢ |
| | | ApplyChangeCyclePriceDTO applyChangeCyclePriceDTO_add = new ApplyChangeCyclePriceDTO(); |
| | | applyChangeCyclePriceDTO_add.setApplyId(update.getApplyId()); |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°åå·¥æ°æ®"); |
| | | } |
| | | if (Constants.equalsInteger(detail.getType(), Constants.ZERO)) { |
| | | |
| | | //æ¥è¯¢å ä¿äººåæ¯å¦åå¨ å²çªç ä¿åæç»æ°æ® |
| | | if(applyDetailJoinMapper.selectCount(new QueryWrapper<ApplyDetail>() |
| | | .lambda() |
| | | .eq(ApplyDetail::getApplyId,update.getApplyId()) |
| | | .eq(ApplyDetail::getIdcardNo,detail.getIdcardNo()) |
| | | .le(ApplyDetail::getStartTime,DateUtil.getMontageDate(update.getApplyStartTime(),1)) |
| | | .ge(ApplyDetail::getEndTime,DateUtil.getMontageDate(update.getApplyStartTime(),3)) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "å½åä¿åä¸ï¼å ä¿äººåã" + detail.getMemberName() + "ãå卿¥æå²çªçæ°æ®"); |
| | | } |
| | | |
| | | |
| | | //å ä¿ |
| | | ApplyDetail add = new ApplyDetail(); |
| | | add.setApplyId(update.getApplyId()); |
| | |
| | | add.setMemberId(detail.getMemberId()); |
| | | add.setMemberName(detail.getMemberName()); |
| | | add.setWorktypeId(detail.getWorktypeId()); |
| | | add.setIsdeleted(Constants.ZERO); |
| | | add.setIdcardNo(detail.getIdcardNo()); |
| | | add.setSex(Constants.getSexByIdCard(detail.getIdcardNo())); |
| | | add.setMemberName(detail.getMemberName()); |
| | | add.setDuId(detail.getDuId()); |
| | | add.setStartTime(update.getApplyStartTime()); |
| | | add.setEndTime(detail.getEndTime()); |
| | | add.setStartTime(DateUtil.getMontageDate(update.getApplyStartTime(), 1)); |
| | | add.setEndTime(DateUtil.getMontageDate(detail.getEndTime(), 2)); |
| | | add.setFee(countCyclePriceVO_add.getCyclePrice()); |
| | | |
| | | if (DateUtil.daysBetweenDates(DateUtil.getMontageDate(detail.getStartTime(), 2), new Date()) >= 0) { |
| | | |
| | | if(new Date().compareTo(DateUtil.getMontageDate(detail.getStartTime(), 2))>=0){ |
| | | Integer days = DateUtil.daysBetweenDates(DateUtil.getMontageDate(new Date(), 2), detail.getStartTime()) + 1; |
| | | //å¦æå·²äº§çè´¹ç¨ï¼è®¡ç®å·²äº§çè´¹ç¨ |
| | | add.setCurrentFee(this.getApplyPrice(update.getApplyId(), days)); |
| | |
| | | |
| | | MemberInsurance memberInsurance = new MemberInsurance(detail, update, update.getEditor(), add.getId()); |
| | | memberInsuranceList.add(memberInsurance); |
| | | |
| | | applyChangeDetailJoinMapper.update(null,new UpdateWrapper<ApplyChagneDetail>().lambda() |
| | | .set(ApplyChagneDetail::getFee,add.getFee()) |
| | | .set(ApplyChagneDetail::getStartTime,DateUtil.getMontageDate(update.getApplyStartTime(), 1)) |
| | | .eq(ApplyChagneDetail::getId,detail.getId()) |
| | | ); |
| | | |
| | | } else { |
| | | //åä¿æä½ |
| | | //æ¥è¯¢åå·¥æ¯å¨ä¸»åä¸ æ¯å¦åå¨çæä¸çæ°æ® |
| | |
| | | .set(MemberInsurance::getEndTime, update.getApplyStartTime()) |
| | | .eq(MemberInsurance::getRelationId, oldModel.getId()) |
| | | ); |
| | | |
| | | //ä¿®æ¹ä¸å¡æç»è¡æ°æ®å®é
æ¹åæ¥æ |
| | | applyChangeDetailJoinMapper.update(null,new UpdateWrapper<ApplyChagneDetail>().lambda() |
| | | .set(ApplyChagneDetail::getFee,updateFee) |
| | | .set(ApplyChagneDetail::getEndTime,DateUtil.getMontageDate(update.getApplyStartTime(), 3)) |
| | | .eq(ApplyChagneDetail::getId,detail.getId()) |
| | | ); |
| | | |
| | | } |
| | | |
| | | member.setApplyId(update.getApplyId()); |
| | |
| | | .set(InsuranceApply::getEditDate, update.getEditDate()) |
| | | .eq(InsuranceApply::getId, update.getApplyId()) |
| | | ); |
| | | |
| | | update.setFee(totalFee); |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | CompanySolution companySolution = companySolutionMapper.selectOne(new QueryWrapper<CompanySolution>().lambda() |
| | | .eq(CompanySolution::getCompanyId,loginUserInfo.getCompanyId()) |
| | | .eq(CompanySolution::getSolutionBaseId,solutions.getId()) |
| | | .eq(CompanySolution::getSolutionId,solutions.getId()) |
| | | .eq(CompanySolution::getIsdeleted,Constants.ZERO) |
| | | .last(" limit 1 ") |
| | | ); |
| | |
| | | && DateUtil.compareDate( applyChange.getValidTime(),insuranceApply.getEndTime()) >= Constants.ZERO)) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "ç³è¯·æ¥ææªå¤äºä¿åæ¥æå
ï¼æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | //æ¥è¯¢ä¿å䏿¯å¦åå¨è¿è¡ä¸çå åä¿/æ¢ååæ® |
| | | if(applyChangeMapper.selectCount(new QueryWrapper<ApplyChange>().lambda() |
| | | .eq(ApplyChange::getApplyId,insuranceApply.getId()) |
| | | .notIn(ApplyChange::getStatus,Constants.ApplyChangeStatus.APPROVE.getKey(),Constants.ApplyChangeStatus.CLOSE.getKey()) |
| | | |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "åå¨è¿è¡ä¸çå åä¿/æ¢åç³è¯·"); |
| | | }; |
| | | |
| | | |
| | | applyChange.setCreateDate(new Date()); |
| | | applyChange.setCreator(loginUserInfo.getId()); |
| | | applyChange.setEditor(loginUserInfo.getId()); |
| | |
| | | applyChangeFee.setId(applyChange.getId()); |
| | | applyChangeFee.setFee(fee); |
| | | applyChangeMapper.updateById(applyChangeFee); |
| | | |
| | | // if(1==1){ |
| | | // throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | // } |
| | | |
| | | |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_COMPANY_COMMIT; |
| | | String info =applyLogType.getInfo(); |
| | |
| | | && DateUtil.compareDate( applyChange.getValidTime(),insuranceApply.getEndTime()) >= Constants.ZERO)) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "ç³è¯·æ¥ææªå¤äºä¿åæ¥æå
ï¼æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | |
| | | //æ¥è¯¢ä¿å䏿¯å¦åå¨è¿è¡ä¸çå åä¿/æ¢ååæ® |
| | | if(applyChangeMapper.selectCount(new QueryWrapper<ApplyChange>().lambda() |
| | | .eq(ApplyChange::getApplyId,insuranceApply.getId()) |
| | | .ne(ApplyChange::getId,applyChange.getId()) |
| | | .notIn(ApplyChange::getStatus,Constants.ApplyChangeStatus.APPROVE.getKey(),Constants.ApplyChangeStatus.CLOSE.getKey()) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "åå¨è¿è¡ä¸çå åä¿/æ¢åç³è¯·"); |
| | | }; |
| | | applyChange.setEditDate(new Date()); |
| | | applyChange.setEditor(loginUserInfo.getId()); |
| | | applyChange.setApplyStartTime(applyChange.getValidTime()); |
| | |
| | | BigDecimal fee = this.dealApplyChangeData(applyChange,insuranceApply,companySolution,solutions,loginUserInfo,BigDecimal.ZERO); |
| | | applyChange.setFee(fee); |
| | | applyChangeMapper.updateById(applyChange); |
| | | |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_UPLOAD_AGAIN; |
| | | String info =applyLogType.getInfo(); |
| | |
| | | if (Objects.isNull(applyChagneDetail.getMemberId())) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "åä¿äººåã" + applyChagneDetail.getMemberName() + "ãå¿
填项缺失"); |
| | | } |
| | | |
| | | //æ¥è¯¢åä¿äººåæ¯å¦åå¨ å²çªç ä¿åæç»æ°æ® |
| | | if(applyDetailJoinMapper.selectCount(new QueryWrapper<ApplyDetail>() |
| | | .lambda() |
| | | .eq(ApplyDetail::getApplyId,applyChange.getApplyId()) |
| | | .eq(ApplyDetail::getIdcardNo,applyChagneDetail.getIdcardNo()) |
| | | .le(ApplyDetail::getStartTime,DateUtil.getMontageDate(applyChange.getApplyStartTime(),1)) |
| | | .ge(ApplyDetail::getEndTime,DateUtil.getMontageDate(applyChange.getApplyStartTime(),3)) |
| | | )<=Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "å½åä¿åä¸ï¼åä¿äººåã" + applyChagneDetail.getMemberName() + "ãæªæ¥è¯¢å°ç¬¦åæ¹åæ¥æçæ°æ®"); |
| | | } |
| | | |
| | | Member member = memberMapper.selectById(applyChagneDetail.getMemberId()); |
| | | if (Objects.isNull(member)) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "åä¿äººåã" + applyChagneDetail.getMemberName() + "ãæªæ¥è¯¢å°ç³»ç»äººåä¿¡æ¯"); |
| | |
| | | List<ApplyDetail> applyDetailList = applyDetailJoinMapper.selectList(new QueryWrapper<ApplyDetail>().lambda() |
| | | .eq(ApplyDetail::getApplyId, applyChange.getApplyId()) |
| | | .eq(ApplyDetail::getMemberId, applyChagneDetail.getMemberId()) |
| | | .le(ApplyDetail::getStartTime,DateUtil.getMontageDate(applyChange.getApplyStartTime(),1)) |
| | | .ge(ApplyDetail::getEndTime,DateUtil.getMontageDate(applyChange.getApplyStartTime(),3)) |
| | | .orderByDesc(ApplyDetail::getCreateDate)); |
| | | if (applyDetailList.size() > Constants.ONE) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "åä¿äººåã" + applyChagneDetail.getMemberName() + "ãä¿åä¿¡æ¯å¼å¸¸ï¼åå¨å¤æ¡æ°æ®"); |
| | |
| | | * @param duSolutionList |
| | | * @param loginUserInfo |
| | | */ |
| | | public void addChangeDetail(ApplyChange applyChange ,List<ApplyChagneDetail> addDetailList,List<DuWorktype> duWorktypeList,List<DuSolution> duSolutionList,InsuranceApply insuranceApply,Solutions solutions,LoginUserInfo loginUserInfo,BigDecimal detailFee){ |
| | | public void addChangeDetail(ApplyChange applyChange ,List<ApplyChagneDetail> addDetailList, |
| | | List<DuWorktype> duWorktypeList,List<DuSolution> duSolutionList, |
| | | InsuranceApply insuranceApply,Solutions solutions,LoginUserInfo loginUserInfo,BigDecimal detailFee){ |
| | | for (ApplyChagneDetail applyChagneDetail : addDetailList) { |
| | | if ( Objects.isNull(applyChagneDetail.getDuId()) |
| | | || Objects.isNull(applyChagneDetail.getWorktypeId()) |
| | | || StringUtils.isBlank(applyChagneDetail.getIdcardNo()) |
| | | ) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "å ä¿äººåã" + applyChagneDetail.getMemberName() + "ãå¿
填项缺失"); |
| | | } |
| | | //æ¥è¯¢å ä¿äººåæ¯å¦åå¨ å²çªç ä¿åæç»æ°æ® |
| | | if(applyDetailJoinMapper.selectCount(new QueryWrapper<ApplyDetail>() |
| | | .lambda() |
| | | .eq(ApplyDetail::getApplyId,applyChange.getApplyId()) |
| | | .eq(ApplyDetail::getIdcardNo,applyChagneDetail.getIdcardNo()) |
| | | .le(ApplyDetail::getStartTime,DateUtil.getMontageDate(applyChange.getApplyStartTime(),1)) |
| | | .ge(ApplyDetail::getEndTime,DateUtil.getMontageDate(applyChange.getApplyStartTime(),3)) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "å½åä¿åä¸ï¼å ä¿äººåã" + applyChagneDetail.getMemberName() + "ãå卿¥æå²çªçæ°æ®"); |
| | | } |
| | | |
| | | applyChagneDetail.setCreateDate(new Date()); |
| | |
| | | ) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "æ¢å人åã" + applyChagneDetail.getMemberName() + "ãå¿
填项缺失"); |
| | | } |
| | | |
| | | //æ¥è¯¢æ¢åäººåæ¯å¦åå¨ ææçä¿åæç»æ°æ® |
| | | if(applyDetailJoinMapper.selectCount(new QueryWrapper<ApplyDetail>() |
| | | .lambda() |
| | | .eq(ApplyDetail::getApplyId,applyChange.getApplyId()) |
| | | .eq(ApplyDetail::getIdcardNo,applyChagneDetail.getIdcardNo()) |
| | | .le(ApplyDetail::getStartTime,DateUtil.getMontageDate(applyChange.getApplyStartTime(),1)) |
| | | .ge(ApplyDetail::getEndTime,DateUtil.getMontageDate(applyChange.getApplyStartTime(),1)) |
| | | )<=Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "å½åä¿åä¸ï¼æ¢å人åã" + applyChagneDetail.getMemberName() + "ãæªæ¥è¯¢å°ç¬¦åæ¹åæ¥æçæ°æ®"); |
| | | } |
| | | |
| | | Member member = memberMapper.selectById(applyChagneDetail.getMemberId()); |
| | | if (Objects.isNull(member)) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "æ¢å人åã" + applyChagneDetail.getMemberName() + "ãæªæ¥è¯¢å°ç³»ç»äººåä¿¡æ¯"); |
| | |
| | | new MPJLambdaWrapper<ApplyChagneDetail>() |
| | | .leftJoin(ApplyChange.class, ApplyChange::getId, ApplyChagneDetail::getApplyChangeId) |
| | | .eq(ApplyChagneDetail::getMemberId, applyChagneDetail.getMemberId()) |
| | | .eq(ApplyChange::getApplyId, applyChange.getApplyId()) |
| | | .in(ApplyChange::getStatus, Constants.ZERO, Constants.ONE) |
| | | ) > Constants.ZERO) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "æ¢å人åã" + applyChagneDetail.getMemberName() + "ãåå¨ç³è¯·ä¸çå åä¿/æ¢ååæ®"); |
| | |
| | | List<ApplyDetail> applyDetailList = applyDetailJoinMapper.selectList(new QueryWrapper<ApplyDetail>().lambda() |
| | | .eq(ApplyDetail::getApplyId, applyChange.getApplyId()) |
| | | .eq(ApplyDetail::getMemberId, applyChagneDetail.getMemberId()) |
| | | .ge(ApplyDetail::getEndTime, new Date())); |
| | | .le(ApplyDetail::getStartTime,DateUtil.getMontageDate(applyChange.getApplyStartTime(),1)) |
| | | .ge(ApplyDetail::getEndTime,DateUtil.getMontageDate(applyChange.getApplyStartTime(),1))); |
| | | if(applyDetailList.size()>Constants.ONE){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "æ¢å人åã" + applyChagneDetail.getMemberName() + "ãä¿åä¿¡æ¯å¼å¸¸ï¼åå¨å¤æ¡æ°æ®"); |
| | | }else if(applyDetailList.size()==Constants.ZERO){ |
| | |
| | | if (duWorktypeList.stream().filter(d -> d.getWorkTypeId().equals(applyChagneDetail.getWorktypeId())) |
| | | .collect(Collectors.toList()).size() <= Constants.ZERO) { |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(), "æ¢å人åã" + applyChagneDetail.getMemberName() + "ãå工工ç§ä¿¡æ¯æªæ¥è¯¢å°ï¼"); |
| | | } |
| | | if(applyChagneDetail.getOldDuId().equals(applyChagneDetail.getDuId()) |
| | | && applyChagneDetail.getOldWorktypeId().equals(applyChagneDetail.getWorktypeId())){ |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(), "æ¢å人åã" + applyChagneDetail.getMemberName() + "ãæ¢åæ°æ®ç¸åï¼"); |
| | | } |
| | | applyChagneDetail.setCreateDate(new Date()); |
| | | applyChagneDetail.setCreator(loginUserInfo.getId()); |
| | |
| | | Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey()) |
| | | // .eq(!Objects.isNull(model.getCompanyId()),InsuranceApply::getCompanyId,model.getCompanyId()) |
| | | // .eq(!Objects.isNull(model.getSolutionsId()),ApplyChange::getSolutionsId,model.getSolutionsId()) |
| | | .eq(!Objects.isNull(model.getApplyId()),ApplyChange::getApplyId,model.getApplyId()) |
| | | .eq(!Objects.isNull(model.getBaseSolutionsId()),Solutions::getBaseId,model.getBaseSolutionsId()) |
| | | .ge(StringUtils.isNotBlank(model.getCreateDateS()),ApplyChange::getCreateDate, model.getCreateDateS()+" 00:00:00" ) |
| | | .le(StringUtils.isNotBlank(model.getCreateDateE()),ApplyChange::getCreateDate, model.getCreateDateE()+" 23:59:59" ); |
| | |
| | | } |
| | | queryWrapper.eq(pageWrap.getModel().getCompanyId()!=null,InsuranceApply::getCompanyId, pageWrap.getModel().getCompanyId()); |
| | | } |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | |
| | | queryWrapper.orderByDesc(ApplyDetail::getCreateDate); |
| | | |
| | | // for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | // if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | // queryWrapper.orderByDesc(sortData.getProperty()); |
| | | // } else { |
| | | // queryWrapper.orderByAsc(sortData.getProperty()); |
| | | // } |
| | | // } |
| | | PageData<ApplyChange> pageData = PageData.from(applyChangeJoinMapper.selectJoinPage(page,ApplyChange.class, queryWrapper)); |
| | | return pageData; |
| | | } |
| | |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,applyChange.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,applyChange.getId(),solutions.getName(), |
| | | applyChange.getCompanyId(), Constants.NoticeType.THREE); |
| | | insuranceApply.getCompanyId(), Constants.NoticeType.THREE); |
| | | noticesMapper.insert(notices); |
| | | |
| | | |
| | |
| | | applyChangeMapper.updateById(applyChange); |
| | | |
| | | String info = applyLogType.getInfo(); |
| | | info = info.replace("${param}", applyChangeOptDTO.getOptIllustration()); |
| | | if(StringUtils.isNotBlank(applyChangeOptDTO.getOptIllustration())){ |
| | | info = info.replace("${param}", applyChangeOptDTO.getOptIllustration()); |
| | | } |
| | | ApplyLog log = new ApplyLog(applyChange,applyLogType.getName(),info,applyChange.getId(),applyLogType.getKey(), null, null); |
| | | applyLogMapper.insert(log); |
| | | } |
| | |
| | | .selectAs(InsuranceApply::getCompanyId,ApplyChange::getCompanyId) |
| | | .selectAs(InsuranceApply::getCode,ApplyChange::getApplyCode) |
| | | .selectAs(InsuranceApply::getStartTime,ApplyChange::getStartTime) |
| | | .selectAs(InsuranceApply::getStartTime,ApplyChange::getEndTime) |
| | | .selectAs(InsuranceApply::getEndTime,ApplyChange::getEndTime) |
| | | .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId) |
| | | .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId) |
| | | .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId) |
| | |
| | | queryWrapper.selectAs(Worktype::getName,ApplyDetail::getWorkTypeName); |
| | | queryWrapper.selectAs(Member::getIdcardNo,ApplyDetail::getIdcardNo); |
| | | queryWrapper.selectAs(Member::getName,ApplyDetail::getMemberName); |
| | | queryWrapper.selectAs(Solutions::getName,ApplyDetail::getSolutionName); |
| | | queryWrapper.leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyDetail::getDuId); |
| | | queryWrapper.leftJoin(Worktype.class,Worktype::getId,ApplyDetail::getWorktypeId); |
| | | queryWrapper.leftJoin(Member.class,Member::getId,ApplyDetail::getMemberId); |
| | | queryWrapper.leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId); |
| | | queryWrapper.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId); |
| | | |
| | | ApplyDetailPageDTO applyDetailPageDTO = pageWrap.getModel(); |
| | | |
| | | queryWrapper.eq(!Objects.isNull(applyDetailPageDTO.getApplyId()),ApplyDetail::getApplyId,applyDetailPageDTO.getApplyId()); |
| | | queryWrapper.ge(!Objects.isNull(applyDetailPageDTO.getApplyStatus()) |
| | | &&!applyDetailPageDTO.getApplyStatus().equals(Constants.ZERO), |
| | |
| | | //å¤çå
³èæ¹æ¡ |
| | | dealSolutionsData(company); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void exportFiles(Integer id, HttpServletResponse response){ |
| | | try { |
| | |
| | | if(s.getSolutionBaseId() == null){ |
| | | continue; |
| | | } |
| | | Solutions newVersion = solutionsMapper.selectOne(new QueryWrapper<Solutions>().lambda().eq(Solutions::getBaseId,s.getSolutionBaseId()) |
| | | .eq(Solutions::getDataType,Constants.TWO).last("limit 1")); |
| | | if(Objects.isNull(newVersion)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"è¯·æ·»å ææçä¿é©æ¹æ¡ä¿¡æ¯ï¼"); |
| | | } |
| | | sIds.add(s.getSolutionBaseId()); |
| | | s.setCompanyId(company.getId()); |
| | | s.setIsdeleted(Constants.ZERO); |
| | |
| | | s.setCreateDate(company.getCreateDate()); |
| | | s.setCreator(company.getCreator()); |
| | | s.setSortnum(num++); |
| | | s.setSolutionBaseId( s.getSolutionBaseId() ); |
| | | s.setSolutionId( newVersion.getId() ); |
| | | s.setStatus(Constants.ZERO); |
| | | list.add(s); |
| | | } |
| | |
| | | companySolutionJoinMapper.insertBatchSomeColumn(list); |
| | | } |
| | | |
| | | |
| | | |
| | | /* private void dealSolutionsData(Company company) { |
| | | List<Integer> sIds = new ArrayList<>(); |
| | | List<CompanySolution> list = new ArrayList<>(); |
| | | int num =0; |
| | | for(CompanySolution s :company.getSolutionList()){ |
| | | if(s.getSolution() == null || s.getSolution().getBaseId() == null ||s.getSolution().getId()==null){ |
| | | continue; |
| | | } |
| | | sIds.add(s.getSolution().getId() ); |
| | | s.setCompanyId(company.getId()); |
| | | s.setIsdeleted(Constants.ZERO); |
| | | s.setCanAdd(Constants.formatIntegerNum(s.getCanAdd())); |
| | | s.setCanReduce(Constants.formatIntegerNum(s.getCanReduce())); |
| | | s.setCreateDate(company.getCreateDate()); |
| | | s.setCreator(company.getCreator()); |
| | | s.setSortnum(num++); |
| | | s.setSolutionBaseId( s.getSolution().getId() ); |
| | | s.setSolutionId( s.getSolution().getBaseId() ); |
| | | s.setStatus(Constants.ZERO); |
| | | list.add(s); |
| | | } |
| | | if(list.size() ==0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"è¯·æ·»å ææçä¿é©æ¹æ¡ä¿¡æ¯ï¼"); |
| | | } |
| | | List<Solutions> solutionsList = solutionsMapper.selectList(new QueryWrapper<Solutions>().lambda() |
| | | .in(Solutions::getId,sIds) |
| | | .eq(Solutions::getIsdeleted,Constants.ZERO)); |
| | | if(solutionsList.size()!= list.size()){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"è¯·æ·»å ææçä¿é©æ¹æ¡ä¿¡æ¯å¦"); |
| | | } |
| | | for(Solutions s:solutionsList){ |
| | | if(Constants.equalsInteger(s.getStatus(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"ä¿é©æ¹æ¡ã"+s.getName()+"ã已被ç¦ç¨ï¼ä¸è½è¿è¡è¯¥æä½"); |
| | | } |
| | | } |
| | | companySolutionJoinMapper.insertBatchSomeColumn(list); |
| | | }*/ |
| | | private void isValidCreateParam(Company company) { |
| | | if(StringUtils.isBlank(company.getPhone()) |
| | | ||StringUtils.isBlank(company.getName()) |
| | |
| | | for(Company company :companyList){ |
| | | //æ¥è¯¢ä¼ä¸ç¾çº¦ç¶æ å®¡æ ¸ç¶æ,0æ£å¨ç³è¯·1éè¿2驳å |
| | | int status = signService.organizationAuditStatus(company.getEmail()); |
| | | if(status == 0){ |
| | | continue; |
| | | } |
| | | if(status == 1){ |
| | | Company update = new Company(); |
| | | update.setId(company.getId()); |
| | |
| | | //æ´æ°è®¤è¯ç¶æ |
| | | companyMapper.updateById(update); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | // @Override |
| | |
| | | if (pageWrap.getModel().getBaseId() != null) { |
| | | queryWrapper.eq(DispatchUnit::getBaseId, pageWrap.getModel().getBaseId()); |
| | | } |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | queryWrapper.orderByAsc(DispatchUnit::getUnitStatus); |
| | | queryWrapper.orderByAsc(DispatchUnit::getWorktypeStatus); |
| | | queryWrapper.orderByDesc(DispatchUnit::getCreateDate); |
| | | // for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | // if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | // queryWrapper.orderByDesc(sortData.getProperty()); |
| | | // } else { |
| | | // queryWrapper.orderByAsc(sortData.getProperty()); |
| | | // } |
| | | // } |
| | | PageData<DispatchUnit> pageData = PageData.from(dispatchUnitJoinMapper.selectJoinPage(page,DispatchUnit.class, queryWrapper)); |
| | | return pageData; |
| | | } |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.DispatchUnitMapper; |
| | | import com.doumee.dao.business.DuWorktypeMapper; |
| | | import com.doumee.dao.business.WorktypeMapper; |
| | | import com.doumee.dao.business.model.DispatchUnit; |
| | | import com.doumee.dao.business.model.DuWorktype; |
| | | import com.doumee.dao.business.model.Worktype; |
| | | import com.doumee.service.business.DuWorktypeService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | @Autowired |
| | | private DuWorktypeMapper duWorktypeMapper; |
| | | |
| | | @Autowired |
| | | private WorktypeMapper worktypeMapper; |
| | | |
| | | @Autowired |
| | | private DispatchUnitMapper dispatchUnitMapper; |
| | | |
| | | @Override |
| | | public Integer create(DuWorktype duWorktype) { |
| | | duWorktypeMapper.insert(duWorktype); |
| | |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | DuWorktype duWorktype = duWorktypeMapper.selectById(id); |
| | | if(Objects.isNull(duWorktype)){ |
| | | DuWorktype dbDuWorkType = duWorktypeMapper.selectById(id); |
| | | if(Objects.isNull(dbDuWorkType)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(duWorktype.getStatus().equals(Constants.TWO)){ |
| | | duWorktypeMapper.deleteById(id); |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å½åç¶ææ æ³è¿è¡å é¤"); |
| | | if(!dbDuWorkType.getStatus().equals(Constants.TWO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"æ°æ®ç¶æéè¯¯ï¼æ æ³è¿è¡å é¤"); |
| | | } |
| | | DispatchUnit dispatchUnit = dispatchUnitMapper.selectById(dbDuWorkType.getDispatchUnitId()); |
| | | if(Objects.isNull(dispatchUnit)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | duWorktypeMapper.deleteById(id); |
| | | |
| | | if(duWorktypeMapper.selectCount(new QueryWrapper<DuWorktype>().lambda() |
| | | .eq(DuWorktype::getWorkTypeId,dbDuWorkType.getWorkTypeId()) |
| | | .eq(DuWorktype::getStatus,Constants.ZERO) |
| | | .ne(DuWorktype::getId,dbDuWorkType.getId()) |
| | | )>Constants.ZERO){ |
| | | dispatchUnit.setWorktypeStatus(0); |
| | | }else if(duWorktypeMapper.selectCount(new QueryWrapper<DuWorktype>().lambda() |
| | | .eq(DuWorktype::getWorkTypeId,dbDuWorkType.getWorkTypeId()) |
| | | .eq(DuWorktype::getStatus,Constants.TWO) |
| | | .ne(DuWorktype::getId,dbDuWorkType.getId()) |
| | | )>Constants.ZERO){ |
| | | dispatchUnit.setWorktypeStatus(2); |
| | | }else{ |
| | | dispatchUnit.setWorktypeStatus(1); |
| | | } |
| | | dispatchUnitMapper.updateById(dispatchUnit); |
| | | } |
| | | |
| | | @Override |
| | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId())); |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()) |
| | | .ne(Notices::getType,Constants.NoticeType.SIX.getStatus()) |
| | | .eq(Notices::getObjId,insuranceApply.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ONE,insuranceApply.getId(),solutions.getName(), |
| | | model.getCompanyId(), Constants.NoticeType.FOUR); |
| | | noticesMapper.insert(notices); |
| | |
| | | update.setEndTime(actEndTime); |
| | | update.setStartTime(insuranceApply.getStartTime()); |
| | | insuranceApplyMapper.updateById(update); |
| | | |
| | | //ä¿®æ¹æç»è¡çå¼å§ç»ææ¥æ |
| | | applyDetailMapper.update(null,new UpdateWrapper<ApplyDetail>().lambda().set(ApplyDetail::getStartTime,insuranceApply.getStartTime()) |
| | | .set(ApplyDetail::getEndTime,actEndTime).eq(ApplyDetail::getApplyId,model.getId())); |
| | | |
| | | multifileMapper.update(null,new UpdateWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getIsdeleted,Constants.ZERO) |
| | | .eq(Multifile::getObjType,Constants.MultiFile.BD_DONE_PDF.getKey()) |
| | | .eq(Multifile::getObjId,update.getId()) |
| | | .set(Multifile::getIsdeleted,Constants.ONE) |
| | | .set(Multifile::getEditDate,update.getEditDate()) |
| | | .set(Multifile::getEditor,update.getEditor()) |
| | | ); |
| | | |
| | | insuranceApply.getBaoxiandanFile().setIsdeleted(Constants.ZERO); |
| | | insuranceApply.getBaoxiandanFile().setCreator(user.getId()); |
| | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()) |
| | | .ne(Notices::getType,Constants.NoticeType.SIX.getStatus()) |
| | | .eq(Notices::getObjId,model.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,model.getId(),model.getSolutionsName(),model.getCompanyId(),Constants.NoticeType.TWO); |
| | | noticesMapper.insert(notices); |
| | | |
| | |
| | | |
| | | } |
| | | public Multifile uploadChangeSignedFileDo(ApplyChange model,String fileurl,String fullurl) { |
| | | Integer companyId = model.getCompanyId(); |
| | | ApplyChange update = new ApplyChange(); |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(model.getCreator()); |
| | |
| | | noticeObjectType = Constants.NoticeObjectType.CHANGE_FACTORY; |
| | | } |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()) |
| | | .ne(Notices::getType,Constants.NoticeType.SIX.getStatus()) |
| | | .eq(Notices::getObjId,model.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,model.getId(),model.getSolutionsName(), |
| | | model.getCompanyId(), Constants.NoticeType.TWO); |
| | | companyId, Constants.NoticeType.TWO); |
| | | notices.setParam1(model.getApplyId().toString()); |
| | | noticesMapper.insert(notices); |
| | | |
| | |
| | | update.setId(model.getId()); |
| | | insuranceApplyMapper.updateById(update); |
| | | |
| | | multifileMapper.update(null,new UpdateWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getIsdeleted,Constants.ZERO) |
| | | .eq(Multifile::getObjType,Constants.MultiFile.BD_APPLY_PDF.getKey()) |
| | | .eq(Multifile::getObjId,update.getId()) |
| | | .set(Multifile::getIsdeleted,Constants.ONE) |
| | | .set(Multifile::getEditDate,update.getEditDate()) |
| | | .set(Multifile::getEditor,update.getEditor()) |
| | | ); |
| | | insuranceApply.getToubaodanFile().setIsdeleted(Constants.ZERO); |
| | | insuranceApply.getToubaodanFile().setCreator(user.getId()); |
| | | insuranceApply.getToubaodanFile().setObjId(update.getId()); |
| | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()) |
| | | .ne(Notices::getType,Constants.NoticeType.SIX.getStatus()) |
| | | .eq(Notices::getObjId,model.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ONE,model.getId(),solutions.getName(),model.getCompanyId(),noticeType); |
| | | noticesMapper.insert(notices); |
| | | |
| | |
| | | Constants.InsuranceApplyStatus insuranceApplyStatus = Constants.InsuranceApplyStatus.UPLOAD; |
| | | insuranceApply.setCreateDate(new Date()); |
| | | insuranceApply.setCreator(loginUserInfo.getId()); |
| | | insuranceApply.setEditor(loginUserInfo.getId()); |
| | | insuranceApply.setEditDate(new Date()); |
| | | insuranceApply.setIsdeleted(Constants.ZERO); |
| | | insuranceApply.setCompanyId(loginUserInfo.getCompanyId()); |
| | | insuranceApply.setCheckInfo(insuranceApplyStatus.getName()); |
| | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId())); |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()) |
| | | .ne(Notices::getType,Constants.NoticeType.SIX.getStatus()) |
| | | .eq(Notices::getObjId,insuranceApply.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,insuranceApply.getId(),solutions.getName(),insuranceApply.getCompanyId(),Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(notices); |
| | | |
| | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId())); |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()) |
| | | .ne(Notices::getType,Constants.NoticeType.SIX.getStatus()) |
| | | .eq(Notices::getObjId,insuranceApply.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,insuranceApply.getId(),solutions.getName(),insuranceApply.getCompanyId(),Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(notices); |
| | | |
| | |
| | | applyDetail.setIdcardNo(member.getIdcardNo()); |
| | | applyDetail.setSex(member.getSex()); |
| | | applyDetail.setFee(countCyclePriceVO.getCyclePrice()); |
| | | applyDetail.setCurrentFee(BigDecimal.ZERO); |
| | | //éªè¯æ´¾é£åä½ä¿¡æ¯æ¯å¦åå¨ |
| | | if(duSolutionList.stream().filter(d->d.getDispatchUnitId().equals(applyDetail.getDuId())).collect(Collectors.toList()).size()<=Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"ã"+applyDetail.getMemberName()+"ãå工派é£å使ªæ¥è¯¢å°ï¼"); |
| | |
| | | queryWrapper.selectAs(Company::getName,InsuranceApply::getCompanyName); |
| | | queryWrapper.selectAs(Solutions::getName,InsuranceApply::getSolutionsName); |
| | | queryWrapper.select(" DATEDIFF( t.END_TIME ,now() ) AS loseEfficacyDays "); |
| | | queryWrapper.select(" ( select count(1) from apply_detail ad where ad.apply_id = t.id ) as insureNum"); |
| | | queryWrapper.select(" ( select count(DISTINCT(ad.MEMBER_ID)) from apply_detail ad where ad.apply_id = t.id ) as insureNum"); |
| | | if(!Objects.isNull(pageWrap.getModel())&&!Objects.isNull(pageWrap.getModel().getType())){ |
| | | queryWrapper.select(" ifnull(( select sum(td.fee) from taxes ts inner join tax_detial td on td.TAX_ID = ts.id where ts.status != 2 and td.INSURANCE_APPLY_ID = t.id ),0) as taxesMoney"); |
| | | queryWrapper.select(" ( select td.CREATE_DATE from taxes ts inner join tax_detial td on td.TAX_ID = ts.id where ts.status != 2 and td.INSURANCE_APPLY_ID = t.id order by td.CREATE_DATE desc limit 1 ) as taxesLast "); |
| | |
| | | queryWrapper.ge(InsuranceApply::getEndTime, Utils.Date.getStart(pageWrap.getModel().getEndTimeS())); |
| | | } |
| | | if (pageWrap.getModel().getEndTimeE() != null) { |
| | | queryWrapper.le(InsuranceApply::getEndTime, Utils.Date.getEnd(pageWrap.getModel().getEndTimeE())); |
| | | queryWrapper.lt(InsuranceApply::getEndTime, Utils.Date.getEnd(pageWrap.getModel().getEndTimeE())); |
| | | } |
| | | if (pageWrap.getModel().getStartTimeS() != null) { |
| | | queryWrapper.ge(InsuranceApply::getStartTime, Utils.Date.getStart(pageWrap.getModel().getStartTimeS())); |
| | | } |
| | | if (pageWrap.getModel().getStartTimeE() != null) { |
| | | queryWrapper.le(InsuranceApply::getStartTime, Utils.Date.getEnd(pageWrap.getModel().getStartTimeE())); |
| | | queryWrapper.lt(InsuranceApply::getStartTime, Utils.Date.getEnd(pageWrap.getModel().getStartTimeE())); |
| | | } |
| | | if (pageWrap.getModel().getCreateTimeS() != null) { |
| | | queryWrapper.ge(InsuranceApply::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateTimeS())); |
| | | } |
| | | if (pageWrap.getModel().getCreateTimeE() != null) { |
| | | queryWrapper.le(InsuranceApply::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateTimeE())); |
| | | queryWrapper.lt(InsuranceApply::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateTimeE())); |
| | | } |
| | | if (pageWrap.getModel().getType() != null) { |
| | | queryWrapper.eq(Solutions::getType, pageWrap.getModel().getType()); |
| | |
| | | queryWrapper.eq(InsuranceApply::getCode, pageWrap.getModel().getCode()); |
| | | } |
| | | if (pageWrap.getModel().getStatus() != null) { |
| | | queryWrapper.eq(InsuranceApply::getStatus, pageWrap.getModel().getStatus()); |
| | | queryWrapper.in(InsuranceApply::getStatus, pageWrap.getModel().getStatus().split(",")); |
| | | } |
| | | if(CollectionUtils.isNotEmpty(pageWrap.getSorts())){ |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | |
| | | |
| | | public void initApplyStatus(InsuranceApply apply){ |
| | | apply.setStatusCollect(Constants.InsuranceApplyStatus.getCollectStatus(apply.getStatus())); |
| | | if(Constants.equalsInteger(apply.getStatusCollect(),Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){ |
| | | if(Constants.equalsInteger(apply.getStatus(),Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){ |
| | | //妿已宿 |
| | | if(apply.getEndTime()==null || System.currentTimeMillis()>apply.getEndTime().getTime()){ |
| | | apply.setStatusCollect(Constants.THREE);//å·²è¿æ |
| | |
| | | queryWrapper.eq(InsuranceApply::getCode, model.getCode()); |
| | | } |
| | | if (model.getStatus() != null) { |
| | | queryWrapper.eq(InsuranceApply::getStatus, model.getStatus()); |
| | | queryWrapper.in(InsuranceApply::getStatus, model.getStatus().split(",")); |
| | | } |
| | | if (CollectionUtils.isNotEmpty(model.getIds())) { |
| | | queryWrapper.in(InsuranceApply::getId, model.getIds()); |
| | |
| | | .selectAll(InsuranceApply.class) |
| | | .selectAs(Solutions::getName,InsuranceApply::getSolutionsName) |
| | | .selectAs(Company::getName,InsuranceApply::getCompanyName) |
| | | .select(" ( select count(1) from apply_detail ad where ad.apply_id = t.id ) as insureNum") |
| | | .select(" ( select max(ac.APPLY_START_TIME) from apply_change ac where ac.apply_id = t.id and ac.status = 2 ) as lastChangeDate") |
| | | .select(" ( select count(DISTINCT(ad.MEMBER_ID)) from apply_detail ad where ad.apply_id = t.id ) as insureNum") |
| | | .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId) |
| | | .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId) |
| | | .eq(InsuranceApply::getId,id) |
| | |
| | | .selectAll(ApplyLog.class) |
| | | .selectAs(SystemUser::getRealname,ApplyLog::getCreatorName) |
| | | .selectAs(Company::getName,ApplyLog::getCompanyName) |
| | | .selectAs(SystemUser::getType,ApplyLog::getCreatorType) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,ApplyLog::getCreator) |
| | | .leftJoin(Company.class,Company::getId,SystemUser::getCompanyId) |
| | | .in(ApplyLog::getObjType,Constants.ApplyLogType.getTypeList(Constants.ZERO)) |
| | |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void applyOpt(InsuranceApplyOptDTO insuranceApplyOptDTO){ |
| | | if(Objects.isNull(insuranceApplyOptDTO) |
| | | ||Objects.isNull(insuranceApplyOptDTO.getApplyId()) |
| | | ||StringUtils.isBlank(insuranceApplyOptDTO.getOptIllustration())){ |
| | | ||Objects.isNull(insuranceApplyOptDTO.getApplyId())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId())); |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()) |
| | | .ne(Notices::getType,Constants.NoticeType.SIX.getStatus()) |
| | | .eq(Notices::getObjId,insuranceApply.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ONE,insuranceApply.getId(),solutions.getName(), |
| | | insuranceApply.getCompanyId(), Constants.NoticeType.THREE); |
| | | noticesMapper.insert(notices); |
| | |
| | | Integer days = DateUtil.calculateBetween(applyDetail.getStartTime(),new Date(),0); |
| | | applyDetail.setCurrentFee(fee.divide(BigDecimal.valueOf(maxDays),2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(days))); |
| | | applyDetailMapper.updateById(applyDetail); |
| | | }else if(applyDetail.getStartTime().compareTo(new Date()) <= 0&&applyDetail.getEndTime().compareTo(new Date()) <= 0){ |
| | | applyDetail.setCurrentFee(fee); |
| | | applyDetailMapper.updateById(applyDetail); |
| | | } |
| | | sumAmount = sumAmount.add(applyDetail.getCurrentFee()); |
| | | } |
| | |
| | | insuranceApplyMapper.updateById(insuranceApply); |
| | | } |
| | | } |
| | | // if(1==1){ |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED); |
| | | // } |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * çæ å¾
审æ¹éç¥ |
| | | */ |
| | | @Override |
| | | public void generateNotice(){ |
| | | List<InsuranceApply> insuranceApplyList = insuranceApplyJoinMapper.selectJoinList(InsuranceApply.class,new MPJLambdaWrapper<InsuranceApply>() |
| | | .selectAll(InsuranceApply.class) |
| | | .selectAs(Solutions::getName,InsuranceApply::getSolutionsName) |
| | | .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId) |
| | | .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey()) |
| | | .ge(InsuranceApply::getEndTime,DateUtil.getDate(new Date(),"yyyy-MM-dd HH:mm:ss")) |
| | | .apply(" DATEDIFF(t.END_TIME,CURRENT_DATE() ) <= 5 ") |
| | | .notExists(" select 1 from notices n where n.obj_type = 0 and n.type = 6 and n.obj_id = t.id ") |
| | | ); |
| | | for (InsuranceApply insuranceApply:insuranceApplyList) { |
| | | Notices notices = new Notices(Constants.NoticeObjectType.INSURANCE_APPLY,Constants.ONE,insuranceApply.getId(),insuranceApply.getSolutionsName(), |
| | | insuranceApply.getCompanyId(), Constants.NoticeType.SIX); |
| | | noticesMapper.insert(notices); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | |
| | | wrapper.orderByDesc("CREATE_DATE"); |
| | | return memberInsuranceMapper.selectList(wrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<MemberInsurance> getList(MemberInsurance memberInsurance) { |
| | | memberInsurance.setIsdeleted(Constants.ZERO); |
| | | QueryWrapper<MemberInsurance> wrapper = new QueryWrapper<>(memberInsurance); |
| | | if(!Objects.isNull(memberInsurance.getStatus())){ |
| | | if(memberInsurance.getStatus().equals(Constants.ZERO)){ |
| | | wrapper.lambda().ge(MemberInsurance::getStartTime,new Date()); |
| | | }else{ |
| | | wrapper.lambda().le(MemberInsurance::getStartTime,new Date()); |
| | | } |
| | | } |
| | | wrapper.lambda().orderByDesc(MemberInsurance::getCreateDate); |
| | | return memberInsuranceMapper.selectList(wrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public PageData<MemberInsurance> findPage(PageWrap<MemberInsurance> pageWrap) { |
| | | IPage<MemberInsurance> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(memberInsuranceMapper.selectPage(page, queryWrapper)); |
| | | PageData<MemberInsurance> pageData = PageData.from(memberInsuranceMapper.selectPage(page, queryWrapper)); |
| | | |
| | | return pageData; |
| | | } |
| | | |
| | | |
| | |
| | | QueryWrapper<MemberInsurance> wrapper = new QueryWrapper<>(memberInsurance); |
| | | return memberInsuranceMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * ç¨å·¥ä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | .apply(!Objects.isNull(memberQueryDTO.getSolutionsStatus())&&memberQueryDTO.getSolutionsStatus().equals(Constants.ONE),"now() between t.start_time and t.end_time") |
| | | .apply(!Objects.isNull(memberQueryDTO.getSolutionsStatus())&&memberQueryDTO.getSolutionsStatus().equals(Constants.TWO),"now() > t.end_time") |
| | | ; |
| | | queryWrapper.orderByAsc(DispatchUnit::getName); |
| | | queryWrapper.orderByAsc(Member::getName); |
| | | // for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | // if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | // queryWrapper.orderByDesc(sortData.getProperty()); |
| | | // } else { |
| | | // queryWrapper.orderByAsc(sortData.getProperty()); |
| | | // } |
| | | // } |
| | | PageData<Member> pageData = PageData.from(memberJoinMapper.selectJoinPage(page,Member.class, queryWrapper)); |
| | | |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | Integer sn = 0; |
| | | for (Member member:pageData.getRecords()) { |
| | | sn = sn + 1; |
| | | member.setSn(sn); |
| | | if(StringUtils.isNotBlank(member.getIdcardNo())){ |
| | | member.setAge(Constants.getAgeByIdCard(member.getIdcardNo())); |
| | | } |
| | | } |
| | | PageData<Member> pageData = PageData.from(memberJoinMapper.selectJoinPage(page,Member.class, queryWrapper)); |
| | | return pageData; |
| | | } |
| | | |
| | |
| | | .apply(!Objects.isNull(memberQueryDTO.getSolutionsStatus())&&memberQueryDTO.getSolutionsStatus().equals(Constants.ONE),"now() between t.start_time and t.end_time") |
| | | .apply(!Objects.isNull(memberQueryDTO.getSolutionsStatus())&&memberQueryDTO.getSolutionsStatus().equals(Constants.TWO),"now() > t.end_time") |
| | | .like(StringUtils.isNotBlank(memberQueryDTO.getName()),Member::getName, memberQueryDTO.getName()) |
| | | .notExists(!Objects.isNull(memberQueryDTO.getNotInInsuranceApplyId()), |
| | | " select 1 from apply_detail ad where ad.apply_id = "+memberQueryDTO.getNotInInsuranceApplyId()+" and ad.END_TIME > now() and ad.isdeleted = 0 " + |
| | | " and ad.member_id = t.id "); |
| | | .notExists(!Objects.isNull(memberQueryDTO.getNotInInsuranceApplyId())&&!Objects.isNull(memberQueryDTO.getValidTime()), |
| | | " select 1 from apply_detail ad where ad.apply_id = "+memberQueryDTO.getNotInInsuranceApplyId()+"" + |
| | | " and ad.END_TIME >= '"+DateUtil.DateToStr(memberQueryDTO.getValidTime(),"yyyy-MM-dd HH:mm:ss.SSS")+"' and ad.START_TIME <= '"+DateUtil.DateToStr(memberQueryDTO.getValidTime(),"yyyy-MM-dd HH:mm:ss.SSS")+"' and ad.isdeleted = 0 " + |
| | | " and ad.member_id = t.id ") ; |
| | | if(!Objects.isNull(memberQueryDTO.getInsuranceApplyId())){ |
| | | lambdaWrapper = new MPJLambdaWrapper<Member>() |
| | | .selectAll(Member.class) |
| | |
| | | .leftJoin(Worktype.class,Worktype::getId,ApplyDetail::getWorktypeId) |
| | | .eq(Member::getIsdeleted, Constants.ZERO) |
| | | .eq(InsuranceApply::getId,memberQueryDTO.getInsuranceApplyId()) |
| | | .exists(!Objects.isNull(memberQueryDTO.getInsuranceApplyId()), |
| | | " select 1 from apply_detail ad where ad.apply_id = "+memberQueryDTO.getInsuranceApplyId()+" and ad.END_TIME > now() and ad.isdeleted = 0 " + |
| | | .le(!Objects.isNull(memberQueryDTO.getValidTime()),ApplyDetail::getStartTime,memberQueryDTO.getValidTime()) |
| | | .ge(!Objects.isNull(memberQueryDTO.getValidTime()),ApplyDetail::getEndTime,memberQueryDTO.getValidTime()) |
| | | .exists(!Objects.isNull(memberQueryDTO.getInsuranceApplyId())&&!Objects.isNull(memberQueryDTO.getValidTime()), |
| | | " select 1 from apply_detail ad where ad.apply_id = "+memberQueryDTO.getInsuranceApplyId()+"" + |
| | | " and ad.END_TIME >= '"+DateUtil.DateToStr(memberQueryDTO.getValidTime(),"yyyy-MM-dd HH:mm:ss.SSS")+"' and ad.START_TIME <= '"+DateUtil.DateToStr(memberQueryDTO.getValidTime(),"yyyy-MM-dd HH:mm:ss.SSS")+"' and ad.isdeleted = 0 " + |
| | | " and ad.member_id = t.id "); |
| | | } |
| | | List<Member> memberList = memberJoinMapper.selectJoinList(Member.class,lambdaWrapper); |
| | |
| | | .selectAs(Worktype::getName,Member::getWorkTypeName) |
| | | .leftJoin(DispatchUnit.class,DispatchUnit::getId,Member::getDuId) |
| | | .leftJoin(Worktype.class,Worktype::getId,Member::getWorktypeId) |
| | | .isNotNull(Member::getIdcardNo) |
| | | .eq(Member::getCompanyId,loginUserInfo.getCompanyId()) |
| | | .eq(Member::getIsdeleted,Constants.ZERO) |
| | | ); |
| | |
| | | if(dataList == null || dataList.size() ==0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼å½å
¥æ°æ®ä¸ºç©ºï¼"); |
| | | } |
| | | List<String> idCardList = dataList.stream().map(m->m.getIdCard()).collect(Collectors.toList()); |
| | | Set<String> set = new HashSet<>(idCardList); |
| | | if(idCardList.size() != set.size()){ |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"对ä¸èµ·ï¼å½å
¥æ°æ®åå¨èº«ä»½è¯å·ç¸åæ°æ®ï¼"); |
| | | } |
| | | for(MemberImport model : dataList){ |
| | | if(CollectionUtils.isNotEmpty(list)){ |
| | | Member member = list.stream().filter(m->m.getIdcardNo().equals(model.getIdCard())).findAny().get(); |
| | | if(!Objects.isNull(member)){ |
| | | // model.setWorkTypeId(member.getWorktypeId()); |
| | | // model.setWorkTypeName(member.getWorkTypeName()); |
| | | Optional<Member> memberOptional= list.stream().filter(m->m.getIdcardNo().equals(model.getIdCard())).findFirst(); |
| | | if(memberOptional.isPresent()){ |
| | | Member member = memberOptional.get(); |
| | | model.setIdCard(member.getIdcardNo()); |
| | | // model.setDuId(member.getDuId()); |
| | | // model.setDuName(member.getDuName()); |
| | | model.setSex(member.getSex()); |
| | | }else{ |
| | | model.setSex(Constants.getSexByIdCard(model.getIdCard())); |
| | |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.InsuranceApply; |
| | | import com.doumee.dao.business.model.Notices; |
| | | import com.doumee.dao.business.vo.ApplyNoticeVO; |
| | | import com.doumee.service.business.NoticesService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * ç³»ç»æ¶æ¯ä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | QueryWrapper<Notices> wrapper = new QueryWrapper<>(notices); |
| | | return noticesMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æä¿å æéæ°é |
| | | * @param companyId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ApplyNoticeVO getApplyNotice(Integer companyId){ |
| | | ApplyNoticeVO applyNoticeVO = new ApplyNoticeVO(); |
| | | applyNoticeVO.setWaitSignNum(Constants.ZERO); |
| | | applyNoticeVO.setRenewalNum(Constants.ZERO); |
| | | List<Notices> noticesList = noticesMapper.selectList(new QueryWrapper<Notices>() |
| | | .lambda() |
| | | .select(Notices::getType) |
| | | .eq(Notices::getPalt,Constants.ONE) |
| | | .eq(Notices::getCompanyId,companyId) |
| | | .eq(Notices::getObjType,Constants.NoticeObjectType.INSURANCE_APPLY.getKey()) |
| | | .eq(Notices::getStatus,Constants.ZERO) |
| | | .in(Notices::getType,Constants.NoticeType.SIX.getStatus(),Constants.NoticeType.ONE.getStatus()) |
| | | ); |
| | | if(CollectionUtils.isNotEmpty(noticesList)){ |
| | | applyNoticeVO.setRenewalNum(noticesList.stream().filter(m->m.getType().equals(Constants.NoticeType.SIX.getStatus())).collect(Collectors.toList()).size()); |
| | | applyNoticeVO.setWaitSignNum(noticesList.size() - applyNoticeVO.getRenewalNum()); |
| | | } |
| | | return applyNoticeVO ; |
| | | } |
| | | |
| | | /** |
| | | * å
³éæé |
| | | * @param companyId |
| | | * @param type |
| | | */ |
| | | @Override |
| | | public void closeApplyNotice(Integer companyId,Integer type){ |
| | | noticesMapper.update(null,new UpdateWrapper<Notices>() |
| | | .lambda() |
| | | .set(Notices::getStatus,Constants.ONE) |
| | | .eq(Notices::getPalt,Constants.ONE) |
| | | .eq(Notices::getCompanyId,companyId) |
| | | .eq(Notices::getStatus,Constants.ZERO) |
| | | .eq(Notices::getObjType,Constants.NoticeObjectType.INSURANCE_APPLY.getKey()) |
| | | .eq(Notices::getType,type) |
| | | ); |
| | | } |
| | | |
| | | } |
| | |
| | | .eq(SettleClaimsLog::getSettleClainmsId,settleClaims.getId()) |
| | | .orderByAsc(SettleClaimsLog::getCreateDate) |
| | | ); |
| | | |
| | | settleClaims.setSettleClaimsLogList(settleClaimsLogList); |
| | | SettleClaimsLog lastConfirm = settleClaimsLogMapper.selectOne(new QueryWrapper<SettleClaimsLog>().lambda() |
| | | .eq(SettleClaimsLog::getSettleClainmsId,settleClaims.getId()) |
| | | .eq(SettleClaimsLog::getObjType,Constants.SettleClaimsLogType.PLATFORM_CONFIRM_INFORMATION.getKey()) |
| | | .orderByDesc(SettleClaimsLog::getCreateDate) |
| | | .last(" limit 1") |
| | | ); |
| | | |
| | | Multifile multifile = multifileJoinMapper.selectOne(new QueryWrapper<Multifile>() |
| | | .lambda() |
| | | .eq(Multifile::getObjId,settleClaims.getId()) |
| | | .eq(Multifile::getIsdeleted,Constants.ZERO) |
| | | .in(Multifile::getObjType, |
| | | Constants.MultiFile.LP_SGXC_FILE.getKey(), |
| | | Constants.MultiFile.LP_YGGX_FILE.getKey(), |
| | | Constants.MultiFile.LP_MZCL_FILE.getKey(), |
| | | Constants.MultiFile.LP_ZYCL_FILE.getKey(), |
| | | Constants.MultiFile.LP_SCZL_FILE.getKey(), |
| | | Constants.MultiFile.LP_JACL_FILE.getKey()) |
| | | .orderByDesc(Multifile::getCreateDate) |
| | | .last(" limit 1") |
| | | ); |
| | | |
| | | if(!Objects.isNull(lastConfirm)&&!Objects.isNull(multifile)){ |
| | | settleClaims.setFinishDate(lastConfirm.getCreateDate().compareTo(multifile.getCreateDate())>=0?lastConfirm.getCreateDate():multifile.getCreateDate()); |
| | | }else if(!Objects.isNull(lastConfirm)&&Objects.isNull(multifile)){ |
| | | settleClaims.setFinishDate(lastConfirm.getCreateDate()); |
| | | } |
| | | return settleClaims; |
| | | } |
| | | |
| | |
| | | multifile.setObjType(scSupplementDTO.getObjType()); |
| | | multifile.setObjId(scSupplementDTO.getId()); |
| | | multifile.setFileurl(scSupplementDTO.getFileUrl()); |
| | | multifile.setName(scSupplementDTO.getFileUrl().substring(scSupplementDTO.getFileUrl().lastIndexOf("/") + 1)); |
| | | multifile.setName(scSupplementDTO.getFileName()); |
| | | multifile.setType(scSupplementDTO.getFileType()); |
| | | multifileJoinMapper.insert(multifile); |
| | | } |
| | |
| | | queryWrapper.eq(SettleClaims::getCode, pageWrap.getModel().getCode()); |
| | | } |
| | | if (pageWrap.getModel().getStatus() != null) { |
| | | queryWrapper.eq(SettleClaims::getStatus, pageWrap.getModel().getStatus()); |
| | | if(pageWrap.getModel().getStatus().equals(Constants.ZERO)){ |
| | | queryWrapper.in(SettleClaims::getStatus, Constants.SettleClaimsStatus.WAIT_ACCEPTANCE.getKey() |
| | | ,Constants.SettleClaimsStatus.DEAL_ING.getKey() |
| | | ,Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey()); |
| | | }else{ |
| | | queryWrapper.eq(SettleClaims::getStatus, pageWrap.getModel().getStatus()); |
| | | } |
| | | |
| | | |
| | | } |
| | | if (pageWrap.getModel().getType() != null) { |
| | | queryWrapper.eq(SettleClaims::getType, pageWrap.getModel().getType()); |
| | |
| | | if (pageWrap.getModel().getInsuranceApplyId() != null) { |
| | | queryWrapper.eq(SettleClaims::getInsuranceApplyId, pageWrap.getModel().getInsuranceApplyId()); |
| | | } |
| | | queryWrapper.orderByAsc(SettleClaims::getCreateDate); |
| | | queryWrapper.orderByDesc(SettleClaims::getCreateDate); |
| | | /*for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.InsuranceMapper; |
| | | import com.doumee.dao.business.SolutionWorktypeMapper; |
| | | import com.doumee.dao.business.SolutionsMapper; |
| | | import com.doumee.dao.business.WorktypeMapper; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.join.SolutionWorktypeJoinMapper; |
| | | import com.doumee.dao.business.join.SolutionsJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | private SolutionWorktypeJoinMapper solutionWorktypeJoinMapper; |
| | | @Autowired |
| | | private InsuranceMapper insuranceMapper; |
| | | @Autowired |
| | | private CompanySolutionMapper companySolutionMapper; |
| | | @Autowired |
| | | private DuSolutionMapper duSolutionMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public Integer create(Solutions solutions) { |
| | | LoginUserInfo user= (LoginUserInfo)SecurityUtils.getSubject().getPrincipal(); |
| | | initCreateParam(solutions);//å·¥ç§æ°æ®æææ§æ£éªï¼å»é¤ç©ºç½è¡æ°æ® |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼è¯¥ä¿é©å
¬å¸ä¿¡æ¯ä¸åå¨ï¼è¯·å°è¯å·æ°é¡µé¢éè¯~" ); |
| | | } |
| | | if( !Constants.equalsInteger(model.getStatus(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼è¯¥ä¿é©å
¬å¸å·²è¢«ï¼è¯·å°è¯å·æ°é¡µé¢éè¯~" ); |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼è¯¥ä¿é©å
¬å¸å·²è¢«ç¦ç¨ï¼è¯·å°è¯å·æ°é¡µé¢éè¯~" ); |
| | | } |
| | | List<Worktype> worktypeList = worktypeMapper.selectList(new QueryWrapper<Worktype>().lambda() |
| | | .eq(Worktype::getInsuranceId,solutions.getInsuranceId()) |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public void updateById(Solutions solutions) { |
| | | LoginUserInfo user= (LoginUserInfo)SecurityUtils.getSubject().getPrincipal(); |
| | | Solutions model = findById(solutions.getId()); |
| | |
| | | solutions.setVersion(UUID.randomUUID().toString()); |
| | | solutions.setEditDate(new Date()); |
| | | solutionsMapper.updateById(solutions); |
| | | |
| | | Solutions oldVersion = solutionsMapper.selectOne(new QueryWrapper<Solutions>() |
| | | .lambda() |
| | | .eq(Solutions::getBaseId,solutions.getId()) |
| | | .eq(Solutions::getDataType,Constants.TWO) |
| | | .last("limit 1") |
| | | ); |
| | | |
| | | |
| | | if(Objects.isNull(oldVersion)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°åå²çæ¬æ°æ®"); |
| | | } |
| | | |
| | | //å¦æä¿®æ¹ï¼å产çä¸ä¸ªæ°çåå²çæ¬ ~ |
| | | Solutions newModel = new Solutions(); |
| | |
| | | .lambda() |
| | | .eq(SolutionWorktype::getSolutionId,solutions.getId()) |
| | | ); |
| | | |
| | | |
| | | solutionsMapper.update(null,new UpdateWrapper<Solutions>() |
| | | .lambda() |
| | | .ne(Solutions::getId,newModel.getId()) |
| | |
| | | ); |
| | | //å¤çå·¥ç§ä¿¡æ¯ï¼æ°å¢ææ°çï¼åæ¶äº§çåå²çæ¬ |
| | | dealWorkType(solutions,newModel,solutions.getWorktypeIdList(),false); |
| | | |
| | | //æ´æ°company_solution ä½¿ç¨æ°çæ¬çæ°æ® |
| | | companySolutionMapper.update(null, |
| | | new UpdateWrapper<CompanySolution>() |
| | | .lambda() |
| | | .eq(CompanySolution::getStatus,Constants.ZERO) |
| | | .set(CompanySolution::getSolutionId,newModel.getId()) |
| | | .eq(CompanySolution::getSolutionBaseId,solutions.getId()) |
| | | ); |
| | | //æ´æ° du_solution ä½¿ç¨æ°çæ¬çæ°æ® |
| | | duSolutionMapper.update(null, |
| | | new UpdateWrapper<DuSolution>() |
| | | .lambda() |
| | | .eq(DuSolution::getIsdeleted, Constants.ZERO) |
| | | .eq(DuSolution::getStatus, Constants.ONE) |
| | | .set(DuSolution::getSolutionId,newModel.getId()) |
| | | .eq(DuSolution::getSolutionId,oldVersion.getId())); |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (pageWrap.getModel().getOrtherInfo() != null) { |
| | | queryWrapper.eq(Solutions::getOrtherInfo, pageWrap.getModel().getOrtherInfo()); |
| | | } |
| | | if (pageWrap.getModel().getSolutionBaseId() != null) { |
| | | queryWrapper.eq(Solutions::getSolutionBaseId, pageWrap.getModel().getSolutionBaseId()); |
| | | } |
| | | |
| | | if (pageWrap.getModel().getVersion() != null) { |
| | | queryWrapper.eq(Solutions::getVersion, pageWrap.getModel().getVersion()); |
| | | } |
| | |
| | | |
| | | |
| | | @Override |
| | | public List<Solutions> findListForCompany() { |
| | | public List<Solutions> findListForCompany(Integer dataType) { |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | List<Solutions> solutionsList = solutionsJoinMapper.selectJoinList(Solutions.class,new MPJLambdaWrapper<Solutions>() |
| | | .selectAll(Solutions.class) |
| | | .leftJoin(CompanySolution.class,CompanySolution::getSolutionBaseId,Solutions::getId) |
| | | .leftJoin(CompanySolution.class,CompanySolution::getSolutionId,Solutions::getId) |
| | | .leftJoin(Company.class,Company::getId,CompanySolution::getCompanyId) |
| | | .leftJoin(Insurance.class,Insurance::getId,Solutions::getInsuranceId) |
| | | .eq(Solutions::getIsdeleted,Constants.ZERO) |
| | | .eq(Solutions::getDataType,Constants.TWO) |
| | | .eq(Solutions::getStatus,Constants.ZERO) |
| | | .eq(Solutions::getDataType,dataType) |
| | | .eq(CompanySolution::getIsdeleted,Constants.ZERO) |
| | | .eq(CompanySolution::getCompanyId,user.getCompanyId()) |
| | | .eq(Company::getIsdeleted,Constants.ZERO) |
| | | .eq(Company::getStatus,Constants.ZERO) |
| | | .eq(Insurance::getIsdeleted,Constants.ZERO) |
| | | .eq(Insurance::getStatus,Constants.ZERO) |
| | | .orderByAsc(Solutions::getSortnum) |
| | | ); |
| | | return solutionsList; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®åå²çæ¬æ¥è¯¢å½åææ°å¯ç¨çæ¬ |
| | | * @param solutionId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Solutions getNewVersion(Integer solutionId){ |
| | | Solutions solutions = solutionsMapper.selectById(solutionId); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°å岿¹æ¡ä¿¡æ¯"); |
| | | } |
| | | if(solutions.getDataType().equals(Constants.TWO)){ |
| | | return solutions; |
| | | } |
| | | Solutions newVersion = solutionsMapper.selectOne(new QueryWrapper<Solutions>().lambda() |
| | | .eq(Solutions::getIsdeleted,Constants.ZERO) |
| | | .eq(Solutions::getDataType,Constants.TWO) |
| | | .eq(Solutions::getBaseId,solutions.getBaseId()) |
| | | .last("limit 1") |
| | | ); |
| | | if(Objects.isNull(newVersion)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°ææ°çæ¬æ°æ®"); |
| | | } |
| | | return newVersion; |
| | | } |
| | | |
| | | |
| | | @Override |
| | |
| | | if(model==null || !Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(Constants.equalsInteger(model.getType(),Constants.ZERO)){ |
| | | if(Constants.equalsInteger(model.getApplyType(),Constants.ZERO)){ |
| | | List<TaxDetial> detialList = getDetailsApplysListById(id); |
| | | model.setApplyList(detialList); |
| | | }else{ |
| | |
| | | queryWrapper.selectAll(TaxDetial.class); |
| | | queryWrapper.selectAs(InsuranceApply::getCode,TaxDetial::getApplyCode); |
| | | queryWrapper.selectAs(Solutions::getName,TaxDetial::getSolutionName); |
| | | queryWrapper.selectAs(ApplyChange::getValidCode,TaxDetial::getChangApplyCode); |
| | | queryWrapper.leftJoin(InsuranceApply.class,InsuranceApply::getId,TaxDetial::getInsuranceApplyId); |
| | | queryWrapper.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId); |
| | | queryWrapper.leftJoin(ApplyChange.class,ApplyChange::getId,TaxDetial::getApplyChangeId); |
| | | queryWrapper.in(TaxDetial::getType,Constants.ZERO,Constants.ONE); |
| | | queryWrapper.eq(TaxDetial::getTaxId,id); |
| | | List<TaxDetial> detialList = taxDetailJoinMapper.selectJoinList(TaxDetial.class,queryWrapper.orderByAsc(TaxDetial::getType)); |
| | | return detialList; |
| | | } |
| | |
| | | taxes.setAddr(entrustInvoicingDTO.getAddress()); |
| | | taxes.setCompanyName(company.getName()); |
| | | taxes.setApplyType(Constants.ZERO); |
| | | taxes.setTaxBank(company.getTaxBank()); |
| | | taxesMapper.insert(taxes); |
| | | |
| | | List<TaxDetial> taxDetialList = entrustInvoicingDTO.getTaxDetialList(); |
| | |
| | | List<ApplyChange> applyChangeList = applyChangeJoinMapper.selectJoinList(ApplyChange.class,new MPJLambdaWrapper<ApplyChange>() |
| | | .selectAll(ApplyChange.class) |
| | | .selectAs(InsuranceApply::getCode,ApplyChange::getApplyCode) |
| | | .selectAs(Solutions::getName,ApplyChange::getSolutionsName) |
| | | .select("( select count(1) from apply_chagne_detail ad where t.id = ad.APPLY_CHANGE_ID and ad.TYPE = 0 ) as addNum ") |
| | | .select("( select count(1) from apply_chagne_detail ad where t.id = ad.APPLY_CHANGE_ID and ad.TYPE = 1 ) as delNum ") |
| | | .select("( select ifnull(sum(ad.FEE),0) from apply_chagne_detail ad where t.id = ad.APPLY_CHANGE_ID ) as changeMoney" ) |
| | |
| | | |
| | | if(CollectionUtils.isNotEmpty(applyChangeList)){ |
| | | for (ApplyChange applyChange:applyChangeList) { |
| | | insuranceApply.setFee(insuranceApply.getFee().subtract(applyChange.getFee())); |
| | | TaxesInvoicingVO taxesInvoicingVO = applyChange.toTaxesInvoicingVO(); |
| | | if(!Objects.isNull(insuranceApply)){ |
| | | taxesInvoicingVO.setAmount(BigDecimal.ZERO); |
| | | insuranceApply.setFee(insuranceApply.getFee().subtract(applyChange.getFee())); |
| | | } |
| | | TaxesInvoicingVO taxesInvoicingVO = applyChange.toTaxesInvoicingVO(); |
| | | // if(!Objects.isNull(insuranceApply)){ |
| | | // taxesInvoicingVO.setAmount(BigDecimal.ZERO); |
| | | // } |
| | | taxesInvoicingVOList.add(taxesInvoicingVO); |
| | | } |
| | | } |
| | |
| | | taxes.setType(directInvoicingDTO.getType()); |
| | | taxes.setTaxCode(company.getTaxCode()); |
| | | taxes.setTaxAccount(company.getTaxAccount()); |
| | | taxes.setTaxBank(company.getTaxBank()); |
| | | taxes.setTaxAddr(company.getTaxAddr()); |
| | | taxes.setAddr(directInvoicingDTO.getAddress()); |
| | | taxes.setCompanyName(company.getName()); |
| | |
| | | taxDetial.setTaxId(taxes.getId()); |
| | | taxDetial.setTotalFee(taxesInvoicingVO.getAmount()); |
| | | taxDetial.setFee(taxesInvoicingVO.getAmount()); |
| | | taxDetial.setInsuranceApplyId(taxes.getApplyId()); |
| | | if(taxesInvoicingVO.getType().equals(Constants.ZERO)){ |
| | | taxDetial.setInsuranceApplyId(taxesInvoicingVO.getId()); |
| | | taxDetial.setType(taxesInvoicingVO.getType()); |
| | | }else if(taxesInvoicingVO.getType().equals(Constants.ONE)){ |
| | | taxDetial.setApplyChangeId(taxesInvoicingVO.getId()); |