Merge branch '2.0.1' of http://139.186.142.91:10010/r/productDev/funingyunwei into 2.0.1
已添加16个文件
已删除1个文件
已修改22个文件
| | |
| | | <el-table-column prop="title" label="æ¶æ¯æ¡ç®" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="companyName" label="æ¶æ¬¾å
¬å¸" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column label="è´¦æ·ç±»å" min-width="100" show-overflow-tooltip> |
| | | <template v-slot="{row}"> |
| | | <template v-slot="{ row }"> |
| | | <span v-if="row.type == 0">对å
¬</span> |
| | | <span v-if="row.type == 1">个人</span> |
| | | </template> |
| | |
| | | <el-table-column prop="bankNo" label="é¶è¡è´¦å·" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="status" label="ç¶æ" min-width="100" show-overflow-tooltip> |
| | | <template v-slot="scope"> |
| | | <el-switch v-model="scope.row.status" @change="e =>changeStatus(scope.row)" :active-value="0" :inactive-value="1"> |
| | | <el-switch v-model="scope.row.status" @change="e => changeStatus(scope.row)" :active-value="0" |
| | | :inactive-value="1"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | this.getList() |
| | | }) |
| | | }, |
| | | getCompany(){ |
| | | getCompany() { |
| | | companyGetList({ |
| | | model: {type: 2}, |
| | | model: { type: 2 }, |
| | | capacity: 9999, |
| | | page: 1 |
| | | }).then(res => { |
| | | this.queryFormConfig.formItems[1].options = res.records || [] |
| | | this.queryFormConfig.formItems[1].options = res.records || [] |
| | | }) |
| | | }, |
| | | handleEdit(row) { |
| | |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | |
| | | <el-table-column prop="accountNum" label="æ¶æ¯è´¦æ·æ°é" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="status" label="ç¶æ" min-width="100" show-overflow-tooltip> |
| | | <template v-slot="scope"> |
| | | <el-switch v-model="scope.row.status" @change="e => changeStatus(scope.row)" :active-value="0" :inactive-value="1"> |
| | | <el-switch v-model="scope.row.status" @change="e => changeStatus(scope.row)" :active-value="0" |
| | | :inactive-value="1"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | |
| | | <div class="main_app"> |
| | | <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" /> |
| | | <div class="mt20"> |
| | | <!-- <el-button v-permissions="['business:ywpatrolline:create']">导åº</el-button>--> |
| | | <!-- <el-button v-permissions="['business:ywpatrolline:create']">导åº</el-button>--> |
| | | </div> |
| | | <el-table v-loading="loading" :data="list" stripe> |
| | | <el-table-column prop="customerName" label="客æ·åç§°" min-width="100" show-overflow-tooltip /> |
| | |
| | | <el-table-column label="æ¿å·" min-width="100" show-overflow-tooltip> |
| | | <template slot-scope="{row}"> |
| | | <div style="display: flex; flex-direction: column;" v-if="row.roomPathName"> |
| | | <span v-for="(item, index) in row.roomPathName.split(';')" :key="index">{{item}}</span> |
| | | <span v-for="(item, index) in row.roomPathName.split(';')" :key="index">{{ item }}</span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | this.getList() |
| | | }, |
| | | methods: { |
| | | isShow (status, contractStatus) { |
| | | isShow(status, contractStatus) { |
| | | if (status === 1) return false |
| | | if (contractStatus === '3' || contractStatus === '4') return false |
| | | return true |
| | |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | closeDW (id) { |
| | | closeDW(id) { |
| | | this.$confirm('确认å
³éæ¤æµæ°´å?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | |
| | | this.getList() |
| | | }) |
| | | }).catch(() => { |
| | | |
| | | }); |
| | | |
| | | }) |
| | | }, |
| | | handleDel(row) { |
| | | let message = `确认å é¤è¯¥è®°å½å?` |
| | |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | |
| | | </el-table-column> |
| | | <el-table-column label="æä½" min-width="130" fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="handleDetail(row)" v-permissions="['business:category:update']">æ¥ç详æ
</el-button> |
| | | <el-button type="text" @click="handleDetail(row)" |
| | | v-permissions="['business:category:update']">æ¥ç详æ
</el-button> |
| | | <el-button type="text" @click="handleEdit(row)" icon="el-icon-edit" |
| | | v-permissions="['business:category:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="handleDel(row)" icon="el-icon-delete" |
| | |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | |
| | | <el-table-column prop="param1" label="ä½ä¸å¼å§" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="param2" label="ä½ä¸ç»æ" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="workTime" label="ä½ä¸æ¶é¿" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="name" |
| | | label="è¿è¾åå·/ååå·" min-width="100" show-overflow-tooltip> |
| | | <el-table-column prop="name" label="è¿è¾åå·/ååå·" min-width="100" show-overflow-tooltip> |
| | | <template v-slot="scope"> |
| | | <span>{{ scope.row.billCode || scope.row.contractNum }}</span> |
| | | </template> |
| | |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | |
| | | <el-table-column prop="param1" label="夿³¨" min-width="120" show-overflow-tooltip /> |
| | | <el-table-column prop="param2" label="ç¶æ" min-width="90" show-overflow-tooltip /> |
| | | <el-table-column prop="workTime" label="æä½" min-width="100" show-overflow-tooltip> |
| | | <template v-slot="{row}"> |
| | | <template v-slot="{ row }"> |
| | | <span class="primaryColor pointer">æ¥ç详æ
</span> |
| | | <span class="red pointer">å é¤</span> |
| | | </template> |
| | |
| | | total: 0, |
| | | queryFormConfig: { |
| | | formItems: [ |
| | | { |
| | | { |
| | | filed: 'carCodeFront', |
| | | type: 'input', |
| | | label: 'ä»åºåç§°', |
| | |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |
| | | <style></style> |
| | |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | |
| | | <el-table-column prop="param2" label="å建æ¶é´" min-width="140" show-overflow-tooltip /> |
| | | <el-table-column prop="workTime" label="çç¹ç¶æ" min-width="80" show-overflow-tooltip /> |
| | | <el-table-column prop="workTime" label="æä½" min-width="140" show-overflow-tooltip> |
| | | <template v-slot="{row}"> |
| | | <template v-slot="{ row }"> |
| | | <span class="primaryColor pointer">æ¥ç详æ
</span> |
| | | <span class="primaryColor pointer">åæ¶</span> |
| | | <span class="primaryColor pointer">å é¤</span> |
| | |
| | | total: 0, |
| | | queryFormConfig: { |
| | | formItems: [ |
| | | { |
| | | { |
| | | filed: 'carCodeFront', |
| | | type: 'input', |
| | | label: 'çç¹å', |
| | |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |
| | | <style></style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow title="éæ©ç©æ" :visible.sync="isShowModal" :confirm-working="isLoading" width="900px" @close="close" |
| | | @confirm="confirm"> |
| | | <el-form ref="searchForm" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item prop="areaType" label="ç©æä¿¡æ¯"> |
| | | <el-input v-model="searchForm.aaa" placeholder="请è¾å
¥ç©æç¼ç /åç§°" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="areaIds" label="ç©æåç±»"> |
| | | <el-cascader v-model="searchForm.areaIds" @change="changeSel" placeholder="è¯·éæ©ç©æåç±»" clearable |
| | | :options="cateList" :props="{ |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'childCategoryList' |
| | | }"></el-cascader> |
| | | </el-form-item> |
| | | <span> |
| | | <el-button type="primary" @click="getList">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </span> |
| | | </el-form> |
| | | <!-- --> |
| | | <el-table @selection-change="handleSelectionChange" :data="list" stripe> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column prop="categoryName" label="ç©æç¼ç " min-width="100px"></el-table-column> |
| | | <el-table-column prop="creatorName" label="ç©æåç§°" min-width="80px"></el-table-column> |
| | | <el-table-column prop="createDate" label="æ¡ç " min-width="100px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="åç" min-width="80px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="è§æ ¼åå·" min-width="80px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="åä½" min-width="80px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="åºå" min-width="80px"></el-table-column> |
| | | </el-table> |
| | | <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination"> |
| | | </Pagination> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import { fetchList as getCateList } from '@/api/business/category.js' |
| | | export default { |
| | | name: 'OperaCategoryWindow', |
| | | components: { GlobalWindow, Pagination }, |
| | | data() { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | searchForm: {}, |
| | | pagination: { |
| | | pageSize: 10, |
| | | page: 1, |
| | | total: 0 |
| | | }, |
| | | list: [], |
| | | selList: [], |
| | | cateList: [], |
| | | isShowModal: false, |
| | | isLoading: false, |
| | | // éªè¯è§å |
| | | rules: { |
| | | name: [{ required: true, message: '请è¾å
¥äºçº§åç±»åç§°', trigger: 'blur' }], |
| | | }, |
| | | dataList: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | confirm() { |
| | | this.$emit('change', this.selList) |
| | | this.close() |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.selList = val |
| | | }, |
| | | getList(page) { |
| | | const { pagination, searchForm } = this |
| | | this.listLoading = true |
| | | if(page){pagination.page = page} |
| | | fetchList({ |
| | | capacity: pagination.pageSize, |
| | | page: pagination.page, |
| | | model: {...searchForm} |
| | | }).then((res) => { |
| | | this.listLoading = false |
| | | this.list = res.records |
| | | this.pagination.total = res.total || 0 |
| | | }, () => { |
| | | this.listLoading = false |
| | | }) |
| | | }, |
| | | initData() { |
| | | getCateList({ |
| | | model: { type: 3 }, |
| | | capacity: 1000, |
| | | page: 1, |
| | | }).then(res => { |
| | | this.cateList = res.records || [] |
| | | }) |
| | | }, |
| | | changeSel(e) { |
| | | if (e && e.length == 2) { |
| | | this.$set(this.searchForm, 'cateId', e[1]) |
| | | } else { |
| | | this.$set(this.searchForm, 'cateId', '') |
| | | } |
| | | }, |
| | | reset() { |
| | | this.searchForm = {} |
| | | this.pagination.pageSize = 10 |
| | | this.pagination.page = 1 |
| | | this.getList() |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | }, |
| | | close() { |
| | | this.isShowModal = false |
| | | this.$emit('close') |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow width="960px" title="åºåºå详æ
" :visible.sync="visible" :confirm-working="isWorking" @close="close" |
| | | @confirm="confirm"> |
| | | <div class="main"> |
| | | <div class="title"> |
| | | <span>å·¥å详æ
</span> |
| | | </div> |
| | | <div class="main_content"> |
| | | <div class="list"> |
| | | <div class="item"> |
| | | <div class="la">åºåºä»åº</div> |
| | | <div class="val">{{ info.projectName }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">åºåºæ¥æ</div> |
| | | <div class="val">{{ info.categoryName }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">åºåºç±»å</div> |
| | | <div class="val">{{ info.creatorName }}{{ info.creatorCompany ? "-" + info.creatorCompany : '' }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">å¤ç人</div> |
| | | <div class="val">{{ info.creatorPhone || info.creatorMobile }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">夿³¨</div> |
| | | <div class="val">{{ info.createDate }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="title">ç©æä¿¡æ¯</div> |
| | | <el-table :data="list" stripe> |
| | | <el-table-column align="center" type="index" width="55" /> |
| | | <el-table-column prop="creatorName" label="ç©æåç§°" show-overflow-tooltip min-width="80px"></el-table-column> |
| | | <el-table-column prop="categoryName" label="ç©æç¼ç " show-overflow-tooltip min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="æ¡å½¢ç " show-overflow-tooltip min-width="100px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="åç" show-overflow-tooltip min-width="80px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="åä½" show-overflow-tooltip min-width="80px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="åºåºæ°é" show-overflow-tooltip min-width="80px"></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import { detailById, dispatchOrder, dealOrder } from '@/api/workorder/ywWorkorder' |
| | | import { getUserList } from '@/api/system/user' |
| | | import { Message, Loading } from 'element-ui' |
| | | import dayjs from 'dayjs' |
| | | export default { |
| | | components: { |
| | | GlobalWindow |
| | | }, |
| | | extends: BaseOpera, |
| | | data() { |
| | | return { |
| | | id: '', |
| | | visible: false, |
| | | info: {}, |
| | | list: [] |
| | | |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | // this.getDetail() |
| | | }, |
| | | methods: { |
| | | getDetail() { |
| | | const { id } = this |
| | | detailById(id).then(res => { |
| | | this.info = res |
| | | }) |
| | | }, |
| | | close() { |
| | | this.visible = false |
| | | this.$emit('close') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import '@/assets/style/variables.scss'; |
| | | |
| | | .main { |
| | | padding-top: 20px; |
| | | |
| | | .title { |
| | | font-weight: 500; |
| | | font-size: 18px; |
| | | color: $primary-color; |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .status { |
| | | padding: 0 12px; |
| | | height: 24px; |
| | | line-height: 24px; |
| | | border-radius: 2px; |
| | | border: 1px solid #00BA92; |
| | | color: #00BA92; |
| | | font-weight: 400; |
| | | font-size: 12px; |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | .primaryColor { |
| | | border: 1px solid rgba(63, 126, 239, .2); |
| | | background-color: rgba(63, 126, 239, .2); |
| | | } |
| | | |
| | | .green { |
| | | background-color: rgba(83, 183, 148, .2); |
| | | border: 1px solid rgba(83, 183, 148, .2); |
| | | } |
| | | |
| | | .gray { |
| | | color: #333333; |
| | | background-color: rgba(128, 128, 128, .2); |
| | | border: 1px solid rgba(128, 128, 128, .2); |
| | | } |
| | | } |
| | | |
| | | .list { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | /* background: #F7F7F7; */ |
| | | border-radius: 2px; |
| | | padding: 15px 20px; |
| | | margin-bottom: 16px; |
| | | |
| | | .item { |
| | | width: 33.3%; |
| | | margin-bottom: 14px; |
| | | |
| | | .la { |
| | | color: #7f7f7f; |
| | | margin-bottom: 6px; |
| | | } |
| | | } |
| | | |
| | | .item2 { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .la { |
| | | margin-bottom: 0; |
| | | width: 72px; |
| | | } |
| | | } |
| | | |
| | | .max { |
| | | width: 100%; |
| | | } |
| | | } |
| | | |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow title="æ°å»ºåºåºå" :visible.sync="isShowModal" :confirm-working="isLoading" width="900px" @close="close" |
| | | @confirm="confirm"> |
| | | <el-form :model="param" ref="form" :rules="rules"> |
| | | <div class="df_ac"> |
| | | <el-form-item class="w3" label="åºåºä»åº" prop="parentId"> |
| | | <el-select :disabled="param.id" v-model="param.parentId" placeholder="ä¸å¡«ä¸ºåä¸çº§åç±»"> |
| | | <el-option v-for="op in dataList" :key="op.id" :label="op.name" :value="op.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item class="w3" label="åºåºæ¥æ"> |
| | | <el-date-picker type="date" v-model="param.getDate" format="yyyy-MM-dd" value-format="yyyy-MM-dd" |
| | | placeholder="è¯·éæ©åºåºæ¥æ"></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item class="w3" label="åºåºç±»å" prop="parentId"> |
| | | <el-select :disabled="param.id" v-model="param.parentId" placeholder="ä¸å¡«ä¸ºåä¸çº§åç±»"> |
| | | <el-option v-for="op in dataList" :key="op.id" :label="op.name" :value="op.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item class="w3" label="å¤ç人" prop="name"> |
| | | <el-input v-model="param.name" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item class="w6" label="夿³¨" prop="name"> |
| | | <el-input v-model="param.name" placeholder="请è¾å
¥" v-trim /> |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | <!-- --> |
| | | <el-tabs v-model="activeName"> |
| | | <el-tab-pane label="ç©æä¿¡æ¯" name="first"></el-tab-pane> |
| | | </el-tabs> |
| | | <el-button type="primary" @click="handleOpenMaterial">éæ©ç©æ</el-button> |
| | | <el-table :data="list" stripe> |
| | | <el-table-column align="center" label="åºå·" type="index" width="50" /> |
| | | <el-table-column prop="creatorName" label="ç©æåç§°" show-overflow-tooltip min-width="80px"></el-table-column> |
| | | <el-table-column prop="categoryName" label="ç©æç¼ç " show-overflow-tooltip min-width="90px"></el-table-column> |
| | | <el-table-column prop="createDate" label="æ¡å½¢ç " show-overflow-tooltip min-width="70px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="åç" show-overflow-tooltip min-width="70px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="åä½" show-overflow-tooltip min-width="70px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="åºåºæ°é" min-width="90px"> |
| | | <template v-slot="{row}"> |
| | | <el-input oninput="value=value.replace(/^(0+)|[^\d]+/g, '').slice(0, 11)" v-model="row.aa" class="w100"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="dealUserName" label="åºåæ°é" show-overflow-tooltip min-width="80px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="æä½" min-width="60px"> |
| | | <template v-slot="scope"> |
| | | <span @click="handleDel(scope)" class="red pointer">å é¤</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- --> |
| | | <AssetSel v-if="isShowSel" ref="AssetSelRef" @change="changeSel" @close="isShowSel = false" /> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import AssetSel from './AssetSel' |
| | | import { create, fetchCateList, getInfoById } from '@/api/business/category.js' |
| | | export default { |
| | | name: 'OperaCategoryWindow', |
| | | components: { GlobalWindow, AssetSel }, |
| | | data() { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | param: {}, |
| | | activeName: 'first', |
| | | isShowModal: false, |
| | | isShowSel: false, |
| | | isLoading: false, |
| | | // éªè¯è§å |
| | | rules: { |
| | | name: [{ required: true, message: '请è¾å
¥äºçº§åç±»åç§°', trigger: 'blur' }], |
| | | }, |
| | | list: [{}], |
| | | |
| | | dataList: [], |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | confirm() { |
| | | |
| | | }, |
| | | getList() { |
| | | fetchCateList({ type: 5 }).then(res => { |
| | | this.dataList = res || [] |
| | | |
| | | }) |
| | | }, |
| | | changeSel() { |
| | | |
| | | }, |
| | | handleDel(val) { |
| | | const index = val.$index |
| | | this.list.splice(index, 1) |
| | | |
| | | }, |
| | | handleOpenMaterial() { |
| | | this.isShowSel = true |
| | | this.$nextTick(() => { |
| | | this.$refs.AssetSelRef.isShowModal = true |
| | | }) |
| | | }, |
| | | close() { |
| | | this.isShowModal = false |
| | | this.$emit('close') |
| | | }, |
| | | getDetail(id) { |
| | | getInfoById(id).then(res => { |
| | | this.param = res |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .df_ac { |
| | | display: flex; |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | |
| | | .w3 { |
| | | width: 33.3%; |
| | | padding: 0 10px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .w6 { |
| | | width: 66.6%; |
| | | padding: 0 10px; |
| | | box-sizing: border-box; |
| | | } |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow width="960px" title="åºåºå详æ
" :visible.sync="visible" :confirm-working="isWorking" @close="close" |
| | | @confirm="confirm"> |
| | | <div class="main"> |
| | | <div class="title"> |
| | | <span>å·¥å详æ
</span> |
| | | </div> |
| | | <div class="main_content"> |
| | | <div class="list"> |
| | | <div class="item"> |
| | | <div class="la">åºåºä»åº</div> |
| | | <div class="val">{{ info.projectName }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">åºåºæ¥æ</div> |
| | | <div class="val">{{ info.categoryName }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">åºåºç±»å</div> |
| | | <div class="val">{{ info.creatorName }}{{ info.creatorCompany ? "-" + info.creatorCompany : '' }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">å¤ç人</div> |
| | | <div class="val">{{ info.creatorPhone || info.creatorMobile }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">夿³¨</div> |
| | | <div class="val">{{ info.createDate }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="title">ç©æä¿¡æ¯</div> |
| | | <el-table :data="list" stripe> |
| | | <el-table-column align="center" type="index" width="55" /> |
| | | <el-table-column prop="creatorName" label="ç©æåç§°" show-overflow-tooltip min-width="80px"></el-table-column> |
| | | <el-table-column prop="categoryName" label="ç©æç¼ç " show-overflow-tooltip min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="æ¡å½¢ç " show-overflow-tooltip min-width="100px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="åç" show-overflow-tooltip min-width="80px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="åä½" show-overflow-tooltip min-width="80px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="åºåºæ°é" show-overflow-tooltip min-width="80px"></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import { detailById, dispatchOrder, dealOrder } from '@/api/workorder/ywWorkorder' |
| | | import { getUserList } from '@/api/system/user' |
| | | import { Message, Loading } from 'element-ui' |
| | | import dayjs from 'dayjs' |
| | | export default { |
| | | components: { |
| | | GlobalWindow |
| | | }, |
| | | extends: BaseOpera, |
| | | data() { |
| | | return { |
| | | id: '', |
| | | visible: false, |
| | | info: {}, |
| | | list: [] |
| | | |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | // this.getDetail() |
| | | }, |
| | | methods: { |
| | | getDetail() { |
| | | const { id } = this |
| | | detailById(id).then(res => { |
| | | this.info = res |
| | | }) |
| | | }, |
| | | close() { |
| | | this.visible = false |
| | | this.$emit('close') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import '@/assets/style/variables.scss'; |
| | | |
| | | .main { |
| | | padding-top: 20px; |
| | | |
| | | .title { |
| | | font-weight: 500; |
| | | font-size: 18px; |
| | | color: $primary-color; |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .status { |
| | | padding: 0 12px; |
| | | height: 24px; |
| | | line-height: 24px; |
| | | border-radius: 2px; |
| | | border: 1px solid #00BA92; |
| | | color: #00BA92; |
| | | font-weight: 400; |
| | | font-size: 12px; |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | .primaryColor { |
| | | border: 1px solid rgba(63, 126, 239, .2); |
| | | background-color: rgba(63, 126, 239, .2); |
| | | } |
| | | |
| | | .green { |
| | | background-color: rgba(83, 183, 148, .2); |
| | | border: 1px solid rgba(83, 183, 148, .2); |
| | | } |
| | | |
| | | .gray { |
| | | color: #333333; |
| | | background-color: rgba(128, 128, 128, .2); |
| | | border: 1px solid rgba(128, 128, 128, .2); |
| | | } |
| | | } |
| | | |
| | | .list { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | /* background: #F7F7F7; */ |
| | | border-radius: 2px; |
| | | padding: 15px 20px; |
| | | margin-bottom: 16px; |
| | | |
| | | .item { |
| | | width: 33.3%; |
| | | margin-bottom: 14px; |
| | | |
| | | .la { |
| | | color: #7f7f7f; |
| | | margin-bottom: 6px; |
| | | } |
| | | } |
| | | |
| | | .item2 { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .la { |
| | | margin-bottom: 0; |
| | | width: 72px; |
| | | } |
| | | } |
| | | |
| | | .max { |
| | | width: 100%; |
| | | } |
| | | } |
| | | |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow title="æ°å»ºåºåºå" :visible.sync="isShowModal" :confirm-working="isLoading" width="900px" @close="close" |
| | | @confirm="confirm"> |
| | | <el-form :model="param" ref="form" :rules="rules"> |
| | | <div class="df_ac"> |
| | | <el-form-item class="w3" label="åºåºä»åº" prop="parentId"> |
| | | <el-select :disabled="param.id" v-model="param.parentId" placeholder="ä¸å¡«ä¸ºåä¸çº§åç±»"> |
| | | <el-option v-for="op in dataList" :key="op.id" :label="op.name" :value="op.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item class="w3" label="åºåºæ¥æ"> |
| | | <el-date-picker type="date" v-model="param.getDate" format="yyyy-MM-dd" value-format="yyyy-MM-dd" |
| | | placeholder="è¯·éæ©åºåºæ¥æ"></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item class="w3" label="åºåºç±»å" prop="parentId"> |
| | | <el-select :disabled="param.id" v-model="param.parentId" placeholder="ä¸å¡«ä¸ºåä¸çº§åç±»"> |
| | | <el-option v-for="op in dataList" :key="op.id" :label="op.name" :value="op.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item class="w3" label="å¤ç人" prop="name"> |
| | | <el-input v-model="param.name" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item class="w6" label="夿³¨" prop="name"> |
| | | <el-input v-model="param.name" placeholder="请è¾å
¥" v-trim /> |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | <!-- --> |
| | | <el-tabs v-model="activeName"> |
| | | <el-tab-pane label="ç©æä¿¡æ¯" name="first"></el-tab-pane> |
| | | </el-tabs> |
| | | <el-button type="primary" @click="handleOpenMaterial">éæ©ç©æ</el-button> |
| | | <el-table :data="list" stripe> |
| | | <el-table-column align="center" label="åºå·" type="index" width="50" /> |
| | | <el-table-column prop="creatorName" label="ç©æåç§°" show-overflow-tooltip min-width="80px"></el-table-column> |
| | | <el-table-column prop="categoryName" label="ç©æç¼ç " show-overflow-tooltip min-width="90px"></el-table-column> |
| | | <el-table-column prop="createDate" label="æ¡å½¢ç " show-overflow-tooltip min-width="70px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="åç" show-overflow-tooltip min-width="70px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="åä½" show-overflow-tooltip min-width="70px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="åºåºæ°é" min-width="90px"> |
| | | <template v-slot="{row}"> |
| | | <el-input oninput="value=value.replace(/^(0+)|[^\d]+/g, '').slice(0, 11)" v-model="row.aa" class="w100"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="dealUserName" label="åºåæ°é" show-overflow-tooltip min-width="80px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="æä½" min-width="60px"> |
| | | <template v-slot="scope"> |
| | | <span @click="handleDel(scope)" class="red pointer">å é¤</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- --> |
| | | <AssetSel v-if="isShowSel" ref="AssetSelRef" @change="changeSel" @close="isShowSel = false" /> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import AssetSel from './AssetSel' |
| | | import { create, fetchCateList, getInfoById } from '@/api/business/category.js' |
| | | export default { |
| | | name: 'OperaCategoryWindow', |
| | | components: { GlobalWindow, AssetSel }, |
| | | data() { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | param: {}, |
| | | activeName: 'first', |
| | | isShowModal: false, |
| | | isShowSel: false, |
| | | isLoading: false, |
| | | // éªè¯è§å |
| | | rules: { |
| | | name: [{ required: true, message: '请è¾å
¥äºçº§åç±»åç§°', trigger: 'blur' }], |
| | | }, |
| | | list: [{}], |
| | | |
| | | dataList: [], |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | confirm() { |
| | | |
| | | }, |
| | | getList() { |
| | | fetchCateList({ type: 5 }).then(res => { |
| | | this.dataList = res || [] |
| | | |
| | | }) |
| | | }, |
| | | changeSel() { |
| | | |
| | | }, |
| | | handleDel(val) { |
| | | const index = val.$index |
| | | this.list.splice(index, 1) |
| | | |
| | | }, |
| | | handleOpenMaterial() { |
| | | this.isShowSel = true |
| | | this.$nextTick(() => { |
| | | this.$refs.AssetSelRef.isShowModal = true |
| | | }) |
| | | }, |
| | | close() { |
| | | this.isShowModal = false |
| | | this.$emit('close') |
| | | }, |
| | | getDetail(id) { |
| | | getInfoById(id).then(res => { |
| | | this.param = res |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .df_ac { |
| | | display: flex; |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | |
| | | .w3 { |
| | | width: 33.3%; |
| | | padding: 0 10px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .w6 { |
| | | width: 66.6%; |
| | | padding: 0 10px; |
| | | box-sizing: border-box; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <div class="main_app"> |
| | | <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" /> |
| | | <div class="mt20"> |
| | | <el-button type="primary" @click="handleEx()" v-permissions="['business:ywpatrolline:create']">导åº</el-button> |
| | | <el-button type="primary" @click="handleEdit()" v-permissions="['business:ywpatrolline:create']">æ°å»ºåºåºå</el-button> |
| | | <el-button @click="handleEx()" v-permissions="['business:ywpatrolline:create']">导åº</el-button> |
| | | </div> |
| | | <el-table v-loading="loading" :data="list" stripe> |
| | | <el-table-column prop="platformName" label="åºåºåå·" min-width="120" show-overflow-tooltip /> |
| | |
| | | <el-table-column prop="param2" label="æä½äºº" min-width="90" show-overflow-tooltip /> |
| | | <el-table-column prop="workTime" label="æä½æ¶é´" min-width="140" show-overflow-tooltip /> |
| | | <el-table-column prop="workTime" label="æä½" min-width="80" show-overflow-tooltip> |
| | | <template v-slot="{row}"> |
| | | <span class="primaryColor pointer">æ¥ç详æ
</span> |
| | | <template v-slot="{ row }"> |
| | | <span @click="handleDetail(row)" class="primaryColor pointer">æ¥ç详æ
</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="mt20"> |
| | | <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> |
| | | </div> |
| | | <!-- --> |
| | | <InEdit v-if="isShowEdit" @close="isShowEdit = false" @success="getList" ref="InEditRef" /> |
| | | <InDetail v-if="isShowDetail" ref="InDetailRef" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/common/Pagination' |
| | | import QueryForm from '@/components/common/QueryForm' |
| | | import InEdit from './components/InEdit' |
| | | import InDetail from './components/InDetail' |
| | | import dayjs from 'dayjs' |
| | | import duration from 'dayjs/plugin/duration' |
| | | dayjs.extend(duration) |
| | |
| | | export default { |
| | | components: { |
| | | Pagination, |
| | | QueryForm |
| | | QueryForm, |
| | | InEdit, |
| | | InDetail |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | isShowEdit: false, |
| | | isShowDetail: false, |
| | | pagination: { |
| | | pageSize: 10, |
| | | page: 1, |
| | | total: 0 |
| | | }, |
| | | filters: {}, |
| | | list: [], |
| | | list: [{}], |
| | | total: 0, |
| | | queryFormConfig: { |
| | | formItems: [ |
| | | { |
| | | { |
| | | filed: 'carCodeFront', |
| | | type: 'input', |
| | | label: 'åºåºåå·', |
| | |
| | | } |
| | | }) |
| | | }, |
| | | handleEdit() { |
| | | this.isShowEdit = true |
| | | this.$nextTick(() => { |
| | | this.$refs.InEditRef.isShowModal = true |
| | | }) |
| | | }, |
| | | handleDetail() { |
| | | this.isShowDetail = true |
| | | this.$nextTick(() => { |
| | | this.$refs.InDetailRef.visible = true |
| | | }) |
| | | }, |
| | | handleEx() { }, |
| | | getGroupList() { |
| | | getPlatformGroupList({ queryData: 0, queryType: 0 }).then(res => { |
| | |
| | | getList(page) { |
| | | const { pagination, filters } = this |
| | | this.loading = true |
| | | if(page){pagination.page = page} |
| | | platformLogPage({ |
| | | model: { |
| | | ...filters, |
| | |
| | | }, |
| | | sorts: [{ direction: 'DESC', property: 'param1' }], |
| | | capacity: pagination.pageSize, |
| | | page: page || pagination.page, |
| | | page: page, |
| | | }).then(res => { |
| | | this.loading = false |
| | | this.list = res.records || [] |
| | |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |
| | | <style></style> |
| | |
| | | <div class="main_app"> |
| | | <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" /> |
| | | <div class="mt20"> |
| | | <el-button type="primary" @click="handleEx()" v-permissions="['business:ywpatrolline:create']">导åº</el-button> |
| | | <el-button type="primary" @click="handleEdit()" v-permissions="['business:ywpatrolline:create']">æ°å»ºåºåºå</el-button> |
| | | <el-button @click="handleEx()" v-permissions="['business:ywpatrolline:create']">导åº</el-button> |
| | | </div> |
| | | <el-table v-loading="loading" :data="list" stripe> |
| | | <el-table-column prop="platformName" label="åºåºåå·" min-width="120" show-overflow-tooltip /> |
| | |
| | | <el-table-column prop="param2" label="æä½äºº" min-width="90" show-overflow-tooltip /> |
| | | <el-table-column prop="workTime" label="æä½æ¶é´" min-width="140" show-overflow-tooltip /> |
| | | <el-table-column prop="workTime" label="æä½" min-width="80" show-overflow-tooltip> |
| | | <template v-slot="{row}"> |
| | | <span class="primaryColor pointer">æ¥ç详æ
</span> |
| | | <template v-slot="{ row }"> |
| | | <span @click="handleDetail(row)" class="primaryColor pointer">æ¥ç详æ
</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="mt20"> |
| | | <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> |
| | | </div> |
| | | <!-- --> |
| | | <OutEdit v-if="isShowEdit" @close="isShowEdit = false" @success="getList" ref="OutEditRef" /> |
| | | <OutDetail v-if="isShowDetail" ref="OutDetailRef" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/common/Pagination' |
| | | import QueryForm from '@/components/common/QueryForm' |
| | | import OutEdit from './components/OutEdit' |
| | | import OutDetail from './components/OutDetail' |
| | | import dayjs from 'dayjs' |
| | | import duration from 'dayjs/plugin/duration' |
| | | dayjs.extend(duration) |
| | |
| | | export default { |
| | | components: { |
| | | Pagination, |
| | | QueryForm |
| | | QueryForm, |
| | | OutEdit, |
| | | OutDetail |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | isShowEdit: false, |
| | | isShowDetail: false, |
| | | pagination: { |
| | | pageSize: 10, |
| | | page: 1, |
| | | total: 0 |
| | | }, |
| | | filters: {}, |
| | | list: [], |
| | | list: [{}], |
| | | total: 0, |
| | | queryFormConfig: { |
| | | formItems: [ |
| | | { |
| | | { |
| | | filed: 'carCodeFront', |
| | | type: 'input', |
| | | label: 'åºåºåå·', |
| | |
| | | } |
| | | }) |
| | | }, |
| | | handleEdit() { |
| | | this.isShowEdit = true |
| | | this.$nextTick(() => { |
| | | this.$refs.OutEditRef.isShowModal = true |
| | | }) |
| | | }, |
| | | handleDetail() { |
| | | this.isShowDetail = true |
| | | this.$nextTick(() => { |
| | | this.$refs.OutDetailRef.visible = true |
| | | }) |
| | | }, |
| | | handleEx() { }, |
| | | getGroupList() { |
| | | getPlatformGroupList({ queryData: 0, queryType: 0 }).then(res => { |
| | |
| | | getList(page) { |
| | | const { pagination, filters } = this |
| | | this.loading = true |
| | | if(page){pagination.page = page} |
| | | platformLogPage({ |
| | | model: { |
| | | ...filters, |
| | |
| | | }, |
| | | sorts: [{ direction: 'DESC', property: 'param1' }], |
| | | capacity: pagination.pageSize, |
| | | page: page || pagination.page, |
| | | page: page, |
| | | }).then(res => { |
| | | this.loading = false |
| | | this.list = res.records || [] |
| | |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |
| | | <style></style> |
| | |
| | | <div class="main_app"> |
| | | <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" /> |
| | | <div class="mt20"> |
| | | <el-button type="primary" @click="handleEx()" v-permissions="['business:ywpatrolline:create']">导åº</el-button> |
| | | <el-button @click="handleEx()" v-permissions="['business:ywpatrolline:create']">导åº</el-button> |
| | | </div> |
| | | <el-table v-loading="loading" :data="list" stripe> |
| | | <el-table-column prop="platformName" label="èµäº§ç¼ç " min-width="100" show-overflow-tooltip /> |
| | |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | |
| | | <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear"> |
| | | </QueryForm> |
| | | <div class="pt16 mb10"> |
| | | <el-button type="primary" @click="batchStatus(0)" |
| | | v-permissions="['business:platformjob:update']">æ¹éå¯ç¨</el-button> |
| | | <el-button type="primary" @click="batchStatus(0)" v-permissions="['business:platformjob:update']">æ¹éå¯ç¨</el-button> |
| | | <el-button @click="batchStatus(1)" v-permissions="['business:platformjob:update']">æ¹éç¦ç¨</el-button> |
| | | </div> |
| | | <el-table @selection-change="handleSelectionChange" class="mb20" v-loading="loading" :data="list" stripe> |
| | |
| | | <el-table-column prop="content" label="æ¶æ¯æ¨¡æ¿" min-width="300" show-overflow-tooltip /> |
| | | <el-table-column label="ç¶æ" width="120" align="center" fixed="right"> |
| | | <template v-slot="scope"> |
| | | <el-switch v-permissions="['business:platformjob:update']" v-model="scope.row.status" @change="changeStatus(scope.row)" :active-value="0" :inactive-value="1"> |
| | | <el-switch v-permissions="['business:platformjob:update']" v-model="scope.row.status" |
| | | @change="changeStatus(scope.row)" :active-value="0" :inactive-value="1"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtempconfig:create', 'æ°å»ºå¬ç¼´ä¿¡æ¯é
ç½®', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtempconfig:delete', 'å é¤å¬ç¼´ä¿¡æ¯é
ç½®', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtempconfig:update', 'ä¿®æ¹å¬ç¼´ä¿¡æ¯é
ç½®', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtempconfig:query', 'æ¥è¯¢å¬ç¼´ä¿¡æ¯é
ç½®', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtempconfig:exportExcel', '导åºå¬ç¼´ä¿¡æ¯é
ç½®(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | |
| | |
| | | package com.doumee.core.utils; |
| | | |
| | | |
| | | import cn.hutool.core.io.IoUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | |
| | | import com.fasterxml.jackson.databind.PropertyNamingStrategy; |
| | | import io.swagger.models.auth.In; |
| | | import org.apache.batik.util.Platform; |
| | | import org.apache.commons.compress.archivers.zip.Zip64Mode; |
| | | import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; |
| | | import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | | import java.net.URLDecoder; |
| | | import java.text.SimpleDateFormat; |
| | |
| | | } |
| | | } |
| | | |
| | | public static void packFilesToZip(List<File> files, OutputStream os) throws IOException { |
| | | try { |
| | | ZipArchiveOutputStream zipOutputStream = new ZipArchiveOutputStream(os); |
| | | zipOutputStream.setUseZip64(Zip64Mode.AsNeeded); |
| | | for (File file : files) { |
| | | if(!file.exists()){ |
| | | System.out.println("===æä»¶ä¸åå¨======="+file.getPath()); |
| | | continue; |
| | | }else{ |
| | | System.out.println("===æä»¶åå¨======="+file.getPath()); |
| | | } |
| | | ZipArchiveEntry entry = new ZipArchiveEntry(file.getName()); |
| | | zipOutputStream.putArchiveEntry(entry); |
| | | FileInputStream fileInputStream = new FileInputStream(file); |
| | | byte[] buffer = new byte[1024]; |
| | | int length; |
| | | while ((length = fileInputStream.read(buffer)) > 0) { |
| | | zipOutputStream.write(buffer, 0, length); |
| | | } |
| | | zipOutputStream.closeArchiveEntry(); |
| | | zipOutputStream.flush(); |
| | | IoUtil.close(fileInputStream); |
| | | file.delete(); |
| | | } |
| | | }catch (Exception e){ |
| | | throw new BusinessException(ResponseStatus.EXPORT_EXCEL_ERROR.getCode(),"对ä¸èµ·ï¼ä¸è½½å缩æä»¶å¤±è´¥"); |
| | | }finally { |
| | | if (os != null) { |
| | | try { |
| | | os.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwContractBill; |
| | | import com.doumee.dao.business.vo.YwContractBillCallDataVO; |
| | | import com.doumee.dao.business.vo.YwContractBillDataVO; |
| | | import com.doumee.service.business.YwContractBillService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | return ApiResponse.success(ywContractBillService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("é¾æè´¦å") |
| | | @PostMapping("/findPageForOverdue") |
| | | @CloudRequiredPermission("business:ywcontractbill:query") |
| | | public ApiResponse<PageData<YwContractBill>> findPageForOverdue (@RequestBody PageWrap<YwContractBill> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywContractBillService.findPageForOverdue(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("å¯é款账å") |
| | | @PostMapping("/getCanBackBill") |
| | | @CloudRequiredPermission("business:ywcontractbill:query") |
| | |
| | | return ApiResponse.success(ywContractBillService.getWaitDealList(contractId)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("è·åæ¹éå¬ç¼´æ°æ®") |
| | | @PostMapping("/getNoticeCustomerData") |
| | | @CloudRequiredPermission("business:ywcontractbill:query") |
| | | public ApiResponse<List<YwContractBillCallDataVO>> getNoticeCustomerData(@RequestBody List<Integer> billIds,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywContractBillService.getNoticeCustomerData(billIds)); |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | 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.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwTempConfig; |
| | | import com.doumee.dao.business.vo.YwCallTempDataVO; |
| | | import com.doumee.service.business.YwTempConfigService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/10 09:43 |
| | | */ |
| | | @Api(tags = "å¬ç¼´ä¿¡æ¯é
ç½®") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/ywTempConfig") |
| | | public class YwTempConfigCloudController extends BaseController { |
| | | |
| | | @Autowired |
| | | private YwTempConfigService ywTempConfigService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:ywtempconfig:create") |
| | | public ApiResponse create(@RequestBody YwTempConfig ywTempConfig) { |
| | | return ApiResponse.success(ywTempConfigService.create(ywTempConfig)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:ywtempconfig:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | ywTempConfigService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:ywtempconfig:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ywTempConfigService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:ywtempconfig:update") |
| | | public ApiResponse updateById(@RequestBody YwTempConfig ywTempConfig) { |
| | | ywTempConfigService.updateById(ywTempConfig); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:ywtempconfig:query") |
| | | public ApiResponse<PageData<YwTempConfig>> findPage (@RequestBody PageWrap<YwTempConfig> pageWrap) { |
| | | return ApiResponse.success(ywTempConfigService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:ywtempconfig:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<YwTempConfig> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(YwTempConfig.class).export(ywTempConfigService.findPage(pageWrap).getRecords(), "å¬ç¼´ä¿¡æ¯é
ç½®", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:ywtempconfig:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(ywTempConfigService.findById(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/getCallTemp") |
| | | @RequiresPermissions("business:ywtempconfig:query") |
| | | public ApiResponse<YwCallTempDataVO> getCallTemp() { |
| | | return ApiResponse.success(ywTempConfigService.getCallTemp()); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.excel; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwTempConfig; |
| | | import org.apache.poi.xwpf.usermodel.XWPFDocument; |
| | | import org.apache.poi.xwpf.usermodel.XWPFParagraph; |
| | | import org.apache.poi.xwpf.usermodel.XWPFRun; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.*; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.URL; |
| | | import java.net.URLEncoder; |
| | | import java.nio.charset.Charset; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2025/1/3 9:11 |
| | | */ |
| | | public class ExcelReplaceCommon { |
| | | |
| | | // public static void main(String[] args) { |
| | | // modifyWordTemplate("https://bdreport.oss-cn-beijing.aliyuncs.com/xczl/20250110/temp/BE9C167EE35C40E78029C68BABBD0EAB.docx", "d://output.docx", "å¼ ä¸", "Java课ç¨"); |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public static String modifyWordTemplate(String templatePath, List<YwTempConfig> ywTempConfigList,String fileName) { |
| | | try ( |
| | | XWPFDocument document = new XWPFDocument(getFileInputStream(templatePath))) { |
| | | // æ¤å¤è¿æ¥å°åç»æ¿æ¢æ¥éª¤ |
| | | // éåæ®µè½ |
| | | for (XWPFParagraph paragraph : document.getParagraphs()) { |
| | | for (XWPFRun run : paragraph.getRuns()) { |
| | | // æ¿æ¢å ä½ç¬¦ |
| | | String text = run.getText(0); |
| | | if (text != null) { |
| | | for (YwTempConfig ywTempConfig:ywTempConfigList |
| | | ) { |
| | | text = text.replace(ywTempConfig.getTitle(), ywTempConfig.getUrl()); |
| | | } |
| | | run.setText(text, 0); // éæ°è®¾ç½®ææ¬ |
| | | } |
| | | } |
| | | } |
| | | String path = "d://"+fileName; |
| | | try (FileOutputStream fos = new FileOutputStream(path)) { |
| | | document.write(fos); // å°ä¿®æ¹åçææ¡£åå
¥è¾åºæµ |
| | | } |
| | | return path; |
| | | /*//äºè¿å¶OutputStream |
| | | ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
| | | document.write(baos);//ææ¡£åå
¥æµ |
| | | //OutputStreamåå
¥InputStreamäºè¿å¶æµ |
| | | ByteArrayInputStream in = new ByteArrayInputStream(baos.toByteArray()); */ |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æä»¶è½¬æ¢å¼å¸¸!"); |
| | | } |
| | | |
| | | /*读åç½ç»æä»¶*/ |
| | | public static InputStream getFileInputStream(String path) { |
| | | URL url = null; |
| | | try { |
| | | url = new URL(path); |
| | | HttpURLConnection conn = (HttpURLConnection)url.openConnection(); |
| | | //设置è¶
æ¶é´ä¸º3ç§ |
| | | conn.setConnectTimeout(3*1000); |
| | | //鲿¢å±è½ç¨åºæåèè¿å403é误 |
| | | conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)"); |
| | | //å¾å°è¾å
¥æµ |
| | | return conn.getInputStream(); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.YwTempConfig; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/10 09:43 |
| | | */ |
| | | public interface YwTempConfigMapper extends MPJBaseMapper<YwTempConfig> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/02/14 11:14 |
| | | */ |
| | | @Data |
| | | public class YwSmsEmailBillCallDTO implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "æ¥æ¶äººä¸»é®" ) |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty(value = "è´¦å主é®", example = "1") |
| | | private Integer billId; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦åéçæ¯ 0=å¦ï¼1=æ¯", example = "1") |
| | | private Integer sendSms; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦åéé®ä»¶ 0=å¦ï¼1=æ¯", example = "1") |
| | | private Integer sendEmail; |
| | | |
| | | } |
| | |
| | | @TableField(exist = false) |
| | | private String customerName; |
| | | |
| | | @ApiModelProperty(value = "客æ·é»è®¤è系人", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer customerUserId; |
| | | |
| | | @ApiModelProperty(value = "客æ·ä¸»é®", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer customerId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "å
¬å¸åç§°", example = "1") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | |
| | | @ExcelColumn(name="æ¯å¦é¾æ",index = 9,width = 6,valueMapping = "0=æªé¾æï¼1=已龿") |
| | | private Integer isOverdue; |
| | | |
| | | @ApiModelProperty(value = "åååä»·ï¼å
ï¼", example = "1") |
| | | @TableField(exist = false) |
| | | private BigDecimal price; |
| | | |
| | | @ApiModelProperty(value = "仿¬¾å¨æç±»å 0=å
æ¯å¹³ç±³å¤©ï¼1=å
æ¯å¹³ç±³æï¼2=å
æ¯å¹³ç±³å¹´ï¼3=å
æ¯å¤©ï¼4=å
æ¯æï¼5=å
æ¯å¹´ï¼6=å
æ¯åºï¼", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer circleType; |
| | | |
| | | @ApiModelProperty(value = "æ¡æ¬¾ç±»å 0ç§èµæ¡æ¬¾ 1ç©ä¸æ¡æ¬¾", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer detailType; |
| | | |
| | | @ApiModelProperty(value = "éä»¶ä¿¡æ¯", example = "1") |
| | | @TableField(exist = false) |
| | | private List<Multifile> multifileList; |
| | |
| | | @TableField(exist = false) |
| | | private List<YwContractRevenue> ywContractRevenueList; |
| | | |
| | | @ApiModelProperty(value = "ç§èµæ»é¢ç§¯", example = "1") |
| | | @TableField(exist = false) |
| | | private BigDecimal totalArea; |
| | | |
| | | @ApiModelProperty(value = "ç§èµæ¯ä»æ¹å¼ 0=䏿¬¡æ§ä»æ¬¾ï¼1=æ¯ä¸ä¸ªæä¸ä»ï¼2=å
个æä¸ä»ï¼3=ä¸å¹´ä¸ä»", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer zlPayType; |
| | | |
| | | @ApiModelProperty(value = "ç©ä¸æ¯ä»æ¹å¼ 0=䏿¬¡æ§ä»æ¬¾ï¼1=æ¯ä¸ä¸ªæä¸ä»ï¼2=å
个æä¸ä»ï¼3=ä¸å¹´ä¸ä»", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer wyPayType; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * å¬ç¼´ä¿¡æ¯é
ç½® |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/10 09:43 |
| | | */ |
| | | @Data |
| | | @ApiModel("å¬ç¼´ä¿¡æ¯é
ç½®") |
| | | @TableName("`yw_temp_config`") |
| | | public class YwTempConfig extends LoginUserModel { |
| | | |
| | | @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 = "ç±»åï¼0=çæ¯æ¨¡æ¿ï¼1=é®ä»¶æ¨¡æ¿ï¼2=ç§èµéç¥éä»¶ï¼3=å
¶ä»éç¥éä»¶ï¼4=è´¦åå
³é®åï¼5=ååå
³é®åï¼6=å
¶ä»ä¿¡æ¯ï¼", example = "1") |
| | | @ExcelColumn(name="ç±»åï¼0=çæ¯æ¨¡æ¿ï¼1=é®ä»¶æ¨¡æ¿ï¼2=ç§èµéç¥éä»¶ï¼3=å
¶ä»éç¥éä»¶ï¼4=è´¦åå
³é®åï¼5=ååå
³é®åï¼6=å
¶ä»ä¿¡æ¯ï¼") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "æ é¢") |
| | | @ExcelColumn(name="æ é¢") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "æä»¶å°å type = 2/3使ç¨") |
| | | @ExcelColumn(name="æä»¶å°å type = 2/3使ç¨") |
| | | private String url; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.vo; |
| | | |
| | | import com.doumee.dao.business.model.YwTempConfig; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2025/1/8 15:32 |
| | | */ |
| | | @Data |
| | | public class YwCallTempDataVO { |
| | | |
| | | @ApiModelProperty(value = "çæ¯æ¨¡æ¿", example = "1") |
| | | private YwTempConfig smsTemp; |
| | | |
| | | @ApiModelProperty(value = "é®ä»¶ä¿¡æ¯æ¨¡æ¿", example = "1") |
| | | private YwTempConfig emailTemp; |
| | | |
| | | @ApiModelProperty(value = "ç§èµéç¥å模æ¿", example = "1") |
| | | private YwTempConfig leaseTemp; |
| | | |
| | | @ApiModelProperty(value = "å
¶ä»éç¥å模æ¿", example = "1") |
| | | private YwTempConfig otherTemp; |
| | | |
| | | @ApiModelProperty(value = "模æ¿å
³é®å - è´¦å", example = "1") |
| | | private List<YwTempConfig> billTempList; |
| | | |
| | | @ApiModelProperty(value = "模æ¿å
³é®å - åå", example = "1") |
| | | private List<YwTempConfig> contractTempList; |
| | | |
| | | @ApiModelProperty(value = "模æ¿å
³é®å - å
¶ä»", example = "1") |
| | | private List<YwTempConfig> otherTempList; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.vo; |
| | | |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.YwContractBill; |
| | | import com.doumee.dao.business.model.YwCustomer; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2025/1/8 15:32 |
| | | */ |
| | | @Data |
| | | public class YwContractBillCallDataVO { |
| | | |
| | | @ApiModelProperty(value = "è´¦å主é®", example = "1") |
| | | private Integer billId; |
| | | |
| | | @ApiModelProperty(value = "客æ·åç§°", example = "1") |
| | | private String customerName; |
| | | |
| | | @ApiModelProperty(value = "é»è®¤è系人主é®", example = "1") |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty(value = "è系人å表", example = "1") |
| | | private List<Member> memberList; |
| | | |
| | | } |
| | |
| | | long count(SmsEmail smsEmail); |
| | | |
| | | void sendWaitingSmsNotice(); |
| | | |
| | | Integer sendBillSms(String content,String mobile,Integer billId); |
| | | |
| | | Integer sendEmail(String email,String content,Integer billId); |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwContractBill; |
| | | import com.doumee.dao.business.vo.YwContractBillCallDataVO; |
| | | import com.doumee.dao.business.vo.YwContractBillDataVO; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | PageData<YwContractBill> findPage(PageWrap<YwContractBill> pageWrap); |
| | | |
| | | /** |
| | | * é¾æè´¦åå页 |
| | | * @param pageWrap |
| | | * @return |
| | | */ |
| | | PageData<YwContractBill> findPageForOverdue(PageWrap<YwContractBill> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param ywContractBill å®ä½å¯¹è±¡ |
| | |
| | | |
| | | List<YwContractBill> getCanBackBill(YwContractBill model); |
| | | |
| | | |
| | | YwContractBillDataVO getWaitDealList(Integer contractId); |
| | | |
| | | List<YwContractBillCallDataVO> getNoticeCustomerData(List<Integer> billIds); |
| | | |
| | | void downloadCallFeeDoc(List<Integer> billIds, LoginUserInfo loginUserInfo, HttpServletResponse response); |
| | | |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwTempConfig; |
| | | import com.doumee.dao.business.vo.YwCallTempDataVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å¬ç¼´ä¿¡æ¯é
ç½®Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/10 09:43 |
| | | */ |
| | | public interface YwTempConfigService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param ywTempConfig å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(YwTempConfig ywTempConfig); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param ywTempConfig å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(YwTempConfig ywTempConfig); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param ywTempConfig å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(YwTempConfig ywTempConfig); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param ywTempConfigs å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<YwTempConfig> ywTempConfigs); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return YwTempConfig |
| | | */ |
| | | YwTempConfig findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param ywTempConfig å®ä½å¯¹è±¡ |
| | | * @return YwTempConfig |
| | | */ |
| | | YwTempConfig findOne(YwTempConfig ywTempConfig); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param ywTempConfig å®ä½å¯¹è±¡ |
| | | * @return List<YwTempConfig> |
| | | */ |
| | | List<YwTempConfig> findList(YwTempConfig ywTempConfig); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<YwTempConfig> |
| | | */ |
| | | PageData<YwTempConfig> findPage(PageWrap<YwTempConfig> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param ywTempConfig å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(YwTempConfig ywTempConfig); |
| | | |
| | | YwCallTempDataVO getCallTemp(); |
| | | } |
| | |
| | | import com.doumee.dao.system.SystemUserMapper; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.SmsEmailService; |
| | | import com.doumee.service.business.third.EmailService; |
| | | import com.doumee.service.business.third.EmayService; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public Integer sendBillSms(String content,String mobile,Integer billId) { |
| | | if(StringUtils.isBlank(mobile)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | boolean result= emayService.sendSingleSms(mobile,content); |
| | | if(!result){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼çä¿¡åé失败ï¼è¯·ç¨åéè¯ï¼"); |
| | | } |
| | | SmsEmail smsEmail = new SmsEmail(); |
| | | smsEmail.setIsdeleted(Constants.ZERO); |
| | | smsEmail.setCreateDate(new Date()); |
| | | smsEmail.setStatus(Constants.ZERO); |
| | | smsEmail.setType(Constants.ZERO); |
| | | smsEmail.setTitle("è´¦åå¬è´¹"); |
| | | smsEmail.setObjId(billId); |
| | | smsEmail.setObjType(Constants.ZERO+""); |
| | | smsEmail.setContent(content); |
| | | smsEmailMapper.insert(smsEmail); |
| | | return smsEmail.getId(); |
| | | } |
| | | |
| | | @Autowired |
| | | private EmailService emailService; |
| | | |
| | | @Override |
| | | public Integer sendEmail(String email,String content,Integer billId) { |
| | | if(StringUtils.isBlank(email)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | boolean result= emailService.sendEmail(email,"è´¦åå¬è´¹",content,null); |
| | | SmsEmail smsEmail = new SmsEmail(); |
| | | smsEmail.setRemark("é®ä»¶åçæå"); |
| | | if(!result){ |
| | | smsEmail.setRemark("é®ä»¶åç失败"); |
| | | } |
| | | smsEmail.setIsdeleted(Constants.ZERO); |
| | | smsEmail.setCreateDate(new Date()); |
| | | smsEmail.setStatus(Constants.ONE); |
| | | smsEmail.setType(Constants.TWO); |
| | | smsEmail.setObjId(billId); |
| | | smsEmail.setObjType(Constants.ONE+""); |
| | | smsEmail.setContent(content); |
| | | smsEmailMapper.insert(smsEmail); |
| | | return smsEmail.getId(); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.excel.ExcelReplaceCommon; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dto.YwSmsEmailBillCallDTO; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.vo.YwContractBillCallDataVO; |
| | | import com.doumee.dao.business.vo.YwContractBillDataVO; |
| | | import com.doumee.dao.system.MultifileMapper; |
| | | import com.doumee.dao.system.model.Multifile; |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.java.Log; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.checkerframework.checker.units.qual.C; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.math.BigDecimal; |
| | | import java.net.URLEncoder; |
| | | import java.nio.charset.Charset; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | @Autowired |
| | | private YwContractMapper ywContractMapper; |
| | | |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | |
| | | @Autowired |
| | | private YwTempConfigMapper ywTempConfigMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | YwContractBill::getPayStatus,model.getPayStatus()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getType()), |
| | | YwContractBill::getType,model.getType()) |
| | | .le(Objects.nonNull(model)&&Objects.nonNull(model.getIsOverdue())&&Constants.equalsInteger(model.getIsOverdue(),Constants.ONE), |
| | | YwContractBill::getPlanPayDate, DateUtil.getCurrDateTime()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getIsOverdue())&&Constants.equalsInteger(model.getIsOverdue(),Constants.ONE), |
| | | YwContractBill::getStatus, Constants.ZERO) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getContractId()), |
| | | YwContractBill::getContractId,model.getContractId()) |
| | | .like(Objects.nonNull(model)&&StringUtils.isNotBlank(model.getContractCode()), |
| | |
| | | }else{ |
| | | ywContractBill.setIsOverdue(Constants.ZERO); |
| | | } |
| | | //楼å®åç§° |
| | | List<YwContractRoom> ywContractRoomList = ywContractBill.getYwContractRoomList(); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractRoomList)){ |
| | | StringBuilder roomPathName = new StringBuilder(); |
| | | for (YwContractRoom ywContractRoom:ywContractRoomList) { |
| | | if(StringUtils.isNotBlank(ywContractRoom.getProjectName())){ |
| | | roomPathName.append(ywContractRoom.getProjectName()+"/"); |
| | | } |
| | | if(StringUtils.isNotBlank(ywContractRoom.getBuildingName())){ |
| | | roomPathName.append(ywContractRoom.getBuildingName()+"/"); |
| | | } |
| | | if(StringUtils.isNotBlank(ywContractRoom.getFloorName())){ |
| | | roomPathName.append(ywContractRoom.getFloorName()+"/"); |
| | | } |
| | | if(StringUtils.isNotBlank(ywContractRoom.getRoomName())){ |
| | | roomPathName.append(ywContractRoom.getRoomName()); |
| | | } |
| | | if(StringUtils.isNotBlank(roomPathName)){ |
| | | roomPathName.append(";"); |
| | | } |
| | | } |
| | | ywContractBill.setRoomPathName(roomPathName.toString()); |
| | | } |
| | | } |
| | | |
| | | return PageData.from(iPage); |
| | | } |
| | | |
| | | /** |
| | | * é¾æè´¦å |
| | | * @param pageWrap |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageData<YwContractBill> findPageForOverdue(PageWrap<YwContractBill> pageWrap) { |
| | | IPage<YwContractBill> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwContractBill> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwContractBill model = pageWrap.getModel(); |
| | | IPage<YwContractBill> iPage = ywContractBillMapper.selectJoinPage(page,YwContractBill.class, |
| | | queryWrapper.selectAll(YwContractBill.class) |
| | | .select(" ( select ifnull( sum( CASE WHEN t.bill_type = 0 and yw.REVENUE_TYPE = 0 THEN yw.ACT_RECEIVABLE_FEE when t.bill_type = 0 and yw.REVENUE_TYPE = 1 then -yw.ACT_RECEIVABLE_FEE when t.bill_type = 1 and yw.REVENUE_TYPE = 0 then -yw.ACT_RECEIVABLE_FEE else yw.ACT_RECEIVABLE_FEE END),0) from yw_contract_revenue yw where yw.bill_id = t.id and yw.status = 0 and yw.isdeleted = 0 ) as actReceivableFee ") |
| | | .selectAs(YwContract::getCode,YwContractBill::getContractCode) |
| | | .selectAs(YwCustomer::getName,YwContractBill::getCustomerName) |
| | | .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId) |
| | | .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId) |
| | | .eq(YwContractBill::getIsdeleted,Constants.ZERO) |
| | | .like(Objects.nonNull(model)&&StringUtils.isNotBlank(model.getCustomerName()), |
| | | YwCustomer::getName,model.getCustomerName()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getStatus()), |
| | | YwContractBill::getStatus,model.getStatus()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getBillType()), |
| | | YwContractBill::getBillType,model.getBillType()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getPayStatus()), |
| | | YwContractBill::getPayStatus,model.getPayStatus()) |
| | | .in(Objects.nonNull(model)&&Objects.nonNull(model.getPayStatus()), |
| | | YwContractBill::getPayStatus,Constants.ZERO,Constants.THREE,Constants.TWO,Constants.FOUR) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getType()), |
| | | YwContractBill::getType,model.getType()) |
| | | .le(Objects.nonNull(model)&&Objects.nonNull(model.getIsOverdue())&&Constants.equalsInteger(model.getIsOverdue(),Constants.ONE), |
| | | YwContractBill::getPlanPayDate, DateUtil.getCurrDateTime()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getIsOverdue())&&Constants.equalsInteger(model.getIsOverdue(),Constants.ONE), |
| | | YwContractBill::getStatus, Constants.ZERO) |
| | | .ge(Objects.nonNull(model)&&Objects.nonNull(model.getPlanPayDateStart()),YwContractBill::getPlanPayDate, Utils.Date.getStart(model.getPlanPayDateStart())) |
| | | .le(Objects.nonNull(model)&&Objects.nonNull(model.getPlanPayDateEnd()),YwContractBill::getPlanPayDate, Utils.Date.getEnd(model.getPlanPayDateEnd())) |
| | | .orderByDesc(YwContractBill::getId)); |
| | | this.dealRoomDetail(iPage.getRecords()); |
| | | for (YwContractBill ywContractBill:iPage.getRecords()) { |
| | | //éæ¶éé¢ |
| | | ywContractBill.setNeedReceivableFee( |
| | | ywContractBill.getReceivableFee().subtract(ywContractBill.getActReceivableFee()) |
| | | ); |
| | | //楼å®åç§° |
| | | List<YwContractRoom> ywContractRoomList = ywContractBill.getYwContractRoomList(); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractRoomList)){ |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<YwContractBillCallDataVO> getNoticeCustomerData(List<Integer> billIds){ |
| | | List<YwContractBillCallDataVO> ywContractBillCallDataVOList = new ArrayList<>(); |
| | | List<YwContractBill> ywContractBillList = ywContractBillMapper.selectJoinList(YwContractBill.class,new MPJLambdaWrapper<YwContractBill>() |
| | | .selectAll(YwContractBill.class) |
| | | .selectAs(YwCustomer::getName,YwContractBill::getCustomerName) |
| | | .selectAs(YwCustomer::getUserId,YwContractBill::getCustomerUserId) |
| | | .selectAs(YwCustomer::getId,YwContractBill::getCustomerId) |
| | | .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId) |
| | | .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId) |
| | | .in(YwContractBill::getId,billIds) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(ywContractBillList) || |
| | | !Constants.equalsInteger(billIds.size(),ywContractBillList.size()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"è´¦åæ°æ®é误ï¼è¯·å·æ°éè¯"); |
| | | } |
| | | this.dealRoomDetail(ywContractBillList); |
| | | for (YwContractBill ywContractBill:ywContractBillList) { |
| | | YwContractBillCallDataVO ywContractBillCallDataVO = new YwContractBillCallDataVO(); |
| | | ywContractBillCallDataVO.setBillId(ywContractBill.getId()); |
| | | ywContractBillCallDataVO.setCustomerName(ywContractBill.getCustomerName()); |
| | | ywContractBillCallDataVO.setUserId(ywContractBill.getCustomerUserId()); |
| | | //æ¥è¯¢å®¢æ·ä¸çææäººå |
| | | ywContractBillCallDataVO.setMemberList( |
| | | memberMapper.selectList(new QueryWrapper<Member>().lambda().eq(Member::getCustomerId,ywContractBill.getCustomerId()) |
| | | .eq(Member::getIsdeleted,Constants.ZERO)) |
| | | ); |
| | | ywContractBillCallDataVOList.add(ywContractBillCallDataVO); |
| | | } |
| | | return ywContractBillCallDataVOList; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void downloadCallFeeDoc(List<Integer> billIds, LoginUserInfo loginUserInfo,HttpServletResponse response){ |
| | | try { |
| | | List<YwContractBill> ywContractBillList = ywContractBillMapper.selectJoinList(YwContractBill.class,new MPJLambdaWrapper<YwContractBill>() |
| | | .selectAll(YwContractBill.class) |
| | | .selectAs(YwCustomer::getName,YwContractBill::getCustomerName) |
| | | .selectAs(YwCustomer::getUserId,YwContractBill::getCustomerUserId) |
| | | .selectAs(YwCustomer::getId,YwContractBill::getCustomerId) |
| | | .selectAs(YwContractDetail::getPrice,YwContractBill::getPrice) |
| | | .selectAs(YwContract::getCompanyId,YwContractBill::getCompanyId) |
| | | .selectAs(YwContractDetail::getCircleType,YwContractBill::getCircleType) |
| | | .selectAs(YwContractDetail::getType,YwContractBill::getDetailType) |
| | | .selectAs(YwContract::getZlPayType,YwContractBill::getZlPayType) |
| | | .selectAs(YwContract::getWyPayType,YwContractBill::getWyPayType) |
| | | .select(" ( select ifnull(sum(r.rent_area),0) from yw_room y left join yw_contract_room yr on y.id = yr.room_id where yr.contract_id = t.contract_id and y.IS_INVESTMENT = 0 and yr.type = 0 ) " , YwContractBill::getTotalArea) |
| | | .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId) |
| | | .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId) |
| | | .leftJoin(YwContractDetail.class,YwContractDetail::getId,YwContractBill::getDetailId) |
| | | .in(YwContractBill::getId,billIds) |
| | | ); |
| | | List<YwTempConfig> ywTempConfigList = ywTempConfigMapper.selectList(new QueryWrapper<YwTempConfig>().lambda().eq(YwTempConfig::getIsdeleted,Constants.ZERO)); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(ywTempConfigList)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªæ¥è¯¢å°æ¨¡æ¿é
置项,请è系管çå"); |
| | | } |
| | | List<YwTempConfig> tempList = ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.FOUR)|| |
| | | Constants.equalsInteger(i.getType(),Constants.FIVE)|| |
| | | Constants.equalsInteger(i.getType(),Constants.SIX)).collect(Collectors.toList()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(tempList)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªæ¥è¯¢å°æ¨¡æ¿é
置项,请è系管çå"); |
| | | } |
| | | List<File> fileList = new ArrayList<>(); |
| | | for (YwContractBill ywContractBill:ywContractBillList) { |
| | | this.dealTempData(tempList,ywContractBill,loginUserInfo); |
| | | String fileName = "å¬è´¹éç¥å_" +ywContractBill.getCode() +"_" + System.currentTimeMillis()+".docx"; |
| | | YwTempConfig ywTempConfig = new YwTempConfig(); |
| | | if(Constants.equalsInteger(ywContractBill.getType(),Constants.ZERO)){ |
| | | Optional<YwTempConfig> optional = ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.TWO)).findAny(); |
| | | if (optional.isPresent()) { |
| | | ywTempConfig = optional.get(); |
| | | } |
| | | }else{ |
| | | Optional<YwTempConfig> optional = ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.THREE)).findAny(); |
| | | if (optional.isPresent()) { |
| | | ywTempConfig = optional.get(); |
| | | } |
| | | } |
| | | if(Objects.isNull(ywTempConfig)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"模æ¿ä¿¡æ¯å¼å¸¸,请è系管çå"); |
| | | } |
| | | String path = ExcelReplaceCommon.modifyWordTemplate(ywTempConfig.getUrl(),tempList,fileName); |
| | | File f = new File(path); |
| | | if(f !=null && f.isFile()){ |
| | | fileList.add(f); |
| | | } |
| | | if(fileList == null || fileList.size() == 0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | } |
| | | String fileName = "å¬è´¹éç¥å-" +System.currentTimeMillis(); |
| | | String encodeFileName = URLEncoder.encode(fileName, Charset.forName("UTF-8").toString())+".zip"; |
| | | response.setHeader("Content-Disposition","attachment;filename=" + encodeFileName); |
| | | response.setContentType("application/octet-stream"); |
| | | response.setHeader("eva-opera-type", "download"); |
| | | response.setHeader("eva-download-filename", encodeFileName); |
| | | Constants.packFilesToZip(fileList,response.getOutputStream()); |
| | | } catch (Exception e) { |
| | | throw new BusinessException(ResponseStatus.EXPORT_EXCEL_ERROR, e); |
| | | } |
| | | } |
| | | |
| | | |
| | | public void dealTempData(List<YwTempConfig> ywTempConfigList , YwContractBill ywContractBill, LoginUserInfo loginUserInfo){ |
| | | //æ¥è¯¢æ¶æ¯è´¦å·æ°æ® |
| | | |
| | | for (YwTempConfig y:ywTempConfigList) { |
| | | if(y.getTitle().equals("${è´¹ç¨åç§°}")&&Objects.nonNull(ywContractBill.getCostType())){ |
| | | //è´¹ç¨ç±»åï¼0=ç§èµè´¹ï¼1=ç©ä¸è´¹ï¼2=ç§èµæ¼éï¼3=ç©ä¸æ¼éï¼4=æ°´çµè´¹ï¼5=æé¡¹è´¹ï¼6=å
¶ä»; 7=ä¿è¯é |
| | | if(Constants.equalsInteger(ywContractBill.getCostType(),Constants.ZERO)){ |
| | | y.setUrl("ç§èµè´¹"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCostType(),Constants.ONE)){ |
| | | y.setUrl("ç©ä¸è´¹"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCostType(),Constants.TWO)){ |
| | | y.setUrl("ç§èµæ¼é"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCostType(),Constants.THREE)){ |
| | | y.setUrl("ç©ä¸æ¼é"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCostType(),Constants.FOUR)){ |
| | | y.setUrl("æ°´çµè´¹"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCostType(),Constants.FIVE)){ |
| | | y.setUrl("æé¡¹è´¹"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCostType(),Constants.SIX)){ |
| | | y.setUrl("å
¶ä»"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCostType(),Constants.SEVEN)){ |
| | | y.setUrl("ä¿è¯é"); |
| | | } |
| | | }else if(y.getTitle().equals("${è®¡è´¹å¨æ}")&&Objects.nonNull(ywContractBill.getDetailType())){ |
| | | if(Constants.equalsInteger(ywContractBill.getDetailType(),Constants.ZERO)){ |
| | | //ç§èµæ¯ä»æ¹å¼ 0=䏿¬¡æ§ä»æ¬¾ï¼1=æ¯ä¸ä¸ªæä¸ä»ï¼2=å
个æä¸ä»ï¼3=ä¸å¹´ä¸ä» |
| | | if(Objects.nonNull(ywContractBill.getZlPayType())){ |
| | | if(Constants.equalsInteger(ywContractBill.getZlPayType(),Constants.ZERO)){ |
| | | y.setUrl("䏿¬¡æ§ä»æ¬¾"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getZlPayType(),Constants.ONE)){ |
| | | y.setUrl("æ¯ä¸ä¸ªæä¸ä»"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getZlPayType(),Constants.TWO)){ |
| | | y.setUrl("å
个æä¸ä»"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getZlPayType(),Constants.THREE)){ |
| | | y.setUrl("ä¸å¹´ä¸ä»"); |
| | | } |
| | | } |
| | | }else{ |
| | | //ç©ä¸æ¯ä»æ¹å¼ 0=䏿¬¡æ§ä»æ¬¾ï¼1=æ¯ä¸ä¸ªæä¸ä»ï¼2=å
个æä¸ä»ï¼3=ä¸å¹´ä¸ä» |
| | | if(Objects.nonNull(ywContractBill.getWyPayType())){ |
| | | if(Constants.equalsInteger(ywContractBill.getWyPayType(),Constants.ZERO)){ |
| | | y.setUrl("䏿¬¡æ§ä»æ¬¾"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getWyPayType(),Constants.ONE)){ |
| | | y.setUrl("æ¯ä¸ä¸ªæä¸ä»"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getWyPayType(),Constants.TWO)){ |
| | | y.setUrl("å
个æä¸ä»"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getWyPayType(),Constants.THREE)){ |
| | | y.setUrl("ä¸å¹´ä¸ä»"); |
| | | } |
| | | } |
| | | } |
| | | }else if(y.getTitle().equals("${åä»·}")&&Objects.nonNull(ywContractBill.getPrice())){ |
| | | y.setUrl(ywContractBill.getPrice().toString()); |
| | | }else if(y.getTitle().equals("${åä½}")&&Objects.nonNull(ywContractBill.getCircleType())){ |
| | | //仿¬¾å¨æç±»å 0=å
æ¯å¹³ç±³å¤©;1=å
æ¯å¹³ç±³æ;2=å
æ¯å¹³ç±³å¹´;3=å
æ¯å¤©;4=å
æ¯æ;5=å
æ¯å¹´;6=å
æ¯åº; |
| | | if(Constants.equalsInteger(ywContractBill.getCircleType(),Constants.ZERO)){ |
| | | y.setUrl("å
æ¯å¹³ç±³å¤©"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCircleType(),Constants.ONE)){ |
| | | y.setUrl("å
æ¯å¹³ç±³æ"); |
| | | }else if(Constants.equalsInteger(ywContractBill.getCircleType(),Constants.ONE)){ |
| | | y.setUrl("å
æ¯å¹³ç±³å¹´"); |
| | | } else if(Constants.equalsInteger(ywContractBill.getCircleType(),Constants.ONE)){ |
| | | y.setUrl("å
æ¯å¤©"); |
| | | } else if(Constants.equalsInteger(ywContractBill.getCircleType(),Constants.ONE)){ |
| | | y.setUrl("å
æ¯æ"); |
| | | } else if(Constants.equalsInteger(ywContractBill.getCircleType(),Constants.ONE)){ |
| | | y.setUrl("å
æ¯å¹´"); |
| | | } else if(Constants.equalsInteger(ywContractBill.getCircleType(),Constants.ONE)){ |
| | | y.setUrl("å
æ¯åº"); |
| | | } |
| | | }else if(y.getTitle().equals("${åºæ¶æ¥æ}")&&Objects.nonNull(ywContractBill.getPlanPayDate())){ |
| | | y.setUrl(DateUtil.formatDate(ywContractBill.getPlanPayDate(),"yyyy-MM-dd")); |
| | | }else if(y.getTitle().equals("${åºæ¶éé¢}")&&Objects.nonNull(ywContractBill.getReceivableFee())){ |
| | | y.setUrl(ywContractBill.getReceivableFee().toString()); |
| | | }else if(y.getTitle().equals("${è´¦å夿³¨}")){ |
| | | if(StringUtils.isNotBlank(ywContractBill.getRemark())){ |
| | | y.setUrl(ywContractBill.getRemark()); |
| | | }else{ |
| | | y.setUrl(""); |
| | | } |
| | | }else if(y.getTitle().equals("${ç§å®¢åç§°}")&&StringUtils.isNotBlank(ywContractBill.getCustomerName())){ |
| | | y.setUrl(ywContractBill.getCustomerName()); |
| | | }else if(y.getTitle().equals("${楼å®/楼å±/æ¿æº}")){ |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractBill.getYwContractRoomList())){ |
| | | StringBuilder roomPathName = new StringBuilder(); |
| | | for (YwContractRoom ywContractRoom:ywContractBill.getYwContractRoomList()) { |
| | | if(StringUtils.isNotBlank(ywContractRoom.getProjectName())){ |
| | | roomPathName.append(ywContractRoom.getProjectName()+"/"); |
| | | } |
| | | if(StringUtils.isNotBlank(ywContractRoom.getBuildingName())){ |
| | | roomPathName.append(ywContractRoom.getBuildingName()+"/"); |
| | | } |
| | | if(StringUtils.isNotBlank(ywContractRoom.getFloorName())){ |
| | | roomPathName.append(ywContractRoom.getFloorName()+"/"); |
| | | } |
| | | if(StringUtils.isNotBlank(ywContractRoom.getRoomName())){ |
| | | roomPathName.append(ywContractRoom.getRoomName()); |
| | | } |
| | | if(StringUtils.isNotBlank(roomPathName)){ |
| | | roomPathName.append(";"); |
| | | } |
| | | } |
| | | y.setUrl(roomPathName.toString()); |
| | | } |
| | | }else if(y.getTitle().equals("${ç§èµé¢ç§¯}")&&Objects.nonNull(ywContractBill.getTotalArea())){ |
| | | y.setUrl(ywContractBill.getTotalArea().toString()); |
| | | }else if(y.getTitle().equals("${æå±å
¬å¸è´¦æ·åç§°}")){ |
| | | y.setUrl("æå±å
¬å¸è´¦æ·åç§°"); |
| | | }else if(y.getTitle().equals("${æå±å
¬å¸é¶è¡è´¦å·}")){ |
| | | y.setUrl("æå±å
¬å¸é¶è¡è´¦å·"); |
| | | }else if(y.getTitle().equals("${æå±å
¬å¸å¼æ·é¶è¡}")){ |
| | | y.setUrl("æå±å
¬å¸å¼æ·é¶è¡"); |
| | | }else if(y.getTitle().equals("${éç¥åçææ¥æ}")){ |
| | | y.setUrl(DateUtil.formatDate(new Date(),"yyyy-MM-dd")); |
| | | }else if(y.getTitle().equals("${å½åç¨æ·å§å}")){ |
| | | y.setUrl(loginUserInfo.getRealname()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | public void sendSmsEmail(List<YwSmsEmailBillCallDTO> ywSmsEmailBillCallDTOList,LoginUserInfo loginUserInfo){ |
| | | if(CollectionUtils.isEmpty(ywSmsEmailBillCallDTOList)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | List<YwTempConfig> ywTempConfigList = ywTempConfigMapper.selectList(new QueryWrapper<YwTempConfig>().lambda().eq(YwTempConfig::getIsdeleted,Constants.ZERO)); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(ywTempConfigList)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªæ¥è¯¢å°æ¨¡æ¿é
置项,请è系管çå"); |
| | | } |
| | | List<YwTempConfig> tempList = ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.FOUR)|| |
| | | Constants.equalsInteger(i.getType(),Constants.FIVE)|| |
| | | Constants.equalsInteger(i.getType(),Constants.SIX)).collect(Collectors.toList()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(tempList)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªæ¥è¯¢å°æ¨¡æ¿é
置项,请è系管çå"); |
| | | } |
| | | for (YwSmsEmailBillCallDTO ywSmsEmailBillCallDTO:ywSmsEmailBillCallDTOList) { |
| | | if(Objects.isNull(ywSmsEmailBillCallDTO) |
| | | || Objects.isNull(ywSmsEmailBillCallDTO.getBillId()) |
| | | || Objects.isNull(ywSmsEmailBillCallDTO.getUserId()) |
| | | ||Objects.isNull(ywSmsEmailBillCallDTO.getSendEmail()) |
| | | || Objects.isNull(ywSmsEmailBillCallDTO.getSendSms())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | |
| | | YwContractBill ywContractBill = ywContractBillMapper.selectJoinOne(YwContractBill.class,new MPJLambdaWrapper<YwContractBill>() |
| | | .selectAll(YwContractBill.class) |
| | | .selectAs(YwCustomer::getName,YwContractBill::getCustomerName) |
| | | .selectAs(YwCustomer::getUserId,YwContractBill::getCustomerUserId) |
| | | .selectAs(YwCustomer::getId,YwContractBill::getCustomerId) |
| | | .selectAs(YwContractDetail::getPrice,YwContractBill::getPrice) |
| | | .selectAs(YwContract::getCompanyId,YwContractBill::getCompanyId) |
| | | .selectAs(YwContractDetail::getCircleType,YwContractBill::getCircleType) |
| | | .selectAs(YwContractDetail::getType,YwContractBill::getDetailType) |
| | | .selectAs(YwContract::getZlPayType,YwContractBill::getZlPayType) |
| | | .selectAs(YwContract::getWyPayType,YwContractBill::getWyPayType) |
| | | .select(" ( select ifnull(sum(r.rent_area),0) from yw_room y left join yw_contract_room yr on y.id = yr.room_id where yr.contract_id = t.contract_id and y.IS_INVESTMENT = 0 and yr.type = 0 ) " , YwContractBill::getTotalArea) |
| | | .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId) |
| | | .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId) |
| | | .leftJoin(YwContractDetail.class,YwContractDetail::getId,YwContractBill::getDetailId) |
| | | .eq(YwContractBill::getId,ywSmsEmailBillCallDTO.getBillId()) |
| | | .last( "limit 1" ) |
| | | ); |
| | | this.dealTempData(tempList,ywContractBill,loginUserInfo); |
| | | Member member = memberMapper.selectById(ywSmsEmailBillCallDTO.getUserId()); |
| | | if(Objects.isNull(member)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"å卿ªæ¥è¯¢å°ç人åä¿¡æ¯"); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | for (YwSmsEmailBillCallDTO ywSmsEmailBillCallDTO:ywSmsEmailBillCallDTOList) { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | 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.YwTempConfigMapper; |
| | | import com.doumee.dao.business.model.YwTempConfig; |
| | | import com.doumee.dao.business.vo.YwCallTempDataVO; |
| | | import com.doumee.service.business.YwTempConfigService; |
| | | 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 org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * å¬ç¼´ä¿¡æ¯é
ç½®Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/10 09:43 |
| | | */ |
| | | @Service |
| | | public class YwTempConfigServiceImpl implements YwTempConfigService { |
| | | |
| | | @Autowired |
| | | private YwTempConfigMapper ywTempConfigMapper; |
| | | |
| | | @Override |
| | | public Integer create(YwTempConfig ywTempConfig) { |
| | | ywTempConfigMapper.insert(ywTempConfig); |
| | | return ywTempConfig.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | ywTempConfigMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(YwTempConfig ywTempConfig) { |
| | | UpdateWrapper<YwTempConfig> deleteWrapper = new UpdateWrapper<>(ywTempConfig); |
| | | ywTempConfigMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | ywTempConfigMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(YwTempConfig ywTempConfig) { |
| | | ywTempConfigMapper.updateById(ywTempConfig); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<YwTempConfig> ywTempConfigs) { |
| | | if (CollectionUtils.isEmpty(ywTempConfigs)) { |
| | | return; |
| | | } |
| | | for (YwTempConfig ywTempConfig: ywTempConfigs) { |
| | | this.updateById(ywTempConfig); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public YwTempConfig findById(Integer id) { |
| | | return ywTempConfigMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public YwTempConfig findOne(YwTempConfig ywTempConfig) { |
| | | QueryWrapper<YwTempConfig> wrapper = new QueryWrapper<>(ywTempConfig); |
| | | return ywTempConfigMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<YwTempConfig> findList(YwTempConfig ywTempConfig) { |
| | | QueryWrapper<YwTempConfig> wrapper = new QueryWrapper<>(ywTempConfig); |
| | | return ywTempConfigMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<YwTempConfig> findPage(PageWrap<YwTempConfig> pageWrap) { |
| | | IPage<YwTempConfig> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<YwTempConfig> queryWrapper = new QueryWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(YwTempConfig::getId, pageWrap.getModel().getId()); |
| | | } |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.lambda().eq(YwTempConfig::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | | if (pageWrap.getModel().getCreateDate() != null) { |
| | | queryWrapper.lambda().ge(YwTempConfig::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.lambda().le(YwTempConfig::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | } |
| | | if (pageWrap.getModel().getEditor() != null) { |
| | | queryWrapper.lambda().eq(YwTempConfig::getEditor, pageWrap.getModel().getEditor()); |
| | | } |
| | | if (pageWrap.getModel().getEditDate() != null) { |
| | | queryWrapper.lambda().ge(YwTempConfig::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.lambda().le(YwTempConfig::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | } |
| | | if (pageWrap.getModel().getIsdeleted() != null) { |
| | | queryWrapper.lambda().eq(YwTempConfig::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getRemark() != null) { |
| | | queryWrapper.lambda().eq(YwTempConfig::getRemark, pageWrap.getModel().getRemark()); |
| | | } |
| | | if (pageWrap.getModel().getType() != null) { |
| | | queryWrapper.lambda().eq(YwTempConfig::getType, pageWrap.getModel().getType()); |
| | | } |
| | | if (pageWrap.getModel().getTitle() != null) { |
| | | queryWrapper.lambda().eq(YwTempConfig::getTitle, pageWrap.getModel().getTitle()); |
| | | } |
| | | if (pageWrap.getModel().getUrl() != null) { |
| | | queryWrapper.lambda().eq(YwTempConfig::getUrl, pageWrap.getModel().getUrl()); |
| | | } |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(ywTempConfigMapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |
| | | @Override |
| | | public long count(YwTempConfig ywTempConfig) { |
| | | QueryWrapper<YwTempConfig> wrapper = new QueryWrapper<>(ywTempConfig); |
| | | return ywTempConfigMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public YwCallTempDataVO getCallTemp(){ |
| | | YwCallTempDataVO ywCallTempDataVO = new YwCallTempDataVO(); |
| | | List<YwTempConfig> ywTempConfigList = ywTempConfigMapper.selectList(new QueryWrapper<YwTempConfig>().lambda() |
| | | .eq(YwTempConfig::getIsdeleted, Constants.ZERO)); |
| | | Optional<YwTempConfig> smsOptional = ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(), |
| | | Constants.ZERO)).findAny(); |
| | | if (smsOptional.isPresent()) { |
| | | ywCallTempDataVO.setSmsTemp(smsOptional.get()); |
| | | } |
| | | Optional<YwTempConfig> emailOptional = ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(), |
| | | Constants.ONE)).findAny(); |
| | | if (emailOptional.isPresent()) { |
| | | ywCallTempDataVO.setEmailTemp(emailOptional.get()); |
| | | } |
| | | Optional<YwTempConfig> leaseOptional = ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(), |
| | | Constants.TWO)).findAny(); |
| | | if (leaseOptional.isPresent()) { |
| | | ywCallTempDataVO.setLeaseTemp(leaseOptional.get()); |
| | | } |
| | | Optional<YwTempConfig> otherOptional = ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(), |
| | | Constants.THREE)).findAny(); |
| | | if (otherOptional.isPresent()) { |
| | | ywCallTempDataVO.setOtherTemp(otherOptional.get()); |
| | | } |
| | | ywCallTempDataVO.setContractTempList( |
| | | ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.FIVE)).collect(Collectors.toList()) |
| | | ); |
| | | ywCallTempDataVO.setBillTempList( |
| | | ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.FOUR)).collect(Collectors.toList()) |
| | | ); |
| | | ywCallTempDataVO.setOtherTempList( |
| | | ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.SIX)).collect(Collectors.toList()) |
| | | ); |
| | | return ywCallTempDataVO; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.third; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.AnnotationConfigApplicationContext; |
| | | import org.springframework.core.io.FileSystemResource; |
| | | import org.springframework.mail.javamail.JavaMailSender; |
| | | import org.springframework.mail.javamail.MimeMessageHelper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.mail.internet.MimeMessage; |
| | | import java.io.File; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | public class EmailService { |
| | | @Autowired |
| | | private JavaMailSender javaMailSender;//注å
¥JavaMailSender |
| | | @Value("${spring.mail.username}") |
| | | private String fromEmail; |
| | | public boolean sendEmail(String toEmail, String title, String content, List<Map<String,Object>> fileList) { |
| | | try { |
| | | AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); |
| | | context.refresh(); |
| | | MimeMessage message = javaMailSender.createMimeMessage(); |
| | | MimeMessageHelper helper = new MimeMessageHelper(message, true); |
| | | |
| | | helper.setTo(toEmail); |
| | | helper.setFrom(fromEmail); |
| | | helper.setSubject(title); |
| | | helper.setText(content); |
| | | if(fileList!=null){ |
| | | for (Map<String,Object> f : fileList){ |
| | | // 设置éä»¶ |
| | | helper.addAttachment((String) f.get("name"),new FileSystemResource((File) f.get("file"))); |
| | | } |
| | | } |
| | | javaMailSender.send(message); |
| | | System.out.println("é®ä»¶åéæåï¼"); |
| | | return true; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return false; |
| | | } |
| | | } |
| | | } |