Merge remote-tracking branch 'origin/master'
| | |
| | | export function applyChagneDetailList (data) { |
| | | return request.post('/business/applyChagneDetail/list', data) |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function update (data) { |
| | | return request.post('/business/applyChange/update', data) |
| | | } |
| | |
| | | <div class="desc_item_label_left"> |
| | | <span>æä¿ä¼ä¸ï¼{{ apply.companyName }}</span> |
| | | <span v-if="model.status === 0">ä¿åç¶æï¼å¾
ç¾ç½²</span> |
| | | <<<<<<< HEAD |
| | | <span v-if="model.status === 1">ä¿åç¶æï¼å¾
å®¡æ ¸</span> |
| | | <span v-if="model.status === 2">ä¿åç¶æï¼å·²ä¸ä¼ æ¹å</span> |
| | | ======= |
| | | <span v-if="model.status === 1">ä¿åç¶æï¼å·²ç¾ç« </span> |
| | | <span v-if="model.status === 2">ä¿åç¶æï¼å·²çæ</span> |
| | | >>>>>>> 35bd55ad951fe8c5fb997dfa7bd836ad53db96fe |
| | | <span v-if="model.status === 3 || model.status === 4">ä¿åç¶æï¼éåç³è¯·</span> |
| | | <span v-if="model.status === 5 || model.status === 8">ä¿åç¶æï¼å·²éå</span> |
| | | <span v-if="model.status ===7">ä¿åç¶æï¼å·²å
³é</span> |
| | | <span v-if="model.status === 7 || model.status === 6">ä¿åç¶æï¼å·²å
³é</span> |
| | | <span>æäº¤æ¶é´ï¼{{ model.createDate }}</span> |
| | | </div> |
| | | <div class="desc_item_label_right"> |
| | | <template v-if="userInfo.type === 1"> |
| | | <el-button type="primary" @click="$refs.ApplyChangeDetails.open('å åä¿è¯¦å',apply,model)">导åºè¯¦å</el-button> |
| | | <el-button v-if="[5, 8].includes(model.status)" type="primary" @click="$refs.additionSubtractionApplication.open('å åä¿ç³è¯·', {id: dataId})">忬¡æä¿</el-button> |
| | | <el-button v-if="[5, 8].includes(model.status)" type="primary" @click="$refs.reinsurance.open('å åä¿ç³è¯·', {id: dataId, applyChangId: modelId})">忬¡æä¿</el-button> |
| | | <el-button type="primary" v-if="model.status == 0" @click="goSign">ç¾ç½²ç³è¯·å</el-button> |
| | | <el-button v-if="[2, 3, 7].includes(model.status)" type="primary">ç³è¯·éå</el-button> |
| | | <el-button v-if="[0, 1, 2, 3, 7].includes(model.status)" type="primary" @click="$refs.add_subtract_return.open('ç³è¯·éå', { id: modelId })">ç³è¯·éå</el-button> |
| | | <el-button v-if="model.status == 5" type="primary" @click="viewApplyFile">æ¥çç³è¯·å</el-button> |
| | | <el-button v-if="model.status == 5" type="primary" @click="viewPidan">æ¥çæ¹å</el-button> |
| | | <el-button v-if="model.status == 2" type="primary" @click="viewPidan">æ¥çæ¹å</el-button> |
| | | <el-button v-if="[5, 8].includes(model.status)" type="primary" @click="closeOrder">å
³é订å</el-button> |
| | | </template> |
| | | <template v-else> |
| | |
| | | <ApplyChangeDetails ref="ApplyChangeDetails" @success="successEvent" /> |
| | | <OperaApplyChangeCheckWindow ref="OperaApplyChangeCheckWindow" @success="successEvent" /> |
| | | <!-- ä¼ä¸ç³è¯·éå --> |
| | | <applyReturn ref="applyReturn" @success="successEvent" /> |
| | | <!-- <applyReturn ref="applyReturn" @success="successEvent" />--> |
| | | <add_subtract_return ref="add_subtract_return" @success="successEvent" /> |
| | | <!-- æ°å¢æä¿ --> |
| | | <OperaInsuranceApply ref="OperaInsuranceApply" @success="successEvent" /> |
| | | <!-- å åä¿ç³è¯· --> |
| | | <additionSubtractionApplication ref="additionSubtractionApplication" @success="successEvent" /> |
| | | <reinsurance ref="reinsurance" @success="successEvent" /> |
| | | <!-- æ¢åç³è¯· --> |
| | | <factoryChange ref="factoryChange" @success="successEvent" /> |
| | | </GlobalWindow> |
| | |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import ApplyChangeDetails from '@/components/business/ApplyChangeDetails' |
| | | import OperaApplyChangeCheckWindow from '@/components/business/OperaApplyChangeCheckWindow' |
| | | import additionSubtractionApplication from '@/components/enterprise/additionSubtractionApplication' |
| | | import reinsurance from '@/components/enterprise/reinsurance' |
| | | import factoryChange from '@/components/enterprise/factoryChange' |
| | | import applyReturn from '@/components/enterprise/applyReturn' |
| | | import add_subtract_return from '@/components/enterprise/add_subtract_return' |
| | | import { |
| | | getDetail, |
| | | getChangeDetail, |
| | |
| | | GlobalWindow, |
| | | ApplyChangeDetails, |
| | | OperaApplyChangeCheckWindow, |
| | | applyReturn, |
| | | add_subtract_return, |
| | | OperaInsuranceApply, |
| | | additionSubtractionApplication, |
| | | reinsurance, |
| | | factoryChange |
| | | }, |
| | | data () { |
| | |
| | | this.search() |
| | | }, |
| | | closeOrder() { |
| | | this.$confirm('确认å
³é次ä¿åå?', 'æç¤º', { |
| | | this.$confirm('确认å
³éæ¤è®¢åå?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | |
| | | <div class="desc_item_label_left"> |
| | | <span>æä¿ä¼ä¸ï¼{{ apply.companyName }}</span> |
| | | <span v-if="model.status === 0">ä¿åç¶æï¼å¾
ç¾ç½²</span> |
| | | <<<<<<< HEAD |
| | | <span v-if="model.status === 1">ä¿åç¶æï¼å¾
å®¡æ ¸</span> |
| | | <span v-if="model.status === 2">ä¿åç¶æï¼å·²ä¸ä¼ æ¹å</span> |
| | | ======= |
| | | <span v-if="model.status === 1">ä¿åç¶æï¼å·²ç¾ç« </span> |
| | | <span v-if="model.status === 2">ä¿åç¶æï¼å·²çæ</span> |
| | | >>>>>>> 35bd55ad951fe8c5fb997dfa7bd836ad53db96fe |
| | | <span v-if="model.status === 3 || model.status === 4">ä¿åç¶æï¼éåç³è¯·</span> |
| | | <span v-if="model.status ===5 || model.status === 8">ä¿åç¶æï¼å·²éå</span> |
| | | <span v-if="model.status ===7">ä¿åç¶æï¼å·²å
³é</span> |
| | |
| | | </div> |
| | | <div class="desc_item_label_right"> |
| | | <template v-if="userInfo.type === 1"> |
| | | <el-button v-if="[0, 2, 3, 10].includes(model.status)" type="danger" @click="$refs.applyReturn.open('ç³è¯·éå', {id: dataId})">ç³è¯·éå</el-button> |
| | | <el-button v-if="model.status == 4" type="primary" @click="$refs.OperaInsuranceApply.open('æä¿ç³è¯·', {id: dataId})">忬¡æä¿</el-button> |
| | | <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 == 5" type="primary" @click="viewBaoxiandan">æ¥çç³è¯·å</el-button> |
| | | <el-button v-if="model.status == 5" type="primary" @click="viewBaoxiandan">æ¥çæ¹å</el-button> |
| | | <el-button v-if="model.status == 2" type="primary" @click="goSign">å
³é订å</el-button> |
| | | <el-button type="primary" @click="$refs.ApplyChangeDetails.open('æ¢åç³è¯·è¯¦å',apply,model)">导åºè¯¦å</el-button> |
| | | <!-- <el-button v-if="[0, 2, 3, 10].includes(model.status)" type="danger" @click="$refs.applyReturn.open('ç³è¯·éå', {id: dataId})">ç³è¯·éå</el-button>--> |
| | | <el-button v-if="[5, 8].includes(model.status)" type="primary" @click="$refs.editFactoryChange.open('æ¢åç³è¯·', {id: dataId, applyChangId: modelId})">忬¡æä¿</el-button> |
| | | <el-button type="primary" v-if="model.status == 0" @click="goSign">ç¾ç½²ç³è¯·å</el-button> |
| | | <el-button v-if="[0, 1, 2, 3, 7].includes(model.status)" type="primary" @click="$refs.add_subtract_return.open('ç³è¯·éå', { id: modelId })">ç³è¯·éå</el-button> |
| | | <el-button v-if="model.status == 5" type="primary" @click="viewApplyFile">æ¥çç³è¯·å</el-button> |
| | | <el-button v-if="model.status == 5" type="primary" @click="viewPidan">æ¥çæ¹å</el-button> |
| | | <el-button v-if="[5, 8].includes(model.status)" type="primary" @click="closeOrder">å
³é订å</el-button> |
| | | </template> |
| | | <template v-else> |
| | | <el-button type="primary" @click="$refs.ApplyChangeDetails.open('æ¢åç³è¯·è¯¦å',apply,model)">导åºè¯¦å</el-button> |
| | |
| | | <OperaApplyChangeUnitCheckWindow ref="OperaApplyChangeCheckWindow" @success="successEvent" /> |
| | | <!-- ä¼ä¸ç³è¯·éå --> |
| | | <applyReturn ref="applyReturn" @success="successEvent" /> |
| | | <add_subtract_return ref="add_subtract_return" @success="successEvent" /> |
| | | <!-- æ°å¢æä¿ --> |
| | | <OperaInsuranceApply ref="OperaInsuranceApply" @success="successEvent" /> |
| | | <!-- å åä¿ç³è¯· --> |
| | | <additionSubtractionApplication ref="additionSubtractionApplication" @success="successEvent" /> |
| | | <!-- æ¢åç³è¯· --> |
| | | <factoryChange ref="factoryChange" @success="successEvent" /> |
| | | |
| | | <editFactoryChange ref="editFactoryChange" @success="successEvent" /> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | |
| | | import OperaApplyChangeUnitCheckWindow from '@/components/business/OperaApplyChangeUnitCheckWindow' |
| | | import additionSubtractionApplication from '@/components/enterprise/additionSubtractionApplication' |
| | | import factoryChange from '@/components/enterprise/factoryChange' |
| | | import editFactoryChange from '@/components/enterprise/editFactoryChange' |
| | | import applyReturn from '@/components/enterprise/applyReturn' |
| | | import add_subtract_return from '@/components/enterprise/add_subtract_return' |
| | | import { |
| | | getDetail, |
| | | getChangeDetail, |
| | | applyChagneDetailPage, |
| | | getChangeUnitSignLink |
| | | } from '@/api/business/insuranceApply' |
| | | import { applyChangeOpt } from '@/api/business/applyChange' |
| | | import OperaInsuranceApply from '@/components/enterprise/OperaInsuranceApplyWindow' |
| | | import { mapState } from 'vuex' |
| | | |
| | |
| | | applyReturn, |
| | | OperaInsuranceApply, |
| | | additionSubtractionApplication, |
| | | factoryChange |
| | | factoryChange, |
| | | add_subtract_return, |
| | | editFactoryChange |
| | | }, |
| | | data () { |
| | | return { |
| | |
| | | this.getDetail() |
| | | this.getList() |
| | | }, |
| | | closeOrder() { |
| | | this.$confirm('确认å
³éæ¤è®¢åå?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | applyChangeOpt({ |
| | | optType: 6, |
| | | applyId: this.model.id |
| | | }).then(res => { |
| | | this.getDetail() |
| | | }).catch(e => { |
| | | this.$message.error(e) |
| | | }) |
| | | }).catch(() => { |
| | | |
| | | }); |
| | | }, |
| | | resetting() { |
| | | this.search() |
| | | }, |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="40%" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <el-form ref="form" :model="form" label-width="130px"> |
| | | <el-form-item label="å¡«åç³è¯·è¯´æ"> |
| | | <el-input type="textarea" v-model="form.remark"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { applyChangeOpt } from '@/api/business/applyChange' |
| | | |
| | | export default { |
| | | name: 'add_subtract_return', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data () { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: null, |
| | | remark: '' |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/insurance', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | open (title, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form[this.configData['field.id']] = null |
| | | }) |
| | | this.$nextTick(() => { |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | } |
| | | }) |
| | | }, |
| | | confirm() { |
| | | this.isWorking = true |
| | | applyChangeOpt({ applyId: this.form.id, optIllustration: this.form.remark, optType: 3 }) |
| | | .then(res => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('æä½æå') |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | import confirmJobType from '@/components/enterprise/confirmJobType' |
| | | import { all } from '@/api/business/solutions' |
| | | import { getDetail } from '@/api/business/insuranceApply' |
| | | import { create, getChangeCountCyclePriceVO, applyChagneDetailList } from '@/api/business/applyChange' |
| | | import { create, getChangeCountCyclePriceVO } from '@/api/business/applyChange' |
| | | export default { |
| | | name: 'additionSubtractionApplication', |
| | | extends: BaseOpera, |
| | |
| | | }, |
| | | handleClick(e) { |
| | | this.activeName = e.index |
| | | }, |
| | | getApplyChagneDetailList() { |
| | | applyChagneDetailList({ |
| | | |
| | | }) |
| | | }, |
| | | // è·åæä¿è¯¦æ
|
| | | getDetails() { |
| | |
| | | methods: { |
| | | open (title, arr) { |
| | | this.title = title |
| | | this.dw = '' |
| | | this.gz = '' |
| | | this.form.solutionId = arr.solutionId |
| | | this.data = arr.seleData |
| | | this.visible = true |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="100%" |
| | | text="æä¿ç³è¯·" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <div class="list"> |
| | | <el-form :inline="true" ref="form" :model="form" :rules="rules" class="demo-form-inline"> |
| | | <el-form-item label="ä¿é©æ¹æ¡"> |
| | | <span>{{form.solutionsName}}</span> |
| | | </el-form-item> |
| | | <el-form-item label="æ¹åçæèµ·æ" prop="applyStartTime"> |
| | | <div style="display: flex; flex-direction: column;"> |
| | | <el-date-picker |
| | | v-model="form.applyStartTime" |
| | | type="datetime" |
| | | :picker-options="pickerOptions" |
| | | value-format="yyyy-MM-dd hh:mm:ss" |
| | | format="yyyy-MM-dd hh:mm:ss" |
| | | placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | <span style="color: #F95601; font-size: 14px;">ï¼æ¬¡æ¥çææä¿è¯·äº17:30åæäº¤ï¼è¶
æ¶æäº¤ä»¥ä¿é©å为åï¼</span> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="æä¿å¹´é¾" v-if="item"> |
| | | <span>{{item.minAge}} è³ {{item.maxAge}}</span> |
| | | </el-form-item> |
| | | <el-form-item label="è´¹ç¨" v-if="item"> |
| | | <span>{{item.price}}å
</span> |
| | | <span v-if="item.timeUnit === 0">/天</span> |
| | | <span v-if="item.timeUnit === 1">/åæ</span> |
| | | <span v-if="item.timeUnit === 2">/æ</span> |
| | | <span v-if="item.timeUnit === 3">/å¹´</span> |
| | | <span>/人</span> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="desc_item_from"> |
| | | <el-table |
| | | :data="list" |
| | | border |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | prop="code" |
| | | align="center" |
| | | label="å
³èä¿åå·"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="solutionsName" |
| | | label="ä¿é©æ¹æ¡" |
| | | align="center" |
| | | width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="startTime" |
| | | align="center" |
| | | label="ä¿é©çæèµ·æ"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="endTime" |
| | | align="center" |
| | | label="ä¿é©çææ¢æ"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="insureNum" |
| | | align="center" |
| | | label="æä¿äººæ°"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="serviceDays" |
| | | align="center" |
| | | label="å¨ä¿æ¶é¿ï¼å¤©ï¼"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="currentFee" |
| | | align="center" |
| | | label="å½åè´¹ç¨(å
)"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="fee" |
| | | align="center" |
| | | label="æ»è´¹ç¨(å
)"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="btns"> |
| | | <div class="btns_item"> |
| | | <el-button type="primary" @click="seleUser">éååå·¥</el-button> |
| | | <el-button type="danger" @click="deleItem">å é¤</el-button> |
| | | </div> |
| | | <div class="btns_item"> |
| | | <el-button type="primary" @click="sele">éåæ´¾é£åä½</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | :data="form.factory" |
| | | border |
| | | ref="multipleTable" |
| | | @selection-change="handleSelectionChange" |
| | | style="width: 100%;margin-bottom: 15px;"> |
| | | <el-table-column |
| | | type="selection" |
| | | width="55"> |
| | | </el-table-column> |
| | | <el-table-column label="åºå·" width="80px"> |
| | | <template slot-scope="scope"> |
| | | <span>{{scope.$index + 1}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="memberName" |
| | | label="å§å"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="idCard" |
| | | label="身份è¯å·"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="oldDuName" |
| | | label="åæ´¾é£åä½"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="oldWorkTypeName" |
| | | label="åæå±å·¥ç§"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="duName" |
| | | label="åæ´åæ´¾é£åä½"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="workTypeName" |
| | | label="åæ´åæå±å·¥ç§"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="æä½"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" style="color: red;" @click="dele(scope.$index)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="info" v-if="item"> |
| | | <span v-if="item.specialAgreement">{{item.specialAgreement}}</span> |
| | | <span v-if="item.specialInfo">{{item.specialInfo}}</span> |
| | | <span v-if="item.ortherInfo">{{item.ortherInfo}}</span> |
| | | </div> |
| | | <!-- éæ©åå·¥ --> |
| | | <selectEmployees ref="selectEmployees" @result="getValue" /> |
| | | <!-- æ·»å åå·¥ --> |
| | | <addEmployee ref="addEmployee" @result="getValue" /> |
| | | <!-- 导å
¥åå --> |
| | | <importEmployees ref="importEmployees" @result="getValue" /> |
| | | <!-- ç¡®è®¤å·¥ç§ --> |
| | | <confirmJobType ref="confirmJobType" @result="getUser" /> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import selectEmployees from '@/components/enterprise/selectEmployees' |
| | | import addEmployee from '@/components/enterprise/addEmployee' |
| | | import importEmployees from '@/components/enterprise/importEmployees' |
| | | import confirmJobType from '@/components/enterprise/confirmJobType' |
| | | import { all } from '@/api/business/solutions' |
| | | import { getDetail, findList } from '@/api/business/insuranceApply' |
| | | import { create, update, applyChagneDetailList } from '@/api/business/applyChange' |
| | | export default { |
| | | name: 'editFactoryChange', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, selectEmployees, addEmployee, importEmployees, confirmJobType }, |
| | | data () { |
| | | return { |
| | | form: { |
| | | id: null, |
| | | applyChangId: '', |
| | | solutionId: '', |
| | | solutionsName: '', |
| | | applyStartTime: '', |
| | | applyEndTime: '', |
| | | factory: [] |
| | | }, |
| | | pickerOptions: {}, |
| | | price: '', |
| | | endTime: '', // å®é
ä¿é©çææ¢æ |
| | | company: [], |
| | | seleData: [], |
| | | item: null, |
| | | // éªè¯è§å |
| | | rules: { |
| | | applyStartTime: [ |
| | | { required: true, message: 'è¯·éæ©æ¹åçæèµ·æ' } |
| | | ] |
| | | }, |
| | | list: [] |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/insuranceApply', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | open (title, target) { |
| | | this.title = title |
| | | this.form.addDetailList = [] |
| | | this.form.delDetailList = [] |
| | | this.list = [] |
| | | this.form.id = null |
| | | this.item = null |
| | | this.form.solutionId = '' |
| | | this.form.solutionsName = '' |
| | | this.form.applyStartTime = '' |
| | | this.form.applyEndTime = '' |
| | | if (target && target.id) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form.id = target.id |
| | | this.form.applyChangId = target.applyChangId |
| | | this.getDetails() |
| | | this.getapplyChagneDetailList() |
| | | }) |
| | | } else { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form[this.configData['field.id']] = null |
| | | }) |
| | | } |
| | | this.getCompany() |
| | | this.visible = true |
| | | // this.updatePickerOptions() |
| | | }, |
| | | // è·åæ¢å人å |
| | | getapplyChagneDetailList() { |
| | | applyChagneDetailList({ |
| | | applyChangId: this.form.applyChangId, |
| | | types: [2] |
| | | }).then(res => { |
| | | res.forEach(item => { |
| | | item.idCard = item.memberIdcardNo |
| | | item.oldDuId = item.duId |
| | | item.oldDuName = item.duName |
| | | item.oldWorkTypeName = item.workTypeName |
| | | item.oldWorktypeId = item.worktypeId |
| | | item.workTypeName = '' |
| | | item.worktypeId = '' |
| | | item.duId = '' |
| | | item.duName = '' |
| | | }) |
| | | this.form.factory = res |
| | | }) |
| | | }, |
| | | // è·åæä¿è¯¦æ
|
| | | getDetails() { |
| | | findList({ applyId: this.form.id }) |
| | | .then(res => { |
| | | res.forEach(item => { |
| | | item.idCard = item.idcardNo |
| | | item.fee = '' |
| | | }) |
| | | res.forEach(item => { |
| | | item.oldDuId = item.duId |
| | | item.oldDuName = item.duName |
| | | item.oldWorkTypeName = item.workTypeName |
| | | item.oldWorktypeId = item.worktypeId |
| | | item.workTypeName = '' |
| | | item.worktypeId = '' |
| | | item.duId = '' |
| | | item.duName = '' |
| | | }) |
| | | // this.form.factory = res |
| | | }) |
| | | getDetail(this.form.id) |
| | | .then(res => { |
| | | this.list.push(res) |
| | | this.endTime = res.endTime |
| | | this.form.solutionId = res.solutionId |
| | | this.form.solutionsName = res.solutionsName |
| | | this.pickerOptions = { |
| | | disabledDate(time) { |
| | | // - 8.64e7 |
| | | return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date().getTime() |
| | | } |
| | | }; |
| | | this.changeSolution1(res.solutionId) |
| | | }) |
| | | }, |
| | | deleItem() { |
| | | if (this.seleData.length === 0) { |
| | | this.$message.warning('è³å°éæ©ä¸é¡¹å
容') |
| | | return |
| | | } |
| | | this.seleData.forEach(item => { |
| | | this.form.factory.forEach((row, index) => { |
| | | if (item === row.memberName) { |
| | | this.form.factory.splice(index, 1) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | confirm() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | // if (this.form.addDetailList.length === 0) { |
| | | // this.$message.warning('è³å°æ·»å ä¸é¡¹åå·¥') |
| | | // return |
| | | // } |
| | | for (let i = 0; i < this.form.factory.length; i++) { |
| | | if (!this.form.factory[i].worktypeId || !this.form.factory[i].duId) { |
| | | this.$message.warning('请å®åæ´¾é£åä½åå·¥ç§ä¿¡æ¯') |
| | | return |
| | | } |
| | | } |
| | | this.form.factory.forEach(item => { |
| | | item.idcardNo = item.idCard |
| | | }) |
| | | // let arr = JSON.parse(JSON.stringify(this.form.factory)) |
| | | // arr.forEach(item => { |
| | | // item.idcardNo = item.idCard |
| | | // }) |
| | | this.isWorking = true |
| | | update({ |
| | | id: this.form.applyChangId, |
| | | applyId: this.form.id, |
| | | changeDetailList: this.form.factory, |
| | | validTime: this.form.applyStartTime, |
| | | type: 1 |
| | | }).then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('æä½æå') |
| | | this.$emit('success') |
| | | }).catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }).finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | seleUser() { |
| | | if (!this.form.solutionId) { |
| | | this.$message.warning('请å
éæ©ä¿é©æ¹æ¡') |
| | | return |
| | | } |
| | | this.$refs.selectEmployees.open('éååå·¥', { arr: this.form.delDetailList, price: this.price, insuranceApplyId: this.form.id }) |
| | | }, |
| | | addUser() { |
| | | if (!this.form.solutionId) { |
| | | this.$message.warning('请å
éæ©ä¿é©æ¹æ¡') |
| | | return |
| | | } |
| | | this.$refs.addEmployee.open('æ·»å åå·¥', { arr: this.form.factory, price: this.price }) |
| | | }, |
| | | uploadUser() { |
| | | if (!this.form.solutionId) { |
| | | this.$message.warning('请å
éæ©ä¿é©æ¹æ¡') |
| | | return |
| | | } |
| | | this.$refs.importEmployees.open('ä¸ä¼ åå', { arr: this.form.factory, price: this.price }) |
| | | }, |
| | | // åæ¢æ¹æ¡ |
| | | changeSolution1(e) { |
| | | this.company.forEach(item => { |
| | | if (item.id === e) { |
| | | this.item = item |
| | | } |
| | | }) |
| | | // this.tableData.forEach(item => { |
| | | // item.fee = this.price |
| | | // }) |
| | | }, |
| | | dele(index) { |
| | | this.form.factory.splice(index, 1) |
| | | }, |
| | | getUser(obj) { |
| | | console.log(obj) |
| | | this.seleData.forEach(item => { |
| | | this.form.factory.forEach(row => { |
| | | if (item === row.memberName) { |
| | | row.workTypeName = obj.workTypeName |
| | | row.worktypeId = obj.worktypeId |
| | | row.duName = obj.duName |
| | | row.duId = obj.duId |
| | | } |
| | | }) |
| | | }) |
| | | this.seleData = [] |
| | | this.$refs.multipleTable.clearSelection(); |
| | | }, |
| | | // éæ©åå·¥ |
| | | sele() { |
| | | if (!this.form.solutionId) { |
| | | this.$message.warning('è¯·éæ©ä¿é©æ¹æ¡') |
| | | return |
| | | } |
| | | if (this.seleData.length === 0) { |
| | | this.$message.warning('è¯·éæ©åå·¥') |
| | | return |
| | | } |
| | | this.$refs.confirmJobType.open('确认工ç§', { solutionId: this.form.solutionId }) |
| | | }, |
| | | // æ¥è¯¢å
¨é¨æ¹æ¡ |
| | | getCompany() { |
| | | all({}) |
| | | .then(res => { |
| | | this.company = res |
| | | }) |
| | | }, |
| | | getAgeByIdCard(idCard){ |
| | | const sexAndAge = {} |
| | | //è·åç¨æ·èº«ä»½è¯å·ç |
| | | const userCard = idCard |
| | | //å¦æç¨æ·èº«ä»½è¯å·ç 为undefinedåè¿å空 |
| | | if (!userCard) { |
| | | return sexAndAge |
| | | } |
| | | // è·ååºçæ¥æ |
| | | const yearBirth = userCard.substring(6, 10) |
| | | const monthBirth = userCard.substring(10, 12) |
| | | const dayBirth = userCard.substring(12, 14) |
| | | // è·åå½åå¹´ææ¥å¹¶è®¡ç®å¹´é¾ |
| | | const myDate = new Date() |
| | | const monthNow = myDate.getMonth() + 1 |
| | | const dayNow = myDate.getDate() |
| | | let age = myDate.getFullYear() - yearBirth |
| | | if (monthNow < monthBirth || (monthNow == monthBirth && dayNow < dayBirth)) { |
| | | age-- |
| | | } |
| | | // å¾å°å¹´é¾ |
| | | sexAndAge.age = age |
| | | return sexAndAge.age |
| | | }, |
| | | handleSelectionChange (e) { |
| | | this.seleData = e.map(item => item.memberName) |
| | | }, |
| | | getValue(list) { |
| | | let arr = JSON.parse(JSON.stringify(list)) |
| | | |
| | | arr.forEach(item => { |
| | | item.oldDuId = item.duId |
| | | item.oldDuName = item.duName |
| | | item.oldWorkTypeName = item.workTypeName |
| | | item.oldWorktypeId = item.worktypeId |
| | | |
| | | item.duId = '' |
| | | item.duName = '' |
| | | item.workTypeName = '' |
| | | item.worktypeId = '' |
| | | }) |
| | | this.form.factory.push(...arr) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .list { |
| | | width: 100%; |
| | | } |
| | | .btns { |
| | | width: 100%; |
| | | margin-bottom: 15px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .btns_item { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | } |
| | | .submit { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-bottom: 15px; |
| | | } |
| | | .desc_item_from { |
| | | width: 100%; |
| | | margin-bottom: 10px; |
| | | .desc_item_from_page { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: end; |
| | | margin-top: 10px; |
| | | } |
| | | } |
| | | .desc_item_cate { |
| | | width: 100%; |
| | | margin-bottom: 10px; |
| | | } |
| | | .info { |
| | | width: 100%; |
| | | font-size: 14px; |
| | | color: black; |
| | | } |
| | | </style> |
| | |
| | | <div style="display: flex; flex-direction: column;"> |
| | | <el-date-picker |
| | | v-model="form.applyStartTime" |
| | | type="date" |
| | | type="datetime" |
| | | :picker-options="pickerOptions" |
| | | value-format="yyyy-MM-dd" |
| | | format="yyyy å¹´ MM æ dd æ¥" |
| | | value-format="yyyy-MM-dd hh:mm:ss" |
| | | format="yyyy-MM-dd hh:mm:ss" |
| | | placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | <span style="color: #F95601; font-size: 14px;">ï¼æ¬¡æ¥çææä¿è¯·äº17:30åæäº¤ï¼è¶
æ¶æäº¤ä»¥ä¿é©å为åï¼</span> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="100%" |
| | | text="æä¿ç³è¯·" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <div class="list"> |
| | | <el-form :inline="true" ref="form" :model="form" :rules="rules" class="demo-form-inline"> |
| | | <el-form-item label="ä¿é©æ¹æ¡"> |
| | | <span>{{form.solutionsName}}</span> |
| | | </el-form-item> |
| | | <el-form-item label="æ¹åçæèµ·æ" prop="applyStartTime"> |
| | | <div style="display: flex; flex-direction: column;"> |
| | | <el-date-picker |
| | | @change="changeApplyStartTime" |
| | | v-model="form.applyStartTime" |
| | | type="date" |
| | | :picker-options="pickerOptions" |
| | | value-format="yyyy-MM-dd" |
| | | format="yyyy å¹´ MM æ dd æ¥" |
| | | placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | <span style="color: #F95601; font-size: 14px;">ï¼æ¬¡æ¥çææä¿è¯·äº17:30åæäº¤ï¼è¶
æ¶æäº¤ä»¥ä¿é©å为åï¼</span> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="æä¿å¹´é¾" v-if="item"> |
| | | <span>{{item.minAge}} è³ {{item.maxAge}}</span> |
| | | </el-form-item> |
| | | <el-form-item label="è´¹ç¨" v-if="item"> |
| | | <span>{{item.price}}å
</span> |
| | | <span v-if="item.timeUnit === 0">/天</span> |
| | | <span v-if="item.timeUnit === 1">/åæ</span> |
| | | <span v-if="item.timeUnit === 2">/æ</span> |
| | | <span v-if="item.timeUnit === 3">/å¹´</span> |
| | | <span>/人</span> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="desc_item_from"> |
| | | <el-table |
| | | :data="list" |
| | | border |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | prop="code" |
| | | align="center" |
| | | label="å
³èä¿åå·"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="solutionsName" |
| | | label="ä¿é©æ¹æ¡" |
| | | align="center" |
| | | width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="startTime" |
| | | align="center" |
| | | label="ä¿é©çæèµ·æ"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="endTime" |
| | | align="center" |
| | | label="ä¿é©çææ¢æ"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="insureNum" |
| | | align="center" |
| | | label="æä¿äººæ°"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="serviceDays" |
| | | align="center" |
| | | label="å¨ä¿æ¶é¿ï¼å¤©ï¼"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="currentFee" |
| | | align="center" |
| | | label="å½åè´¹ç¨(å
)"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="fee" |
| | | align="center" |
| | | label="æ»è´¹ç¨(å
)"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="desc_item_cate"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="å ä¿åå·¥" name="0"></el-tab-pane> |
| | | <el-tab-pane label="åä¿åå·¥" name="1"></el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | <div class="btns"> |
| | | <div class="btns_item"> |
| | | <el-button type="primary" @click="seleUser">éååå·¥</el-button> |
| | | <el-button type="primary" @click="uploadUser" v-if="activeName !== '1'">导å
¥åå·¥</el-button> |
| | | <el-button type="primary" @click="addUser" v-if="activeName !== '1'">æ·»å åå·¥</el-button> |
| | | <el-button type="danger" @click="deleItem">å é¤</el-button> |
| | | </div> |
| | | <div class="btns_item" v-if="activeName !== '1'"> |
| | | <el-button type="primary" @click="sele">éåæ´¾é£åä½</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | :data="activeName === '0' ? form.addDetailList : form.delDetailList" |
| | | border |
| | | show-summary |
| | | :summary-method="getSummaries" |
| | | ref="multipleTable" |
| | | @selection-change="handleSelectionChange" |
| | | style="width: 100%;margin-bottom: 15px;"> |
| | | <el-table-column |
| | | type="selection" |
| | | width="55"> |
| | | </el-table-column> |
| | | <el-table-column label="åºå·" width="80px"> |
| | | <template slot-scope="scope"> |
| | | <span>{{scope.$index + 1}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="memberName" |
| | | label="å§å"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="idCard" |
| | | label="身份è¯å·"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="å¹´é¾"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="item"> |
| | | <span style="color: red;" v-if="(getAgeByIdCard(row.idCard) < item.minAge) || (getAgeByIdCard(row.idCard) > item.maxAge)">{{getAgeByIdCard(row.idCard)}}</span> |
| | | <span v-else>{{ getAgeByIdCard(row.idCard) }}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="duName" |
| | | label="æ´¾é£åä½"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="workTypeName" |
| | | label="æå±å·¥ç§"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="è´¹ç¨"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="activeName === '0'">{{row.fee}}</span> |
| | | <span v-else>-{{row.fee}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="æä½"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" style="color: red;" @click="dele(scope.$index)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="info" v-if="item"> |
| | | <span v-if="item.specialAgreement">{{item.specialAgreement}}</span> |
| | | <span v-if="item.specialInfo">{{item.specialInfo}}</span> |
| | | <span v-if="item.ortherInfo">{{item.ortherInfo}}</span> |
| | | </div> |
| | | <!-- éæ©åå·¥ --> |
| | | <selectEmployees ref="selectEmployees" @result="getValue" /> |
| | | <!-- æ·»å åå·¥ --> |
| | | <addEmployee ref="addEmployee" @result="getValue" /> |
| | | <!-- 导å
¥åå --> |
| | | <importEmployees ref="importEmployees" @result="getValue" /> |
| | | <!-- ç¡®è®¤å·¥ç§ --> |
| | | <confirmJobType ref="confirmJobType" @result="getUser" /> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import selectEmployees from '@/components/enterprise/selectEmployees' |
| | | import addEmployee from '@/components/enterprise/addEmployee' |
| | | import importEmployees from '@/components/enterprise/importEmployees' |
| | | import confirmJobType from '@/components/enterprise/confirmJobType' |
| | | import { all } from '@/api/business/solutions' |
| | | import { getDetail } from '@/api/business/insuranceApply' |
| | | import { update, getChangeCountCyclePriceVO, applyChagneDetailList } from '@/api/business/applyChange' |
| | | export default { |
| | | name: 'reinsurance', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, selectEmployees, addEmployee, importEmployees, confirmJobType }, |
| | | data () { |
| | | return { |
| | | form: { |
| | | id: null, |
| | | applyChangId: '', |
| | | solutionId: '', |
| | | solutionsName: '', |
| | | applyStartTime: '', |
| | | applyEndTime: '', |
| | | addDetailList: [], |
| | | delDetailList: [], |
| | | }, |
| | | activeName: '0', |
| | | pickerOptions: {}, |
| | | price: '', |
| | | endTime: '', // å®é
ä¿é©çææ¢æ |
| | | company: [], |
| | | seleData: [], |
| | | item: null, |
| | | // éªè¯è§å |
| | | rules: { |
| | | applyStartTime: [ |
| | | { required: true, message: 'è¯·éæ©æ¹åçæèµ·æ' } |
| | | ] |
| | | }, |
| | | list: [] |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/insuranceApply', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | open (title, target) { |
| | | this.title = title |
| | | this.form.addDetailList = [] |
| | | this.form.delDetailList = [] |
| | | this.list = [] |
| | | this.form.id = null |
| | | this.item = null |
| | | this.form.solutionId = '' |
| | | this.form.solutionsName = '' |
| | | this.form.applyStartTime = '' |
| | | this.form.applyEndTime = '' |
| | | if (target && target.id) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form.id = target.id |
| | | this.form.applyChangId = target.applyChangId |
| | | this.getDetails() |
| | | }) |
| | | } else { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form[this.configData['field.id']] = null |
| | | }) |
| | | } |
| | | this.getCompany() |
| | | this.visible = true |
| | | // this.updatePickerOptions() |
| | | }, |
| | | changeApplyStartTime(e) { |
| | | getChangeCountCyclePriceVO({ |
| | | applyId: this.form.id, |
| | | validTime: e |
| | | }).then(res => { |
| | | this.price = res.cyclePrice |
| | | this.form.addDetailList.forEach(item => { |
| | | item.fee = res.cyclePrice |
| | | }) |
| | | this.form.delDetailList.forEach(item => { |
| | | item.fee = res.cyclePrice |
| | | }) |
| | | }) |
| | | }, |
| | | handleClick(e) { |
| | | this.activeName = e.index |
| | | }, |
| | | // è·åæä¿è¯¦æ
|
| | | getDetails() { |
| | | applyChagneDetailList({ |
| | | applyChangId: this.form.applyChangId, |
| | | types: [0] |
| | | }).then(res => { |
| | | res.forEach(item => { |
| | | item.fee = '' |
| | | item.idCard = item.memberIdcardNo |
| | | item.workTypeName = '' |
| | | item.worktypeId = '' |
| | | item.duName = '' |
| | | item.duId = '' |
| | | }) |
| | | this.form.addDetailList = res |
| | | }) |
| | | applyChagneDetailList({ |
| | | applyChangId: this.form.applyChangId, |
| | | types: [1] |
| | | }).then(res => { |
| | | res.forEach(item => { |
| | | item.fee = '' |
| | | item.idCard = item.memberIdcardNo |
| | | item.workTypeName = '' |
| | | item.worktypeId = '' |
| | | item.duName = '' |
| | | item.duId = '' |
| | | }) |
| | | this.form.delDetailList = res |
| | | }) |
| | | getDetail(this.form.id) |
| | | .then(res => { |
| | | this.list.push(res) |
| | | this.endTime = res.endTime |
| | | this.form.solutionId = res.solutionId |
| | | this.form.solutionsName = res.solutionsName |
| | | this.pickerOptions = { |
| | | disabledDate(time) { |
| | | // - 8.64e7 |
| | | return time.getTime() > new Date(res.endTime).getTime() || time.getTime() < new Date().getTime() |
| | | } |
| | | }; |
| | | this.changeSolution1(res.solutionId) |
| | | }) |
| | | }, |
| | | getSummaries(param) { |
| | | const { columns, data } = param |
| | | const sums = [] |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = 'æ»ä»·' |
| | | return |
| | | } else if (index === 7) { |
| | | let total = 0 |
| | | if (this.activeName === '0') { |
| | | this.form.addDetailList.forEach(item => { |
| | | total += item.fee |
| | | }) |
| | | sums[index] = total |
| | | return |
| | | } else { |
| | | this.form.delDetailList.forEach(item => { |
| | | total += item.fee |
| | | }) |
| | | sums[index] = '-' + total |
| | | return |
| | | } |
| | | sums[index] = '' |
| | | } |
| | | }) |
| | | return sums |
| | | }, |
| | | deleItem() { |
| | | if (this.seleData.length === 0) { |
| | | this.$message.warning('è³å°éæ©ä¸é¡¹å
容') |
| | | return |
| | | } |
| | | if (this.activeName === '0') { |
| | | this.seleData.forEach(item => { |
| | | this.form.addDetailList.forEach((row, index) => { |
| | | if (item === row.name) { |
| | | this.form.addDetailList.splice(index, 1) |
| | | } |
| | | }) |
| | | }) |
| | | } else { |
| | | this.seleData.forEach(item => { |
| | | this.form.delDetailList.forEach((row, index) => { |
| | | if (item === row.name) { |
| | | this.form.delDetailList.splice(index, 1) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | confirm() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | // if (this.form.addDetailList.length === 0) { |
| | | // this.$message.warning('è³å°æ·»å ä¸é¡¹åå·¥') |
| | | // return |
| | | // } |
| | | for (let i = 0; i < this.form.addDetailList.length; i++) { |
| | | if (!this.form.addDetailList[i].worktypeId || !this.form.addDetailList[i].duId) { |
| | | this.$message.warning('请å®åå ä¿æ´¾é£åä½åå·¥ç§ä¿¡æ¯') |
| | | return |
| | | } |
| | | } |
| | | for (let i = 0; i < this.form.delDetailList.length; i++) { |
| | | if (!this.form.delDetailList[i].worktypeId || !this.form.delDetailList[i].duId) { |
| | | this.$message.warning('请å®ååä¿æ´¾é£åä½åå·¥ç§ä¿¡æ¯') |
| | | return |
| | | } |
| | | } |
| | | this.form.addDetailList.forEach(item => { |
| | | item.idcardNo = item.idCard |
| | | }) |
| | | this.form.delDetailList.forEach(item => { |
| | | item.idcardNo = item.idCard |
| | | }) |
| | | // let arr = JSON.parse(JSON.stringify(this.form.addDetailList)) |
| | | // arr.forEach(item => { |
| | | // item.idcardNo = item.idCard |
| | | // }) |
| | | this.isWorking = true |
| | | update({ |
| | | id: this.form.applyChangId, |
| | | applyId: this.form.id, |
| | | addDetailList: this.form.addDetailList, |
| | | delDetailList: this.form.delDetailList, |
| | | validTime: this.form.applyStartTime, |
| | | type: 0 |
| | | }).then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('æä½æå') |
| | | this.$emit('success') |
| | | }).catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }).finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | seleUser() { |
| | | if (!this.form.solutionId) { |
| | | this.$message.warning('请å
éæ©ä¿é©æ¹æ¡') |
| | | return |
| | | } |
| | | if (this.activeName === '0') { |
| | | this.$refs.selectEmployees.open('éååå·¥', { arr: this.form.addDetailList, price: this.price, notInInsuranceApplyId: this.form.id }) |
| | | } else { |
| | | this.$refs.selectEmployees.open('éååå·¥', { arr: this.form.delDetailList, price: this.price, insuranceApplyId: this.form.id }) |
| | | } |
| | | }, |
| | | addUser() { |
| | | if (!this.form.solutionId) { |
| | | this.$message.warning('请å
éæ©ä¿é©æ¹æ¡') |
| | | return |
| | | } |
| | | if (this.activeName === '0') { |
| | | this.$refs.addEmployee.open('æ·»å åå·¥', { arr: this.form.addDetailList, price: this.price }) |
| | | } else { |
| | | this.$refs.addEmployee.open('æ·»å åå·¥', { arr: this.form.delDetailList, price: this.price }) |
| | | } |
| | | }, |
| | | uploadUser() { |
| | | if (!this.form.solutionId) { |
| | | this.$message.warning('请å
éæ©ä¿é©æ¹æ¡') |
| | | return |
| | | } |
| | | if (this.activeName === '0') { |
| | | this.$refs.importEmployees.open('ä¸ä¼ åå', { arr: this.form.addDetailList, price: this.price }) |
| | | } else { |
| | | this.$refs.importEmployees.open('ä¸ä¼ åå', { arr: this.form.delDetailList, price: this.price }) |
| | | } |
| | | }, |
| | | // åæ¢æ¹æ¡ |
| | | changeSolution1(e) { |
| | | this.company.forEach(item => { |
| | | if (item.id === e) { |
| | | this.item = item |
| | | } |
| | | }) |
| | | // this.tableData.forEach(item => { |
| | | // item.fee = this.price |
| | | // }) |
| | | }, |
| | | dele(index) { |
| | | if (this.activeName === '0') { |
| | | this.form.addDetailList.splice(index, 1) |
| | | } else { |
| | | this.form.delDetailList.splice(index, 1) |
| | | } |
| | | }, |
| | | getUser(obj) { |
| | | this.seleData.forEach(item => { |
| | | if (this.activeName === '0') { |
| | | this.form.addDetailList.forEach(row => { |
| | | if (item === row.name) { |
| | | row.workTypeName = obj.workTypeName |
| | | row.worktypeId = obj.worktypeId |
| | | row.duName = obj.duName |
| | | row.duId = obj.duId |
| | | } |
| | | }) |
| | | } else { |
| | | this.form.delDetailList.forEach(row => { |
| | | if (item === row.name) { |
| | | row.workTypeName = obj.workTypeName |
| | | row.worktypeId = obj.worktypeId |
| | | row.duName = obj.duName |
| | | row.duId = obj.duId |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | this.seleData = [] |
| | | this.$refs.multipleTable.clearSelection(); |
| | | }, |
| | | // éæ©åå·¥ |
| | | sele() { |
| | | if (!this.form.solutionId) { |
| | | this.$message.warning('è¯·éæ©ä¿é©æ¹æ¡') |
| | | return |
| | | } |
| | | if (this.seleData.length === 0) { |
| | | this.$message.warning('è¯·éæ©åå·¥') |
| | | return |
| | | } |
| | | this.$refs.confirmJobType.open('确认工ç§', { solutionId: this.form.solutionId }) |
| | | }, |
| | | // æ¥è¯¢å
¨é¨æ¹æ¡ |
| | | getCompany() { |
| | | all({}) |
| | | .then(res => { |
| | | this.company = res |
| | | }) |
| | | }, |
| | | getAgeByIdCard(idCard){ |
| | | if (!idCard) return '' |
| | | const sexAndAge = {} |
| | | //è·åç¨æ·èº«ä»½è¯å·ç |
| | | const userCard = idCard |
| | | //å¦æç¨æ·èº«ä»½è¯å·ç 为undefinedåè¿å空 |
| | | if (!userCard) { |
| | | return sexAndAge |
| | | } |
| | | // è·ååºçæ¥æ |
| | | const yearBirth = userCard.substring(6, 10) |
| | | const monthBirth = userCard.substring(10, 12) |
| | | const dayBirth = userCard.substring(12, 14) |
| | | // è·åå½åå¹´ææ¥å¹¶è®¡ç®å¹´é¾ |
| | | const myDate = new Date() |
| | | const monthNow = myDate.getMonth() + 1 |
| | | const dayNow = myDate.getDate() |
| | | let age = myDate.getFullYear() - yearBirth |
| | | if (monthNow < monthBirth || (monthNow == monthBirth && dayNow < dayBirth)) { |
| | | age-- |
| | | } |
| | | // å¾å°å¹´é¾ |
| | | sexAndAge.age = age |
| | | return sexAndAge.age |
| | | }, |
| | | handleSelectionChange (e) { |
| | | this.seleData = e.map(item => item.name) |
| | | }, |
| | | getValue(list) { |
| | | console.log(list) |
| | | if (this.activeName === '0') { |
| | | this.form.addDetailList.push(...list) |
| | | } else { |
| | | this.form.delDetailList.push(...list) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .list { |
| | | width: 100%; |
| | | } |
| | | .btns { |
| | | width: 100%; |
| | | margin-bottom: 15px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .btns_item { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | } |
| | | .submit { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-bottom: 15px; |
| | | } |
| | | .desc_item_from { |
| | | width: 100%; |
| | | margin-bottom: 10px; |
| | | .desc_item_from_page { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: end; |
| | | margin-top: 10px; |
| | | } |
| | | } |
| | | .desc_item_cate { |
| | | width: 100%; |
| | | margin-bottom: 10px; |
| | | } |
| | | .info { |
| | | width: 100%; |
| | | font-size: 14px; |
| | | color: black; |
| | | } |
| | | </style> |
| | |
| | | import {all as solutionAll, all} from '@/api/business/solutions' |
| | | import {pageAll as companyAll} from "@/api/business/company"; |
| | | export default { |
| | | name: 'add_subtract', |
| | | name: 'switchCourt', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaApplyChangeUnitDetailWindow }, |
| | | data () { |
| | |
| | | <el-table-column prop="status" label="ä¿åç¶æ" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.status === 0">å¾
ç¾ç½²</span> |
| | | <span v-if="row.status === 1">å·²ç¾ç« </span> |
| | | <span v-if="row.status === 2">å·²ä¸ä¼ æ¹å</span> |
| | | <span v-if="row.status === 3">éåç³è¯·</span> |
| | | <span v-if="row.status === 1">å¾
å®¡æ ¸</span> |
| | | <span v-if="row.status === 2">å·²çæ</span> |
| | | <span v-if="row.status === 3 || row.status === 4">ç³è¯·éå</span> |
| | | <span v-if="row.status === 5 || row.status === 8">å·²éå</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="applyCode" label="å
³èä¿åå·" min-width="100px"></el-table-column> |
| | |
| | | <TableLayout :permissions="['business:applychange:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="ä¿åç¶æ" prop="status"> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-select v-model="searchForm.status" placeholder="è¯·éæ©" @change="search"> |
| | | <el-option label="å
¨é¨" value=""></el-option> |
| | | <el-option label="å¾
ç¾ç½²" value="0"></el-option> |
| | | <el-option label="å·²ç¾ç« " value="1"></el-option> |
| | | <el-option label="å·²ä¸ä¼ æ¹å" value="2"></el-option> |
| | | <el-option label="éåç³è¯·" value="3"></el-option> |
| | | <el-option label="å¾
å®¡æ ¸" value="1"></el-option> |
| | | <el-option label="å·²çæ" value="2"></el-option> |
| | | <el-option label="ç³è¯·éå" value="3"></el-option> |
| | | <!-- 3 4 齿¯éåç³è¯·ä¸--> |
| | | <el-option label="å·²éå" value="5"></el-option> |
| | | <el-option label="å·²å
³é" value="6"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æä¿ä¼ä¸" prop="status"> |
| | | <el-select v-model="searchForm.status" placeholder="è¯·éæ©"> |
| | | <el-form-item label="ä¿é©æ¹æ¡" prop="baseSolutionsId"> |
| | | <el-select v-model="searchForm.baseSolutionsId" placeholder="è¯·éæ©" @change="search"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ä¿é©æ¹æ¡" prop="status"> |
| | | <el-select v-model="searchForm.status" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | v-for="item in solutionList" |
| | | :key="item.baseId" |
| | | :label="item.name" |
| | | :value="item.baseId"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æäº¤æ¥æ" prop="status"> |
| | | <el-date-picker |
| | | v-model="searchForm.status" |
| | | @change="changeTime" |
| | | v-model="searchForm.time" |
| | | type="daterange" |
| | | value-format="yyyy-MM-dd" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ"> |
| | |
| | | <span>{{scope.$index + 1}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="status" label="ä¿åç¶æ" min-width="100px"> |
| | | <el-table-column prop="status" label="ç¶æ" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.status === 0">å¾
ç¾ç½²</span> |
| | | <span v-if="row.status === 1">å·²ç¾ç« </span> |
| | | <span v-if="row.status === 2">å·²ä¸ä¼ æ¹å</span> |
| | | <span v-if="row.status === 3">éåç³è¯·</span> |
| | | <span v-if="row.status === 1">å¾
å®¡æ ¸</span> |
| | | <span v-if="row.status === 2">å·²çæ</span> |
| | | <span v-if="row.status === 3 || row.status === 4">ç³è¯·éå</span> |
| | | <span v-if="row.status === 5 || row.status === 8">å·²éå</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="æä¿ä¼ä¸" min-width="100px"></el-table-column> |
| | | <el-table-column prop="validCode" label="æ¹åå·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="code" label="å
³èä¿åå·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="code" label="ä¿é©æ¹æ¡" min-width="100px"></el-table-column> |
| | | <el-table-column prop="code" label="å ä¿äººæ°ï¼äººï¼" min-width="100px"></el-table-column> |
| | | <el-table-column prop="code" label="åä¿äººæ°ï¼äººï¼" min-width="100px"></el-table-column> |
| | | <el-table-column prop="code" label="è´¹ç¨åæ´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="solutionsName" label="ä¿é©æ¹æ¡" min-width="100px"></el-table-column> |
| | | <el-table-column prop="changeNum" label="æ¢å人æ°ï¼äººï¼" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="æäº¤æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="startTime" label="æ¹åçæèµ·æ" min-width="100px"></el-table-column> |
| | | <el-table-column |
| | | label="æä½" |
| | | min-width="120" |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaApplyChangeUnitDetailWindow from '@/components/business/OperaApplyChangeUnitDetailWindow' |
| | | import {all as solutionAll} from "@/api/business/solutions"; |
| | | import {all as solutionAll, all} from '@/api/business/solutions' |
| | | import {pageAll as companyAll} from "@/api/business/company"; |
| | | export default { |
| | | name: 'switchCourt', |
| | |
| | | // æç´¢ |
| | | searchForm: { |
| | | status: '', |
| | | type: '' |
| | | type: '1', |
| | | solutionsId: '', |
| | | createDateE: '', |
| | | createDateS: '', |
| | | time: [] |
| | | }, |
| | | options: [] |
| | | solutionList:[], |
| | | companyList:[] |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | this.loadSelectList() |
| | | }, |
| | | methods:{ |
| | | // handlePageChange() { |
| | | // this.search() |
| | | // }, |
| | | loadSelectList() { |
| | | solutionAll({dataType:2}).then(res => { |
| | | this.solutionList = res |
| | | }).catch(err => { |
| | | }) |
| | | companyAll({}).then(res => { |
| | | this.companyList = res |
| | | }).catch(err => { |
| | | }) |
| | | methods: { |
| | | loadSelectList() { |
| | | solutionAll({dataType:2}).then(res => { |
| | | this.solutionList = res |
| | | }).catch(err => { |
| | | }) |
| | | companyAll({}).then(res => { |
| | | this.companyList = res |
| | | }).catch(err => { |
| | | }) |
| | | }, |
| | | changeTime(e) { |
| | | if (e.length > 0) { |
| | | this.searchForm.createDateS = e[0] |
| | | this.searchForm.createDateE = e[1] |
| | | } else { |
| | | this.searchForm.createDateS = '' |
| | | this.searchForm.createDateE = '' |
| | | } |
| | | this.search() |
| | | }, |
| | | reset() { |
| | | this.searchForm.createDateS = '' |
| | | this.searchForm.createDateE = '' |
| | | this.searchForm.time = [] |
| | | this.$refs.searchForm.resetFields(); |
| | | this.search() |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | return ApiResponse.success(applyChagneDetailService.findPageForCompany(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("å表æ¥è¯¢") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:applychagnedetail:query") |
| | | public ApiResponse<List<ApplyChagneDetail>> findList (@RequestBody ApplyDetailPageDTO applyDetailPageDTO) { |
| | | return ApiResponse.success(applyChagneDetailService.findListForCompany(applyDetailPageDTO)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:applychagnedetail:exportExcel") |
| | |
| | | } |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ·»å å·¥ç§") |
| | | @ApiOperation("æ·»å æ¹æ¡å·¥ç§") |
| | | @PostMapping("/createSolution") |
| | | @RequiresPermissions("business:dispatchunit:create") |
| | | public ApiResponse createSolution(@RequestBody SaveDispatchUnitDTO saveDispatchUnitDTO) { |
| | |
| | | public ApiResponse<InsuranceApply> findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(insuranceApplyService.findDetail(id)); |
| | | } |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @ApiOperation("ä¼ä¸ç¾ç½²ä¿å") |
| | | @GetMapping("/getSignLink/{id}") |
| | | @RequiresPermissions("business:insuranceapply:query") |
| | | public ApiResponse<String> getSignLink(@PathVariable Integer id) { |
| | |
| | | insuranceApplyService.applyOpt(insuranceApplyOptDTO); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("è·åä¿åæ¢æä¸åå§éé¢") |
| | | @PostMapping("/getCountCyclePriceVO") |
| | |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | 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.model.Notices; |
| | | import com.doumee.service.business.NoticesService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:notices:query") |
| | | public ApiResponse<PageData<Notices>> findPage (@RequestBody PageWrap<Notices> pageWrap) { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | pageWrap.getModel().setCompanyId(loginUserInfo.getCompanyId()); |
| | | pageWrap.getModel().setPalt(Constants.ONE); |
| | | return ApiResponse.success(noticesService.findPage(pageWrap)); |
| | | } |
| | | |
| | |
| | | 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.Notices; |
| | | import com.doumee.service.business.NoticesService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:notices:query") |
| | | public ApiResponse<PageData<Notices>> findPage (@RequestBody PageWrap<Notices> pageWrap) { |
| | | pageWrap.getModel().setPalt(Constants.ZERO); |
| | | return ApiResponse.success(noticesService.findPage(pageWrap)); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | public enum NoticeObjectType { |
| | | INSURANCE_APPLY(0, "æä¿ç³è¯·","ä¿é©æ¹æ¡"), |
| | | APPLY_CHANGE(1, "å åä¿ç³è¯·","ä¿é©æ¹æ¡"), |
| | | CHANGE_FACTORY(2, "åå·¥æ¢åç³è¯·","ä¿é©æ¹æ¡"), |
| | | DISPATCH_UNIT(3, "æ´¾é£åä½ç³è¯·","æ´¾é£åä½"), |
| | | TAXES(4, "å¼ç¥¨ç³è¯·","å¼ç¥¨éé¢"), |
| | | SETTLE_CLAIMS(5, "æ¥æ¡çèµ","æ¥æ¡äºº") |
| | | ; |
| | | // æååé |
| | | private int key; |
| | | private String name; |
| | | private String info; |
| | | |
| | | // æé æ¹æ³ |
| | | NoticeObjectType(int key, String name,String info) { |
| | | this.name = name; |
| | | this.key = key; |
| | | this.info = info; |
| | | } |
| | | |
| | | // æ®éæ¹æ³ |
| | | public static String getName(int index) { |
| | | for (NoticeObjectType c : NoticeObjectType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | // get set æ¹æ³ |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public int getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(int key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | public String getInfo() { |
| | | return info; |
| | | } |
| | | |
| | | public void setInfo(String info) { |
| | | this.info = info; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | public enum NoticeType { |
| | | |
| | | ZERO(0, "å¾
审æ¹","","","å¾
å®¡æ ¸","å·²ç³è¯·","å¾
åç"), |
| | | ONE(1, "ä¼ä¸å¾
ç¾ç½²","","","å·¥ç§å¾
å®¡æ ¸","","宿åç"), |
| | | TWO(2, "å¾
åºå","å¾
审æ¹","å¾
审æ¹","","",""), |
| | | THREE(3, "ç³è¯·éå","ç³è¯·éå","ç³è¯·éå","","",""), |
| | | FOUR(4, "å·²éå","å·²éå","å·²éå","","",""), |
| | | FIVE(5, "ç³è¯·é©³å","ç³è¯·é©³å","ç³è¯·é©³å","","","") |
| | | ; |
| | | |
| | | // æååé |
| | | private int status; |
| | | private String insuranceApplyDetail; |
| | | private String applyChangeDetail; |
| | | private String changeFactoryDetail; |
| | | private String dispatchUnitDetail; |
| | | private String taxesDetail; |
| | | private String settleClaimsDetail; |
| | | |
| | | // æé æ¹æ³ |
| | | NoticeType(int status, String insuranceApplyDetail,String applyChangeDetail |
| | | , String changeFactoryDetail,String dispatchUnitDetail |
| | | , String taxesDetail,String settleClaimsDetail) { |
| | | this.status = status; |
| | | this.insuranceApplyDetail = insuranceApplyDetail; |
| | | this.applyChangeDetail = applyChangeDetail; |
| | | this.changeFactoryDetail = changeFactoryDetail; |
| | | this.dispatchUnitDetail = dispatchUnitDetail; |
| | | this.taxesDetail = taxesDetail; |
| | | this.settleClaimsDetail = settleClaimsDetail; |
| | | } |
| | | |
| | | // æ®éæ¹æ³ |
| | | public static String getDetail(int status,int type) { |
| | | for (NoticeType c : NoticeType.values()) { |
| | | if (c.getStatus() == status) { |
| | | if(type==NoticeObjectType.INSURANCE_APPLY.getKey() ){ |
| | | return c.getInsuranceApplyDetail(); |
| | | }else if(type == NoticeObjectType.APPLY_CHANGE.getKey()){ |
| | | return c.getApplyChangeDetail(); |
| | | }else if(type == NoticeObjectType.CHANGE_FACTORY.getKey()){ |
| | | return c.getChangeFactoryDetail(); |
| | | }else if(type == NoticeObjectType.DISPATCH_UNIT.getKey()){ |
| | | return c.getDispatchUnitDetail(); |
| | | }else if(type == NoticeObjectType.TAXES.getKey()){ |
| | | return c.getTaxesDetail(); |
| | | }else if(type == NoticeObjectType.SETTLE_CLAIMS.getKey()){ |
| | | return c.getSettleClaimsDetail(); |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // get set æ¹æ³ |
| | | public int getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(int status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getInsuranceApplyDetail() { |
| | | return insuranceApplyDetail; |
| | | } |
| | | |
| | | public void setInsuranceApplyDetail(String name) { |
| | | this.insuranceApplyDetail = insuranceApplyDetail; |
| | | } |
| | | |
| | | public String getApplyChangeDetail() { |
| | | return applyChangeDetail; |
| | | } |
| | | |
| | | public void setApplyChangeDetail(String info) { |
| | | this.applyChangeDetail = applyChangeDetail; |
| | | } |
| | | |
| | | public String getChangeFactoryDetail() { |
| | | return changeFactoryDetail; |
| | | } |
| | | |
| | | public void setChangeFactoryDetail(String info) { |
| | | this.changeFactoryDetail = changeFactoryDetail; |
| | | } |
| | | |
| | | public String getDispatchUnitDetail() { |
| | | return dispatchUnitDetail; |
| | | } |
| | | |
| | | public void setDispatchUnitDetail(String info) { |
| | | this.dispatchUnitDetail = dispatchUnitDetail; |
| | | } |
| | | |
| | | public String getTaxesDetail() { |
| | | return taxesDetail; |
| | | } |
| | | |
| | | public void setTaxesDetail(String info) { |
| | | this.taxesDetail = taxesDetail; |
| | | } |
| | | |
| | | public String getSettleClaimsDetail() { |
| | | return settleClaimsDetail; |
| | | } |
| | | |
| | | public void setSettleClaimsDetail(String info) { |
| | | this.settleClaimsDetail = settleClaimsDetail; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | public static BigDecimal countDetailFee(Solutions solutions,Date startDate, Date endDate){ |
| | | //æ¥è¯¢ä¿é©å®é
卿 |
| | | Integer cycle = DateUtil.calculateBetween(endDate,startDate,solutions.getTimeUnit()); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.join; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.Notices; |
| | | import com.github.yulichang.base.mapper.MPJJoinMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | public interface NoticesJoinMapper extends MPJJoinMapper<Notices> { |
| | | |
| | | } |
| | |
| | | @TableField(exist = false) |
| | | private String workTypeName; |
| | | |
| | | @ApiModelProperty(value = "ä¼ä¸åç§°") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "ä¿é©ç¶æ:1=ä¿éä¸;2=ä¸å¨ä¿") |
| | | @TableField(exist = false) |
| | | private Integer solutionsStatus; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "æåºç ", example = "1") |
| | | @ExcelColumn(name="æåºç ") |
| | | private Integer sortnum; |
| | | |
| | | @ApiModelProperty(value = "æä¿ç³è¯·ç¼ç ï¼å
³èinsurance_apply", example = "1") |
| | | @ExcelColumn(name="æä¿ç³è¯·ç¼ç ï¼å
³èinsurance_apply") |
| | | private Integer applyId; |
| | | |
| | | @ApiModelProperty(value = "人åç¼ç ï¼å
³èmemeberï¼", example = "1") |
| | | @ExcelColumn(name="人åç¼ç ï¼å
³èmemeberï¼") |
| | | private Integer memberId; |
| | | |
| | | @ApiModelProperty(value = "å®é
ä¿é©çææ¢æ") |
| | | @ExcelColumn(name="å®é
ä¿é©çææ¢æ") |
| | | @ExcelColumn(name="ä¿é©çææ¢æ",index = 7) |
| | | private Date endTime; |
| | | |
| | | @ApiModelProperty(value = "å®é
ä¿é©çæèµ·æ") |
| | | @ExcelColumn(name="å®é
ä¿é©çæèµ·æ") |
| | | @ExcelColumn(name="ä¿é©çæèµ·æ",index = 6) |
| | | private Date startTime; |
| | | |
| | | @ApiModelProperty(value = "身份è¯å·ç ") |
| | | @ExcelColumn(name="身份è¯å·ç ") |
| | | private String idcardNo; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æ¹æ¡ä¸»é®", example = "1") |
| | | @ExcelColumn(name="æ¹æ¡ä¸»é®") |
| | | private Integer solutionId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æ´¾é£åä½ç¼ç ï¼å
³èdispatch_unit)", example = "1") |
| | | @ExcelColumn(name="æ´¾é£åä½ç¼ç ï¼å
³èdispatch_unit)") |
| | | private Integer duId; |
| | | |
| | | @ApiModelProperty(value = "å·¥ç§ç¼ç (å
³èworktype)", example = "1") |
| | | @ExcelColumn(name="å·¥ç§ç¼ç (å
³èworktype)") |
| | | private Integer worktypeId; |
| | | |
| | | @ApiModelProperty(value = "å½å产çè´¹ç¨", example = "1") |
| | | @ExcelColumn(name="å½å产çè´¹ç¨") |
| | | private BigDecimal currentFee; |
| | | |
| | | @ApiModelProperty(value = "è´¹ç¨", example = "1") |
| | | @ExcelColumn(name="è´¹ç¨") |
| | | private BigDecimal fee; |
| | | |
| | | @ApiModelProperty(value = "æ§å« 0ç· 1女", example = "1") |
| | | @ExcelColumn(name="æ§å« 0ç· 1女") |
| | | // @ExcelColumn(name="æ§å«",valueMapping = "0=ç·;1=女;") |
| | | private Integer sex; |
| | | |
| | | @ApiModelProperty(value = "ä¿åå·") |
| | | @ExcelColumn(name="ä¿åå·") |
| | | @ExcelColumn(name="ä¿åå·",index = 2) |
| | | private String bdCode; |
| | | |
| | | @ApiModelProperty(value = "æ¹åå·") |
| | | @ExcelColumn(name="æ¹åå·") |
| | | @ExcelColumn(name="æ¹åå·",index = 3) |
| | | private String pdCode; |
| | | |
| | | @ApiModelProperty(value = "ä¿é©æ¹æ¡åç§°") |
| | | @ExcelColumn(name="ä¿é©æ¹æ¡åç§°") |
| | | @ExcelColumn(name="ä¿é©æ¹æ¡",index = 1) |
| | | private String solutionName; |
| | | |
| | | @ApiModelProperty(value = "æ¹åç³è¯·ç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ¹åç³è¯·ç¼ç ") |
| | | private Integer applyChangeId; |
| | | |
| | | @ApiModelProperty(value = "å·¥ç§åç§°") |
| | | @ExcelColumn(name="å·¥ç§åç§°") |
| | | @ExcelColumn(name="å·¥ç§åç§°",index = 5) |
| | | private String worktypeName; |
| | | |
| | | @ApiModelProperty(value = "æ´¾é£åä½åç§°") |
| | | @ExcelColumn(name="æ´¾é£åä½åç§°") |
| | | @ExcelColumn(name="æ´¾é£åä½",index = 4) |
| | | private String duName; |
| | | |
| | | @ApiModelProperty(value = "å
³èæç»ä¸»é®", example = "1") |
| | | @ExcelColumn(name="å
³èæç»ä¸»é®") |
| | | private Integer relationId; |
| | | |
| | | // @ApiModelProperty(value = "å
³èæç»ç±»åï¼0=æä¿ç³è¯·ï¼1=å åä¿/æ¢å", example = "1") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | |
| | | @ApiModelProperty(value = "å
³è对象类å") |
| | | @ExcelColumn(name="å
³è对象类å") |
| | | private String objType; |
| | | private Integer objType; |
| | | |
| | | @ApiModelProperty(value = "å
³è对象åç§°") |
| | | @ExcelColumn(name="å
³è对象åç§°") |
| | | private String objName; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0平尿¶æ¯ 1ä¼ä¸æ¶æ¯") |
| | | @ExcelColumn(name="ç±»å 0平尿¶æ¯ 1ä¼ä¸æ¶æ¯") |
| | | private String type; |
| | | @ApiModelProperty(value = "ç±»å") |
| | | @ExcelColumn(name="ç±»å") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "ç±»åæè¿°") |
| | | @TableField(exist = false) |
| | | private String typeDetail; |
| | | |
| | | |
| | | @ApiModelProperty(value = "å
³èåæ°1") |
| | | @ExcelColumn(name="å
³èåæ°1") |
| | |
| | | @ExcelColumn(name="å
³èä¼ä¸ç¼ç (å
³ècompanyï¼") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "å
³èä¼ä¸åç§°") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "å¹³å° 0平尿¶æ¯ 1ä¼ä¸æ¶æ¯", example = "1") |
| | | @ExcelColumn(name="å¹³å° 0平尿¶æ¯ 1ä¼ä¸æ¶æ¯") |
| | | private Integer palt; |
| | |
| | | @ExcelColumn(name="æ¯å¦å·²è¯» 0æªè¯» 1已读") |
| | | private Integer readed; |
| | | |
| | | public Notices(){ |
| | | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param noticeType æ¶æ¯ç±»å |
| | | * @param palt æ°æ®å¹³å° 0平尿¶æ¯ 1ä¼ä¸æ¶æ¯ |
| | | * @param objId å
³èå¯¹è±¡ä¸»é® |
| | | * @param content æ¹æ¡åç§°/åä½åç§°/å¼ç¥¨éé¢/æ¥æ¡äºº |
| | | * @param companyId ä¼ä¸ä¸»é® |
| | | */ |
| | | public Notices(Constants.NoticeObjectType noticeObjectType,Integer palt, Integer objId, String content, Integer companyId,Constants.NoticeType noticeType){ |
| | | this.createDate = new Date(); |
| | | this.creator = userId ; |
| | | this.isdeleted = Constants.ZERO ; |
| | | this.title = noticeObjectType.getName(); |
| | | this.objType = noticeObjectType.getKey(); |
| | | this.objId = objId; |
| | | this.info = noticeObjectType.getInfo(); |
| | | this.content = content; |
| | | this.status = Constants.ZERO; |
| | | this.readed = Constants.ZERO; |
| | | this.type = noticeType.getStatus(); |
| | | this.companyId = companyId; |
| | | this.palt = palt ; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | PageData<ApplyChagneDetail> findPageForCompany(PageWrap<ApplyDetailPageDTO> pageWrap); |
| | | |
| | | |
| | | List<ApplyChagneDetail> findListForCompany(ApplyDetailPageDTO applyDetailPageDTO); |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | |
| | | return pageData; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<ApplyChagneDetail> findListForCompany(ApplyDetailPageDTO applyDetailPageDTO) { |
| | | MPJLambdaWrapper<ApplyChagneDetail> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(ApplyChagneDetail.class); |
| | | queryWrapper.select("t2.name",ApplyChagneDetail::getWorkTypeName); |
| | | queryWrapper.select("t3.name",ApplyChagneDetail::getDuName); |
| | | queryWrapper.select("t4.name",ApplyChagneDetail::getOldWorkTypeName); |
| | | queryWrapper.select("t5.name",ApplyChagneDetail::getOldDuName); |
| | | queryWrapper.selectAs(Member::getName,ApplyChagneDetail::getMemberName); |
| | | queryWrapper.selectAs(Member::getSex,ApplyChagneDetail::getSex); |
| | | queryWrapper.selectAs(Member::getIdcardNo,ApplyChagneDetail::getMemberIdcardNo); |
| | | queryWrapper.leftJoin(Member.class,Member::getId,ApplyChagneDetail::getMemberId); |
| | | queryWrapper.leftJoin(Worktype.class,Worktype::getId,ApplyChagneDetail::getWorktypeId); |
| | | queryWrapper.leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyChagneDetail::getDuId); |
| | | queryWrapper.leftJoin(Worktype.class,Worktype::getId,ApplyChagneDetail::getOldWorktypeId); |
| | | queryWrapper.leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyChagneDetail::getOldDuId); |
| | | queryWrapper.in(CollectionUtils.isNotEmpty(applyDetailPageDTO.getTypes()),ApplyChagneDetail::getType,applyDetailPageDTO.getTypes()); |
| | | queryWrapper.eq(!Objects.isNull(applyDetailPageDTO.getApplyChangId()),ApplyChagneDetail::getApplyChangeId,applyDetailPageDTO.getApplyChangId()); |
| | | return applyChangeDetailJoinMapper.selectJoinList(ApplyChagneDetail.class, queryWrapper); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public long count(ApplyChagneDetail applyChagneDetail) { |
| | | QueryWrapper<ApplyChagneDetail> wrapper = new QueryWrapper<>(applyChagneDetail); |
| | |
| | | @Autowired |
| | | private SolutionsMapper solutionsMapper; |
| | | |
| | | @Autowired |
| | | private NoticesMapper noticesMapper; |
| | | /** |
| | | * å¹³å°éåæä¿ |
| | | * @param param |
| | |
| | | ApplyChange update = new ApplyChange(); |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(user.getId()); |
| | | update.setStatus(Constants.ApplyChangeStatus.PALTFORM_CHECK_PASS_NO.getKey()); |
| | | update.setStatus(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey()); |
| | | update.setCheckDate(update.getEditDate()); |
| | | update.setCheckInfo(param.getCheckInfo()); |
| | | update.setCheckUserId(user.getId()); |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | |
| | | InsuranceApply insuranceApply = insuranceApplyMapper.selectById(model.getApplyId()); |
| | | if(Objects.isNull(insuranceApply)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(insuranceApply.getIsdeleted().equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"æ°æ®å·²å é¤,æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"æªæ¥è¯¢å°æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | Constants.ApplyLogType applyLogType = null; |
| | | String info = ""; |
| | | ApplyChange update = new ApplyChange(); |
| | | Constants.NoticeType noticeType = Constants.NoticeType.FOUR; |
| | | if(param.getDealBackApply() ==1){ |
| | | //妿æ¯é©³å,åªè½å¯é©³åå·²ç¾ç« ç¶æä¸çéåç³è¯·ç¶æè¿è¡æä½ |
| | | if(!Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())){ |
| | |
| | | applyLogType = Constants.ApplyLogType.CA_PALTFORM_REFUSE_APPLY; |
| | | info = applyLogType.getInfo(); |
| | | info = info.replace("${param}", param.getCheckInfo()); |
| | | // |
| | | if( Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())){ |
| | | update.setStatus(Constants.ApplyChangeStatus.SIGNATURE.getKey()); |
| | | }else if( Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey())){ |
| | | update.setStatus(Constants.ApplyChangeStatus.UPLOAD.getKey()); |
| | | } |
| | | update.setStatus(Constants.ApplyChangeStatus.SIGNATURE.getKey()); |
| | | noticeType = Constants.NoticeType.FIVE; |
| | | }else{ |
| | | //妿æ¯åæ,两ç§ç³è¯·éåç¶æé½å¯æä½ |
| | | if(!(Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey()) |
| | |
| | | update.setStatus(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey()); |
| | | applyLogType = Constants.ApplyLogType.CA_PLATFORM_AGREE_BACK_APPLY; |
| | | } |
| | | |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(user.getId()); |
| | | //åæéåï¼ç´æ¥åå°æåç¶æï¼å¦æé©³åéåç³è¯·ï¼åä¿åç¶æåå°å¾
ä¸ä¼ ä¿é©å |
| | |
| | | update.setCheckUserId(user.getId()); |
| | | update.setId(model.getId()); |
| | | applyChangeMapper.updateById(update); |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.APPLY_CHANGE; |
| | | if(model.getType().equals(Constants.ONE)){ |
| | | noticeObjectType = Constants.NoticeObjectType.CHANGE_FACTORY; |
| | | } |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,model.getId(),solutions.getName(), |
| | | model.getCompanyId(), noticeType); |
| | | noticesMapper.insert(notices); |
| | | |
| | | ApplyLog log = new ApplyLog(update,applyLogType.getName(),info,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update)); |
| | | applyLogMapper.insert(log); |
| | |
| | | if (!loginUserInfo.getType().equals(Constants.ONE)) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "ç¨æ·ç±»åé误ï¼éä¼ä¸ç¨æ·æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | BigDecimal fee = BigDecimal.ZERO; |
| | | |
| | | InsuranceApply insuranceApply = insuranceApplyMapper.selectById(applyChange.getApplyId()); |
| | | if (Objects.isNull(insuranceApply)) { |
| | |
| | | applyChange.setStatus(Constants.ZERO); |
| | | applyChangeMapper.insert(applyChange); |
| | | |
| | | this.dealApplyChangeData(applyChange,insuranceApply,companySolution,solutions,loginUserInfo,fee); |
| | | BigDecimal fee = this.dealApplyChangeData(applyChange,insuranceApply,companySolution,solutions,loginUserInfo,BigDecimal.ZERO); |
| | | |
| | | ApplyChange applyChangeFee = new ApplyChange(); |
| | | applyChangeFee.setId(applyChange.getId()); |
| | | applyChangeFee.setFee(fee); |
| | | applyChangeMapper.updateById(applyChangeFee); |
| | | |
| | | |
| | | this.saveApplyLog(applyChange,Constants.ApplyChangeLogStatus.UPLOAD,null); |
| | | return applyChange.getId(); |
| | |
| | | if(Objects.isNull(dbApplyChange)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!dbApplyChange.getStatus().equals(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey())){ |
| | | if(! (dbApplyChange.getStatus().equals(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey()) |
| | | || dbApplyChange.getStatus().equals(Constants.ApplyChangeStatus.PALTFORM_CHECK_PASS_NO.getKey()) ) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(), "ä¸å¡ä¿ç³è¯·åç¶æé误"); |
| | | } |
| | | |
| | |
| | | |
| | | applyChange.setEditDate(new Date()); |
| | | applyChange.setEditor(loginUserInfo.getId()); |
| | | applyChange.setApplyStartTime(applyChange.getValidTime()); |
| | | applyChange.setStatus(Constants.ZERO); |
| | | BigDecimal fee = BigDecimal.ZERO; |
| | | //å é¤å岿°æ® |
| | | applyChagneDetailJoinMapper.delete(new QueryWrapper<ApplyChagneDetail>().lambda().eq(ApplyChagneDetail::getApplyChangeId,applyChange.getId())); |
| | | |
| | | this.dealApplyChangeData(applyChange,insuranceApply,companySolution,solutions,loginUserInfo,fee); |
| | | BigDecimal fee = this.dealApplyChangeData(applyChange,insuranceApply,companySolution,solutions,loginUserInfo,BigDecimal.ZERO); |
| | | applyChange.setFee(fee); |
| | | applyChangeMapper.updateById(applyChange); |
| | | this.saveApplyLog(applyChange,Constants.ApplyChangeLogStatus.UPLOAD,null); |
| | |
| | | } |
| | | |
| | | |
| | | public void dealApplyChangeData(ApplyChange applyChange,InsuranceApply insuranceApply,CompanySolution companySolution,Solutions solutions,LoginUserInfo loginUserInfo,BigDecimal fee){ |
| | | public BigDecimal dealApplyChangeData(ApplyChange applyChange,InsuranceApply insuranceApply,CompanySolution companySolution,Solutions solutions,LoginUserInfo loginUserInfo,BigDecimal fee){ |
| | | |
| | | |
| | | //æ¥è¯¢ä¿é©æ¹æ¡ä¸çæææ´¾é£åä½ |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "该ä¼ä¸åé
ä¿é©æ¹æ¡æ æ³è¿è¡å ä¿"); |
| | | } |
| | | //å ä¿æç»æ°æ® 计ç®éé¢ æ ¹æ®æ¹åæ¶é´ è®¡ç® |
| | | applyChangeCyclePriceDTO.setValidTime(DateUtil.getMontageDate(insuranceApply.getStartTime(),1)); |
| | | applyChangeCyclePriceDTO.setValidTime(DateUtil.getMontageDate(applyChange.getValidTime(),1)); |
| | | CountCyclePriceVO countCyclePriceVO = this.getChangeCountCyclePriceVO(applyChangeCyclePriceDTO); |
| | | BigDecimal detailFee = countCyclePriceVO.getCyclePrice(); |
| | | |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "该ä¼ä¸åé
ä¿é©æ¹æ¡æ æ³è¿è¡åä¿"); |
| | | } |
| | | //åä¿æç»æ°æ® 计ç®éé¢ æ ¹æ®æ¹åæ¶é´ åä¸å¤© è®¡ç® |
| | | applyChangeCyclePriceDTO.setValidTime(DateUtil.getMontageDate(insuranceApply.getStartTime(),3)); |
| | | applyChangeCyclePriceDTO.setValidTime(DateUtil.getMontageDate(applyChange.getValidTime(),3)); |
| | | CountCyclePriceVO countCyclePriceVO = this.getChangeCountCyclePriceVO(applyChangeCyclePriceDTO); |
| | | BigDecimal detailFee = countCyclePriceVO.getCyclePrice(); |
| | | this.delChangeDetail(applyChange,delDetailList,insuranceApply,solutions,loginUserInfo,detailFee); |
| | |
| | | if (CollectionUtils.isNotEmpty(changeDetailList)) { |
| | | this.changeDetail(applyChange,changeDetailList,duWorktypeList,duSolutionList,loginUserInfo); |
| | | } |
| | | return fee; |
| | | } |
| | | |
| | | |
| | |
| | | if (applyChagneDetailJoinMapper.selectJoinCount( |
| | | new MPJLambdaWrapper<ApplyChagneDetail>() |
| | | .leftJoin(ApplyChange.class, ApplyChange::getId, ApplyChagneDetail::getApplyChangeId) |
| | | .eq(ApplyChange::getApplyId,applyChange.getApplyId()) |
| | | .eq(ApplyChagneDetail::getMemberId, applyChagneDetail.getMemberId()) |
| | | .in(ApplyChange::getStatus, Constants.ZERO, Constants.ONE) |
| | | ) > Constants.ZERO) { |
| | |
| | | applyChagneDetail.setType(Constants.ONE); |
| | | |
| | | applyChagneDetail.setStartTime(DateUtil.getMontageDate(applyDetail.getStartTime(),1)); |
| | | applyChagneDetail.setEndTime(DateUtil.getMontageDate(applyChange.getStartTime(),3)); |
| | | applyChagneDetail.setEndTime(DateUtil.getMontageDate(applyChange.getApplyStartTime(),3)); |
| | | |
| | | applyChagneDetail.setFee( detailFee.multiply(new BigDecimal(-1))); |
| | | applyChagneDetailJoinMapper.insert(applyChagneDetail); |
| | |
| | | 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()) |
| | | .le(ApplyDetail::getStartTime, DateUtil.getDate(new Date(),"yyyy-MM-dd HH:mm:ss")) |
| | | .ge(ApplyDetail::getEndTime, DateUtil.getDate(new Date(),"yyyy-MM-dd HH:mm:ss"))); |
| | | .ge(ApplyDetail::getEndTime, new Date())); |
| | | if(applyDetailList.size()>Constants.ONE){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "æ¢å人åã" + applyChagneDetail.getMemberName() + "ãä¿åä¿¡æ¯å¼å¸¸ï¼åå¨å¤æ¡æ°æ®"); |
| | | }else if(applyDetailList.size()==Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "æ¢å人åã" + applyChagneDetail.getMemberName() + "ãæªæ¥è¯¢å°æä¿è®°å½"); |
| | | } |
| | | ApplyDetail applyDetail = applyDetailList.get(Constants.ZERO); |
| | | if(applyChange.getValidTime().compareTo( applyDetail.getEndTime())>0){ |
| | |
| | | public void changeOpt(ApplyChangeOptDTO applyChangeOptDTO){ |
| | | if(Objects.isNull(applyChangeOptDTO) |
| | | ||Objects.isNull(applyChangeOptDTO.getApplyId()) |
| | | ||StringUtils.isBlank(applyChangeOptDTO.getOptIllustration())){ |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | |
| | | if(applyChange.getIsdeleted().equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"æ°æ®å·²å é¤,æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | |
| | | Constants.ApplyChangeLogStatus applyChangeLogStatus = Constants.ApplyChangeLogStatus.RETURN_APPLY; |
| | | |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.APPLY_CHANGE; |
| | | if(applyChange.getType().equals(Constants.ONE)){ |
| | | noticeObjectType = Constants.NoticeObjectType.CHANGE_FACTORY; |
| | | } |
| | | if(applyChangeOptDTO.getOptType().equals(3)){ |
| | | //åèµ·éåç³è¯· |
| | | if(loginUserInfo.getType().equals(Constants.ONE)){ |
| | | if(!loginUserInfo.getType().equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"éä¼ä¸ç«¯ç¨æ·æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | if(!(applyChange.getStatus().equals(Constants.ApplyChangeStatus.UPLOAD.getKey()) |
| | |
| | | }else{ |
| | | applyChange.setStatus(Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey()); |
| | | } |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | //å é¤å
¶ä»å¾
å |
| | | 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); |
| | | noticesMapper.insert(notices); |
| | | |
| | | |
| | | }else if(applyChangeOptDTO.getOptType().equals(4)){ |
| | | applyChangeLogStatus = Constants.ApplyChangeLogStatus.PLATFORM_AGREE; |
| | |
| | | }else if(applyChangeOptDTO.getOptType().equals(6)){ |
| | | //ä¼ä¸å
³é |
| | | applyChangeLogStatus = Constants.ApplyChangeLogStatus.CLOSE; |
| | | if(loginUserInfo.getType().equals(Constants.ONE)){ |
| | | if(!loginUserInfo.getType().equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"éä¼ä¸ç«¯ç¨æ·æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | if(!applyChange.getStatus().equals(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æ°æ®ç¶æéè¯¯æ æ³è¿è¡è¯¥æä½!"); |
| | | } |
| | | applyChange.setStatus(Constants.ApplyChangeStatus.CLOSE.getKey()); |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,applyChange.getId())); |
| | | |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST ); |
| | | } |
| | |
| | | if(company== null || StringUtils.isBlank( company.getEmail()) || !Constants.equalsInteger(company.getSignStatus(),Constants.THREE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼ä¼ä¸å°æªå
·å¤å¨çº¿ç¾ç« æ¡ä»¶ï¼è¯·è系平å°ç®¡çå确认~"); |
| | | } |
| | | InsuranceApply insuranceApply = insuranceApplyMapper.selectById(model.getApplyId()); |
| | | if(Objects.isNull(insuranceApply)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢ä¿åä¿¡æ¯"); |
| | | } |
| | | Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | String fileUrl = null; |
| | | if(Constants.equalsObject(model.getType(), Constants.ONE)){ |
| | | fileUrl = ExcelExporter.build(ApplyChange.class).exportChangeUnitExcelToPdf(model,"æ¢åç³è¯·è¡¨"); |
| | |
| | | update.setSignApplyNo(applyNo); |
| | | applyChangeMapper.updateById(update); |
| | | |
| | | |
| | | |
| | | return link; |
| | | } |
| | | |
| | |
| | | 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.DuLogMapper; |
| | | import com.doumee.dao.business.DuSolutionMapper; |
| | | import com.doumee.dao.business.DuWorktypeMapper; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dto.*; |
| | | import com.doumee.dao.business.join.DispatchUnitJoinMapper; |
| | | import com.doumee.dao.business.join.DuLogJoinMapper; |
| | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private NoticesMapper noticesMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer checkWorktype(DispatchUnit param) { |
| | |
| | | //å卿ä½åå² |
| | | this.saveDuLog(update,Constants.DispatchUnitLogType.WORK_TYPE_AUDIT_UN_PASS,update.getCheckInfo()); |
| | | } |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.DISPATCH_UNIT; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | |
| | | //å卿ä½åå² |
| | | this.saveDuLog(dispatchUnit,Constants.DispatchUnitLogType.AUDIT_UN_PASS,update.getCheckInfo()); |
| | | } |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.DISPATCH_UNIT; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,dispatchUnit.getId())); |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | @Override |
| | |
| | | duWorktypeMapper.insert(duWorktype); |
| | | } |
| | | } |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.DISPATCH_UNIT; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,dispatchUnit.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,dispatchUnit.getId(),dispatchUnit.getName(), |
| | | dispatchUnit.getCompanyId(), Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | return dispatchUnit.getId(); |
| | | } |
| | | |
| | |
| | | |
| | | // this.dealDuData(saveDispatchUnitDTO,loginUserInfo); |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.DISPATCH_UNIT; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,dispatchUnit.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,dispatchUnit.getId(),dispatchUnit.getName(), |
| | | dispatchUnit.getCompanyId(), Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | return dispatchUnit.getId(); |
| | | } |
| | | |
| | |
| | | //å卿ä½åå² |
| | | this.saveDuLog(dispatchUnit,Constants.DispatchUnitLogType.ADD_WORK_TYPE,null); |
| | | this.dealDuData(saveDispatchUnitDTO,loginUserInfo); |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.DISPATCH_UNIT; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,dispatchUnit.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,dispatchUnit.getId(),dispatchUnit.getName(), |
| | | dispatchUnit.getCompanyId(), Constants.NoticeType.ONE); |
| | | noticesMapper.insert(notices); |
| | | |
| | | return dispatchUnit.getId(); |
| | | } |
| | | |
| | |
| | | @Autowired |
| | | private DuWorktypeMapper duWorktypeMapper; |
| | | |
| | | @Autowired |
| | | private NoticesMapper noticesMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer back(InsuranceApply insuranceApply) { |
| | |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼è¯¥ç³è¯·ç¶æå·²æµè½¬ï¼å½å䏿¯æè¯¥æä½~"); |
| | | } |
| | | |
| | | Solutions solutions = solutionsMapper.selectById(model.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | InsuranceApply update = new InsuranceApply(); |
| | | update.setEditDate(new Date()); |
| | |
| | | update.setCheckUserId(user.getId()); |
| | | update.setId(model.getId()); |
| | | insuranceApplyMapper.updateById(update); |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ONE,insuranceApply.getId(),solutions.getName(), |
| | | model.getCompanyId(), Constants.NoticeType.FOUR); |
| | | noticesMapper.insert(notices); |
| | | |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.PLATFORM_RETURN; |
| | | String info =applyLogType.getInfo(); |
| | |
| | | if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | |
| | | Solutions solutions = solutionsMapper.selectById(model.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | Constants.ApplyLogType applyLogType = null; |
| | | String info = ""; |
| | |
| | | update.setEditDate(new Date()); |
| | | update.setSignApplyNo(applyNo); |
| | | insuranceApplyMapper.updateById(update); |
| | | |
| | | return link; |
| | | } |
| | | public String uploadSignFile(String link){ |
| | |
| | | update.setId(model.getId()); |
| | | insuranceApplyMapper.updateById(update); |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,model.getId(),model.getSolutionsName(),model.getCompanyId(),Constants.NoticeType.TWO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | Multifile f = new Multifile(); |
| | | f.setIsdeleted(Constants.ZERO); |
| | | f.setCreator(model.getCreator()); |
| | |
| | | update.setCheckUserId(model.getCreator()); |
| | | update.setId(model.getId()); |
| | | applyChangeMapper.updateById(update); |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.APPLY_CHANGE; |
| | | if(model.getType().equals(Constants.ONE)){ |
| | | noticeObjectType = Constants.NoticeObjectType.CHANGE_FACTORY; |
| | | } |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ONE,model.getId(),model.getSolutionsName(), |
| | | model.getCompanyId(), Constants.NoticeType.TWO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | Multifile f = new Multifile(); |
| | | f.setIsdeleted(Constants.ZERO); |
| | |
| | | // info = info.replace("${param}", update.getCheckInfo()); |
| | | ApplyLog log = new ApplyLog(update,applyLogType.getName(),StringUtils.isNotBlank(update.getCheckInfo())?info:"",update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update)); |
| | | applyLogMapper.insert(log); |
| | | |
| | | //å é¤å
¶ä»å¾
å |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId())); |
| | | |
| | | return 1; |
| | | |
| | | } |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼è¯¥ç³è¯·ç¶æå·²æµè½¬ï¼å½å䏿¯æè¯¥æä½~"); |
| | | } |
| | | |
| | | Solutions solutions = solutionsMapper.selectById(model.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | |
| | | Constants.ApplyLogType applyLogType = null; |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | InsuranceApply update = new InsuranceApply(); |
| | |
| | | update.setCheckInfo(insuranceApply.getCheckInfo()); |
| | | update.setCheckUserId(user.getId()); |
| | | update.setId(model.getId()); |
| | | Constants.NoticeType noticeType = Constants.NoticeType.ONE; |
| | | if(insuranceApply.getDealBackApply() ==1){ |
| | | //妿æ¯ä¸éè¿ |
| | | applyLogType = Constants.ApplyLogType.PLATFORM_RETURN ; |
| | | update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_RETURN.getKey()); |
| | | |
| | | noticeType = Constants.NoticeType.FOUR; |
| | | }else{ |
| | | applyLogType = Constants.ApplyLogType.PLATFORM_CHECK_PASS; |
| | | update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey()); |
| | | } |
| | | insuranceApplyMapper.updateById(update); |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ONE,model.getId(),solutions.getName(),model.getCompanyId(),noticeType); |
| | | noticesMapper.insert(notices); |
| | | |
| | | String info =applyLogType.getInfo(); |
| | | info = info.replace("${param}", update.getCheckInfo()); |
| | | ApplyLog log = new ApplyLog(update,applyLogType.getName(),info,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update)); |
| | |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(!loginUserInfo.getType().equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ç¨æ·ç±»åé误ï¼éä¼ä¸ç¨æ·æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"æªæ¥è¯¢å°æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | List<ApplyDetail> applyDetailList = insuranceApply.getApplyDetailList(); |
| | | //夿æ¯å¦åå¨éå¤ä¿¡æ¯ |
| | |
| | | |
| | | |
| | | //å¤çä¸çº§æ°æ® |
| | | this.dealApplyDetailData(insuranceApply,applyDetailList,loginUserInfo,countCyclePriceVO); |
| | | this.dealApplyDetailData(insuranceApply,solutions,applyDetailList,loginUserInfo,countCyclePriceVO); |
| | | InsuranceApply updBean = new InsuranceApply(); |
| | | updBean.setId(insuranceApply.getId()); |
| | | updBean.setFee(applyDetailList.stream().map(ApplyDetail::getFee).reduce(BigDecimal.ZERO,BigDecimal::add)); |
| | | insuranceApplyMapper.updateById(updBean); |
| | | //å卿¥å¿æ°æ® |
| | | this.saveApplyLog(insuranceApply,insuranceApplyStatus,null); |
| | | //åéå¾
åä¸å¡ |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,insuranceApply.getId(),solutions.getName(),insuranceApply.getCompanyId(),Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | return insuranceApply.getId(); |
| | | } |
| | | |
| | |
| | | insuranceApply.setEndTime(countCyclePriceVO.getEndDate()); |
| | | |
| | | applyDetailMapper.delete(new QueryWrapper<ApplyDetail>().lambda().eq(ApplyDetail::getApplyId,insuranceApply.getId())); |
| | | |
| | | Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"æªæ¥è¯¢å°æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | |
| | | //å¤çä¸çº§æ°æ® |
| | | this.dealApplyDetailData(insuranceApply,applyDetailList,loginUserInfo,countCyclePriceVO); |
| | | this.dealApplyDetailData(insuranceApply,solutions,applyDetailList,loginUserInfo,countCyclePriceVO); |
| | | insuranceApply.setFee(applyDetailList.stream().map(ApplyDetail::getFee).reduce(BigDecimal.ZERO,BigDecimal::add)); |
| | | insuranceApplyMapper.updateById(insuranceApply); |
| | | //å卿¥å¿æ°æ® |
| | | this.saveApplyLog(insuranceApply,insuranceApplyStatus,null); |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,insuranceApply.getId(),solutions.getName(),insuranceApply.getCompanyId(),Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | return insuranceApply.getId(); |
| | | } |
| | | |
| | | |
| | | |
| | | public void dealApplyDetailData(InsuranceApply insuranceApply,List<ApplyDetail> applyDetailList,LoginUserInfo loginUserInfo,CountCyclePriceVO countCyclePriceVO){ |
| | | Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"æªæ¥è¯¢å°æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | public void dealApplyDetailData(InsuranceApply insuranceApply,Solutions solutions,List<ApplyDetail> applyDetailList,LoginUserInfo loginUserInfo,CountCyclePriceVO countCyclePriceVO){ |
| | | //æ¥è¯¢ä¿é©æ¹æ¡ä¸çæææ´¾é£åä½ |
| | | List<DuSolution> duSolutionList = duSolutionJoinMapper.selectJoinList(DuSolution.class,new MPJLambdaWrapper<DuSolution>() |
| | | .selectAll(DuSolution.class) |
| | |
| | | if(insuranceApply.getIsdeleted().equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"æ°æ®å·²å é¤,æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"æªæ¥è¯¢å°æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | |
| | | //-----TODU-------RJ-------å®åéåç¶æå弿 è®°------------------ |
| | | Constants.InsuranceApplyStatus insuranceApplyStatus = Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_SIGNATURE; |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.INSURANCE_APPLY; |
| | | if(insuranceApplyOptDTO.getOptType().equals(Constants.ONE)){ |
| | | if(!(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.UPLOAD.getKey()) |
| | | ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WAIT_SIGNATURE.getKey()) |
| | |
| | | }else if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.SIGNATURE.getKey())){ |
| | | insuranceApplyStatus = Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_SIGNATURE; |
| | | } |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ONE,insuranceApply.getId(),solutions.getName(), |
| | | insuranceApply.getCompanyId(), Constants.NoticeType.THREE); |
| | | noticesMapper.insert(notices); |
| | | |
| | | |
| | | }else if(insuranceApplyOptDTO.getOptType().equals(Constants.TWO)){ |
| | | insuranceApplyStatus = Constants.InsuranceApplyStatus.CLOSE; |
| | | if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.CLOSE.getKey())){ |
| | |
| | | ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey()))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æ°æ®ç¶æéå¯ç³è¯·éå!"); |
| | | } |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId())); |
| | | } |
| | | insuranceApply.setStatus(insuranceApplyStatus.getKey()); |
| | | insuranceApply.setCheckDate(new Date()); |
| | |
| | | .selectAs(DispatchUnit::getName,Member::getDuName) |
| | | .selectAs(Worktype::getName,Member::getWorkTypeName) |
| | | .selectAs(Solutions::getName,Member::getSolutionName) |
| | | .select(" case when now() between t.start_time and t.end_time then 1 else 0 end solutionsStatus ") |
| | | .leftJoin(InsuranceApply.class,InsuranceApply::getId,Member::getApplyId) |
| | | .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId) |
| | | .leftJoin(DispatchUnit.class,DispatchUnit::getId,Member::getDuId) |
| | |
| | | .like(StringUtils.isNotBlank(memberQueryDTO.getIdCard()),Member::getIdcardNo, memberQueryDTO.getIdCard()) |
| | | .eq(!Objects.isNull(memberQueryDTO.getDuId()),Member::getDuId, memberQueryDTO.getDuId()) |
| | | .eq(!Objects.isNull(memberQueryDTO.getSolutionsId()),Solutions::getId, memberQueryDTO.getSolutionsId()) |
| | | .ge(!Objects.isNull(memberQueryDTO.getSolutionsStatus())&&!memberQueryDTO.getSolutionsStatus().equals(Constants.ZERO), |
| | | Member::getStartTime, DateUtil.getDate(new Date(),"yyyy-MM-dd")+" 00:00:00") |
| | | .le(!Objects.isNull(memberQueryDTO.getSolutionsStatus())&&memberQueryDTO.getSolutionsStatus().equals(Constants.ONE), |
| | | Member::getEndTime, DateUtil.getDate(new Date(),"yyyy-MM-dd")+" 23:59:59") |
| | | .ge(!Objects.isNull(memberQueryDTO.getSolutionsStatus())&&memberQueryDTO.getSolutionsStatus().equals(Constants.TWO), |
| | | Member::getEndTime, DateUtil.getDate(new Date(),"yyyy-MM-dd")+" 23:59:59") |
| | | .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") |
| | | ; |
| | | |
| | | |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | |
| | | @Override |
| | | public List<Member> findListByDTO(MemberQueryDTO memberQueryDTO) { |
| | | |
| | | MPJLambdaWrapper<Member> lambdaWrapper = new MPJLambdaWrapper<Member>() |
| | | .selectAll(Member.class) |
| | | MPJLambdaWrapper<Member> lambdaWrapper = new MPJLambdaWrapper<Member>(); |
| | | lambdaWrapper.selectAll(Member.class) |
| | | .selectAs(DispatchUnit::getName,Member::getDuName) |
| | | .selectAs(Worktype::getName,Member::getWorkTypeName) |
| | | .selectAs(Company::getName,Member::getCompanyName) |
| | | .select(" case when now() between t.start_time and t.end_time then 1 else 2 end solutionsStatus ") |
| | | .leftJoin(DispatchUnit.class,DispatchUnit::getId,Member::getDuId) |
| | | .leftJoin(Worktype.class,Worktype::getId,Member::getWorktypeId) |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId) |
| | | .notIn(CollectionUtils.isNotEmpty(memberQueryDTO.getMemberIds()),Member::getId,memberQueryDTO.getMemberIds()) |
| | | .eq(!Objects.isNull(memberQueryDTO.getCompanyId()),Member::getCompanyId,memberQueryDTO.getCompanyId()) |
| | | .eq(Member::getIsdeleted, Constants.ZERO) |
| | | .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 " + |
| | |
| | | .selectAll(Member.class) |
| | | .selectAs(DispatchUnit::getName,Member::getDuName) |
| | | .selectAs(Worktype::getName,Member::getWorkTypeName) |
| | | .selectAs(Company::getName,Member::getCompanyName) |
| | | .leftJoin(ApplyDetail.class,ApplyDetail::getMemberId,Member::getId) |
| | | .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId) |
| | | .leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyDetail::getDuId) |
| | |
| | | " select 1 from apply_detail ad where ad.apply_id = "+memberQueryDTO.getInsuranceApplyId()+" and ad.END_TIME > now() and ad.isdeleted = 0 " + |
| | | " and ad.member_id = t.id "); |
| | | } |
| | | List<Member> memberList = memberJoinMapper.selectJoinList(Member.class,lambdaWrapper |
| | | ); |
| | | List<Member> memberList = memberJoinMapper.selectJoinList(Member.class,lambdaWrapper); |
| | | return memberList; |
| | | } |
| | | |
| | |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.NoticesMapper; |
| | | import com.doumee.dao.business.join.NoticesJoinMapper; |
| | | import com.doumee.dao.business.model.ApplyChagneDetail; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.InsuranceApply; |
| | | import com.doumee.dao.business.model.Notices; |
| | | import com.doumee.service.business.NoticesService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class NoticesServiceImpl implements NoticesService { |
| | | |
| | | @Autowired |
| | | private NoticesMapper noticesMapper; |
| | | private NoticesJoinMapper noticesMapper; |
| | | |
| | | @Override |
| | | public Integer create(Notices notices) { |
| | |
| | | @Override |
| | | public PageData<Notices> findPage(PageWrap<Notices> pageWrap) { |
| | | IPage<Notices> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<Notices> queryWrapper = new QueryWrapper<>(); |
| | | MPJLambdaWrapper<Notices> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(Notices::getId, pageWrap.getModel().getId()); |
| | | } |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.lambda().eq(Notices::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | | if (pageWrap.getModel().getCreateDate() != null) { |
| | | queryWrapper.lambda().ge(Notices::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.lambda().le(Notices::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | } |
| | | if (pageWrap.getModel().getEditor() != null) { |
| | | queryWrapper.lambda().eq(Notices::getEditor, pageWrap.getModel().getEditor()); |
| | | } |
| | | if (pageWrap.getModel().getEditDate() != null) { |
| | | queryWrapper.lambda().ge(Notices::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.lambda().le(Notices::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | } |
| | | queryWrapper.selectAll(Notices.class); |
| | | queryWrapper.selectAs(Company::getName,Notices::getCompanyName); |
| | | queryWrapper.leftJoin(Company.class,Company::getId,Notices::getCompanyId); |
| | | if (pageWrap.getModel().getIsdeleted() != null) { |
| | | queryWrapper.lambda().eq(Notices::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getRemark() != null) { |
| | | queryWrapper.lambda().eq(Notices::getRemark, pageWrap.getModel().getRemark()); |
| | | } |
| | | if (pageWrap.getModel().getTitle() != null) { |
| | | queryWrapper.lambda().eq(Notices::getTitle, pageWrap.getModel().getTitle()); |
| | | } |
| | | if (pageWrap.getModel().getInfo() != null) { |
| | | queryWrapper.lambda().eq(Notices::getInfo, pageWrap.getModel().getInfo()); |
| | | } |
| | | if (pageWrap.getModel().getContent() != null) { |
| | | queryWrapper.lambda().eq(Notices::getContent, pageWrap.getModel().getContent()); |
| | | } |
| | | if (pageWrap.getModel().getObjId() != null) { |
| | | queryWrapper.lambda().eq(Notices::getObjId, pageWrap.getModel().getObjId()); |
| | | queryWrapper.eq(Notices::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getObjType() != null) { |
| | | queryWrapper.lambda().eq(Notices::getObjType, pageWrap.getModel().getObjType()); |
| | | } |
| | | if (pageWrap.getModel().getObjName() != null) { |
| | | queryWrapper.lambda().eq(Notices::getObjName, pageWrap.getModel().getObjName()); |
| | | queryWrapper.eq(Notices::getObjType, pageWrap.getModel().getObjType()); |
| | | } |
| | | if (pageWrap.getModel().getType() != null) { |
| | | queryWrapper.lambda().eq(Notices::getType, pageWrap.getModel().getType()); |
| | | } |
| | | if (pageWrap.getModel().getParam1() != null) { |
| | | queryWrapper.lambda().eq(Notices::getParam1, pageWrap.getModel().getParam1()); |
| | | } |
| | | if (pageWrap.getModel().getParam2() != null) { |
| | | queryWrapper.lambda().eq(Notices::getParam2, pageWrap.getModel().getParam2()); |
| | | } |
| | | if (pageWrap.getModel().getParam3() != null) { |
| | | queryWrapper.lambda().eq(Notices::getParam3, pageWrap.getModel().getParam3()); |
| | | } |
| | | if (pageWrap.getModel().getParam4() != null) { |
| | | queryWrapper.lambda().eq(Notices::getParam4, pageWrap.getModel().getParam4()); |
| | | } |
| | | if (pageWrap.getModel().getParam5() != null) { |
| | | queryWrapper.lambda().eq(Notices::getParam5, pageWrap.getModel().getParam5()); |
| | | } |
| | | if (pageWrap.getModel().getUserId() != null) { |
| | | queryWrapper.lambda().eq(Notices::getUserId, pageWrap.getModel().getUserId()); |
| | | queryWrapper.eq(Notices::getType, pageWrap.getModel().getType()); |
| | | } |
| | | if (pageWrap.getModel().getCompanyId() != null) { |
| | | queryWrapper.lambda().eq(Notices::getCompanyId, pageWrap.getModel().getCompanyId()); |
| | | queryWrapper.eq(Notices::getCompanyId, pageWrap.getModel().getCompanyId()); |
| | | } |
| | | if (pageWrap.getModel().getPalt() != null) { |
| | | queryWrapper.lambda().eq(Notices::getPalt, pageWrap.getModel().getPalt()); |
| | | queryWrapper.eq(Notices::getPalt, pageWrap.getModel().getPalt()); |
| | | } |
| | | if (pageWrap.getModel().getStatus() != null) { |
| | | queryWrapper.lambda().eq(Notices::getStatus, pageWrap.getModel().getStatus()); |
| | | queryWrapper.eq(Notices::getStatus, pageWrap.getModel().getStatus()); |
| | | } |
| | | if (pageWrap.getModel().getReaded() != null) { |
| | | queryWrapper.lambda().eq(Notices::getReaded, pageWrap.getModel().getReaded()); |
| | | queryWrapper.eq(Notices::getReaded, pageWrap.getModel().getReaded()); |
| | | } |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | if(CollectionUtils.isNotEmpty(pageWrap.getSorts())){ |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | }else{ |
| | | queryWrapper.orderByDesc(Notices::getCreateDate); |
| | | } |
| | | return PageData.from(noticesMapper.selectPage(page, queryWrapper)); |
| | | |
| | | PageData<Notices> pageData = PageData.from(noticesMapper.selectJoinPage(page,Notices.class, queryWrapper)); |
| | | pageData.getRecords().forEach(i->{ |
| | | i.setTypeDetail( |
| | | Constants.NoticeType.getDetail(i.getObjType(),i.getType()) |
| | | ); |
| | | }); |
| | | return pageData; |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.NoticesMapper; |
| | | import com.doumee.dao.business.SettleClaimsLogMapper; |
| | | import com.doumee.dao.business.SettleClaimsMapper; |
| | | import com.doumee.dao.business.dto.SCSupplementDTO; |
| | |
| | | @Autowired |
| | | private SettleClaimsLogJoinMapper settleClaimsLogJoinMapper; |
| | | |
| | | @Autowired |
| | | private NoticesMapper noticesMapper; |
| | | /** |
| | | * å é¤éä»¶ |
| | | * @return |
| | |
| | | update.setStatus(Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey()); |
| | | settleClaimsMapper.updateById(update); |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.SETTLE_CLAIMS; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | |
| | | Constants.SettleClaimsLogType applyLogType = Constants.SettleClaimsLogType.PLATFORM_RETURN; |
| | | String info =applyLogType.getInfo(); |
| | | info = info.replace("${param}", update.getCheckInfo()); |
| | |
| | | update.setId(model.getId()); |
| | | update.setStatus(Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey()); |
| | | settleClaimsMapper.updateById(update); |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.SETTLE_CLAIMS; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | |
| | | Constants.SettleClaimsLogType applyLogType = Constants.SettleClaimsLogType.PLATFORM_CONFIRM_INFORMATION; |
| | | String info =applyLogType.getInfo(); |
| | |
| | | update.setScClaimAccount(Constants.formatBigdecimal(param.getScClaimAccount())); |
| | | update.setClaimAccount(update.getYlClaimAccount().add(update.getSwClaimAccount()).add(update.getScClaimAccount()).add(update.getWgClaimAccount())); |
| | | settleClaimsMapper.updateById(update); |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.SETTLE_CLAIMS; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ONE,model.getId(),model.getInformantName(), |
| | | model.getCompanyId(), Constants.NoticeType.ONE); |
| | | noticesMapper.insert(notices); |
| | | |
| | | Constants.SettleClaimsLogType applyLogType = Constants.SettleClaimsLogType.PLATFORM_FINISH; |
| | | String info =applyLogType.getInfo(); |
| | |
| | | } |
| | | //è®°å½æ¥å¿ |
| | | this.saveSettleClaimsLog(settleClaims,Constants.SettleClaimsLogType.UPLOAD,null); |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.SETTLE_CLAIMS; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,settleClaims.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,settleClaims.getId(),settleClaims.getInformantName(), |
| | | settleClaims.getCompanyId(), Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | |
| | | return settleClaims.getId(); |
| | | } |
| | | |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æ æ³ä¿®æ¹æ¹æ¡ä¿¡æ¯"); |
| | | } |
| | | if(!(oldSettleClaims.getStatus().equals(Constants.SettleClaimsStatus.WAIT_ACCEPTANCE.getKey()) |
| | | || oldSettleClaims.getStatus().equals(Constants.SettleClaimsStatus.DEAL_ING.getKey()) |
| | | || oldSettleClaims.getStatus().equals(Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey()))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å½åç¶ææ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | |
| | | } |
| | | SettleClaims settleClaims = settleClaimsMapper.selectById(scSupplementDTO.getId()); |
| | | if(!(settleClaims.getStatus().equals(Constants.SettleClaimsStatus.WAIT_ACCEPTANCE.getKey()) |
| | | || settleClaims.getStatus().equals(Constants.SettleClaimsStatus.DEAL_ING.getKey()) |
| | | || settleClaims.getStatus().equals(Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey()))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å½åç¶ææ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | |
| | | |
| | | SettleClaims settleClaims = settleClaimsMapper.selectById(scSupplementDTO.getId()); |
| | | if(!(settleClaims.getStatus().equals(Constants.SettleClaimsStatus.WAIT_ACCEPTANCE.getKey()) |
| | | || settleClaims.getStatus().equals(Constants.SettleClaimsStatus.DEAL_ING.getKey()) |
| | | || settleClaims.getStatus().equals(Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey()))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å½åç¶ææ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.CompanyMapper; |
| | | import com.doumee.dao.business.SolutionsMapper; |
| | | import com.doumee.dao.business.TaxDetialMapper; |
| | | import com.doumee.dao.business.TaxesMapper; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dto.DirectInvoicingDTO; |
| | | import com.doumee.dao.business.dto.DirectInvoicingDetailDTO; |
| | | import com.doumee.dao.business.dto.EntrustInvoicingDTO; |
| | |
| | | private ApplyChangeJoinMapper applyChangeJoinMapper; |
| | | @Autowired |
| | | private SolutionsMapper solutionsMapper; |
| | | |
| | | @Autowired |
| | | private NoticesMapper noticesMapper; |
| | | @Override |
| | | public Integer create(Taxes taxes) { |
| | | taxesMapper.insert(taxes); |
| | |
| | | } |
| | | } |
| | | } |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.TAXES; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,model.getId())); |
| | | } |
| | | |
| | | private List<TaxDetial> getDetailListById(Integer id) { |
| | |
| | | queryWrapper.leftJoin(Taxes.class,Taxes::getId,TaxDetial::getDelTaxId); |
| | | queryWrapper.eq( TaxDetial::getTaxId,id); |
| | | List<TaxDetial> detialList = taxDetailJoinMapper.selectJoinList(TaxDetial.class,queryWrapper.orderByAsc(TaxDetial::getType)); |
| | | |
| | | |
| | | return detialList; |
| | | } |
| | | |
| | |
| | | update.setDoneDate(update.getEditDate()); |
| | | update.setImgurl(taxes.getImgurl()); |
| | | taxesMapper.updateById(update); |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.TAXES; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,taxes.getId())); |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | taxDetial.setType(Constants.ZERO); |
| | | } |
| | | taxDetailJoinMapper.insertBatchSomeColumn(taxDetialList); |
| | | |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.TAXES; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,taxes.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,taxes.getId(),taxes.getPrice().toString(), |
| | | taxes.getCompanyId(), Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æ å¯å¼ç¥¨æ°æ®ï¼æä½å¤±è´¥"); |
| | | } |
| | | |
| | | //åå¨å¾
åä¿¡æ¯ |
| | | Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.TAXES; |
| | | //å é¤å
¶ä»å¾
å |
| | | noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,taxes.getId())); |
| | | Notices notices = new Notices(noticeObjectType,Constants.ZERO,taxes.getId(),taxes.getPrice().toString(), |
| | | taxes.getCompanyId(), Constants.NoticeType.ZERO); |
| | | noticesMapper.insert(notices); |
| | | |
| | | // List<DirectInvoicingDetailDTO> directInvoicingDetailDTOList = directInvoicingDTO.getDirectInvoicingDetailDTOList(); |
| | | // for (DirectInvoicingDetailDTO directInvoicingDetailDTO:directInvoicingDetailDTOList) { |
| | | // if(Objects.isNull(directInvoicingDetailDTO) |
| | | // || Objects.isNull(directInvoicingDetailDTO.getId()) |
| | | // || Objects.isNull(directInvoicingDetailDTO.getType()) |
| | | // || Objects.isNull(directInvoicingDetailDTO.getFee()) |
| | | // ){ |
| | | // throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | // } |
| | | // |
| | | // if(directInvoicingDetailDTO.getType().equals(Constants.ZERO)){ |
| | | // //ä¿å |
| | | // InsuranceApply insuranceApply = insuranceApplyJoinMapper.selectJoinOne(InsuranceApply.class, |
| | | // new MPJLambdaWrapper<InsuranceApply>() |
| | | // .selectAll(InsuranceApply.class) |
| | | // .selectAs(Solutions::getName,InsuranceApply::getSolutionsName) |
| | | // .select(" ( select count(1) from apply_detail ad where ad.apply_id = t.id ) as insureNum") |
| | | // .notExists(" select 1 from taxes t1 inner join tax_detial t2 on t1.id = t2.tax_id where t2.type = 0 and t1.status != 2 and t.id = t2.INSURANCE_APPLY_ID ") |
| | | // .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey()) |
| | | // .eq(InsuranceApply::getId,directInvoicingDetailDTO.getId()) |
| | | // ); |
| | | // if(Objects.isNull(insuranceApply)){ |
| | | // throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"ä¿åå·ã"+insuranceApply.getCode()+"ãæªæ¥è¯¢å°ä¿åä¿¡æ¯"); |
| | | // } |
| | | // |
| | | // |
| | | // |
| | | // }else if(directInvoicingDetailDTO.getType().equals(Constants.ZERO)){ |
| | | // //å åä¿ |
| | | // }else{ |
| | | // //å²çº¢å |
| | | // } |
| | | // |
| | | // |
| | | // } |
| | | // taxDetailJoinMapper.insertBatchSomeColumn(taxDetialList); |
| | | } |
| | | |
| | | |