Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
| | |
| | | |
| | | // 获取月台组信息 |
| | | export function getPlatformGroupList (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/platform/getPlatformGroupList', data) |
| | | return request.post('/visitsAdmin/cloudService/business/platform/getPlatformGroupListNew', data) |
| | | } |
| | | // 叫号列表 |
| | | export function platformCallList (data) { |
| | |
| | | </el-form-item> |
| | | <el-form-item label="选择组织:" prop="groupId"> |
| | | <el-select v-model="form.groupId" @change="changeSel" clearable filterable placeholder="请选择"> |
| | | <el-option v-for="item in companyList" :key="item.id" :label="item.name" :value="item.id"> |
| | | <template v-for="item in companyList"> |
| | | <el-option v-if="item.countNum && item.countNum>0" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </template> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="选择车主:" prop="memberId"> |
| | |
| | | }, |
| | | getCompany() { |
| | | companyGetList({ |
| | | model: {}, |
| | | capacity: 1000, |
| | | model: { },//有员工的数据 |
| | | capacity: 10000, |
| | | page: 1, |
| | | }).then(res => { |
| | | this.companyList = res.records || [] |
| | |
| | | <el-input v-model="form.name" placeholder="请输入姓名" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="所属组织" prop="companyId"> |
| | | <el-cascader v-model="form.company" :options="department" @change="handleChangeCompany" :show-all-levels="false" |
| | | clearable filterable :props="departprops"></el-cascader> |
| | | <!-- <el-cascader v-model="form.company" :options="department" @change="handleChangeCompany" :show-all-levels="false" |
| | | clearable filterable :props="departprops"></el-cascader>--> |
| | | <el-select v-model="form.companyId" clearable filterable placeholder="请选择"> |
| | | <template v-for="item in companyList"> |
| | | <el-option v-if="item.countNum && item.countNum>0" :key="item.id" :label="item.companyNamePath" :value="item.id"> |
| | | </el-option> |
| | | </template> |
| | | </el-select> |
| | | <div style="font-size: 12px;color: #F56C6C"> |
| | | 注:仅支持选择 【{{ companyType === 0 ? '相关方组织' : '内部组织' }}】 |
| | | </div> |
| | |
| | | import { checkMobile, validIdCardNo, validIdCardNoNew } from '@/utils/form' |
| | | import { allList } from '@/api/business/position' |
| | | import { upload } from '@/api/system/common' |
| | | import {companyGetList} from "@/api/business/company"; |
| | | export default { |
| | | name: 'OperaCompanyWindow', |
| | | extends: BaseOpera, |
| | |
| | | companyType: 0, |
| | | department: [], |
| | | positionList: [], |
| | | companyList: [], |
| | | // 表单数据 |
| | | form: { |
| | | id: null, |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | getCompany() { |
| | | companyGetList({ |
| | | model: {type:this.companyType } , |
| | | capacity: 10000, |
| | | page: 1, |
| | | }).then(res => { |
| | | this.companyList = res.records || [] |
| | | |
| | | }) |
| | | }, |
| | | openCamera() { |
| | | this.paisheModal = true |
| | | this.isShowCamera = true |
| | |
| | | faceImgFull: '' |
| | | } |
| | | this.companyType = companyType |
| | | this.getPositionList() |
| | | this.getCompany() |
| | | // this.getPositionList() |
| | | // 新建 |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | |
| | | this.form[this.configData['field.id']] = null |
| | | this.form.company = [] |
| | | }) |
| | | |
| | | this.getCompany() |
| | | return |
| | | } |
| | | // 编辑 |
| | |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .table-pagination { |
| | | padding: 16px 0; |
| | | text-align: left; |
| | | display: block; |
| | | z-index: 100; |
| | | width: -webkit-fill-available; |
| | | /* width: 80%; */ |
| | | position: fixed; |
| | | bottom: 30px; |
| | | background-color: white; |
| | | margin-right: 50px; |
| | | } |
| | | </style> |
| | |
| | | const { companyId } = this.param |
| | | this.$set(this.param, 'areaId', '') |
| | | this.$set(this.param, 'checkUserId', '') |
| | | this.addrList = [] |
| | | if(companyId){ |
| | | allList({ type: 0,companyId }).then(res => { // 位置 |
| | | this.addrList = res || [] |
| | | }) |
| | | } |
| | | }, |
| | | changeArea (e) { |
| | | const item = this.addrList.find(i => i.id === e) |
| | |
| | | padding-top: 0; |
| | | } |
| | | } |
| | | .danger-column{ |
| | | color: red; |
| | | } |
| | | // 头部 |
| | | .table-header { |
| | | overflow: hidden; |
| | |
| | | .table-content { |
| | | padding: 0 16px; |
| | | .table-wrap { |
| | | padding: 16px 16px 0 16px; |
| | | padding: 16px 16px 60px 16px; |
| | | background: #fff; |
| | | // 工具栏 |
| | | .toolbar { |
| | |
| | | .table-pagination { |
| | | padding: 16px 0; |
| | | text-align: left; |
| | | display: block; |
| | | z-index: 100; |
| | | width: -webkit-fill-available; |
| | | /* width: 80%; */ |
| | | position: fixed; |
| | | bottom: 30px; |
| | | background-color: white; |
| | | margin-right: 50px; |
| | | } |
| | | } |
| | | } |
| | |
| | | .table-content { |
| | | /*padding: 0 16px;*/ |
| | | .table-wrap { |
| | | padding: 16px 16px 0 16px; |
| | | padding: 16px 16px 60px 16px; |
| | | background: #fff; |
| | | // 工具栏 |
| | | .toolbar { |
| | |
| | | .table-pagination { |
| | | padding: 16px 0; |
| | | text-align: left; |
| | | display: block; |
| | | z-index: 100; |
| | | width: -webkit-fill-available; |
| | | /* width: 80%; */ |
| | | position: fixed; |
| | | bottom: 30px; |
| | | background-color: white; |
| | | margin-right: 50px; |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:device:query']"> |
| | | <!-- 搜索表单 --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="门禁点名称" prop="doorName"> |
| | | <el-input v-model="searchForm.doorName" placeholder="请输入门禁点名称" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="区域名称" prop="regionPathName"> |
| | | <el-input v-model="searchForm.regionPathName" placeholder="请输入区域名称" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="是否园区入口" prop="isEntrance"> |
| | | <el-select v-model="searchForm.isEntrance" placeholder="请选择"> |
| | | <el-option label="是" value="1"></el-option> |
| | | <el-option label="否" value="0"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="在线状态" prop="online"> |
| | | <el-select v-model="searchForm.online" placeholder="请选择" clearable> |
| | | <el-option label="离线" value="0"></el-option> |
| | | <el-option label="在线" value="1"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- 表格和分页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar"> |
| | | <li><el-button type="primary" @click="synchronousData">同步</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | > |
| | | <el-table-column label="序号" width="55" fixed><template slot-scope="scope" >{{scope.$index+1}}</template></el-table-column> |
| | | <el-table-column prop="name" label="设备名称"></el-table-column> |
| | | <el-table-column prop="doorName" label="门禁点名称"></el-table-column> |
| | | <el-table-column prop="regionPathName" label="区域名称"></el-table-column> |
| | | <!-- |
| | | <el-table-column prop="doorNo" label="门禁点编号"></el-table-column> |
| | | --> |
| | | <el-table-column prop="manufature" label="厂商"></el-table-column> |
| | | <el-table-column prop="online" label="在线状态"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.online == 0">离线</span> |
| | | <span v-if="row.online == 1">在线</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="ip" label="设备ip"></el-table-column> |
| | | <el-table-column prop="port" label="设备端口"></el-table-column> |
| | | <el-table-column label="是否园区入口"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch |
| | | @change="changeManufature($event, row)" |
| | | v-model="row.isEntrance" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | | :active-value="1" |
| | | :inactive-value="0"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="no" width="200px" label="设备号"></el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | <!-- 新建/修改 --> |
| | | <!-- <OperaDeviceWindow ref="operaDeviceWindow" @success="handlePageChange"/>--> |
| | | </TableLayout> |
| | | <TableLayout :permissions="['business:device:query']"> |
| | | <!-- 搜索表单 --> |
| | | <div ref="QueryFormRef" slot="search-form"> |
| | | <el-form ref="searchForm" :model="searchForm" label-width="100px" inline> |
| | |
| | | <div v-else>-</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="工号" min-width="100px"></el-table-column> |
| | | <!-- <el-table-column prop="code" label="工号" min-width="100px"></el-table-column> |
| | | <el-table-column label="卡片" min-width="80px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button @click="$refs.cardOpeningRecord.open('开卡记录', row.id)" type="text">{{ row.memberCardCount || |
| | | '0' }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column>--> |
| | | <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editDate" label="最后操作时间" min-width="150px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:member:update', 'business:member:delete', 'business:empower:create'])" |
| | | label="操作" min-width="280"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" icon="el-icon-edit" @click="$refs.OperaMemberWindow.open('编辑员工信息', row, department)" |
| | | <el-button type="text" icon="el-icon-edit" @click="$refs.OperaMemberWindow.open('编辑员工信息', row, department,searchForm.companyType)" |
| | | v-permissions="['business:empower:update']">编辑</el-button> |
| | | <el-button type="text" icon="el-icon-plus" @click="empower(row.id)" |
| | | v-permissions="['business:empower:create']">重新授权</el-button> |
| | |
| | | <div v-else>-</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="工号" min-width="100px"></el-table-column> |
| | | <!-- <el-table-column prop="code" label="工号" min-width="100px"></el-table-column> |
| | | <el-table-column label="卡片" min-width="80px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button @click="$refs.cardOpeningRecord.open('开卡记录', row.id)" type="text">{{ row.memberCardCount || |
| | | '0' }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column>--> |
| | | <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editDate" label="最后操作时间" min-width="150px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:member:update', 'business:member:delete', 'business:empower:create'])" |
| | | label="操作" min-width="280"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" icon="el-icon-edit" @click="$refs.OperaMemberWindow.open('编辑员工信息', row, department)" |
| | | <el-button type="text" icon="el-icon-edit" @click="$refs.OperaMemberWindow.open('编辑员工信息', row, department,searchForm.companyType)" |
| | | v-permissions="['business:empower:update']">编辑</el-button> |
| | | <el-button type="text" icon="el-icon-plus" @click="empower(row.id)" |
| | | v-permissions="['business:empower:create']">重新授权</el-button> |
| | |
| | | <template> |
| | | <div class="main_app"> |
| | | |
| | | <div ref="QueryFormRef"> |
| | | <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" /> |
| | | <div class="main_app" style="padding-bottom: 60px"> |
| | | <QueryForm |
| | | v-model="filters" |
| | | :query-form-config="queryFormConfig" |
| | | @handleQuery="getList(1)" |
| | | @clear="clear" |
| | | /> |
| | | <div class="query_btns" style="margin: 16px 0 0" v-permissions="['business:visits:create', 'business:visits:exportExcel']"> |
| | | <el-button type="primary" @click="handleEdit()" icon="el-icon-plus" v-permissions="['business:visits:create']">新建</el-button> |
| | | <el-button type="primary" :loading="exLoading" @click="exportExcel" v-permissions="['business:visits:exportExcel']">导出</el-button> |
| | | </div> |
| | | <div class="query_btns" style="margin: 16px 0 0" |
| | | v-permissions="['business:visits:create', 'business:visits:exportExcel']"> |
| | | <el-button type="primary" @click="handleEdit()" icon="el-icon-plus" |
| | | v-permissions="['business:visits:create']">新建</el-button> |
| | | <el-button type="primary" :loading="exLoading" @click="exportExcel" |
| | | v-permissions="['business:visits:exportExcel']">导出</el-button> |
| | | </div> |
| | | <el-table :max-height="tableHeight" v-loading="loading" :data="dataList" stripe row-key="id" default-expand-all> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="dataList" |
| | | stripe |
| | | row-key="id" |
| | | default-expand-all |
| | | > |
| | | <el-table-column type="selection" width="55" align="center"></el-table-column> |
| | | <el-table-column prop="carNos" label="入园车辆" min-width="100px"></el-table-column> |
| | | <el-table-column prop="companyName" label="公司名称" min-width="100px"></el-table-column> |
| | | <el-table-column prop="name" label="联系人信息" min-width="100px"></el-table-column> |
| | | <el-table-column prop="phone" label="手机号" min-width="100px"></el-table-column> |
| | | <el-table-column prop="receptMemberName" label="被访人" min-width="100px"></el-table-column> |
| | | <el-table-column |
| | | prop="carNos" |
| | | label="入园车辆" |
| | | min-width="100px" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="companyName" |
| | | label="公司名称" |
| | | min-width="100px" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | label="联系人信息" |
| | | min-width="100px" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="phone" |
| | | label="手机号" |
| | | min-width="100px" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="receptMemberName" |
| | | label="被访人" |
| | | min-width="100px" |
| | | ></el-table-column> |
| | | <el-table-column label="拜访时间" min-width="160px"> |
| | | <template slot-scope="{ row }"> |
| | | <span>起:{{ row.starttime }}</span><br /> |
| | | <span>起:{{ row.starttime }}</span |
| | | ><br /> |
| | | <span>止:{{ row.endtime }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="reason" label="拜访事由" min-width="100"></el-table-column> |
| | | <el-table-column prop="status" fixed="right" label="状态" align="center" min-width="100"> |
| | | <el-table-column |
| | | prop="reason" |
| | | label="拜访事由" |
| | | min-width="100" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="status" |
| | | fixed="right" |
| | | label="状态" |
| | | align="center" |
| | | min-width="100" |
| | | > |
| | | <template slot-scope="{ row }"> |
| | | <span style="color: rgba(245, 154, 35, 0.996)" v-if="row.status === 0">待提交审批</span> |
| | | <span v-if="row.status === 1" style="color: rgba(245, 154, 35, 0.996)">处理中</span> |
| | | <span v-if="row.status === 2" style="color: rgba(245, 154, 35, 0.996)">已同意</span> |
| | | <span style="color: rgba(245, 154, 35, 0.996)" v-if="row.status === 0" |
| | | >待提交审批</span |
| | | > |
| | | <span v-if="row.status === 1" style="color: rgba(245, 154, 35, 0.996)" |
| | | >处理中</span |
| | | > |
| | | <span v-if="row.status === 2" style="color: rgba(245, 154, 35, 0.996)" |
| | | >已同意</span |
| | | > |
| | | <span style="color: gray" v-if="row.status === 3">已拒绝</span> |
| | | <span v-if="row.status === 4" style="color: gray">取消</span> |
| | | <span v-if="row.status === 5" style="color: green">下发成功</span> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" width="180" fixed="right"> |
| | | <template slot-scope="{ row }"> |
| | | <el-button type="text" @click="handleDetail(row)" v-permissions="['business:company:update']">查看详情</el-button> |
| | | <el-button type="text" icon="el-icon-delete" @click="deleteById(row)" style="color: red" |
| | | v-permissions="['business:visits:delete']">删除</el-button> |
| | | <el-button |
| | | type="text" |
| | | @click="handleDetail(row)" |
| | | v-permissions="['business:company:update']">查看详情</el-button> |
| | | <el-button type="text" icon="el-icon-delete" @click="deleteById(row)" style="color: red" v-permissions="['business:visits:delete']">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination class="mt10" @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="getList" |
| | | :pagination="pagination" |
| | | /> |
| | | <ReportDetail v-if="isShowReport" ref="VisReportDetailRef" /> |
| | | <OperaVisitsReportWindow @close="isShowEdit = false" @success="getList" v-if="isShowEdit" |
| | | ref="operaVisitsWindowRef" /> |
| | | <OperaVisitsReportWindow @close="isShowEdit = false" @success="getList" v-if="isShowEdit" ref="operaVisitsWindowRef" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | return { |
| | | isShowEdit: false, |
| | | exLoading: false, |
| | | tableHeight: 400, |
| | | |
| | | isShowReport: false, |
| | | activeTab: '0', |
| | |
| | | }, |
| | | created() { |
| | | this.getList() |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.tableHeight = document.body.scrollHeight - this.$refs.QueryFormRef.offsetHeight - 300 |
| | | }) |
| | | }, |
| | | methods: { |
| | | exportExcel() { |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| | | <style lang="scss" scoped> |
| | | .table-pagination { |
| | | padding: 16px 0; |
| | | text-align: left; |
| | | display: block; |
| | | z-index: 100; |
| | | width: -webkit-fill-available; |
| | | /* width: 80%; */ |
| | | position: fixed; |
| | | bottom: 30px; |
| | | background-color: white; |
| | | margin-right: 50px; |
| | | } |
| | | </style> |
| | |
| | | :data="tableData.list" |
| | | stripe |
| | | > |
| | | <el-table-column prop="createName" label="操作人员"></el-table-column> |
| | | <el-table-column prop="typeName" label="操作类型" /> |
| | | <el-table-column prop="remark" label="操作内容" width="900"/> |
| | | <el-table-column prop="createDate" label="操作时间"></el-table-column> |
| | | <el-table-column prop="createName" align="center" width="150" label="操作人员"></el-table-column> |
| | | <el-table-column prop="typeName" align="center" width="150" label="操作类型" class-name="danger-column"/> |
| | | <el-table-column prop="remark" label="操作内容" min-width="900"/> |
| | | <el-table-column prop="createDate" align="center" width="150" label="操作时间"></el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | |
| | | <span v-if="row.status === 9" style="color: gray">已失效</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" label="下发备注" min-width="100px"></el-table-column> |
| | | <el-table-column v-if="containPermissions(['business:visits:update', 'business:visits:delete'])" label="操作" |
| | | min-width="200" fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="departure(row.id)" icon="el-icon-delete" style="color: red" |
| | | v-if="row.status == 7">离场</el-button> |
| | | <!-- <el-button type="text" @click="cancel(row.id)" v-permissions="['business:visits:cancel']" |
| | | icon="el-icon-delete" style="color: red" v-if="row.status == 5">取消预约</el-button>--> |
| | | <el-button type="text" @click="resend(row.id)" v-permissions="['business:visits:update']" |
| | | icon="el-icon-edit" v-if="row.status == 6">重新下发</el-button> |
| | | <!-- <el-button type="text" @click="$refs.OperaVisitsDesWindow.open('详情', row.id)" icon="el-icon-view">详情</el-button> --> |
| | | <el-button type="text" @click="resend(row.id)" v-permissions="['business:visits:update']" icon="el-icon-edit" v-if="row.status == 6">重新下发</el-button> |
| | | <el-button type="text" @click="handleDetail(row)" icon="el-icon-view">详情</el-button> |
| | | <el-button type="text" icon="el-icon-delete" @click="deleteById(row)" style="color: red" |
| | | v-permissions="['business:visits:delete']">删除</el-button> |
| | | <!-- <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:visits:delete']">查询审批结果</el-button>--> |
| | | <el-button type="text" @click="departure(row.id)" icon="el-icon-delete" style="color: red" v-if="row.status == 7">离场</el-button> |
| | | <el-button type="text" icon="el-icon-delete" @click="deleteById(row)" style="color: red" v-permissions="['business:visits:delete']">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <template slot-scope="{ row }"> |
| | | <template> |
| | | <el-button type="text" @click="$refs.operaBookingsDetailWindow.open('会议详情', row)">查看详情</el-button> |
| | | <el-button v-if="row.meetingStatus == '1' && row.creator === userInfo.id" type="text" |
| | | @click="$refs.operaBookingsWindow.open('编辑会议预约', row)">编辑</el-button> |
| | | <el-button v-if=" (row.meetingStatus == '1' || row.meetingStatus == '4') &&row.creator === userInfo.id " type="text" @click="$refs.operaBookingsWindow.open('编辑会议预约', row)">编辑</el-button> |
| | | <el-button type="text" |
| | | v-if="row.creator === userInfo.id && (row.meetingStatus == '1' || row.meetingStatus == '4')" |
| | | v-if="row.hasRole ==1 && (row.meetingStatus == '1' || row.meetingStatus == '4')" |
| | | @click="handleStart(row)">开始</el-button> |
| | | <el-button type="text" v-if="row.creator === userInfo.id && row.meetingStatus == '2'" |
| | | <el-button type="text" v-if=" row.hasRole ==1&& row.meetingStatus == '2'" |
| | | @click="handleEnd(row)">结束</el-button> |
| | | <el-button v-if="row.creator === userInfo.id && (row.meetingStatus == '1' || row.meetingStatus == '4')" |
| | | type="text" @click="cancelMeeting(row.id)">撤回</el-button> |
| | | <el-button v-if="row.hasRole ==1 && (row.meetingStatus == '1' || row.meetingStatus == '4')" type="text" @click="cancelMeeting(row.id)">撤回</el-button> |
| | | <el-button type="text" @click="deleteById(row)" class="red" v-permissions="['business:bookings:delete']">删除</el-button> |
| | | </template> |
| | | <!-- <el-button v-else type="text" @click="deleteById(row)" v-permissions="['business:bookings:delete']">删除</el-button> --> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | data() { |
| | | return { |
| | | date: [], |
| | | userInfo: this.$store.state.userInfo, |
| | | // userInfo: this.$store.state.userInfo, |
| | | // 搜索 |
| | | searchForm: { |
| | | roomId: '', |
| | |
| | | <div class="item-title">会议内容</div> |
| | | <div class="item-value">{{ form.content || "无" }}</div> |
| | | </div> |
| | | <div v-if="form.projectList.length" class="item"> |
| | | <div v-if="form.projectList && form.projectList.length" class="item"> |
| | | <div class="">服务项</div> |
| | | <div class="item-value"> |
| | | {{ form.projectList.map((item) => item.projectName).join(" | ") }} |
| | | </div> |
| | | </div> |
| | | <div class="item" v-if="form.fileList.length"> |
| | | <div class="item" v-if="form.fileList && form.fileList.length"> |
| | | <div class="item-title">附件</div> |
| | | <div> |
| | | <FileLink |
| | |
| | | <template> |
| | | <GlobalAlertWindow v-loading="isUploading" :title="title" :visible.sync="visible" :confirm-working="isWorking" |
| | | @confirm="confirm"> |
| | | <p class="tip-warn" v-if="form.id"><i class="el-icon-warning"></i>操作说明:<br> |
| | | <span style="color: #e75314">如果当前会议室存在未结束的会议,不允许更新开放时间和粒度分钟,提交后开放时间和粒度分钟修改不生效!</span> |
| | | </p> |
| | | <el-form :model="form" ref="form" :rules="rules" label-width="120px" label-suffix=":"> |
| | | <el-form-item label="会议室名称" prop="name"> |
| | | <el-input v-model="form.name" placeholder="请输入会议室名称" :maxlength="10" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="开放时间" prop="timeRange"> |
| | | <el-time-picker is-range value-format="HH:mm" format="HH:mm" v-model="timeRange" range-separator="至" |
| | | <el-time-picker is-range value-format="HH:mm" :disabled=" form.bookingNum && form.bookingNum>0" format="HH:mm" v-model="timeRange" range-separator="至" |
| | | start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围" @change="selectRange"></el-time-picker> |
| | | </el-form-item> |
| | | <el-form-item label="粒度分钟" prop="intervalTime"> |
| | | <el-input v-model="form.intervalTime" type="number" placeholder="请输入时间粒度(分钟)" v-trim /> |
| | | <el-input v-model="form.intervalTime" type="number" :disabled="form.bookingNum && form.bookingNum>0" placeholder="请输入时间粒度(分钟)" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="容纳人数" prop="limitNum"> |
| | | <el-input v-model="form.limitNum" type="number" placeholder="请输入容纳人数" v-trim /> |
| | |
| | | imgFullUrl: '', |
| | | tips: '', |
| | | status: 0, |
| | | intervalTime: 0 |
| | | intervalTime: 0, |
| | | bookingNum: 0, |
| | | }, |
| | | user: [], |
| | | projectList: [], |
| | |
| | | <el-form-item label="会议室名称" prop="name"> |
| | | <el-input v-model="searchForm.name" placeholder="请输入名称" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="管理员" prop="sysList"> |
| | | <!-- <el-form-item label="管理员" prop="sysList"> |
| | | <el-select |
| | | v-model="searchForm.sysList" |
| | | filterable |
| | |
| | | :value="item.id" |
| | | :label="item.companyId?`${item.realname}-${item.companyName}`:item.realname" |
| | | ></el-option> |
| | | <!-- :label="`${item.department.name}-${item.realname}`" --> |
| | | <!-- <el-option :key="1" :value="1" label="禁用" /> --> |
| | | <!– :label="`${item.department.name}-${item.realname}`" –> |
| | | <!– <el-option :key="1" :value="1" label="禁用" /> –> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form-item>--> |
| | | |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | |
| | | <el-table-column prop="dutyCompanyName" show-overflow-tooltip label="责任部门" min-width="150px"></el-table-column> |
| | | <el-table-column prop="areaName" label="隐患区域" show-overflow-tooltip min-width="150px"></el-table-column> |
| | | <el-table-column prop="categoryName" label="隐患类型" min-width="150px"></el-table-column> |
| | | <el-table-column prop="content" label="问题描述" min-width="150px"></el-table-column> |
| | | <el-table-column prop="memberName" label="提报人" min-width="80px"></el-table-column> |
| | | <el-table-column prop="companyName" show-overflow-tooltip label="所属组织" min-width="150px"></el-table-column> |
| | | <el-table-column prop="createDate" label="提报时间" min-width="150px"></el-table-column> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="editDate" label="操作时间" min-width="150px"></el-table-column> |
| | | <el-table-column label="操作" min-width="180" fixed="right"> |
| | | <el-table-column prop="dealTime" label="处理时间" min-width="150px"></el-table-column> |
| | | <!-- |
| | | <el-table-column prop="editDate" label="最近操作时间" min-width="150px"></el-table-column> |
| | | --> |
| | | <el-table-column |
| | | label="操作" |
| | | min-width="180" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" icon="el-icon-edit" |
| | | @click="$refs.OperaHiddenDangerWindow.open('隐患随手拍详情', row)">查看详情</el-button> |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:empower:query']"> |
| | | <TableLayout :permissions="['business:carusebook:query']"> |
| | | <!-- 搜索表单 --> |
| | | <div ref="QueryFormRef" slot="search-form"> |
| | | <el-form ref="searchForm" :model="searchForm" label-width="100px" inline> |
| | |
| | | </div> |
| | | <!-- 表格和分页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="[ |
| | | <ul |
| | | class="toolbar" |
| | | v-permissions="[ |
| | | 'business:carusebook:create', |
| | | 'business:carusebook:exportExcel', |
| | | ]"> |
| | | ]" |
| | | > |
| | | <li> |
| | | <el-button type="primary" @click="handleEdit" icon="el-icon-plus" |
| | | v-permissions="['business:carusebook:create']">新建</el-button> |
| | | <el-button |
| | | type="primary" |
| | | @click="handleEdit" |
| | | icon="el-icon-plus" |
| | | v-permissions="['business:carusebook:create']" |
| | | >新建</el-button |
| | | > |
| | | </li> |
| | | <li> |
| | | <el-button type="primary" @click="handleEx" v-permissions="['business:carusebook:exportExcel']">导出</el-button> |
| | | <el-button |
| | | type="primary" |
| | | @click="handleEx" |
| | | v-permissions="['business:carusebook:exportExcel']" |
| | | >导出</el-button |
| | | > |
| | | </li> |
| | | </ul> |
| | | <el-table :max-height="tableHeight" v-loading="isWorking.search" :data="tableData.list" stripe |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="carCode" label="车牌号" min-width="100px"></el-table-column> |
| | | <el-table-column prop="memberName" label="提报人" min-width="80px"></el-table-column> |
| | | <el-table-column prop="memberNames" label="乘车人" min-width="180px"></el-table-column> |
| | | <el-table-column prop="companyName" label="所属组织" min-width="150px"></el-table-column> |
| | | <el-table-column |
| | | prop="carCode" |
| | | label="车牌号" |
| | | min-width="100px" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="memberName" |
| | | label="提报人" |
| | | min-width="80px" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="memberNames" |
| | | label="乘车人" |
| | | min-width="180px" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="companyName" |
| | | label="所属组织" |
| | | min-width="150px" |
| | | ></el-table-column> |
| | | <el-table-column label="用车时间" min-width="170px"> |
| | | <template slot-scope="{ row }"> |
| | | <span v-if="row.startTime">起:{{ row.startTime.slice(0, 16) }}</span><br /> |
| | | <span v-if="row.startTime">起:{{ row.startTime.slice(0,16) }}</span |
| | | ><br /> |
| | | <span v-if="row.endTime">止:{{ row.endTime.slice(0, 16) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="planUseDate" label="出发时间" min-width="150px"> |
| | | <el-table-column |
| | | prop="planUseDate" |
| | | label="出发时间" |
| | | min-width="150px" |
| | | > |
| | | <template slot-scope="{ row }"> |
| | | <span v-if="row.planUseDate">{{ row.planUseDate.slice(0, 16) }}</span> |
| | | </template> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="createDate" label="申请时间" min-width="150px"></el-table-column> |
| | | <el-table-column prop="editDate" label="操作时间" min-width="150px"></el-table-column> |
| | | <el-table-column label="操作" min-width="160" align="center" fixed="right"> |
| | | <el-table-column |
| | | prop="createDate" |
| | | label="申请时间" |
| | | min-width="150px" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="editDate" |
| | | label="操作时间" |
| | | min-width="150px" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | label="操作" |
| | | min-width="180" |
| | | align="center" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{ row }"> |
| | | <el-button type="text" icon="el-icon-edit" |
| | | @click="$refs.OperaDetailsWindow.open('公务车申请详情', row)">查看详情</el-button> |
| | | <el-button |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="$refs.OperaDetailsWindow.open('公务车申请详情', row)" |
| | | >查看详情</el-button |
| | | > |
| | | <!-- <el-button v-if="(row.status === 1 || row.status === 2) && new Date().getTime() < new Date(row.startTime).getTime()" type="text" icon="el-icon-delete" @click="rowRevokeClick(row)" >撤销</el-button> --> |
| | | <el-button style="color: red" |
| | | v-if="(row.status === 0 || row.status === 1 || row.status === 2) && new Date().getTime() < new Date(row.startTime).getTime()" |
| | | type="text" icon="el-icon-delete" @click="rowRevokeClick(row)">撤销</el-button> |
| | | <el-button style="color: red" type="text" icon="el-icon-delete" @click="deleteById(row)">删除</el-button> |
| | | <el-button style="color: red" v-if="row.hasRole ==1" type="text" icon="el-icon-delete" @click="rowRevokeClick(row)" >撤销</el-button> |
| | | <!-- <el-button style="color: red" v-if="(row.status === 0 && row.creator == userInfo.id)||((row.status === 0 || row.status === 1 ) || ( row.status === 2 && new Date().getTime() < new Date(row.startTime).getTime() ))" type="text" icon="el-icon-delete" @click="rowRevokeClick(row)" >撤销</el-button>--> |
| | | <el-button style="color: red" type="text" icon="el-icon-delete" v-permissions="['business:carusebook:delete']" @click="deleteById(row)" >删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination"> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | <!-- --> |
| | | <el-dialog title="用车撤销" :visible.sync="isShowBack" width="520px"> |
| | | <el-form :model="backParam" :rules="rules" ref="backForm" label-width="100px" class="demo-ruleForm"> |
| | | <el-form |
| | | :model="backParam" |
| | | :rules="rules" |
| | | ref="backForm" |
| | | label-width="100px" |
| | | class="demo-ruleForm" |
| | | > |
| | | <el-form-item label="说明" prop="info"> |
| | | <el-input type="textarea" :rows="4" v-model="backParam.info" placeholder="请输入撤销说明"></el-input> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="4" |
| | | v-model="backParam.info" |
| | | placeholder="请输入撤销说明" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | |
| | | <el-button type="primary" @click="backSubmit">确定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <OperaCarUseBookWindow ref="OperaDetailsWindow" @success="handlePageChange" /> |
| | | <OperaCarUseBookWindow |
| | | ref="OperaDetailsWindow" |
| | | @success="handlePageChange" |
| | | /> |
| | | <OperaCarUseBookParamWindow ref="OperaParamWindow" @success="search" /> |
| | | </TableLayout> |
| | | </template> |
| | |
| | | components: { TableLayout, Pagination, OperaCarUseBookWindow, OperaCarUseBookParamWindow }, |
| | | data() { |
| | | return { |
| | | // userInfo: this.$store.state.userInfo, |
| | | // 搜索 |
| | | searchForm: { |
| | | memberName: '', |
| | |
| | | 'field.main': 'id' |
| | | }) |
| | | // this.search() |
| | | this.changeRadio('0') |
| | | this.changeRadio(0) |
| | | this.loadParams() |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.tableHeight = document.body.scrollHeight - this.$refs.QueryFormRef.offsetHeight - 300 |
| | | }) |
| | | }, |
| | | methods: { |
| | | rowRevokeClick(row) { |
| | |
| | | }) |
| | | }, |
| | | seleTime(e) { |
| | | this.searchForm.queryStartTime = null |
| | | this.searchForm.queryEndTime = null |
| | | if (e != null && e.length >= 2) { |
| | | this.searchForm.queryStartTime = e[0] |
| | | this.searchForm.queryEndTime = e[1] |
| | | } |
| | | this.searchForm.radio = null |
| | | this.search() |
| | | }, |
| | | reset() { |
| | | this.$refs.searchForm.resetFields() |
| | | this.searchForm = {} |
| | | this.time = [] |
| | | // this.searchForm.radio = '0' |
| | | // this.changeRadio('0') |
| | | this.search() |
| | | this.searchForm.radio = 0 |
| | | this.changeRadio(0) |
| | | // this.search() |
| | | } |
| | | } |
| | | } |
| | |
| | | <template v-slot="scope"> |
| | | <el-button type="text" v-permissions="['business:platformbooks:detail']" |
| | | @click="handleDetail(scope.row)">预约详情</el-button> |
| | | <el-button type="text" class="red" v-permissions="['business:platformjob:delete']" @click="handleDel(scope.row)">删除</el-button> |
| | | <el-button type="text" class="red" v-permissions="['business:platformbooks:delete']" @click="handleDel(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <div class="value">{{ info.carNos }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="label">施工人员</div> |
| | | <div class="label">是否涉及施工作业</div> |
| | | <div class="value">{{ info.type == "0" ? "否" : "是" }}</div> |
| | | </div> |
| | | <div class="item"> |
| | |
| | | @ApiModelProperty(value = "userId") |
| | | @TableField(exist = false) |
| | | private Integer userId ; |
| | | @ApiModelProperty(value = "是否具有操作权限(开始、结束、撤回)") |
| | | @TableField(exist = false) |
| | | private Integer hasRole ; |
| | | |
| | | @ApiModelProperty(value = "参会人员") |
| | | @TableField(exist = false) |
| | | private List<UserRel> sysList; |
| | | @ApiModelProperty(value = "会议室管理员") |
| | | @TableField(exist = false) |
| | | private List<UserRel> adminList; |
| | | |
| | | @ApiModelProperty(value = "服务项目") |
| | | @TableField(exist = false) |
| | |
| | | @ApiModelProperty(value = "图片全路径") |
| | | @TableField(exist = false) |
| | | private String imgFullUrl; |
| | | @ApiModelProperty(value = "未结束会议记录数") |
| | | @TableField(exist = false) |
| | | private Integer bookingNum; |
| | | |
| | | @ApiModelProperty(value = "附件文件") |
| | | @TableField(exist = false) |
| | |
| | | import com.doumee.service.business.ProjectsService; |
| | | import com.doumee.service.system.SystemUserService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | * @date 2023/05/04 18:18 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class BookingsServiceImpl implements BookingsService { |
| | | |
| | | @Value("${des_pwd}") |
| | |
| | | public Integer create(Bookings bookings) { |
| | | LoginUserInfo user = bookings.getLoginUserInfo(); |
| | | Rooms rooms = roomsMapper.selectById(bookings.getRoomId()); |
| | | if(rooms==null ){ |
| | | if(rooms==null||Constants.equalsInteger(rooms.getIsdeleted(),Constants.ONE) ){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,该会议室暂时无法预约"); |
| | | } |
| | | bookings.setRoomName(rooms.getName()); |
| | |
| | | s.setCreator(user.getId()); |
| | | s.setObjId(bookings.getId()); |
| | | s.setType(MeetConstants.TWO); |
| | | s.setObjType(MeetConstants.ZERO); |
| | | s.setObjType(Constants.MultiFile.MEETING_BOOKS.getKey()); |
| | | multifileJoinMapper.insert(s); |
| | | }); |
| | | } |
| | |
| | | for (int i = 0; i < bookings.getBookingTimeList().size(); i++) { |
| | | BookingTime s = bookings.getBookingTimeList().get(i); |
| | | RoomTime roomTime = roomTimeJoinMapper.selectById(s.getTimeId()); |
| | | if(Objects.isNull(roomTime)){ |
| | | if(Objects.isNull(roomTime) ||Constants.equalsInteger(roomTime.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"存在未查询到的配置日期,请刷新重试"); |
| | | } |
| | | String endRoomTime = gsDate + " " + roomTime.getEndTime()+":00"; |
| | |
| | | Integer s=ids.get(i); |
| | | |
| | | Bookings bkjs = bookingsMapper.selectById(s); |
| | | if (Objects.isNull(bkjs)) { |
| | | if (Objects.isNull(bkjs)||Constants.equalsInteger(bkjs.getIsdeleted(),Constants.ONE)) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "未查询到预约记录"); |
| | | } |
| | | |
| | |
| | | @Transactional(rollbackFor = {BusinessException.class, Exception.class}) |
| | | public void updateById(Bookings bookings) { |
| | | Bookings dbBookings = bookingsMapper.selectById(bookings.getId()); |
| | | if(dbBookings==null ||Constants.equalsInteger(dbBookings.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(dbBookings.getStatus().equals(MeetConstants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "本次操作失败,预约状态已流转"); |
| | | } |
| | | Rooms rooms = roomsMapper.selectById(dbBookings.getRoomId()); |
| | | if(rooms==null ){ |
| | | if(rooms==null||Constants.equalsInteger(rooms.getIsdeleted(),Constants.ONE) ){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,该会议室暂时无法预约"); |
| | | } |
| | | bookings.setRoomName(rooms.getName()); |
| | |
| | | bookingsMapper.updateById(bookings);*/ |
| | | |
| | | Bookings bookings = bookingsMapper.selectById(bs.getId()); |
| | | if (Objects.isNull(bookings)) { |
| | | if (Objects.isNull(bookings)||Constants.equalsInteger(bookings.getIsdeleted(),Constants.ONE)) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(), "未查询到预约记录"); |
| | | } |
| | | |
| | |
| | | //参会人员列表 |
| | | MPJLambdaWrapper<UserRel> urquery = new MPJLambdaWrapper<>(); |
| | | urquery.selectAll(UserRel.class); |
| | | urquery.eq(UserRel::getObjType, MeetConstants.ONE); |
| | | urquery.eq(UserRel::getIsdeleted, MeetConstants.ZERO); |
| | | urquery.eq(UserRel::getObjId, s.getId()); |
| | | urquery.select("(select REALNAME from system_user s where t.USER_ID = s.id and s.DELETED = 0 ) as realName"); |
| | | List<UserRel> userrelList = userRelJoinMapper.selectJoinList(UserRel.class, urquery); |
| | | s.setSysList(userrelList); |
| | | //会议室管理员 |
| | | MPJLambdaWrapper<UserRel> param = new MPJLambdaWrapper<>(); |
| | | urquery.selectAll(UserRel.class); |
| | | urquery.eq(UserRel::getObjType, MeetConstants.ZERO); |
| | | urquery.eq(UserRel::getIsdeleted, MeetConstants.ZERO); |
| | | urquery.eq(UserRel::getObjId, s.getRoomId()); |
| | | List<UserRel> adminList = userRelJoinMapper.selectJoinList(UserRel.class, urquery); |
| | | s.setAdminList(adminList); |
| | | |
| | | //服务项 |
| | | //查询是否有权限 |
| | | s.setHasRole(getHasRoleByParam(s,userInfo,adminList)); |
| | | /* //服务项 |
| | | MPJLambdaWrapper<ProjectRel> prquery = new MPJLambdaWrapper<>(); |
| | | prquery.selectAll(ProjectRel.class); |
| | | prquery.eq(ProjectRel::getIsdeleted, MeetConstants.ZERO); |
| | | prquery.eq(ProjectRel::getObjId, s.getId()); |
| | | prquery.select("(select p.name from meeting_projects p where t.PROJECT_ID = p.id and p.ISDELETED = 0 ) as projectName"); |
| | | List<ProjectRel> prList = projectRelJoinMapper.selectJoinList(ProjectRel.class, prquery); |
| | | s.setProjectList(prList); |
| | | s.setProjectList(prList);*/ |
| | | |
| | | s.setFlag(MeetConstants.ZERO); |
| | | if (System.currentTimeMillis() > s.getStartTime().getTime()) { |
| | |
| | | }); |
| | | return PageData.from(result); |
| | | } |
| | | |
| | | public int getHasRoleByParam(Bookings s,LoginUserInfo userInfo,List<UserRel> adminList){ |
| | | if(Constants.equalsInteger(userInfo.getId(),s.getCreator()) ){ |
| | | return 1; |
| | | } |
| | | if(adminList!=null){ |
| | | for(UserRel u : adminList){ |
| | | if(Constants.equalsInteger(userInfo.getId(),u.getUserId()) ){ |
| | | return 1; |
| | | } |
| | | } |
| | | } |
| | | return 0; |
| | | } |
| | | private void dealMeetingStatusByModel(Bookings s,Integer minute) { |
| | | //会议状态: 1=未开始;2=进行中;3=已结束 ; 4=即将开始; 5=已撤销 |
| | | //status状态 0已预约 1已撤销 2已结束 |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | Bookings bookings = bookingsMapper.selectOne(new QueryWrapper<Bookings>().lambda() |
| | | .eq(Bookings::getIsdeleted,Constants.ZERO) |
| | | .eq(Bookings::getRoomId,bean.getRoomId()) |
| | | .ge(Bookings::getEndTime,DateUtil.getPlusTime(bean.getEndTime())) |
| | | .le(Bookings::getStartTime,DateUtil.getPlusTime(bean.getStartTime())) |
| | |
| | | //预约人 |
| | | meetingDetailResponse.setBookingUser(systemUserService.findById(meetingDetailResponse.getBookingUserId())); |
| | | //时间段列表 |
| | | meetingDetailResponse.setBookingTimeList(bookingTimeMapper.selectList(new QueryWrapper<BookingTime>() |
| | | .eq("BOOKING_ID", id) |
| | | .eq("ISDELETED", MeetConstants.ZERO) |
| | | meetingDetailResponse.setBookingTimeList(bookingTimeMapper.selectList(new QueryWrapper<BookingTime>().lambda() |
| | | .eq(BookingTime::getBookingId, id) |
| | | .eq(BookingTime::getIsdeleted, MeetConstants.ZERO) |
| | | )); |
| | | //参会人员列表 |
| | | List<UserResponse> userResponseList = systemUserService.getUserList(id); |
| | |
| | | i.setPrefixUrl(projectsPath); |
| | | }); |
| | | meetingDetailResponse.setProjectsResponseList(projectsResponseList); |
| | | List<Multifile> multiFileList = multifileMapper.selectList(new QueryWrapper<Multifile>() |
| | | .eq("OBJ_ID", id) |
| | | .eq("OBJ_TYPE", MeetConstants.ZERO) |
| | | List<Multifile> multiFileList = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getObjId, id) |
| | | .eq(Multifile::getObjType, Constants.MultiFile.MEETING_BOOKS.getKey()) |
| | | .eq(Multifile::getIsdeleted, MeetConstants.ZERO) |
| | | ); |
| | | multiFileList.forEach(i -> { |
| | | i.setFileurlFull(projectsPath); |
| | |
| | | //附件信息 |
| | | meetingDetailResponse.setMultiFileList(multiFileList); |
| | | //会议室管理人员 |
| | | List<UserRel> userRelList = userRelMapper.selectList(new QueryWrapper<UserRel>() |
| | | .eq("ISDELETED",MeetConstants.ZERO) |
| | | .eq("OBJ_ID", meetingDetailResponse.getRoomId()) |
| | | .eq("OBJ_TYPE",MeetConstants.ZERO) |
| | | List<UserRel> userRelList = userRelMapper.selectList(new QueryWrapper<UserRel>().lambda() |
| | | .eq(UserRel::getIsdeleted,MeetConstants.ZERO) |
| | | .eq(UserRel::getObjId, meetingDetailResponse.getRoomId()) |
| | | .eq(UserRel::getObjType,MeetConstants.ZERO) |
| | | ); |
| | | if(Constants.equalsInteger(sysUserId,meetingDetailResponse.getBookingUserId())){ |
| | | meetingDetailResponse.setIsAdmin(Constants.ONE); |
| | |
| | | .eq(UserRel::getObjType,Constants.ZERO) |
| | | .eq(UserRel::getUserId,businessOverDTO.getUserId())); |
| | | |
| | | if (!bookings.getCreator().equals(businessOverDTO.getUserId()) && userRelList <= 0) { |
| | | if (!Constants.equalsInteger(bookings.getCreator(),businessOverDTO.getUserId()) && userRelList <= 0) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "非你的预约记录,无法进行该操作"); |
| | | } |
| | | if(!Constants.equalsInteger(bookings.getStatus(),Constants.ZERO)){ |
| | |
| | | bookings.setEditDate(new Date()); |
| | | bookings.setEditor(businessOverDTO.getUserId()); |
| | | bookingsMapper.updateById(bookings); |
| | | /* //更新已结束但未结束的会议信息为已结束 |
| | | //更新已结束但未结束的会议信息为已结束 |
| | | bookingsMapper.update(null,new UpdateWrapper<Bookings>() |
| | | .lambda() |
| | | .set(Bookings::getStatus,Constants.TWO) |
| | |
| | | .apply(" ( END_TIME < now() or ( END_TIME > now() and START_TIME < now() and START_TIME_REAL is null ) )") |
| | | .eq(Bookings::getStatus,Constants.ZERO) |
| | | .eq(Bookings::getRoomId,bookings.getRoomId()) |
| | | );*/ |
| | | ); |
| | | |
| | | } |
| | | |
| | |
| | | response.setMultifileList(multifileList); |
| | | } |
| | | |
| | | |
| | | /* //查询会议列表 |
| | | List<MeetingListResponse> meetingList = bookingsMapper.meetingList( |
| | | new QueryWrapper<Bookings>() |
| | | .eq( "b.id", rooms.getId()) |
| | | .eq("b.ISDELETED",MeetConstants.ZERO) |
| | | .eq("b.STATUS",MeetConstants.ZERO) |
| | | .eq("a.ISDELETED",MeetConstants.ZERO) |
| | | .eq("a.status",Constants.ZERO) |
| | | .ne("a.status",Constants.TWO) |
| | | .like("a.start_time",DateUtil.getCurrDate()) |
| | | .apply(" not exists ( select 1 from meeting_book mb where mb.END_TIME < now() and mb.id = a.id and START_TIME_REAL is null ) ") |
| | | .orderByAsc("a.start_time") |
| | | ); |
| | | this.dealMeetingStatus(meetingList); |
| | | response.setMeetingListResponseList(meetingList);*/ |
| | | |
| | | MPJLambdaWrapper<Bookings> queryWrapper = new MPJLambdaWrapper<Bookings>() |
| | | .selectAll(Bookings.class) |
| | | .selectAs(Rooms::getName, Bookings::getRoomName) |
| | |
| | | .leftJoin(Rooms.class, Rooms::getId, Bookings::getRoomId) |
| | | .leftJoin(SystemUser.class, SystemUser::getId, Bookings::getCreator) |
| | | .eq(Bookings::getIsdeleted, MeetConstants.ZERO) |
| | | .eq(Bookings::getId, MeetConstants.ZERO) |
| | | .eq(Bookings::getStatus, MeetConstants.ZERO) |
| | | .eq(Rooms::getId, rooms.getId()) |
| | | .apply("to_days(t.start_time) = to_days(now())")//子查询当天的 |
| | | .orderByDesc(Bookings::getStartTime); |
| | | .apply("to_days(t.start_time) = to_days(now()) and t.end_time > now()")//子查询当天的 |
| | | .orderByAsc(Bookings::getStartTime); |
| | | Integer minute =getNearStartMinut(); |
| | | List<Bookings> meetingList =bookingsMapper.selectJoinList(Bookings.class,queryWrapper); |
| | | List<MeetingListResponse> rList= new ArrayList<>(); |
| | | if(meetingList!=null){ |
| | | response.setMeetingListResponseList(new ArrayList<>()); |
| | | log.error(JSONObject.toJSONString(meetingList)); |
| | | for(Bookings s : meetingList){ |
| | | dealMeetingStatusByModel(s,minute); |
| | | MeetingListResponse d = new MeetingListResponse(); |
| | |
| | | d.setMeetingName(s.getName()); |
| | | d.setRemark(s.getRemark()); |
| | | d.setStartTime(s.getStartTime()); |
| | | response.getMeetingListResponseList().add(d); |
| | | rList.add(d); |
| | | } |
| | | } |
| | | response.setMeetingListResponseList(rList); |
| | | return response; |
| | | } |
| | | |
| | |
| | | //查询是否处于会议中 |
| | | page.getRecords().forEach(j->{ |
| | | j.setPrefixUrl(path); |
| | | if(bookingsMapper.selectCount(new QueryWrapper<Bookings>() |
| | | if(bookingsMapper.selectCount(new QueryWrapper<Bookings>() .lambda() |
| | | .eq(Bookings::getIsdeleted,Constants.ZERO) |
| | | .exists(" select 1 from meeting_user_rel u where u.OBJ_ID = meeting_book.id and u.USER_ID = '"+j.getId()+"' and u.OBJ_TYPE = 1 ") |
| | | .and(i -> i.between("START_TIME", pageWrap.getModel().getStartTime()+":00",pageWrap.getModel().getEndTime()+":00") |
| | | .or().between("END_TIME", pageWrap.getModel().getStartTime()+":00",pageWrap.getModel().getEndTime()+":00") |
| | | .and(i -> i.between(Bookings::getStartTime, pageWrap.getModel().getStartTime()+":00",pageWrap.getModel().getEndTime()+":00") |
| | | .or().between(Bookings::getEndTime, pageWrap.getModel().getStartTime()+":00",pageWrap.getModel().getEndTime()+":00") |
| | | ) |
| | | )>Constants.ZERO){ |
| | | j.setStatus(Constants.ONE); |
| | |
| | | // .set(Rooms::getStartTime, rooms.getStartTime()) |
| | | .set(Rooms::getLimitNum, rooms.getLimitNum()) |
| | | .set(Rooms::getTips, rooms.getTips()) |
| | | .set(Rooms::getIntervalTime, rooms.getIntervalTime()) |
| | | .set(Rooms::getImgurl, rooms.getImgurl()) |
| | | .eq(Rooms::getId, rooms.getId())); |
| | | |
| | |
| | | IPage<Rooms> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<Rooms> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | |
| | | queryWrapper.selectAll(Rooms.class); |
| | | |
| | | queryWrapper.select("(select count(a.id) from meeting_book a where a.room_id=t.id and a.isdeleted=0 and a.status=0)",Rooms::getBookingNum); |
| | | queryWrapper.orderByDesc(Rooms::getCreateDate); |
| | | queryWrapper.eq(Rooms::getIsdeleted, Constants.ZERO); |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getName()),Rooms::getName, pageWrap.getModel().getName()); |
| | |
| | | if(org.apache.commons.collections4.CollectionUtils.isNotEmpty(pageWrap.getModel().getSysList())){ |
| | | // queryWrapper.leftJoin(UserRel.class,UserRel::getObjId,Rooms::getId); |
| | | List<Integer> collect = pageWrap.getModel().getSysList().stream().map(UserRel::getUserId).collect(Collectors.toList()); |
| | | |
| | | queryWrapper.exists("select u.id from meeting_user_rel u where u.ISDELETED=0 and u.OBJ_ID =t.id and u.USER_ID in (" + StringUtils.strip(collect.toString(),"[]")+" )"); |
| | | } |
| | | |
| | |
| | | # 删除7天前的备份数据 |
| | | find /usr/local/jars/dbbackup -name "antaiwuliu_*.sql" -type f -mtime +7 -exec rm {} \; > /dev/null 2>&1 |
| | | |
| | | |
| | | |
| | | |
| | | /usr/local/mysql/bin/mysqldump -h127.0.0.1 -uroot -pAtwl@2024 antaiwuliu > /usr/local/jars/dbbackup/antaiwuliu_0228JP.sql |
| | | |
| | | |
| | | |
| | | delete from platform_books where id not int (298,297,296,294,290,293) |
| | | |
| | | delete from platform_job a where not exist(select b.id from platform_books b where b.job_id=a.id and b.id in (298,297,296,294,290,293)) |
| | |
| | | } |
| | | |
| | | public List<Integer> getIdList(String ids){ |
| | | if(StringUtils.isBlank(ids)){ |
| | | return null; |
| | | } |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | try { |
| | | idList.add(Integer.valueOf(id)); |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | } |
| | | return idList; |
| | | } |
| | |
| | | }catch (Exception e){ |
| | | }*/ |
| | | } else { |
| | | throw new BusinessException(ResponseStatus.NO_LOGIN.getCode(),request.getRequestURI()+"未登录"); |
| | | throw new BusinessException(ResponseStatus.NO_LOGIN.getCode(),request.getRequestURI()+"未登录,TOKEN缺失"); |
| | | } |
| | | } |
| | | }else{ |
| | |
| | | if (StringUtils.isBlank(userinfo)) { |
| | | throw new BusinessException(ResponseStatus.NO_LOGIN.getCode(),"未登录"); |
| | | } |
| | | stringRedisTemplate.expire(Constants.REDIS_TOKEN_KEY+token,this.expireTime, TimeUnit.MILLISECONDS); |
| | | LoginUserInfo user = JSONObject.toJavaObject(JSONObject.parseObject(userinfo),LoginUserInfo.class ); |
| | | if(user ==null ){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"用户登陆已失效,请重新登陆!"); |
| | | } |
| | | stringRedisTemplate.expire(Constants.REDIS_TOKEN_KEY+token,this.expireTime, TimeUnit.MILLISECONDS); |
| | | //权限判断------------ |
| | | return user; |
| | | } |
| | |
| | | public enum ResponseStatus { |
| | | // 400开头表示参数错误 |
| | | BAD_REQUEST(4000, "参数错误"), |
| | | DATA_EMPTY(4001, "找不到目标数据"), |
| | | DATA_EMPTY(4001, "找不到目标数据,该记录不存在或已被删除"), |
| | | DATA_EXISTS(4002, "记录已存在"), |
| | | PWD_INCORRECT(4003, "密码不正确"), |
| | | VERIFICATION_CODE_INCORRECT(4004, "验证码不正确或已过期"), |
| | |
| | | PT_FK(1,"普通访客"), |
| | | NB_FK(2,"内部人员"), |
| | | |
| | | COMPANY_TYPE_REL(0,"相关方组织"), |
| | | COMPANY_TYPE_INTERNAL(1,"内部人员"), |
| | | COMPANY_TYPE_FK(3,"访客"), |
| | | |
| | | /** 进场类型 **/ |
| | | OUT(0,"出"), |
| | | IN(1,"进"); |
| | |
| | | HIDDEN_DANGER_SUBMIT(0, "隐患随手拍提报", "隐患随手拍提报"), |
| | | HIDDEN_DANGER_DEAL_BEFORE(1, "隐患随手拍处理前", "隐患随手拍处理前"), |
| | | HIDDEN_DANGER_DEAL_AFTER(2, "隐患随手拍处理后 ", "隐患随手拍处理后 "), |
| | | MEETING_BOOKS(4, "会议文件 ", "会议文件 "), |
| | | ; |
| | | // 成员变量 |
| | | private String name; |
| | |
| | | public CronTrigger getCronTrigger (Integer jobId){ |
| | | try { |
| | | return (CronTrigger) this.scheduler.getTrigger(getTriggerKey(jobId)) ; |
| | | } catch (SchedulerException e){ |
| | | throw new RuntimeException("getCronTrigger Fail",e) ; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | // throw new RuntimeException("createJob Fail",e) ; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | |
| | | scheduler.scheduleJob(jobDetail,trigger) ; |
| | | // 状态校验 |
| | | checkStop(quartzJob) ; |
| | | } catch (SchedulerException e){ |
| | | throw new RuntimeException("createJob Fail",e) ; |
| | | } catch (Exception e){ |
| | | e.printStackTrace(); |
| | | // throw new RuntimeException("createJob Fail",e) ; |
| | | } |
| | | } |
| | | |
| | |
| | | scheduler.rescheduleJob(triggerKey, trigger); |
| | | // 状态校验 |
| | | checkStop(quartzJob) ; |
| | | } catch (SchedulerException e) { |
| | | throw new RuntimeException("updateJob Fail",e) ; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | // throw new RuntimeException("createJob Fail",e) ; |
| | | } |
| | | } |
| | | |
| | |
| | | JobDataMap dataMap = new JobDataMap() ; |
| | | dataMap.put(QuartzJob.JOB_PARAM_KEY,quartzJob); |
| | | this.scheduler.triggerJob(getJobKey(quartzJob.getId()),dataMap); |
| | | } catch (SchedulerException e){ |
| | | throw new RuntimeException("run Fail",e) ; |
| | | } catch (Exception e){ |
| | | e.printStackTrace(); |
| | | // throw new RuntimeException("createJob Fail",e) ; |
| | | } |
| | | } |
| | | |
| | |
| | | if(quartzJob.getState() != JobState.JOB_RUN.getStatus()){ |
| | | this.scheduler.pauseJob(getJobKey(quartzJob.getId())); |
| | | } |
| | | } catch (SchedulerException e){ |
| | | throw new RuntimeException("pauseJob Fail",e) ; |
| | | } catch (Exception e){ |
| | | e.printStackTrace(); |
| | | // throw new RuntimeException("createJob Fail",e) ; |
| | | } |
| | | } |
| | | |
| | |
| | | * 新增任务 |
| | | */ |
| | | public int insert(QuartzJob quartzJob) { |
| | | if(quartzJobMapper.selectCount(new QueryWrapper<QuartzJob>().lambda() |
| | | .eq(QuartzJob::getModule,quartzJob.getModule()) |
| | | .eq(QuartzJob::getBeanName,quartzJob.getBeanName())) >0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS); |
| | | } |
| | | int flag = quartzJobMapper.insert(quartzJob) ; |
| | | if (flag > 0){ |
| | | quartzManage.createJob(quartzJob) ; |
| | |
| | | * 更新任务 |
| | | */ |
| | | public int update(QuartzJob quartzJob) { |
| | | if(quartzJobMapper.selectCount(new QueryWrapper<QuartzJob>().lambda() |
| | | .eq(QuartzJob::getModule,quartzJob.getModule()) |
| | | .ne(QuartzJob::getId,quartzJob.getId()) |
| | | .eq(QuartzJob::getBeanName,quartzJob.getBeanName())) >0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS); |
| | | } |
| | | int flag = quartzJobMapper.updateById(quartzJob); |
| | | if (flag > 0){ |
| | | quartzManage.updateJob(quartzJob); |
| | |
| | | @ApiOperation("【访客系统】访客数据即将超时预警") |
| | | @GetMapping("/timer/visit/visitTimeOut") |
| | | ApiResponse visitTimeOut() ; |
| | | @ApiOperation("【访客系统】访客申请待审批记录截止时间已过自动取消预约") |
| | | @GetMapping("/timer/visit/visitNoCheckCancel") |
| | | ApiResponse visitNoCheckCancel() ; |
| | | @ApiOperation("【数字化月台】月台停靠超时报警业务") |
| | | @GetMapping("/timer/platformJob/platformJobTimer") |
| | | ApiResponse platformJobTimer(); |
| | |
| | | queryWrapper.in(QuartzJob::getState, JobState.JOB_RUN.getStatus(),JobState.JOB_STOP.getStatus()); |
| | | List<QuartzJob> jobList = quartzJobMapper.selectList(queryWrapper); |
| | | jobList.forEach(quartzJob -> { |
| | | try { |
| | | CronTrigger cronTrigger = quartzManage.getCronTrigger(quartzJob.getId()) ; |
| | | if (Objects.isNull(cronTrigger)){ |
| | | quartzManage.createJob(quartzJob); |
| | | } else { |
| | | quartzManage.updateJob(quartzJob); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | }); |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | visitsService.syncTimeOutData(); |
| | | return ApiResponse.success("访客即将超时预警"); |
| | | } |
| | | @ApiOperation("待审批记录超时自动取消预约") |
| | | @GetMapping("/visitNoCheckCancel") |
| | | public ApiResponse visitNoCheckCancel() { |
| | | visitsService.visitNoCheckCancel(); |
| | | return ApiResponse.success("待审批记录超时自动取消预约"); |
| | | } |
| | | |
| | | } |
| | |
| | | public ApiResponse<List<PlatformGroup>> getPlatformGroupList (@RequestBody PlatformDataDTO platformDataDTO, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(platformGroupService.getAllPlatformGroup(platformDataDTO,getLoginUser(token))); |
| | | } |
| | | @ApiOperation("获取月台组信息(平台端)") |
| | | @PostMapping("/getPlatformGroupListNew") |
| | | @CloudRequiredPermission("business:platform:query") |
| | | public ApiResponse<List<PlatformGroup>> getPlatformGroupListNew (@RequestBody PlatformDataDTO platformDataDTO, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(platformGroupService.getAllPlatformGroup(platformDataDTO,getLoginUser(token))); |
| | | } |
| | | |
| | | @ApiOperation("获取月台任务信息") |
| | | @GetMapping("/getPlatformWorkData") |
| | |
| | | @GetMapping("/updateTotalNum") |
| | | @CloudRequiredPermission("business:platformjob:update") |
| | | public ApiResponse updateTotalNum(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | wmsService.computjobTotalNum(this.getIdList(ids)); |
| | | List<Integer> idList =this.getIdList(ids); |
| | | if(idList == null || idList.size()==0){ |
| | | idList = new ArrayList<>(); |
| | | PlatformJob param = new PlatformJob(); |
| | | param.setIsdeleted(Constants.ZERO); |
| | | param.setOrigin(Constants.ONE); |
| | | List<PlatformJob> list= platformJobService.findList(param); |
| | | |
| | | for(PlatformJob j :list){ |
| | | idList.add(j.getId()); |
| | | } |
| | | } |
| | | wmsService.computjobTotalNum(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | String visitAuditSuccess = "visitAuditSuccess"; |
| | | // 审批驳回给申请人:申请已被驳回 |
| | | String visitAuditFail = "visitAuditFail"; |
| | | //方可申请下发失败 |
| | | String visitApplyHkFail = "visitApplyHkFail"; |
| | | // 给审批人:申请待您审批 |
| | | String visitWaitAudit = "visitWaitAudit"; |
| | | } |
| | |
| | | private String personPhone; |
| | | |
| | | @ApiModelProperty(value = "人员类型") |
| | | @ExcelColumn(name="人员类型",index = 6,width = 10,valueMapping = "0=劳务访客;1=普通访客;2=内部人员;") |
| | | private Integer personType; |
| | | |
| | | @ApiModelProperty(value = "人员身份证号") |
| | |
| | | private String visitCompanyName; |
| | | |
| | | @ApiModelProperty(value = "组织类型:0=相关方;1=内部") |
| | | private String companyType; |
| | | @ExcelColumn(name="人员类型",index = 6,width = 10,valueMapping = "0=相关方组织;1=内部人员;2=访客;") |
| | | private Integer companyType; |
| | | |
| | | @ApiModelProperty(value = "车辆类型 0内部车辆 1相关方车辆 2访客车辆 3内运物流车 4外协车辆 5市公司卸货车 ") |
| | | private String carType; |
| | |
| | | @ExcelColumn(name="审批备注") |
| | | private String checkInfo; |
| | | |
| | | @ApiModelProperty(value = "审批人") |
| | | @ExcelColumn(name="审批人") |
| | | @ApiModelProperty(value = "实际审批人") |
| | | @ExcelColumn(name="实际审批人") |
| | | private String cheorId; |
| | | |
| | | @ApiModelProperty(value = "审批时间") |
| | |
| | | @ApiModelProperty(value = "审批信息数据") |
| | | @TableField(exist = false) |
| | | private ApproveDataVO approveDateVO; |
| | | |
| | | @ApiModelProperty(value = "是否具有操作权限(撤回)") |
| | | @TableField(exist = false) |
| | | private Integer hasRole ; |
| | | |
| | | } |
| | |
| | | private Integer areaId; |
| | | |
| | | @ApiModelProperty(value = "状态 0待处理 1已处理 2不处理", example = "1") |
| | | @ExcelColumn(name="处理结果" ,valueMapping ="0=0待处理;1=已处理;2=不处理;",index = 5,width = 6) |
| | | @ExcelColumn(name="处理结果" ,valueMapping ="0=0待处理;1=已处理;2=不处理;",index = 6,width = 6) |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "申请处理人编码(关联member)", example = "1") |
| | |
| | | private Integer cateId; |
| | | |
| | | @ApiModelProperty(value = "情况说明") |
| | | // @ExcelColumn(name="情况说明") |
| | | @ExcelColumn(name="问题描述",index = 3,width = 20) |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "提报人编码(关联member)", example = "1") |
| | |
| | | |
| | | @ApiModelProperty(value = "申请人姓名", example = "1") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="提报人姓名",index =3,width = 6) |
| | | @ExcelColumn(name="提报人姓名",index =4,width = 6) |
| | | private String memberName; |
| | | @ApiModelProperty(value = "申请人所属组织名称", example = "1") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="所属组织",index = 4) |
| | | @ExcelColumn(name="所属组织",index = 5,width = 15) |
| | | private String companyName; |
| | | @ApiModelProperty(value = "责任部门名称", example = "1") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="责任部门名称",index = 0,width = 10) |
| | | private String dutyCompanyName; |
| | | @ApiModelProperty(value = "申请人手机号", example = "1") |
| | | |
| | | @TableField(exist = false) |
| | | // @ExcelColumn(name="申请人手机号") |
| | | private String memberPhone; |
| | |
| | | |
| | | @ApiModelProperty(value = "提报时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelColumn(name="提报时间",index = 6,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 18) |
| | | @ExcelColumn(name="提报时间",index = 7,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 18) |
| | | private Date submitTime; |
| | | |
| | | @ApiModelProperty(value = "处理时间(整改/退回使用)") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ExcelColumn(name="处理时间",index = 7 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 18) |
| | | @ExcelColumn(name="处理时间",index = 8 ,dateFormat = "yyyy-MM-dd HH:mm:ss",width = 18) |
| | | private Date dealTime; |
| | | |
| | | @ApiModelProperty(value = "附件信息") |
| | |
| | | private Integer worktimeOutAlarmTime; |
| | | |
| | | |
| | | |
| | | public void dealTime(){ |
| | | if(Constants.equalsInteger(this.getStatus(),Constants.PlatformJobStatus.WAIT_CONFIRM.getKey()) |
| | | || Constants.equalsInteger(this.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey()) ){ |
| | |
| | | private String plateNos; |
| | | |
| | | @ApiModelProperty(value = "人员类型") |
| | | @ExcelColumn(name="归属用户类型") |
| | | @ExcelColumn(name="人员类型") |
| | | private String typeName; |
| | | |
| | | @ApiModelProperty(value = "姓名") |
| | |
| | | * 即将超时通知 |
| | | */ |
| | | void syncTimeOutData(); |
| | | void visitNoCheckCancel(); |
| | | } |
| | |
| | | carEventExcel.getRecords().stream().forEach(obj->{ |
| | | CarEventVo vo = new CarEventVo(); |
| | | vo.setEventTypeName(HKConstants.EventTypes.getName(obj.getEventType())) ; |
| | | if(null != obj.getPersonType()) { |
| | | if(Constants.ZERO == obj.getPersonType()){ |
| | | vo.setTypeName(Constants.Status.LW_FK.getDes()); |
| | | }else if(Constants.ONE == obj.getPersonType()) { |
| | | vo.setTypeName(Constants.Status.PT_FK.getDes()); |
| | | }else { |
| | | vo.setTypeName(Constants.Status.NB_FK.getDes()); |
| | | if(obj.getCompanyType() == null){ |
| | | obj.setCompanyType(Constants.THREE); |
| | | } |
| | | }else { |
| | | vo.setTypeName(""); |
| | | vo.setTypeName(Constants.Status.COMPANY_TYPE_FK.getDes()); |
| | | if(null != obj.getCompanyType()) { |
| | | if(Constants.ZERO == obj.getCompanyType()){ |
| | | vo.setTypeName(Constants.Status.COMPANY_TYPE_REL.getDes()); |
| | | }else if(Constants.ONE == obj.getCompanyType()) { |
| | | vo.setTypeName(Constants.Status.COMPANY_TYPE_INTERNAL.getDes()); |
| | | } |
| | | } |
| | | vo.setPlateNos(obj.getPlateNos()); |
| | | vo.setPersonName(obj.getPersonName()); |
| | |
| | | import com.doumee.service.business.third.EmayService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | 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.transaction.annotation.Transactional; |
| | |
| | | queryWrapper.select("t1.name",CarUseBook::getMemberName); |
| | | queryWrapper.leftJoin(Member.class,Member::getId,CarUseBook::getMemberId) |
| | | .eq(CarUseBook::getId,id) |
| | | .eq(CarUseBook::getIsdeleted,Constants.ZERO) |
| | | .last("limit 1" ); |
| | | CarUseBook model = carUseBookMapper.selectJoinOne(CarUseBook.class,queryWrapper); |
| | | if(model==null ||Constants.equalsInteger(Constants.ONE,model.getIsdeleted())){ |
| | |
| | | .leftJoin(Member.class,Member::getId,CarUseBook::getDriverId) |
| | | .leftJoin("company t4 on t1.company_id=t4.id") |
| | | .eq(CarUseBook::getId,id) |
| | | .eq(CarUseBook::getIsdeleted,Constants.ZERO) |
| | | .last("limit 1" ); |
| | | CarUseBook model = carUseBookMapper.selectJoinOne(CarUseBook.class,queryWrapper); |
| | | if(Objects.isNull(model)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | ApproveDataVO approveDataVO = approveService.arrangeApprovedData(id, |
| | | Constants.equalsInteger(model.getType(),Constants.ZERO)?3:4, |
| | | memberId); |
| | | List<Approve> approveList = approveDataVO.getApproveList(); |
| | | model.setApproveDateVO(getApproveDataVO(memberId,model)); |
| | | List<Approve> approveList = model.getApproveDateVO().getApproveList(); |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.FOUR)){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode(); |
| | |
| | | approve.setCheckDate(model.getCancelTime()); |
| | | approveList.add(approve); |
| | | } |
| | | model.setApproveDateVO(approveDataVO); |
| | | |
| | | Notices notices = noticesJoinMapper.selectOne(new QueryWrapper<Notices>().lambda() |
| | | .eq(Notices::getObjId,id) |
| | |
| | | |
| | | |
| | | return model; |
| | | } |
| | | |
| | | private ApproveDataVO getApproveDataVO( Integer memberId,CarUseBook model) { |
| | | ApproveDataVO approveDataVO = approveService.arrangeApprovedData(model.getId(), |
| | | Constants.equalsInteger(model.getType(),Constants.ZERO)?3:4, |
| | | memberId); |
| | | return approveDataVO; |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | .and(StringUtils.isNotBlank(pageWrap.getModel().getMemberName()), ms->ms.like(Member::getName,pageWrap.getModel().getMemberName()) |
| | | .or().like(Member::getPhone,pageWrap.getModel().getMemberName())) |
| | | .ge(Objects.nonNull(pageWrap.getModel().getQueryStartTime()), CarUseBook::getPlanUseDate,pageWrap.getModel().getQueryStartTime()) |
| | | .le(Objects.nonNull(pageWrap.getModel().getQueryEndTime()),CarUseBook::getPlanUseDate,pageWrap.getModel().getQueryEndTime()) |
| | | .ge(Objects.nonNull(pageWrap.getModel().getQueryStartTime()), CarUseBook::getCreateDate,pageWrap.getModel().getQueryStartTime()) |
| | | .le(Objects.nonNull(pageWrap.getModel().getQueryEndTime()),CarUseBook::getCreateDate,pageWrap.getModel().getQueryEndTime()) |
| | | .orderByDesc(Visits::getCreateDate) |
| | | ; |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(carUseBookMapper.selectJoinPage(page, CarUseBook.class, queryWrapper)); |
| | | PageData<CarUseBook> result =PageData.from(carUseBookMapper.selectJoinPage(page, CarUseBook.class, queryWrapper)); |
| | | if(result!=null && result.getRecords()!=null){ |
| | | for(CarUseBook carUseBook:result.getRecords()){ |
| | | carUseBook.setHasRole(getHasBackRoleBiz(carUseBook,pageWrap.getModel().getLoginUserInfo())); |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | |
| | | .selectAs(Member::getName,CarUseBook::getMemberName) |
| | | .selectAs(Member::getPhone,CarUseBook::getMemberMobile) |
| | | .leftJoin(Member.class,Member::getId,CarUseBook::getMemberId) |
| | | .eq(CarUseBook::getIsdeleted,Constants.ZERO) |
| | | .eq(CarUseBook::getCarId,carUseBook.getCarId()) |
| | | .in(CarUseBook::getStatus,0,1,2) |
| | | .apply(" ( " + |
| | |
| | | @Override |
| | | public void revoke(Integer id, String info, LoginUserInfo loginUserInfo){ |
| | | CarUseBook carUseBook = carUseBookMapper.selectById(id); |
| | | if(Objects.isNull(carUseBook)){ |
| | | if(Objects.isNull(carUseBook) || Constants.equalsInteger(carUseBook.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到用车申请信息"); |
| | | } |
| | | if(getHasBackRoleBiz(carUseBook,loginUserInfo) == Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,无权限行撤销操作!"); |
| | | } |
| | | carUseBook.setCancelInfo(info); |
| | | carUseBook.setCancelTime(new Date()); |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询当前登陆用户是否具有退回申请的权限 |
| | | * 申请人只能在待审核之前撤销,派车员可以在待审核、审核中、审批通过进行撤销 |
| | | * @param carUseBook |
| | | * @param loginUserInfo |
| | | * @return |
| | | */ |
| | | private int getHasBackRoleBiz(CarUseBook carUseBook, LoginUserInfo loginUserInfo) { |
| | | if(Constants.equalsInteger(carUseBook.getCreator(),loginUserInfo.getId()) |
| | | && Constants.equalsInteger(carUseBook.getStatus(),Constants.ZERO)){ |
| | | //申请人可以撤销自己申请中的申请记录 |
| | | return Constants.ONE; |
| | | } |
| | | if(Constants.equalsInteger(carUseBook.getStatus(),Constants.TWO) && carUseBook.getStartTime()!=null |
| | | && System.currentTimeMillis() >= carUseBook.getStartTime().getTime()){ |
| | | //审批通过,但是 已到发车时间,不可以撤销 |
| | | return Constants.ZERO; |
| | | } |
| | | if(!(Constants.equalsInteger(carUseBook.getStatus(),Constants.ZERO)) |
| | | ||Constants.equalsInteger(carUseBook.getStatus(),Constants.ONE) |
| | | ||Constants.equalsInteger(carUseBook.getStatus(),Constants.TWO)){ |
| | | //审批人可以撤销 自己审批的申请记录 |
| | | Approve approve = approveJoinMapper.selectOne(new QueryWrapper<Approve>().lambda() |
| | | .eq(Approve::getIsdeleted,Constants.ZERO) |
| | | .ge(Approve::getLevel,Constants.ZERO) |
| | | .eq(Approve::getChekorId,loginUserInfo.getId()) |
| | | .eq(Approve::getObjId,carUseBook.getId()) |
| | | .eq(Approve::getObjType,carUseBook.getType()==0?3:4) |
| | | .last("limit 1")); |
| | | if(approve!=null){ |
| | | return Constants.ONE; |
| | | } |
| | | } |
| | | return Constants.ZERO; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | Date date = new Date(); |
| | | //删除已授权下发的包期授权 |
| | | dealCancelBookBiz(car.getCode(),date); |
| | | Cars model = new Cars(); |
| | | model.setEditDate(date); |
| | | model.setEdirot(user.getId()); |
| | | model.setId(id); |
| | | model.setIsdeleted(Constants.ONE); |
| | | dealCancelBookBiz(car.getCode(),date,parkBookJoinMapper); |
| | | // Cars model = new Cars(); |
| | | // model.setEditDate(date); |
| | | // model.setEdirot(user.getId()); |
| | | // model.setId(id); |
| | | // model.setIsdeleted(Constants.ONE); |
| | | carsMapper.update(null,new UpdateWrapper<Cars>().lambda() |
| | | .eq(Cars::getId,model.getId()) |
| | | .eq(Cars::getId,id) |
| | | .set(Cars::getStartTime,null) |
| | | .set(Cars::getEndTime,null) |
| | | .set(Cars::getAuthTimeType,null) |
| | | .set(Cars::getAuthStatus,Constants.ZERO) |
| | | .set(Cars::getIsdeleted,Constants.ONE) |
| | | .set(Cars::getEditDate,model.getEditDate()) |
| | | .set(Cars::getEdirot,model.getEdirot()) |
| | | .set(Cars::getEditDate,date) |
| | | .set(Cars::getEdirot,user.getId()) |
| | | ); |
| | | carsMapper.updateById(model); |
| | | // carsMapper.updateById(model); |
| | | } |
| | | public boolean dealCancelBookBiz(String code,Date date){ |
| | | public static boolean dealCancelBookBiz(String code,Date date,ParkBookMapper parkBookJoinMapper){ |
| | | |
| | | List<ParkBook> parkBooks = parkBookJoinMapper.selectJoinList(ParkBook.class,new MPJLambdaWrapper<ParkBook>() |
| | | .selectAll(ParkBook.class ) |
| | |
| | | model.setHkStatus(Constants.ZERO); |
| | | model.setRemark(""); |
| | | model.setAuthStatus(Constants.ZERO); |
| | | dealCancelBookBiz(car.getCode(),model.getEditDate()); |
| | | dealCancelBookBiz(car.getCode(),model.getEditDate(),parkBookJoinMapper); |
| | | carsMapper.update(null,new UpdateWrapper<Cars>().lambda() |
| | | .eq(Cars::getId,model.getId()) |
| | | .set(Cars::getAuthStatus,Constants.ZERO) |
| | |
| | | .set(Cars::getEditDate,model.getEditDate()) |
| | | .set(Cars::getEdirot,model.getEdirot()) |
| | | .set(Cars::getMemberId,model.getMemberId()) |
| | | .set(Cars::getAuthTimeType,null) |
| | | .set(Cars::getStartTime,null) |
| | | .set(Cars::getEndTime,null) |
| | | ); |
| | |
| | | if(loginUserInfo == null){ |
| | | loginUserInfo = model.getLoginUserInfo(); |
| | | } |
| | | if(hiddenDangerParamMapper.selectCount(new QueryWrapper<HiddenDangerParam>().lambda() |
| | | /* if(hiddenDangerParamMapper.selectCount(new QueryWrapper<HiddenDangerParam>().lambda() |
| | | .eq(HiddenDangerParam::getType,model.getType()) |
| | | .eq(HiddenDangerParam::getName,model.getName()) |
| | | .eq(HiddenDangerParam::getIsdeleted,Constants.ZERO) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该名称已存在!"); |
| | | } |
| | | }*/ |
| | | if(Constants.equalsInteger(model.getType(),Constants.ZERO)){ |
| | | //如果是区域配置 |
| | | if(model.getCompanyId() == null){ |
| | |
| | | if(hiddenDangerParam == null || Constants.equalsInteger(hiddenDangerParam.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,该配置信息不存在,请返回刷新页面重试!"); |
| | | } |
| | | if(hiddenDangerParamMapper.selectCount(new QueryWrapper<HiddenDangerParam>().lambda() |
| | | /* if(hiddenDangerParamMapper.selectCount(new QueryWrapper<HiddenDangerParam>().lambda() |
| | | .eq(HiddenDangerParam::getType,model.getType()) |
| | | .eq(HiddenDangerParam::getName,model.getName()) |
| | | .eq(HiddenDangerParam::getIsdeleted,Constants.ZERO) |
| | | .ne(HiddenDangerParam::getId,model.getId()) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该名称已存在!"); |
| | | } |
| | | }*/ |
| | | if(Constants.equalsInteger(hiddenDangerParam.getType(),Constants.ZERO)){ |
| | | //如果是区域配置,校验安全员信息是否正确 |
| | | if(model.getCompanyId() == null){ |
| | |
| | | .leftJoin("company t4 on t1.company_id=t4.id") |
| | | .leftJoin("company t5 on t2.company_id=t5.id"); |
| | | queryWrapper |
| | | .eq(HiddenDanger::getId, id).last("limit 1"); |
| | | .eq(HiddenDanger::getId, id) |
| | | .eq(HiddenDanger::getIsdeleted, Constants.ZERO) |
| | | .last("limit 1"); |
| | | |
| | | HiddenDanger model = hiddenDangerMapper.selectJoinOne(HiddenDanger.class,queryWrapper); |
| | | if(model ==null || Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){ |
| | |
| | | if(userInfo!=null && userInfo.getCompanyIdList()!=null){ |
| | | if( userInfo.getCompanyIdList().size() ==0){ |
| | | //只能看自己 |
| | | queryWrapper.eq(HiddenDanger::getCreator,userInfo.getId()); |
| | | queryWrapper.and(w->{ |
| | | w.eq(HiddenDanger::getCreator,userInfo.getId()).or(). |
| | | eq(HiddenDanger::getCheckUserId,userInfo.getId()); |
| | | }); |
| | | }else{ |
| | | queryWrapper.in("t1.company_id" ,userInfo.getCompanyIdList()); |
| | | } |
| | |
| | | hiddenDanger.setCheckDate(hiddenDanger.getEditDate()); |
| | | hiddenDangerMapper.updateById(hiddenDanger); |
| | | HiddenDanger model = hiddenDangerMapper.selectById(hiddenDanger.getId()); |
| | | if(Objects.isNull(model) ||Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY ); |
| | | } |
| | | HiddenDangerParam hiddenDangerCate = hiddenDangerParamMapper.selectById(model.getCateId()); |
| | | if(Objects.isNull(hiddenDangerCate)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到隐患类型"); |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | HiddenDanger model = hiddenDangerMapper.selectById(hiddenDanger.getId()); |
| | | if(Objects.isNull(model)){ |
| | | if(Objects.isNull(model) ||Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到隐患数据"); |
| | | } |
| | | if (!model.getStatus().equals(Constants.ZERO)) { |
| | |
| | | .selectAll(HiddenDanger.class) |
| | | .selectAs(Member::getName,HiddenDanger::getCheckorName) |
| | | .leftJoin(Member.class,Member::getId,HiddenDanger::getCheckUserId) |
| | | .eq(HiddenDanger::getId,hiddenDanger.getId())); |
| | | if(Objects.isNull(model)){ |
| | | .eq(HiddenDanger::getId,hiddenDanger.getId()) |
| | | ); |
| | | if(Objects.isNull(model) ||Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到隐患数据"); |
| | | } |
| | | if (!Constants.equalsInteger(model.getStatus(),Constants.ZERO)) { |
| | |
| | | private TmsService tmsService; |
| | | @Autowired |
| | | private SystemUserMapper systemUserMapper; |
| | | @Autowired |
| | | private CarsMapper carsMapper; |
| | | @Autowired |
| | | private ParkBookMapper parkBookMapper; |
| | | |
| | | @Autowired |
| | | @Lazy |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public void deleteById(Integer id,LoginUserInfo loginUserInfo) { |
| | | |
| | | Date date =new Date(); |
| | | Member member=new Member(); |
| | | member.setId(id); |
| | | member.setIsdeleted(Constants.ONE); |
| | | member.setEditor(loginUserInfo.getId()); |
| | | member.setEditDate(new Date()); |
| | | member.setEditDate(date); |
| | | member.setHkStatus(Constants.ZERO); |
| | | member.setRemark("人员已删除,等待删除门禁权限"); |
| | | memberMapper.updateById(member); |
| | |
| | | .set(SystemUser::getUpdateUser,member.getEditor()) |
| | | .set(SystemUser::getUpdateTime,member.getEditDate()) |
| | | ); |
| | | |
| | | saveUserActionBiz(member,loginUserInfo,Constants.UserActionType.DELETE,userActionJoinMapper,JSONObject.toJSONString(member)); |
| | | List<Cars> carsList = carsMapper.selectList(new QueryWrapper<Cars>().lambda() |
| | | .eq(Cars::getMemberId,member.getId()) |
| | | .eq(Cars::getIsdeleted,Constants.ONE) |
| | | .eq(Cars::getAuthStatus,Constants.ONE)//已授权包期的车辆 |
| | | ); |
| | | if ((carsMapper!=null && carsList.size()>0)){ |
| | | for(Cars car :carsList){ |
| | | if(Constants.equalsInteger(car.getAuthStatus(),Constants.ZERO)){ |
| | | Cars model = new Cars(); |
| | | carsMapper.update(null,new UpdateWrapper<Cars>().lambda() |
| | | .eq(Cars::getId,car.getId()) |
| | | .set(Cars::getStartTime,null) |
| | | .set(Cars::getEndTime,null) |
| | | .set(Cars::getAuthTimeType,null) |
| | | .set(Cars::getAuthStatus,Constants.ZERO) |
| | | .set(Cars::getEditDate,model.getEditDate()) |
| | | .set(Cars::getEdirot,model.getEdirot()) |
| | | ); |
| | | //删除已授权下发的包期授权 |
| | | CarsServiceImpl.dealCancelBookBiz(car.getCode(),date,parkBookMapper); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | String[] params = new String[3]; |
| | | params[0] = user.getRealname(); |
| | | params[1]=DateUtil.getPlusTime2(date); |
| | | params[2]=model.getContractNum()+"-【司机:"+model.getDriverName()+" "+model.getDriverPhone()+"】-【车牌好: "+model.getPlateNum()+"】"; |
| | | params[2]="【合同号:"+model.getContractNum()+"】-【司机:"+model.getDriverName()+" "+model.getDriverPhone()+"】-【车牌好: "+model.getPlateNum()+"】"; |
| | | //记录删除日志 |
| | | UserActionServiceImpl.saveUserActionBiz(user,id,Constants.UserActionType.PLATFROM_BOOK_DEL,userActionMapper,date,params, JSONObject.toJSONString(model)); |
| | | } |
| | |
| | | public PageData<PlatformBooks> findPage(PageWrap<PlatformBooks> pageWrap) { |
| | | IPage<PlatformBooks> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<PlatformBooks> queryWrapper = new QueryWrapper<>(); |
| | | pageWrap.getModel().setIsdeleted(Constants.ZERO); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper.lambda() |
| | | .eq(pageWrap.getModel().getId() != null, PlatformBooks::getId, pageWrap.getModel().getId()) |
| | |
| | | List<PlatformBooks> platformBooksList = platformBooksMapper.selectList(new QueryWrapper<PlatformBooks>().lambda() |
| | | .eq(PlatformBooks::getReasonId,platformBooksCheckNumDTO.getReasonId()) |
| | | .ne(PlatformBooks::getStatus,Constants.THREE) |
| | | .eq(PlatformBooks::getIsdeleted,Constants.ZERO) |
| | | .like(PlatformBooks::getCreateDate, DateUtil.getDate(platformBooksCheckNumDTO.getArriveDate(),"yyyy-MM-dd")) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformBooksList)){ |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"["+platformBooksApplyDTO.getCarCodeFront()+"]属于内部车辆,无法预约"); |
| | | }; |
| | | PlatformBooks platformBooks = platformBooksMapper.selectById(platformBooksApplyDTO.getId()); |
| | | if(Objects.isNull(platformBooks)){ |
| | | if(Objects.isNull(platformBooks)||Constants.equalsInteger(platformBooks.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformBooks.getStatus(),Constants.ZERO)){ |
| | |
| | | @Override |
| | | public PlatformBooks getDetail(Integer id,Integer memberId){ |
| | | PlatformBooks model = platformBooksMapper.selectById(id); |
| | | if(Objects.isNull(model)){ |
| | | if(Objects.isNull(model)||Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到预约记录"); |
| | | } |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() + |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformBooks model = platformBooksMapper.selectById(revokeDTO.getId()); |
| | | if(Objects.isNull(model)){ |
| | | if(Objects.isNull(model)||Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到预约记录"); |
| | | } |
| | | if(!(Constants.equalsInteger(model.getStatus(),Constants.ZERO)||Constants.equalsInteger(model.getStatus(),Constants.ONE))){ |
| | |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() + |
| | | systemDictDataBiz.queryByCode(Constants.FTP,Constants.PLATFORM_EVENT_IMG).getCode(); |
| | | for(PlatformEvent model : result.getRecords()){ |
| | | if(StringUtils.isNotBlank(model.getPlateNo())){ |
| | | model.setPlateNo(model.getPlateNo().replace("蓝", "").replace("黄", "")); |
| | | } |
| | | if(StringUtils.isNotBlank(model.getBackgroundImageDown())){ |
| | | model.setBackgroundImageDown(prefixUrl + model.getBackgroundImageDown()); |
| | | } |
| | |
| | | || Constants.equalsInteger(i.getPlatformGroupId(),platform.getGroupId()) |
| | | ).collect(Collectors.toList()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformJobs)){ |
| | | for(PlatformJob i :platformJobList){ |
| | | if(Constants.equalsInteger(i.getOrigin(),Constants.ZERO)){ |
| | | i.setWmsContractNum(i.getContractNum()); |
| | | } |
| | | } |
| | | platformWorkVO.setWorkNum( |
| | | platformJobs.stream().filter(i->Constants.equalsInteger(i.getPlatformId(),platform.getId()) && Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())).collect(Collectors.toList()).size() |
| | | ); |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | |
| | | String[] params = new String[3]; |
| | | params[0] = user.getRealname(); |
| | | params[1]=DateUtil.getPlusTime2(date); |
| | | params[2]=job.getBillCode()+"-【司机:"+job.getDriverName()+" "+job.getDrivierPhone()+"】-【车牌号:"+job.getCarCodeFront()+"】"; |
| | | params[2]="【运单号:"+job.getBillCode()+"】-【司机:"+job.getDriverName()+" "+job.getDrivierPhone()+"】-【车牌号:"+job.getCarCodeFront()+"】"; |
| | | //记录删除日志 |
| | | UserActionServiceImpl.saveUserActionBiz(user,id,Constants.UserActionType.PLATFROM_JOB_DEL,userActionMapper,date,params,JSONObject.toJSONString(job)); |
| | | } |
| | |
| | | .selectAs(Platform::getName,PlatformJob::getPlatformName) |
| | | .selectAs(Platform::getWorkRate,PlatformJob::getWorkRate) |
| | | .selectAs(PlatformWmsJob::getCarrierName,PlatformJob::getCarrierName) |
| | | .select(" case when t.total_num is null then ( select sum(pwd.IO_QTY) from platform_wms_detail pwd where pwd.JOB_ID = t.id ) else t.total_num end ioQty ") |
| | | .select(" (select GROUP_CONCAT(distinct(tt.contract_num )) from platform_wms_detail tt where tt.isdeleted=0 and tt.contract_num is not null and tt.job_id=t.id )as wmsContractNum") |
| | | // .select(" case when t.total_num is null then ( select sum(pwd.IO_QTY) from platform_wms_detail pwd where pwd.JOB_ID = t.id ) else t.total_num end ioQty ") |
| | | .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId) |
| | | .leftJoin(PlatformWmsJob.class,PlatformWmsJob::getCarryBillCode,PlatformJob::getBillCode) |
| | | .leftJoin(PlatformBooks.class,PlatformBooks::getJobId,PlatformJob::getId) |
| | |
| | | IPage<PlatformJob> platformJobIPage = platformJobJoinMapper.selectJoinPage(page,PlatformJob.class,queryWrapper); |
| | | platformJobIPage.getRecords().forEach(i->{ |
| | | i.dealTime(); |
| | | i.setTotalNum(i.getIoQty()); |
| | | if(Constants.equalsInteger(i.getOrigin(),Constants.ZERO)){ |
| | | i.setWmsContractNum(i.getContractNum()); |
| | | } |
| | | // i.setTotalNum(i.getIoQty()); |
| | | // this.getWmsJobData(i); |
| | | // this.queryWaitNum(i); |
| | | }); |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(confirmTaskDTO.getId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.ZERO)){ |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(signInDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | |
| | |
| | | } |
| | | //查询今日最大的签到数 |
| | | List<PlatformJob> signList = platformJobMapper.selectList(new QueryWrapper<PlatformJob>().lambda() |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .apply(" DATE(SIGN_DATE) = DATE(NOW()) and sign_date is not null ")); |
| | | if(CollectionUtils.isEmpty(signList)){ |
| | | platformJob.setSignNum(Constants.ONE); |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobDetailDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){ |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey())){ |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey()) |
| | |
| | | //查询月台任务等待作业数量 |
| | | if(platformJobMapper.selectCount(new QueryWrapper<PlatformJob>().lambda() |
| | | .eq(PlatformJob::getPlatformId,platform.getId()) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey(),Constants.PlatformJobStatus.WORKING.getKey()) |
| | | )>=platform.getWorkingNum()){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"超出月台可同时作业数量["+platform.getWorkingNum()+"辆]"); |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if( !( Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey()) |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())){ |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.CALLED.getKey())){ |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(! (Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey()) |
| | |
| | | if(jobIds.size()>0){ |
| | | List<PlatformJob> list = platformJobMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAll(PlatformJob.class) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey()) |
| | | .in(PlatformJob::getId,jobIds) |
| | | ); |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobOperateDTO.getJobId()); |
| | | if(Objects.isNull(platformJob)){ |
| | | if(Objects.isNull(platformJob)||Constants.equalsInteger(platformJob.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.DONE.getKey())){ |
| | |
| | | PlatformJob platformJob = platformJobMapper.selectOne(new QueryWrapper<PlatformJob>().lambda() |
| | | .eq(PlatformJob::getPlatformId,platformDevice.getPlatformId()) |
| | | .eq(PlatformJob::getCarCodeBack,jobOperateDTO.getCarCodeBack()) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.CALLED.getKey()) |
| | | .last(" limit 1 ") |
| | | ); |
| | |
| | | .select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = "+Constants.PlatformJobLogType.WORKING.getKey()+" order by pl.CREATE_DATE desc limit 1 ) as newStartDate ") |
| | | .select(" ( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = "+Constants.PlatformJobLogType.CALLED.getKey()+" order by pl.CREATE_DATE desc limit 1 ) as newCallDate ") |
| | | .select(" case when t.total_num is null then ( select sum(pwd.IO_QTY) from platform_wms_detail pwd where pwd.JOB_ID = t.id ) else t.total_num end ioQty ") |
| | | .select(" (select GROUP_CONCAT(distinct(tt.contract_num )) from platform_wms_detail tt where tt.isdeleted=0 and tt.contract_num is not null and tt.job_id=t.id )as wmsContractNum") |
| | | .selectAs(Platform::getName,PlatformJob::getPlatformName) |
| | | .selectAs(Platform::getWorkRate,PlatformJob::getWorkRate) |
| | | .selectAs(PlatformWmsJob::getCarrierName,PlatformJob::getCarrierName) |
| | |
| | | ); |
| | | //查询今日完成任务 |
| | | platformOrderNumByDateResponse.setDoneNum( |
| | | platformJobMapper.selectCount(new QueryWrapper<PlatformJob>().lambda() |
| | | platformJobMapper.selectCount(new MPJLambdaWrapper<PlatformJob>() |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .like(PlatformJob::getDoneDate,queryDateStr) |
| | | .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey()) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey() |
| | | ,Constants.PlatformJobStatus.AUTHED_LEAVE.getKey() |
| | | ,Constants.PlatformJobStatus.LEAVED.getKey()) |
| | | ) |
| | | ); |
| | | return platformOrderNumByDateResponse; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<PlatformDataListResponse> platformWorkingDataList(PlatformDataListRequest param){ |
| | |
| | | .selectAs(Platform::getName,PlatformWarnEvent::getPlatformName) |
| | | .selectAs(Platform::getHkId,PlatformWarnEvent::getPlatfromHkId) |
| | | .leftJoin(Platform.class,Platform::getId,PlatformWarnEvent::getPlatformId) |
| | | .orderByDesc(PlatformWarnEvent::getCreateDate) |
| | | .last(" limit 20 ") |
| | | ); |
| | | List<PlatformWarnEventListResponse> list = new ArrayList<PlatformWarnEventListResponse>(); |
| | |
| | | List<WmsJobContractVO> wmsJobContractVOList = new ArrayList<>(); |
| | | for (String ioCode:ioCodeSet) { |
| | | if(StringUtils.isBlank(ioCode)){ |
| | | continue; |
| | | // continue; |
| | | } |
| | | WmsJobContractVO wmsJobContractVO = new WmsJobContractVO(); |
| | | wmsJobContractVO.setContractCode(ioCode); |
| | |
| | | for (Retention obj:retentionInfo.getRecords()) { |
| | | RetentionVo vo = new RetentionVo(); |
| | | vo.setCompanyName(obj.getCompanyName()); |
| | | vo.setTypeName(Constants.Status.COMPANY_TYPE_FK.getDes()); |
| | | if(null != obj.getType()) { |
| | | if(Constants.ZERO == obj.getType()){ |
| | | vo.setTypeName(Constants.Status.LW_FK.getDes()); |
| | | }else if(Constants.ONE == obj.getType()) { |
| | | vo.setTypeName(Constants.Status.PT_FK.getDes()); |
| | | }else { |
| | | vo.setTypeName(Constants.Status.NB_FK.getDes()); |
| | | if(Constants.ZERO == obj.getCompanyType()){ |
| | | vo.setTypeName(Constants.Status.COMPANY_TYPE_REL.getDes()); |
| | | }else if(Constants.ONE == obj.getCompanyType()) { |
| | | vo.setTypeName(Constants.Status.COMPANY_TYPE_INTERNAL.getDes()); |
| | | } |
| | | }else { |
| | | vo.setTypeName(""); |
| | | } |
| | | vo.setName(obj.getName()); |
| | | vo.setPhone(obj.getPhone()); |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"审批记录已处理!"); |
| | | } |
| | | Visits visits = visitsMapper.selectById(approve.getObjId()); |
| | | if(Objects.isNull(visits)){ |
| | | if(Objects.isNull(visits)||Constants.equalsInteger(visits.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!auditApproveDTO.getMemberId().equals(approve.getChekorId())){ |
| | |
| | | } |
| | | //根据手机号和身份证号码查询 当前预约的时间是否与其他预约记录有冲突 |
| | | if (visitsMapper.selectCount(new QueryWrapper<Visits>().lambda() |
| | | .eq(Visits::getIsdeleted,Constants.ZERO) |
| | | .notIn(Visits::getStatus,Constants.VisitStatus.cancel |
| | | ,Constants.VisitStatus.noPass |
| | | ,Constants.VisitStatus.xfFail |
| | |
| | | */ |
| | | private void isExsitNoOutVisisRecord(Member member) { |
| | | Visits v = visitsMapper.selectOne(new QueryWrapper<Visits>().lambda() |
| | | .eq(Visits::getIsdeleted,Constants.ZERO) |
| | | .eq(Visits::getPhone, member.getPhone()) |
| | | .eq(Visits::getStatus,Constants.VisitStatus.xfSuccess) |
| | | .last(" limit 1" ) |
| | |
| | | params[0] = user.getRealname(); |
| | | params[1]=DateUtil.getPlusTime2(date); |
| | | if(Constants.equalsInteger(model.getType(),Constants.TWO)){ |
| | | params[2]=model.getCarNos()+"-【单位:"+model.getCompanyName()+" "+model.getName()+" "+model.getPhone()+"】-【时间:"+DateUtil.getPlusTime2(model.getStarttime())+"-"+DateUtil.getPlusTime2(model.getEndtime())+"】"; |
| | | params[2]="【车牌号:"+model.getCarNos()+"】-【单位:"+model.getCompanyName()+" "+model.getName()+" "+model.getPhone()+"】-【时间:"+DateUtil.getPlusTime2(model.getStarttime())+"-"+DateUtil.getPlusTime2(model.getEndtime())+"】"; |
| | | //记录删除访客报备日志 |
| | | UserActionServiceImpl.saveUserActionBiz(user,id,Constants.UserActionType.VISIT_DEL,userActionMapper,date,params, JSONObject.toJSONString(model)); |
| | | UserActionServiceImpl.saveUserActionBiz(user,id,Constants.UserActionType.VISIT_CAR_DEL,userActionMapper,date,params, JSONObject.toJSONString(model)); |
| | | }else{ |
| | | params[2]=model.getCompanyName()+"-【访客:"+model.getName()+" "+model.getPhone()+"】-【时间:"+DateUtil.getPlusTime2(model.getStarttime())+"-"+DateUtil.getPlusTime2(model.getEndtime())+"】"; |
| | | params[2]="【单位:"+model.getCompanyName()+"】-【访客:"+model.getName()+" "+model.getPhone()+"】-【时间:"+DateUtil.getPlusTime2(model.getStarttime())+"-"+DateUtil.getPlusTime2(model.getEndtime())+"】"; |
| | | //记录删除访客申请日志 |
| | | UserActionServiceImpl.saveUserActionBiz(user,id,Constants.UserActionType.VISIT_DEL,userActionMapper,date,params, JSONObject.toJSONString(model)); |
| | | } |
| | |
| | | |
| | | |
| | | } |
| | | @Override |
| | | public void visitNoCheckCancel(){ |
| | | List<Visits> visitsList = visitsMapper.selectList(new QueryWrapper<Visits>().lambda() |
| | | .eq(Visits::getIsdeleted,Constants.ONE) |
| | | .eq(Visits::getStatus,Constants.VisitStatus.waitCheck) |
| | | .apply(" now() >= ENDTIME ") |
| | | ); |
| | | if(visitsList!=null){ |
| | | Date date =new Date(); |
| | | for(Visits s :visitsList){ |
| | | visitsMapper.update(null,new UpdateWrapper<Visits>().lambda() |
| | | .set(Visits::getIsdeleted,Constants.VisitStatus.cancel) |
| | | .set(Visits::getEditDate,date) |
| | | .set(Visits::getRemark,"预约截止时间已过未审批,系统自动取消") |
| | | .eq(Visits::getId,s.getId())); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.web.reqeust.SavePlatformWarnEventDTO; |
| | | import com.doumee.service.business.impl.PlatformWarnEventServiceImpl; |
| | | import com.doumee.service.business.third.TmsService; |
| | | import com.doumee.service.business.third.model.request.TmsOrderInfoRequest; |
| | | import com.doumee.service.business.third.model.response.TmsOrderInfoResponse; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | 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.transaction.annotation.Transactional; |
| | |
| | | private PlatformBroadcastLogMapper platformBroadcastLogMapper; |
| | | @Autowired |
| | | private PlatformJobMapper platformJobMapper; |
| | | @Autowired |
| | | private TmsService tmsService; |
| | | @Autowired |
| | | private PlatformWmsDetailMapper platformWmsDetailMapper; |
| | | @Autowired |
| | |
| | | Constants.PlatformJobStatus.TRANSFERING.getKey(), |
| | | Constants.PlatformJobStatus.EXCEPTION.getKey() |
| | | ) |
| | | )==Constants.ZERO){ |
| | | )==Constants.ZERO){//如果没进行中任务 |
| | | PlatformJob platformJob = platformJobMapper.selectOne(new QueryWrapper<PlatformJob>().lambda() |
| | | .eq(PlatformJob::getCarCodeFront,event.getPlateNos()) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | |
| | | .last(" limit 1") |
| | | ); |
| | | if(Objects.nonNull(platformJob)){ |
| | | platformJob.setStatus(Constants.PlatformJobStatus.WAIT_CALL.getKey()); |
| | | platformJob.setArriveDate(new Date()); |
| | | platformJob.setSingType(Constants.TWO); |
| | | platformJob.setSignDate(new Date()); |
| | | List<PlatformJob> signList = platformJobMapper.selectList(new QueryWrapper<PlatformJob>().lambda().apply(" DATE(SIGN_DATE) = DATE(NOW()) and sign_date is not null ")); |
| | | if(CollectionUtils.isEmpty(signList)){ |
| | | platformJob.setSignNum(Constants.ONE); |
| | | } else{ |
| | | int maxNumber = Collections.max(signList.stream().map(i->i.getSignNum()).collect(Collectors.toList())); |
| | | platformJob.setSignNum(maxNumber + Constants.ONE); |
| | | if(Constants.equalsInteger(platformJob.getType(),Constants.ONE)){ |
| | | //如果是自有车装货自动签到 |
| | | jobAutoSignBiz(platformJob); |
| | | }else if(Constants.equalsInteger(platformJob.getType(),Constants.ZERO)){ |
| | | //如果是自有车卸货 查询TMS合同状态,决定是否自动签到 |
| | | checkTmsContractStatusBiz(platformJob); |
| | | } |
| | | platformJobMapper.updateById(platformJob); |
| | | |
| | | } |
| | | } |
| | | }; |
| | |
| | | return event; |
| | | } |
| | | |
| | | /** |
| | | * ;如果是卸货任务,需要通过TMS提供的“2.2合同列表接口”接口查询车辆对应的合同状态是否为在途状态(对应orderStatus值为3/4/5/6), |
| | | * 如果是自动签到,否则不自动签到;如果一个车辆对应多个合同号,则取运单下任一合同查询对应在途信息 |
| | | * @param platformJob |
| | | */ |
| | | private void checkTmsContractStatusBiz(PlatformJob platformJob) { |
| | | PlatformWmsDetail detail = platformWmsDetailMapper.selectOne(new QueryWrapper<PlatformWmsDetail>().lambda() |
| | | .eq(PlatformWmsDetail::getIsdeleted, Constants.ZERO) |
| | | .eq(PlatformWmsDetail::getJobId, platformJob.getId()) |
| | | .isNotNull(PlatformWmsDetail::getContractNum) |
| | | .last("limit 1") |
| | | ); |
| | | if(detail!=null && StringUtils.isNotBlank(detail.getContractNum())){ |
| | | TmsOrderInfoRequest param = new TmsOrderInfoRequest(); |
| | | param.setContractNumber(detail.getContractNum()); |
| | | TmsOrderInfoResponse response = tmsService.orderInfo(param); |
| | | if(response!=null &&( StringUtils.equals(response.getOrderStatus(),"3") ) |
| | | ||StringUtils.equals(response.getOrderStatus(),"4") |
| | | ||StringUtils.equals(response.getOrderStatus(),"5") |
| | | ||StringUtils.equals(response.getOrderStatus(),"6")){ |
| | | //如果合同在途,则自动签到 |
| | | jobAutoSignBiz(platformJob); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | private void jobAutoSignBiz(PlatformJob platformJob) { |
| | | platformJob.setStatus(Constants.PlatformJobStatus.WAIT_CALL.getKey()); |
| | | platformJob.setArriveDate(new Date()); |
| | | platformJob.setSingType(Constants.TWO); |
| | | platformJob.setSignDate(new Date()); |
| | | List<PlatformJob> signList = platformJobMapper.selectList(new QueryWrapper<PlatformJob>().lambda().apply(" DATE(SIGN_DATE) = DATE(NOW()) and sign_date is not null ")); |
| | | if(CollectionUtils.isEmpty(signList)){ |
| | | platformJob.setSignNum(Constants.ONE); |
| | | } else{ |
| | | int maxNumber = Collections.max(signList.stream().map(i->i.getSignNum()).collect(Collectors.toList())); |
| | | platformJob.setSignNum(maxNumber + Constants.ONE); |
| | | } |
| | | platformJobMapper.updateById(platformJob); |
| | | } |
| | | |
| | | private Retention getRetentionModelByParkRequest(EventParkInfoRequest request,CarEvent event) { |
| | | Retention retention = new Retention(); |
| | | retention.setIsdeleted(Constants.ZERO); |
| | |
| | | import com.doumee.core.utils.DESUtil; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.ImageBase64Util; |
| | | import com.doumee.core.wx.wxPlat.WxPlatConstants; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.business.DeviceRoleMapper; |
| | | import com.doumee.dao.business.RetentionMapper; |
| | | import com.doumee.dao.business.WxNoticeConfigMapper; |
| | | import com.doumee.dao.business.join.VisitsJoinMapper; |
| | | import com.doumee.dao.business.model.DeviceRole; |
| | | import com.doumee.dao.business.model.Member; |
| | |
| | | public class HkSyncVisitServiceImpl extends HkSyncBaseServiceImpl { |
| | | @Autowired |
| | | private VisitsJoinMapper visitsMapper; |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private WxPlatNotice wxPlatNotice; |
| | | @Autowired |
| | | private WxNoticeConfigMapper wxNoticeConfigMapper; |
| | | @Autowired |
| | | private RetentionMapper retentionMapper; |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @Autowired |
| | | private DeviceRoleMapper deviceRoleMapper; |
| | | @Autowired |
| | | private WxPlatNotice wxPlatNotice; |
| | | /** |
| | | * 同步海康访客信息是否已签离状态 |
| | | */ |
| | |
| | | // getUpdateModelByResponse(c,date,roleList,path); |
| | | getUpdateModelByResponseIccm(c,date,roleList,path); |
| | | visitsMapper.updateById(c); |
| | | //给申请人发送微信公众号 下发权限失败 |
| | | if(StringUtils.isNotBlank(c.getOpenid()) && Constants.equalsInteger(c.getStatus(),Constants.VisitStatus.xfFail)){ |
| | | wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz, |
| | | wxNoticeConfigMapper,c, WxPlatConstants.visitContent.visitApplyHkFail, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), |
| | | Arrays.asList(c.getOpenid().split(",")) |
| | | ); |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | if(details.size()>0){ |
| | | platformWmsDetailMapper.insert(details); |
| | | } |
| | | if(jobList.size()>0){ |
| | | list.setJobIdList(jobIdList); |
| | | if(jobList.size()>0){ |
| | | startEndNoticeToDriver(jobList); |
| | | } |
| | | }catch (Exception e){ |
| | |
| | | job.setContractNum(param.getContractNum()); |
| | | job.setDriverPhone(param.getDriverPhone()); |
| | | job.setDriverName(param.getDriverName()); |
| | | // job.setOrigin(Constants.ONE); |
| | | platformWmsJobMapper.insert(job); |
| | | } |
| | | jobIdList.add(job.getId()); |
| | |
| | | if(details.size()>0){ |
| | | platformWmsDetailMapper.insert(details); |
| | | } |
| | | if(jobList.size()>0){ |
| | | list.setJobIdList(jobIdList); |
| | | if(jobList.size()>0){ |
| | | startEndNoticeToDriver(jobList); |
| | | } |
| | | }catch (Exception e){ |
| | |
| | | .eq(PlatformWmsDetail::getIsdeleted, Constants.ZERO)); |
| | | if(details!=null && details.size()>0){ |
| | | for(PlatformWmsDetail d :details){ |
| | | num.add(Constants.formatBigdecimal(d.getIoQty())); |
| | | num = num.add(Constants.formatBigdecimal(d.getIoQty())); |
| | | } |
| | | |
| | | } |
| | | platformJobMapper.update(null,new UpdateWrapper<PlatformJob>().lambda() |
| | | .set(PlatformJob::getTotalNum,num) |
| | | .eq(PlatformJob::getOrigin, Constants.ZERO) |
| | | .eq(PlatformJob::getOrigin, Constants.ONE) |
| | | .eq(PlatformJob::getId, jobId)); |
| | | } |
| | | |
| | | } |
| | | } |
| | | /** |