Merge remote-tracking branch 'origin/master'
| | |
| | | .DS_Store |
| | | coderd.json |
| | | node_modules |
| | | uni_modules |
| | | .env.development |
| | | uview-ui |
| | | |
| | |
| | | } |
| | | |
| | | .placeholder9 { |
| | | color: #999999; |
| | | color: #999999 !important; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | |
| | | width: 64rpx; |
| | | height: 64rpx; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | margin-right: 20rpx; |
| | | display: flex; |
| | | justify-content: center; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import { http } from '@/utils/service.js' |
| | | |
| | | // 叿ºæ³¨å |
| | | export const driverRegister = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/member/registerDriver', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 叿ºç»å½ |
| | | export const driverLogin = (data) => { |
| | | return http({ |
| | | url: 'loginDriver', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // 叿ºé¦é¡µ |
| | | export const driverHomeData = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/driverPlatform/driverHome', |
| | | method: 'get', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // ç©æµè½¦ å
¥ååå |
| | | export const driverReasonList = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/driverPlatform/platformReasonList', |
| | | method: 'get', |
| | | data |
| | | }) |
| | | } |
| | | // æ¥è¯¢å¯é¢çº¦é |
| | | export const checkSurplusNum = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/driverPlatform/checkSurplusNum', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // ç©æµè½¦é¢çº¦ |
| | | export const driverCarApply = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/driverPlatform/apply', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // ç©æµè½¦æ¤é |
| | | export const driverCarRevoke= (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/driverPlatform/revoke', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // é¢çº¦ è®°å½ |
| | | export const driverApplyRecord = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/driverPlatform/page', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // é¢çº¦ 详æ
|
| | | export const driverApplyDetail = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/web/driverPlatform/getDetail', |
| | | method: 'get', |
| | | data |
| | | }) |
| | | } |
| | |
| | | export * from './visitor' |
| | | export * from './staff' |
| | | export * from './meeting' |
| | | export * from './driver' |
| | | |
| | | |
| | | |
| | |
| | | Vue.prototype.$store = store |
| | | Vue.prototype.$jump = (url) => {uni.navigateTo({url})} |
| | | Vue.prototype.$goBack = () => { uni.navigateBack() } |
| | | Vue.prototype.showToast = (str) => { |
| | | uni.showToast({ |
| | | title: str, |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }) |
| | | } |
| | | Vue.prototype.$eventBus = new Vue() |
| | | Vue.prototype.$onWait = new Promise((resolve) => { |
| | | Vue.prototype.$reslove = resolve |
| | |
| | | } |
| | |
|
| | | }
|
| | | ,{
|
| | | "path" : "pages/driver/forgetPsd",
|
| | | "style" : |
| | | { |
| | | "navigationBarTitleText": "æ¾åå¯ç ", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | }
|
| | | ,{
|
| | | "path" : "pages/staff/task/driver",
|
| | | "style" : |
| | | { |
| | | "navigationBarTitleText": "å
¥å审æ¹", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | }
|
| | | ],
|
| | | "subPackages": [
|
| | | {
|
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="login"> |
| | | <image class="login_bg" src="@/static/login_bg@2x.png" /> |
| | | <image class="login_logo" src="@/static/logo@2x.png" mode="widthFix" /> |
| | | <view class="login_title">宿³°ç©æµæºæ
§ååº</view> |
| | | <view class="login_title">ç©æµè½¦å¸æº</view> |
| | | <view class="login_list"> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_phone@2x.png" mode="widthFix" /> |
| | | <input v-model="form.phone" maxlength="18" placeholder="请è¾å
¥ææºå·" /> |
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/ic_captcha.png" mode="widthFix"></image> |
| | | <input |
| | | v-model="form.validCode" |
| | | placeholder="请è¾å
¥éªè¯ç " |
| | | type="text" |
| | | /> |
| | | <text class="captcha" v-if="countDown == 0" @click="initCaptcha" |
| | | >è·åéªè¯ç </text |
| | | > |
| | | <text class="placeholder9" v-else>{{ countDown }}</text> |
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_password@2x.png" mode="widthFix" /> |
| | | <input |
| | | v-model="form.password" |
| | | type="password" |
| | | placeholder="请è¾å
¥æ°å¯ç " |
| | | /> |
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_password@2x.png" mode="widthFix" /> |
| | | <input |
| | | v-model="form.newPassword" |
| | | type="password" |
| | | placeholder="è¯·åæ¬¡è¾å
¥æ°å¯ç " |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="login_btn"> |
| | | <view class="login_btn_n" @click="onLogin">确认修æ¹</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { resetPassword, sendSms } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: { |
| | | }, |
| | | countDown: 0 |
| | | } |
| | | }, |
| | | |
| | | onLoad() { |
| | | }, |
| | | |
| | | methods: { |
| | | dealChange(e) { |
| | | console.log(e) |
| | | }, |
| | | initCaptcha() { |
| | | if (!this.form.phone) return uni.showToast({ |
| | | title: 'ææºå·ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | sendSms({ phone: this.form.phone }).then(res => { |
| | | this.countDown = 60 |
| | | setInterval(() => { |
| | | if (this.countDown == 0) return |
| | | this.countDown-- |
| | | }, 1000) |
| | | }) |
| | | }, |
| | | |
| | | onLogin() { |
| | | const { form } = this |
| | | if (!form.phone) return uni.showToast({ |
| | | title: 'ææºå·ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.validCode) return uni.showToast({ |
| | | title: 'éªè¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.password) return uni.showToast({ |
| | | title: 'æ°å¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.newPassword) return uni.showToast({ |
| | | title: '确认å¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (form.password != form.newPassword) return uni.showToast({ |
| | | title: '两次è¾å
¥å¯ç ä¸ä¸è´', |
| | | icon: 'none' |
| | | }) |
| | | resetPassword({ |
| | | ...form |
| | | }).then(res => { |
| | | if (res && res.code == 200) { |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: 'å¯ç ä¿®æ¹æå,è¯·éæ°ç»å½', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }) |
| | | }) |
| | | uni.redirectTo({ |
| | | url: "/pages/staffLogin/login" |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .login { |
| | | width: 100%; |
| | | display: flex; |
| | | padding-top: 100rpx; |
| | | box-sizing: border-box; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | background: linear-gradient( |
| | | 180deg, |
| | | rgba(39, 155, 170, 0.2) 0%, |
| | | rgba(39, 155, 170, 0) 100% |
| | | ); |
| | | .login_logo { |
| | | width: 180rpx; |
| | | height: 180rpx; |
| | | margin-bottom: 40rpx; |
| | | } |
| | | .login_bg { |
| | | position: absolute; |
| | | top: 0; |
| | | width: 750rpx; |
| | | } |
| | | .login_title { |
| | | font-size: 44rpx; |
| | | font-weight: 600; |
| | | color: #333333; |
| | | } |
| | | .login_list { |
| | | margin-top: 60rpx; |
| | | width: 100%; |
| | | padding: 0 60rpx; |
| | | box-sizing: border-box; |
| | | .login_list_item { |
| | | width: 100%; |
| | | border-radius: 50rpx; |
| | | height: 98rpx; |
| | | padding: 0 40rpx; |
| | | box-sizing: border-box; |
| | | background: #ffffff; |
| | | margin-bottom: 40rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | &:last-child { |
| | | margin-bottom: 0 !important; |
| | | } |
| | | image { |
| | | flex-shrink: 0; |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | } |
| | | .captcha { |
| | | color: $uni-color-primary; |
| | | } |
| | | input { |
| | | flex: 1; |
| | | height: 100%; |
| | | color: #666666; |
| | | margin-left: 24rpx; |
| | | border: none; |
| | | } |
| | | } |
| | | } |
| | | .login_btn { |
| | | width: 100%; |
| | | padding: 0 60rpx; |
| | | box-sizing: border-box; |
| | | margin-top: 80rpx; |
| | | .for_psd { |
| | | color: $uni-color-primary; |
| | | margin-top: 40rpx; |
| | | width: 140rpx; |
| | | text-align: center; |
| | | margin: 40rpx auto; |
| | | } |
| | | .login_btn_n { |
| | | width: 100%; |
| | | height: 98rpx; |
| | | background: $uni-color-primary; |
| | | box-shadow: 0rpx 12rpx 24rpx 0rpx rgba(39, 155, 170, 0.2); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-weight: 600; |
| | | font-size: 32rpx; |
| | | color: #ffffff; |
| | | border-radius: 50rpx; |
| | | } |
| | | } |
| | | .deal_wrap { |
| | | position: absolute; |
| | | width: 100%; |
| | | left: 0; |
| | | text-align: center; |
| | | bottom: 108rpx; |
| | | .deal { |
| | | color: $uni-color-primary; |
| | | } |
| | | } |
| | | .btns{ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | position: fixed; |
| | | bottom: 60rpx; |
| | | left: 0; |
| | | width: 100%; |
| | | .btn{ |
| | | font-size: 30rpx; |
| | | color: $uni-color-primary; |
| | | } |
| | | .separate{ margin: 0 8rpx; } |
| | | } |
| | | } |
| | | .modal { |
| | | padding: 32rpx; |
| | | } |
| | | </style> |
| | | |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="title_wrap"> |
| | | <view class="name">æææï¼æ¬¢è¿ç»å½ï½</view> |
| | | <view class="name">{{ driverInfo.realname }}ï¼æ¬¢è¿ç»å½ï½</view> |
| | | <view class="btn" @click="loginOut">éåºç»å½</view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="banner_wrap"> |
| | | <view class="h1">宿³°ç©æµæºæ
§ååº</view> |
| | | <view class="h2">ç©æµè½¦ä¸åº</view> |
| | | <image |
| | | class="banner" |
| | | src="../../static/driver/wuliuche_banner@2x.png" |
| | | mode="widthFix" |
| | | ></image> |
| | | <image class="banner" src="../../static/driver/wuliuche_banner@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <!-- --> |
| | | <view class="task_list"> |
| | | <swiper circular class="task_swiper"> |
| | | <swiper-item> |
| | | <view class="item"> |
| | | <view class="head"> |
| | | <view class="name">è¿è¾å222</view> |
| | |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <view class="plate"> |
| | | <image |
| | | src="@/static/driver/wuliu_ic_car@2x.png" |
| | | class="icon" |
| | | mode="" |
| | | ></image> |
| | | <image src="@/static/driver/wuliu_ic_car@2x.png" class="icon" mode=""></image> |
| | | <text>çAD</text> |
| | | </view> |
| | | <view class="plate"> |
| | | <image |
| | | src="@/static/driver/wuliu_ic_huowu@2x.png" |
| | | class="icon" |
| | | mode="" |
| | | ></image> |
| | | <image src="@/static/driver/wuliu_ic_huowu@2x.png" class="icon" mode=""></image> |
| | | <text>3000ä¸</text> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </swiper-item> |
| | | <swiper-item> |
| | | <view class="item"> |
| | | <view class="head"> |
| | | <view class="name">è¿è¾å222</view> |
| | | <view class="status"><view class="text">请ä¸ç°åºç¾å°</view></view> |
| | | </view> |
| | | <view class="content"> |
| | | <view class="info"> |
| | | <view class="plate"> |
| | | <image src="@/static/driver/wuliu_ic_car@2x.png" class="icon" mode=""></image> |
| | | <text>çAD</text> |
| | | </view> |
| | | <view class="plate"> |
| | | <image src="@/static/driver/wuliu_ic_huowu@2x.png" class="icon" mode=""></image> |
| | | <text>3000ä¸</text> |
| | | </view> |
| | | </view> |
| | | <view class="sub"> |
| | | <view class="time">02-01 08:11:11</view> |
| | | <view class="sub_btn" @click="handleTask(1)">ç«å³ç¾å°</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </swiper-item> |
| | | </swiper> |
| | | </view> |
| | | <!-- --> |
| | | <view class="title_wrap"><view class="name">ä¸å¡åç</view></view> |
| | | <view class="container1"> |
| | | <view class="left"> |
| | | <view class="img_wrap img1" @click="$jump('/pages/driver/reserved')"> |
| | | <image |
| | | src="@/static/driver/wuliu_ic_ruyuanyuyue@2x.png" |
| | | class="img" |
| | | ></image> |
| | | <image src="@/static/driver/wuliu_ic_ruyuanyuyue@2x.png" class="img"></image> |
| | | <view class="h1">å
¥åé¡»ç¥</view> |
| | | <view class="h2">RESERVATION</view> |
| | | </view> |
| | | <view |
| | | class="img_wrap img2" |
| | | @click="$jump('/pages/driver/reservedGuide')" |
| | | > |
| | | <image |
| | | src="@/static/driver/wuliu_ic_zhinan@2x.png" |
| | | class="img" |
| | | ></image> |
| | | <view class="img_wrap img2" @click="$jump('/pages/driver/reservedGuide?str=bookingTips')"> |
| | | <image src="@/static/driver/wuliu_ic_zhinan@2x.png" class="img"></image> |
| | | <view class="h1">é¢çº¦æå</view> |
| | | <view class="h2">APPOINTMENT GUIDE</view> |
| | | </view> |
| | | </view> |
| | | <view class="right"> |
| | | <view |
| | | class="img_wrap img2" |
| | | @click="$jump('/pages/driver/reservedRecord')" |
| | | > |
| | | <image |
| | | src="@/static/driver/wuliu_ic_yuyuejilu@2x.png" |
| | | class="img" |
| | | ></image> |
| | | <view class="img_wrap img2" @click="$jump('/pages/driver/reservedRecord')"> |
| | | <image src="@/static/driver/wuliu_ic_yuyuejilu@2x.png" class="img"></image> |
| | | <view class="h1">é¢çº¦è®°å½</view> |
| | | <view class="h2">APPOINTMENT RECORD</view> |
| | | </view> |
| | | <view class="img_wrap img2" @click="$jump('/pages/driver/queueUp')"> |
| | | <image |
| | | src="@/static/driver/wuliu_ic_paidui@2x.png" |
| | | class="img" |
| | | ></image> |
| | | <image src="@/static/driver/wuliu_ic_paidui@2x.png" class="img"></image> |
| | | <view class="h1">æå°æéæ
åµ</view> |
| | | <view class="h2">HIDDEN DANGER</view> |
| | | </view> |
| | | <view class="img_wrap img2"> |
| | | <image |
| | | src="@/static/driver/wuliu_ic_daolan@2x.png" |
| | | class="img" |
| | | ></image> |
| | | <view class="img_wrap img2" @click="$jump('/pages/driver/reservedGuide?str=reservationMap')"> |
| | | <image src="@/static/driver/wuliu_ic_daolan@2x.png" class="img"></image> |
| | | <view class="h1">ååºå¯¼è§å¾</view> |
| | | <view class="h2">GUIDE MAP</view> |
| | | </view> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { logoutPost, driverHomeData } from '@/api'; |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | driverInfo: uni.getStorageSync('driverInfo') |
| | | }; |
| | | }, |
| | | created() { |
| | | this.initData(); |
| | | }, |
| | | methods: { |
| | | handleTask() { |
| | | initData() { |
| | | driverHomeData().then(res => { |
| | | if (res.code == 200) { |
| | | uni.setStorageSync('driverGuide', { |
| | | bookingTips: res.data.bookingTips, |
| | | reservationMap: res.data.reservationMap |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | loginOut() { |
| | | this.$store.commit('empty'); |
| | | logoutPost(); |
| | | uni.redirectTo({ |
| | | url: '/pages/driver/login' |
| | | }); |
| | | }, |
| | | handleTask(status) { |
| | | if (status == 1) { |
| | | return uni.navigateTo({ |
| | | url: '/pages/driver/taskDetail' |
| | | }); |
| | | } |
| | | uni.navigateTo({ |
| | | url: '/pages/driver/taskConfirm' |
| | | }) |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | |
| | | } |
| | | .task_list { |
| | | margin-bottom: 48rpx; |
| | | .task_swiper { |
| | | padding: 16rpx 10rpx; |
| | | height: 320rpx; |
| | | width: 730rpx; |
| | | margin-left: -20rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | .item { |
| | | background: #ffffff; |
| | | box-shadow: 0rpx 4rpx 32rpx 0rpx rgba(39, 155, 170, 0.18); |
| | | box-shadow: 0rpx 0rpx 12rpx 0rpx rgba(39, 155, 170, 0.32); |
| | | border-radius: 16rpx; |
| | | height: 280rpx; |
| | | width: 98%; |
| | | margin-left: 1%; |
| | | .head { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | background: linear-gradient(270deg, #fefeff 0%, #e1f7fe 100%); |
| | | padding: 20rpx 30rpx; |
| | | padding: 0rpx 30rpx; |
| | | height: 92rpx; |
| | | .name { |
| | | font-weight: 600; |
| | | font-size: 36rpx; |
| | |
| | | .status { |
| | | color: $uni-color-primary; |
| | | font-weight: 600; |
| | | text-align: right; |
| | | .time { |
| | | font-size: 24rpx; |
| | | font-weight: 360; |
| | |
| | | } |
| | | } |
| | | .content { |
| | | height: 180rpx; |
| | | .info { |
| | | display: flex; |
| | | padding: 24rpx 30rpx; |
| | |
| | | <view class="login_list"> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_phone@2x.png" mode="widthFix" /> |
| | | <input v-model="form.phone" maxlength="18" placeholder="ææºå·" /> |
| | | <input v-model="form.username" maxlength="18" placeholder="ææºå·" /> |
| | | </view> |
| | | <view class="login_list_item"> |
| | | <image src="@/static/login_ic_password@2x.png" mode="widthFix" /> |
| | |
| | | <view class="btns"> |
| | | <view class="btn" @click="handleRegister">ç«å³æ³¨å</view> |
| | | <view class="btn separate"> | </view> |
| | | <view class="btn">å¿è®°å¯ç </view> |
| | | <view class="btn" @click="handleSetPsd">å¿è®°å¯ç </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { resetPassword, sendSms } from '@/api' |
| | | import { driverLogin, loginCaptcha, getUserInfo } from '@/api' |
| | | import { mapState, mapMutations } from 'vuex' |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: { |
| | | username: '13996529050', |
| | | password: '1' |
| | | }, |
| | | isShowProtocol: false, |
| | | countDown: 0 |
| | | } |
| | | }, |
| | | |
| | | onLoad() { |
| | | this.initCaptcha() |
| | | }, |
| | | |
| | | methods: { |
| | | ...mapMutations(["setToken", "setDriverInfo"]), |
| | | handleRegister() { |
| | | uni.navigateTo({ |
| | | url: "/pages/driver/register" |
| | | }) |
| | | }, |
| | | handleSetPsd() { |
| | | uni.navigateTo({ |
| | | url: "/pages/driver/forgetPsd" |
| | | }) |
| | | }, |
| | | dealChange(e) { |
| | | console.log(e) |
| | | }, |
| | | initCaptcha() { |
| | | if (!this.form.phone) return uni.showToast({ |
| | | title: 'ææºå·ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | sendSms({ phone: this.form.phone }).then(res => { |
| | | this.countDown = 60 |
| | | setInterval(() => { |
| | | if (this.countDown == 0) return |
| | | this.countDown-- |
| | | }, 1000) |
| | | loginCaptcha().then(res => { |
| | | this.captcha = res.data |
| | | }) |
| | | }, |
| | | |
| | | onLogin() { |
| | | const { form } = this |
| | | if (!form.phone) return uni.showToast({ |
| | | if (!form.username) return uni.showToast({ |
| | | title: 'ææºå·ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | |
| | | title: 'å¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | resetPassword({ |
| | | ...form |
| | | driverLogin({ |
| | | ...form, |
| | | uuid: this.captcha.uuid, |
| | | code: '1' |
| | | }).then(res => { |
| | | if (res && res.code == 200) { |
| | | if (res.code === 200) { |
| | | this.setToken(res.data) |
| | | getUserInfo().then(ress => { |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: 'å¯ç ä¿®æ¹æå,è¯·éæ°ç»å½', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | this.showToast('ç»å½æå') |
| | | }) |
| | | }) |
| | | this.setDriverInfo(ress.data) |
| | | uni.redirectTo({ |
| | | url: "/pages/staffLogin/login" |
| | | url: "/pages/driver/index" |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { resetPassword, sendSms } from '@/api' |
| | | import { driverRegister, sendSms } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: { |
| | | }, |
| | | form: {}, |
| | | isShowProtocol: false, |
| | | countDown: 0 |
| | | } |
| | |
| | | onLogin() { |
| | | const { form } = this |
| | | if (!form.name) return uni.showToast({ |
| | | title: 'ææºå·å§å', |
| | | title: 'å§åä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | if (!form.phone) return uni.showToast({ |
| | |
| | | title: 'å¯ç ä¸è½ä¸ºç©º', |
| | | icon: 'none' |
| | | }) |
| | | resetPassword({ |
| | | driverRegister({ |
| | | ...form |
| | | }).then(res => { |
| | | if (res && res.code == 200) { |
| | | setTimeout(() => { |
| | | uni.showToast({ |
| | | title: '注åæå,请åå¾ç»å½', |
| | | icon: 'success', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }) |
| | | }) |
| | |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>å
¥ååå </text> |
| | | </view> |
| | | <view class="value" @click="showReason = true"> |
| | | <text class="mr6" :style="{ color: param.inReason ? '#000000' : '#999999' }">{{ param.inReason ? param.inReason : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="16"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ååå·</text> |
| | | </view> |
| | | <view class="value"><input type="text" placeholder="请è¾å
¥æ¨çååå·" v-model="param.receptMemberName" placeholder-style="color: #999999;" /></view> |
| | | <view class="value"><input type="text" placeholder="请è¾å
¥æ¨çååå·" v-model="param.contractNum" placeholder-style="color: #999999;" /></view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="line"> |
| | |
| | | <text>å°åºæ¶é´</text> |
| | | </view> |
| | | <view class="value" @click="showDatetime = true"> |
| | | <text class="mr6" :style="{ color: param.area ? '#000000' : '#999999' }">{{ param.area ? param.area : 'è¯·éæ©' }}</text> |
| | | <text class="mr6" :style="{ color: param.arriveDate ? '#000000' : '#999999' }">{{ param.arriveDate ? param.arriveDate : 'è¯·éæ©' }}</text> |
| | | <u-icon name="arrow-right" color="#CCCCCC" size="16"></u-icon> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | <view class="value"> |
| | | <view class="btns"> |
| | | <view class="btn active">æ´æç</view> |
| | | <view class="btn">ä»¶ç</view> |
| | | <view @click="inTypeClick(0)" :class="{ active: param.inType == 0 }" class="btn">æ´æç</view> |
| | | <view @click="inTypeClick(1)" :class="{ active: param.inType == 1 }" class="btn">ä»¶ç</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <text>æ»è¿è¾é</text> |
| | | </view> |
| | | <view class="value"> |
| | | <input type="text" placeholder="请è¾å
¥æ»è¿è¾é" v-model="param.receptMemberName" placeholder-style="color: #999999;" /> |
| | | <input type="number" placeholder="请è¾å
¥æ»è¿è¾é" v-model="param.totalNum" placeholder-style="color: #999999;" /> |
| | | <text class="unit">䏿¯</text> |
| | | </view> |
| | | </view> |
| | |
| | | <text>*</text> |
| | | <text>åè¿è¯ç
§ç</text> |
| | | </view> |
| | | <view class="value"> |
| | | <view class="upload_wrap"><u-icon name="plus" size="20" color="#999999"></u-icon></view> |
| | | <view class="value" @click="handleUpload"> |
| | | <image v-if="param.transportImgFull" class="upload_wrap" :src="param.transportImgFull" alt=""> |
| | | <view v-else class="upload_wrap"><u-icon name="plus" size="20" color="#999999"></u-icon></view> |
| | | </view> |
| | | </view> |
| | | <view class="empty"></view> |
| | |
| | | <text>*</text> |
| | | <text>叿ºå§å</text> |
| | | </view> |
| | | <view class="value"><input type="text" placeholder="请è¾å
¥æ¨ççå®å§å" v-model="param.receptMemberName" placeholder-style="color: #999999;" /></view> |
| | | <view class="value"><input type="text" placeholder="请è¾å
¥æ¨ççå®å§å" v-model="param.driverName" placeholder-style="color: #999999;" /></view> |
| | | </view> |
| | | <view class="line"> |
| | | <view class="label"> |
| | | <text>*</text> |
| | | <text>ææºå·</text> |
| | | </view> |
| | | <view class="value"><input type="text" placeholder="请è¾å
¥æ¨çææºå·" v-model="param.receptMemberName" placeholder-style="color: #999999;" /></view> |
| | | <view class="value"><input type="number" placeholder="请è¾å
¥æ¨çææºå·" v-model="param.driverPhone" placeholder-style="color: #999999;" /></view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="line"> |
| | |
| | | <text>车åçç
§å·</text> |
| | | </view> |
| | | <view class="value" @click="openInput(1)"> |
| | | <text :style="{ color: param.carNos ? '#000000' : '' }">{{ param.carNos ? param.carNos : '请è¾å
¥è½¦çå·ç ' }}</text> |
| | | <text :style="{ color: param.carCodeFront ? '#000000' : '#999999' }">{{ param.carCodeFront ? param.carCodeFront : '请è¾å
¥è½¦çå·ç ' }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="line"> |
| | |
| | | <text>*</text> |
| | | <text>车åçç
§å·</text> |
| | | </view> |
| | | <view class="value" @click="openInput(1)"> |
| | | <text :style="{ color: param.carNos ? '#000000' : '' }">{{ param.carNos ? param.carNos : '请è¾å
¥è½¦çå·ç ' }}</text> |
| | | <view class="value" @click="openInput(2)"> |
| | | <text :style="{ color: param.carCodeBack ? '#000000' : '#999999' }">{{ param.carCodeBack ? param.carCodeBack : '请è¾å
¥è½¦çå·ç ' }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="copy" @click="copy">å¤å¶è½¦åçç
§å·</view> |
| | | <view class="perch"></view> |
| | | <view class="handle_sub"> |
| | | <view class="handle_sub" @click="onSubmit"> |
| | | æäº¤ |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- --> |
| | | </view> |
| | | <u-picker :show="showReason" keyName="reason" :columns="reasonList" @confirm="reasonConfirm"></u-picker> |
| | | <u-datetime-picker |
| | | :show="showDatetime" |
| | | closeOnClickOverlay |
| | |
| | | |
| | | <script> |
| | | import keyboardInput from '@/components/keyboard-input/keyboard-input.vue'; |
| | | import { uploadUrl } from '@/api'; |
| | | import { uploadUrl, driverCarApply, driverReasonList } from '@/api'; |
| | | import dayjs from 'dayjs' |
| | | export default { |
| | | components: { |
| | | keyboardInput |
| | | }, |
| | | data() { |
| | | return { |
| | | param: {}, |
| | | param: { |
| | | inType: 0, |
| | | driverName: uni.getStorageSync('driverInfo').realname, |
| | | driverPhone: uni.getStorageSync('driverInfo').username, |
| | | }, |
| | | reasonIndex: -1, |
| | | reasonList: [], |
| | | showDatetime: false, |
| | | showReason: false, |
| | | |
| | | inputType: '' |
| | | }; |
| | | }, |
| | | created() { |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | copy(){ |
| | | this.param.carNos = this.param.carNos |
| | | uni.showToast({ |
| | | title: 'å¤å¶æå', |
| | | duration: 1000 |
| | | }); |
| | | onSubmit() { |
| | | const param = { ...this.param } |
| | | if (!param.arriveDate) return this.showToast('è¯·éæ©å°åºæ¶é´') |
| | | if (!param.inType && param.inType != 0) return this.showToast('è¯·éæ©å
¥åºç±»å') |
| | | if (!param.contractNum) return this.showToast('请è¾å
¥ååå·') |
| | | if (!param.totalNum) return this.showToast('请è¾å
¥æ»è¿è¾é') |
| | | if (!param.driverName) return this.showToast('请è¾å
¥å¸æºå§å') |
| | | if (!param.driverPhone) return this.showToast('请è¾å
¥ææºå·') |
| | | if (!param.carCodeFront) return this.showToast('请è¾å
¥è½¦åçå·') |
| | | if (!param.carCodeBack) return this.showToast('请è¾å
¥è½¦åçå·') |
| | | if (!param.transportImgFull) return this.showToast('请ä¸ä¼ åè¿è¯ç
§ç') |
| | | param.arriveDate = param.arriveDate + ':00' |
| | | driverCarApply({...param}).then(res => { |
| | | if(res && res.code === 200){ |
| | | uni.navigateBack() |
| | | } |
| | | }) |
| | | }, |
| | | handleUpload() { |
| | | uni.chooseImage({ |
| | | success: chooseImageRes => { |
| | | uni.showLoading({ title: 'ä¸ä¼ ä¸', mask: true }); |
| | | for (let i = 0; i < chooseImageRes.tempFilePaths.length; i++) { |
| | | uni.uploadFile({ |
| | | url: `${uploadUrl}visitsAdmin/cloudService/web/public/uploadFtp.do`, |
| | | filePath: chooseImageRes.tempFilePaths[i], |
| | | name: 'file', |
| | | formData: { |
| | | folderCode: 'MEMBER_IMG' |
| | | initData(){ |
| | | driverReasonList().then(res => { |
| | | this.reasonList = [res.data] |
| | | }) |
| | | }, |
| | | success: uploadFileRes => { |
| | | console.log('uploadFileRes', uploadFileRes); |
| | | let res = JSON.parse(uploadFileRes.data); |
| | | if (type === 'faceImg') { |
| | | this.param.faceImg = res.data.halfPath; |
| | | this.param.faceImgUrl = res.data.prefixPath + res.data.folder + res.data.halfPath; |
| | | } else { |
| | | this.param.imgurl = res.data.halfPath; |
| | | this.param.imgurlUrl = res.data.prefixPath + res.data.folder + res.data.halfPath; |
| | | } |
| | | reasonConfirm(e) { |
| | | const reasonList = this.reasonList[0] |
| | | const index = e.indexs[0] |
| | | this.$set(this.param, 'inReason', reasonList[index].reason) |
| | | this.$set(this.param, 'reasonId', reasonList[index].id) |
| | | this.showReason = false |
| | | }, |
| | | complete() { |
| | | if (i === chooseImageRes.tempFilePaths.length - 1) { |
| | | uni.hideLoading(); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | setinDate(e) { |
| | | this.$set(this.param, 'arriveDate', dayjs(e.value).format('YYYY-MM-DD HH:mm')) |
| | | this.showDatetime = false |
| | | }, |
| | | setinDate(e) {}, |
| | | inTypeClick(e) { |
| | | this.param.inType = e |
| | | }, |
| | | openInput(type) { |
| | | this.inputType = type; |
| | | this.$refs.keyboard.open(); |
| | | }, |
| | | setPlate(e) { |
| | | if (this.inputType === 1) { |
| | | this.param.carNos = e; |
| | | this.$set(this.param, 'carCodeFront', e) |
| | | } else if (this.inputType === 2) { |
| | | this.param.carNos = e; |
| | | this.$set(this.param, 'carCodeBack', e) |
| | | } |
| | | this.$forceUpdate(); |
| | | this.closeInput(); |
| | | }, |
| | | copy(){ |
| | | if(this.param.carCodeFront){ |
| | | this.$set(this.param, 'carCodeBack', this.param.carCodeFront) |
| | | this.showToast('å¤å¶æå'); |
| | | } |
| | | |
| | | }, |
| | | handleUpload() { |
| | | let token = uni.getStorageSync('token') || '' |
| | | uni.chooseImage({ |
| | | count: 1, |
| | | success: (chooseImageRes) => { |
| | | uni.showLoading({ title: 'ä¸ä¼ ä¸', mask: true }) |
| | | const tempFilePaths = chooseImageRes.tempFilePaths |
| | | let imgs = tempFilePaths.map((value, index) => { |
| | | return { |
| | | name: 'file', |
| | | uri: value |
| | | } |
| | | }) |
| | | uni.uploadFile({ |
| | | url: `${uploadUrl}`, |
| | | files: imgs, |
| | | name: 'file', |
| | | formData: { |
| | | folder: 'PLATFORM' |
| | | }, |
| | | header: { |
| | | Dm_user_token: token |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | let res = JSON.parse(uploadFileRes.data) |
| | | console.log('res', res.data) |
| | | if (res.data && res.data.length > 0) { |
| | | this.$set(this.param, 'transportImg', res.data[0].imgaddr) |
| | | this.$set(this.param, 'transportImgFull', res.data[0].url) |
| | | } |
| | | }, |
| | | fail(err) { |
| | | console.log('err', err) |
| | | }, |
| | | complete() { |
| | | uni.hideLoading() |
| | | } |
| | | }) |
| | | // } |
| | | } |
| | | }) |
| | | }, |
| | | closeInput() { |
| | | this.$refs.keyboard.close(); |
| | | } |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="status_wrap"> |
| | | <view class="name">䏿©å¯ç访客ç³è¯·</view> |
| | | <view class="desc">çå¾
æå¤ç</view> |
| | | <view class="status">审æ¹ä¸</view> |
| | | <view class="name">{{info.driverName}}çå
¥åé¢çº¦</view> |
| | | <view class="desc">{{info.carCodeFront}}</view> |
| | | <view class="status">{{ statusMap[info.status] }}</view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="emyty"></view> |
| | | <view class="module_list"> |
| | | <view class="item"> |
| | | <view class="label">æè®¿äºº</view> |
| | | <view class="value">廿ç¶</view> |
| | | <view class="label">å
¥ååå </view> |
| | | <view class="value">{{info.inReason}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="label">é¢è®¡å
¥/ç¦»åæ¶é´</view> |
| | | <view class="value">05/01 8:00 - 05/01 18:00</view> |
| | | <view class="label">ååç¼å·</view> |
| | | <view class="value">{{info.contractNum}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="label">å°åºæ¶é´</view> |
| | | <view class="value" v-if="info.arriveDate">{{info.arriveDate.slice(0,16)}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="label">åè¿è¯ç
§ç</view> |
| | | <view class="value"> |
| | | <image |
| | | v-if="info.transportImg" |
| | | class="avatar_wrap" |
| | | :src="info.prefixUrl + info.transportImg" |
| | | ></image> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="label">å
¥åºç±»å</view> |
| | | <view class="value">{{info.inType == 0 ? 'æ´æç' : 'ä»¶ç'}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="label">æ»è¿æ°é</view> |
| | | <view class="value">{{info.totalNum}}䏿¯</view> |
| | | </view> |
| | | <view class="emyty"></view> |
| | | <view class="item"> |
| | | <view class="label">访客信æ¯</view> |
| | | <view class="value"> |
| | | <image |
| | | class="avatar" |
| | | src="@/static/logo@2x.png" |
| | | mode="widthFix" |
| | | ></image> |
| | | <view class="info"> |
| | | <text class="name">åå¿ 18177665678</text> |
| | | <text>身份è¯å·ï¼3309****2910</text> |
| | | <text>å
¥å车è¾ï¼çA88789</text> |
| | | </view> |
| | | <view class="label">叿ºå§å</view> |
| | | <view class="value">{{info.driverName}} |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="label">å
¬å¸åç§°</view> |
| | | <view class="value">ä¸å½ç§»å¨</view> |
| | | <view class="label">ææºå·</view> |
| | | <view class="value">{{info.driverPhone}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="label">æ½å·¥äººå</view> |
| | | <view class="value">å¦</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="label">æ¥è®¿äºç±</view> |
| | | <view class="value">ä¸å¡æ´½è°</view> |
| | | <view class="label">车çç
§</view> |
| | | <view class="value">å {{info.carCodeFront}}ï¼å {{info.carCodeBack}}</view> |
| | | </view> |
| | | </view> |
| | | <!-- æµç¨ --> |
| | | <view class="flow_wrap"> |
| | | <view class="flow_title">æµç¨</view> |
| | | <view class="list"> |
| | | <view class="item"> |
| | | <view class="avatar"> |
| | | <image class="img" src="@/static/logo@2x.png" mode="widthFix" /> |
| | | <view class="list" v-if="info.approveDateVO != null && info.approveDateVO.approveList != null"> |
| | | <view class="item" v-for="item,index in info.approveDateVO.approveList"> |
| | | <view v-if="index != info.approveDateVO.approveList.length - 1" class="separate"></view> |
| | | <view class="avatar_wrap"> |
| | | <image |
| | | class="img" |
| | | :src=" |
| | | item.faceImg |
| | | ? item.faceImg |
| | | : require('@/static/meeting/common/default_user@2x.png') |
| | | " |
| | | /> |
| | | <image |
| | | v-if="item.status == 2" |
| | | class="status" |
| | | src="@/static/staff/liucheng_success@2x.png" |
| | | mode="widthFix" |
| | | /> |
| | | <view class="separate"></view> |
| | | </view> |
| | | <view class="content"> |
| | | <view class="head"> |
| | | <view class="event">æææäº¤çæè®¿ç³è¯·</view> |
| | | <view class="time">time</view> |
| | | </view> |
| | | <view class="name_wrap"> |
| | | <text>æä¸(<text class="status">å¤çä¸</text>)</text> |
| | | </view> |
| | | <view class="remark">åææ¾è¡</view> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="avatar"> |
| | | <image class="img" src="@/static/logo@2x.png" mode="widthFix" /> |
| | | <image |
| | | v-if="item.status == 3" |
| | | class="status" |
| | | src="@/static/staff/liucheng_success@2x.png" |
| | | src="@/static/staff/liucheng_fail@2x.png" |
| | | mode="widthFix" |
| | | /> |
| | | </view> |
| | | <view class="content"> |
| | | <view class="head"> |
| | | <view class="event">æææäº¤çæè®¿ç³è¯·</view> |
| | | <view class="time">time</view> |
| | | <view class="event">{{ item.title }}</view> |
| | | <view class="time">{{item.createDate}}</view> |
| | | </view> |
| | | <view class="name_wrap"> |
| | | <text>æä¸(<text class="status">å¤çä¸</text>)</text> |
| | | <text>{{item.memberName}}<text v-if="item.statusInfo" class="status">({{item.statusInfo}})</text></text> |
| | | </view> |
| | | <view class="carbon"> |
| | | <view class="carbon_item" v-for="i in 12"> |
| | | <image src="@/static/logo@2x.png" mode="widthFix"></image> |
| | | <view class="text">name</view> |
| | | <view v-if="item.approveType == 1" class="carbon"> |
| | | <view class="carbon_item" v-for="child in item.approveList" |
| | | :key="child.id"> |
| | | <image :src=" |
| | | child.faceImg |
| | | ? child.faceImg |
| | | : require('@/static/meeting/common/default_user@2x.png') |
| | | "></image> |
| | | <view class="text">{{ child.memberName }}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | <view class="emyty"></view> |
| | | <view class="main_footer"> |
| | | <view class="btn" @click="handleSub('0')">æç»</view> |
| | | <view class="btn agree" @click="handleSub('1')">åæ</view> |
| | | <view v-if="info.status == 0 || info.status == 1" class="btn" @click="handleCancel">æ¤åç³è¯·</view> |
| | | <view v-if="info.status == 0 || info.status == 1" class="btn agree" @click="handleEdit">ä¿®æ¹</view> |
| | | <view v-if="info.status == 3" class="btn agree aga" @click="handleAga">忬¡ç³è¯·</view> |
| | | </view> |
| | | |
| | | <!-- --> |
| | | <u-popup |
| | | :show="showApprModal" |
| | | :round="10" |
| | | :safeAreaInsetBottom="true" |
| | | mode="bottom" |
| | | @close="showApprModal = false" |
| | | > |
| | | <view class="appr_modal"> |
| | | <view class="title">åæ</view> |
| | | <textarea |
| | | placeholder="åæè¯´æï¼éå¿
å¡«" |
| | | placeholder-class="placeholder9" |
| | | /> |
| | | <view class="main_footer"> |
| | | <view class="btn" @click="showApprModal = false">åæ¶</view> |
| | | <view class="btn agree">æäº¤</view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { driverApplyDetail, driverCarRevoke } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | showApprModal: false, |
| | | param: {} |
| | | info: {}, |
| | | statusMap: { |
| | | 0: 'å¾
审æ¹', |
| | | 1: '审æ¹ä¸', |
| | | 2: '审æ¹éè¿', |
| | | 3: '审æ¹ä¸éè¿', |
| | | 4: '已忶', |
| | | }, |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | this.getDetail(option.id) |
| | | }, |
| | | methods: { |
| | | handleCancel(){ |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'è¿æ¯ä¸ä¸ªæ¨¡æå¼¹çª', |
| | | success: function (res) { |
| | | if (res.confirm) { |
| | | console.log('ç¨æ·ç¹å»ç¡®å®'); |
| | | } else if (res.cancel) { |
| | | console.log('ç¨æ·ç¹å»åæ¶'); |
| | | } |
| | | } |
| | | }); |
| | | // driverCarRevoke |
| | | }, |
| | | handleEdit(){}, |
| | | handleAga(){}, |
| | | getDetail(id) { |
| | | driverApplyDetail({id}).then(res => { |
| | | this.info = res.data |
| | | if(this.info.approveDateVO && this.info.approveDateVO.approveList.length > 0 ){ |
| | | this.info.approveDateVO.approveList.forEach(item => { |
| | | if(item.approveList && item.approveList.length == 1 && item.type !== 1){ |
| | | item.title = item.approveList[0].title |
| | | item.faceImg = item.approveList[0].faceImg |
| | | item.memberName = item.approveList[0].memberName |
| | | item.statusInfo = item.approveList[0].statusInfo |
| | | item.approveList = [] |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleSub(flag) { |
| | | // this.param.flag = |
| | | if (flag === '1') { |
| | | |
| | | } else { |
| | |
| | | display: flex; |
| | | margin-bottom: 48rpx; |
| | | |
| | | .avatar { |
| | | .avatar_wrap { |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | position: relative; |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .avatar { |
| | | .avatar_wrap { |
| | | margin-right: 20rpx; |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | |
| | | |
| | | .desc { |
| | | font-size: 26rpx; |
| | | color: #ed4545; |
| | | color: #999999; |
| | | } |
| | | |
| | | .status { |
| | |
| | | color: #fff; |
| | | border: 1rpx solid $uni-color-primary; |
| | | } |
| | | .aga{ |
| | | width: 100%; |
| | | } |
| | | } |
| | | |
| | | .appr_modal { |
| | |
| | | <template> |
| | | <view> |
| | | |
| | | <mp-html :content="content" /> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | content: '' |
| | | }; |
| | | }, |
| | | onLoad(option) { |
| | | this.content = uni.getStorageSync('driverGuide')[option.str] |
| | | }, |
| | | methods: { |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <view class="box_list"> |
| | | <view |
| | | class="box_list_item" |
| | | v-for="(item, index) in 3" |
| | | v-for="(item, index) in datalist" |
| | | :key="index" |
| | | @click="handleDetail()" |
| | | @click="handleDetail(item.id)" |
| | | > |
| | | <view class="box_list_item_head"> |
| | | <text>䏿©å¯çå³å¡å
¥åç³è¯·</text> |
| | | <text class="loading">å¾
å®¡æ ¸</text> |
| | | <text>{{item.driverName}}çå
¥åé¢çº¦</text> |
| | | <text class="loading">{{ statusMap[item.status] }}</text> |
| | | </view> |
| | | <view class="box_list_item_nr"> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>被访é®äººï¼</text> |
| | | <text>人äºé¨-çäºè</text> |
| | | <text>ååç¼å·ï¼</text> |
| | | <text>{{item.contractNum}}</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>è¿åæ¶é´ï¼</text> |
| | | <text>12-12 09:00</text> |
| | | <text>å°åºæ¶é´ï¼</text> |
| | | <text>{{item.arriveDate.slice(5,16)}}</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>ç¦»åæ¶é´ï¼</text> |
| | | <text>12-12 12:00</text> |
| | | <text>叿ºå§åï¼</text> |
| | | <text>{{item.driverName}}</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>æ¥è®¿äºç±ï¼</text> |
| | | <text>ä¸å¡æ¥å¾</text> |
| | | <text>车è¾ä¿¡æ¯ï¼</text> |
| | | <text>{{item.carCodeFront}}</text> |
| | | </view> |
| | | <view class="box_list_item_nr_item"> |
| | | <text>éè¡è½¦è¾ï¼</text> |
| | | <text>çA88888</text> |
| | | <text class="placeholder9">{{item.createDate.slice(0,16)}}æäº¤</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- éæ©è½¦è¾ --> |
| | | <u-picker |
| | | keyName="name" |
| | | closeOnClickOverlay |
| | | @close="isShowCar = false" |
| | | :show="isShowCar" |
| | | :columns="carList" |
| | | @confirm="seletedCar" |
| | | @cancel="isShowCar = false" |
| | | ></u-picker> |
| | | <!-- æ¥æ --> |
| | | <u-datetime-picker |
| | | :show="isShowDate" |
| | | :minDate="minDate" |
| | | @confirm="confirmDate" |
| | | @cancel="isShowDate = false" |
| | | mode="date" |
| | | ></u-datetime-picker> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { driverApplyRecord } from "@/api" |
| | | export default { |
| | | data() { |
| | | return { |
| | | isShowCar: false, |
| | | isShowDate: false, |
| | | param: {}, |
| | | carList: [[{ name: 'aa', value: '11' }]], |
| | | timeList: [{ time: '08:30-09:00' }, { time: '08:30-09:00' }, { time: '08:30-09:00' }, { time: '08:30-09:00' }] |
| | | page: 1, |
| | | capacity: 10, |
| | | total: 0, |
| | | datalist: [], |
| | | statusMap: { |
| | | 0: 'å¾
审æ¹', |
| | | 1: '审æ¹ä¸', |
| | | 2: '审æ¹éè¿', |
| | | 3: '审æ¹ä¸éè¿', |
| | | 4: '已忶', |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.getList() |
| | | }, |
| | | methods: { |
| | | handleDetail() { |
| | | getList() { |
| | | const { page, capacity } = this |
| | | driverApplyRecord({ |
| | | page, capacity,model: {} |
| | | }).then(res => { |
| | | this.datalist = res.data.records |
| | | this.total = res.data.total |
| | | }) |
| | | }, |
| | | handleDetail(id) { |
| | | uni.navigateTo({ |
| | | url: "/pages/driver/reservedDetail" |
| | | url: `/pages/driver/reservedDetail?id=${id}` |
| | | }) |
| | | }, |
| | | confirmDate(e) { |
| | |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | page{ |
| | | background: #f7f7f7; |
| | | } |
| | | .main_app { |
| | | background: #f7f7f7; |
| | | padding: 0; |
| | |
| | | } |
| | | } |
| | | .box_list_item_nr { |
| | | padding: 30rpx; |
| | | padding: 30rpx 30rpx 10rpx; |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | background-color: #ffffff; |
| | |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20rpx; |
| | | margin-bottom: 16rpx; |
| | | text { |
| | | &:nth-child(1) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #666666; |
| | | } |
| | | &:nth-child(2) { |
| | | font-size: 26rpx; |
| | | font-weight: 400; |
| | | color: #333333; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | getLocation() { |
| | | uni.getLocation({ |
| | | type: 'wgs84', |
| | | |
| | | success: function (res) { |
| | | console.log(res); |
| | | console.log('å½åä½ç½®çç»åº¦ï¼' + res.longitude) |
| | | console.log('å½åä½ç½®ç纬度ï¼' + res.latitude) |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="main_app"> |
| | | <view class="status_wrap"> |
| | | <view class="name">{{info.driverName}}çå
¥åé¢çº¦</view> |
| | | <view class="desc">{{info.carCodeFront}}</view> |
| | | <view class="status">{{ statusMap[info.status] }}</view> |
| | | </view> |
| | | <!-- --> |
| | | <view class="emyty"></view> |
| | | <view class="module_list"> |
| | | <view class="item"> |
| | | <view class="label">å
¥ååå </view> |
| | | <view class="value">{{info.inReason}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="label">ååç¼å·</view> |
| | | <view class="value">{{info.contractNum}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="label">å°åºæ¶é´</view> |
| | | <view v-if="info.arriveDate" class="value">{{info.arriveDate.slice(0,16)}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="label">åè¿è¯ç
§ç</view> |
| | | <view class="value"> |
| | | <image |
| | | v-if="info.transportImg" |
| | | class="avatar_wrap" |
| | | :src="info.prefixUrl + info.transportImg" |
| | | ></image> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="label">å
¥åºç±»å</view> |
| | | <view class="value">{{info.inType == 0 ? 'æ´æç' : 'ä»¶ç'}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="label">æ»è¿æ°é</view> |
| | | <view class="value">{{info.totalNum}}䏿¯</view> |
| | | </view> |
| | | <view class="emyty"></view> |
| | | <view class="item"> |
| | | <view class="label">叿ºå§å</view> |
| | | <view class="value">{{info.driverName}} |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="label">ææºå·</view> |
| | | <view class="value">{{info.driverPhone}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="label">车çç
§</view> |
| | | <view class="value">å {{info.carCodeFront}}ï¼å {{info.carCodeBack}}</view> |
| | | </view> |
| | | </view> |
| | | <!-- æµç¨ --> |
| | | <view class="flow_wrap"> |
| | | <view class="flow_title">æµç¨</view> |
| | | <view class="list" v-if="info.approveDateVO != null && info.approveDateVO.approveList != null"> |
| | | <view class="item" v-for="item,index in info.approveDateVO.approveList"> |
| | | <view v-if="index != info.approveDateVO.approveList.length - 1" class="separate"></view> |
| | | <view class="avatar_wrap"> |
| | | <image |
| | | class="img" |
| | | :src=" |
| | | item.faceImg |
| | | ? item.faceImg |
| | | : require('@/static/meeting/common/default_user@2x.png') |
| | | " |
| | | /> |
| | | <image |
| | | v-if="item.status == 2" |
| | | class="status" |
| | | src="@/static/staff/liucheng_success@2x.png" |
| | | mode="widthFix" |
| | | /> |
| | | <image |
| | | v-if="item.status == 3" |
| | | class="status" |
| | | src="@/static/staff/liucheng_fail@2x.png" |
| | | mode="widthFix" |
| | | /> |
| | | </view> |
| | | <view class="content"> |
| | | <view class="head"> |
| | | <view class="event">{{ item.title }}</view> |
| | | <view class="time">{{item.createDate}}</view> |
| | | </view> |
| | | <view class="name_wrap"> |
| | | <text>{{item.memberName}}<text v-if="item.statusInfo" class="status">({{item.statusInfo}})</text></text> |
| | | </view> |
| | | <view v-if="item.approveType == 1" class="carbon"> |
| | | <view class="carbon_item" v-for="child in item.approveList" |
| | | :key="child.id"> |
| | | <image :src=" |
| | | child.faceImg |
| | | ? child.faceImg |
| | | : require('@/static/meeting/common/default_user@2x.png') |
| | | "></image> |
| | | <view class="text">{{ child.memberName }}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="emyty"></view> |
| | | <view class="main_footer"> |
| | | <view class="btn" @click="handleSub('0')">æç»</view> |
| | | <view class="btn agree" @click="handleSub('1')">åæ</view> |
| | | </view> |
| | | |
| | | <!-- --> |
| | | <u-popup |
| | | :show="showApprModal" |
| | | :round="10" |
| | | :safeAreaInsetBottom="true" |
| | | mode="bottom" |
| | | @close="showApprModal = false" |
| | | > |
| | | <view class="appr_modal"> |
| | | <view class="title">{{ this.flag == '0' ? 'æç»' : 'åæ' }}</view> |
| | | <textarea |
| | | :placeholder="this.flag == '0' ? 'æç»è¯´æï¼å¿
å¡«' : 'åæè¯´æï¼éå¿
å¡«'" |
| | | placeholder-class="placeholder9" |
| | | /> |
| | | <view class="main_footer"> |
| | | <view class="btn" @click="showApprModal = false">åæ¶</view> |
| | | <view class="btn agree" @click="handleAppy">æäº¤</view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { driverApplyDetail, carUseBookAppr } from '@/api' |
| | | export default { |
| | | data() { |
| | | return { |
| | | showApprModal: false, |
| | | checkInfo: '', |
| | | flag: '1', |
| | | info: {}, |
| | | type: 0, |
| | | statusMap: { |
| | | 0: 'å¾
审æ¹', |
| | | 1: '审æ¹ä¸', |
| | | 2: '审æ¹éè¿', |
| | | 3: '审æ¹ä¸éè¿', |
| | | 4: '已忶', |
| | | }, |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | this.type = option.objType |
| | | this.getDetail(option.id) |
| | | }, |
| | | methods: { |
| | | getDetail(id) { |
| | | driverApplyDetail({id}).then(res => { |
| | | this.info = res.data |
| | | if(this.info.approveDateVO && this.info.approveDateVO.approveList.length > 0 ){ |
| | | this.info.approveDateVO.approveList.forEach(item => { |
| | | if(item.approveList && item.approveList.length == 1 && item.type !== 1){ |
| | | item.title = item.approveList[0].title |
| | | item.faceImg = item.approveList[0].faceImg |
| | | item.memberName = item.approveList[0].memberName |
| | | item.statusInfo = item.approveList[0].statusInfo |
| | | item.approveList = [] |
| | | } |
| | | }) |
| | | } |
| | | console.log('this.info.approveDateVO', this.info.approveDateVO.approveList); |
| | | }) |
| | | }, |
| | | handleAppy() { |
| | | const {flag,checkInfo, type,info } = this |
| | | if(flag == 0 && !checkInfo) return this.showToast('æç»è¯´æå¿
å¡«') |
| | | carUseBookAppr({ |
| | | checkInfo,objId: info.id,objType: 6,status: flag == 0 ? 3 : 2 |
| | | }).then(res => { |
| | | if(res.code == 200){ |
| | | setTimeout(() => { |
| | | this.showToast('æä½æå') |
| | | }) |
| | | this.showApprModal = false |
| | | uni.navigateBack() |
| | | } |
| | | }) |
| | | }, |
| | | handleSub(flag) { |
| | | this.flag = flag |
| | | this.checkInfo = '' |
| | | if (flag === '1') { |
| | | |
| | | } else { |
| | | |
| | | } |
| | | this.showApprModal = true |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | <style> |
| | | page { |
| | | background-color: #f7f7f7; |
| | | } |
| | | </style> |
| | | <style lang="scss"> |
| | | .main_app { |
| | | background-color: #fff; |
| | | padding-bottom: 0; |
| | | |
| | | .flow_wrap { |
| | | padding: 30rpx 0; |
| | | |
| | | .flow_title { |
| | | font-weight: 600; |
| | | font-size: 32rpx; |
| | | color: #222222; |
| | | margin-bottom: 24rpx; |
| | | } |
| | | |
| | | .list { |
| | | .item { |
| | | display: flex; |
| | | margin-bottom: 48rpx; |
| | | position: relative; |
| | | .separate { |
| | | position: absolute; |
| | | width: 4rpx; |
| | | height: calc( 100% - 52rpx ); |
| | | background-color: #eeeeee; |
| | | left: 40rpx; |
| | | top: 90rpx; |
| | | } |
| | | .avatar_wrap { |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | position: relative; |
| | | margin-right: 20rpx; |
| | | .img { |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | .status { |
| | | width: 28rpx; |
| | | height: 28rpx; |
| | | border-radius: 50%; |
| | | position: absolute; |
| | | right: 0; |
| | | bottom: 0; |
| | | } |
| | | |
| | | } |
| | | |
| | | .content { |
| | | flex: 1; |
| | | |
| | | .head { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin-bottom: 4rpx; |
| | | |
| | | .event { |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .time { |
| | | font-size: 26rpx; |
| | | color: #999999; |
| | | } |
| | | } |
| | | |
| | | .name_wrap { |
| | | font-size: 26rpx; |
| | | color: #777777; |
| | | |
| | | .status { |
| | | color: $uni-color-primary; |
| | | } |
| | | } |
| | | |
| | | .remark { |
| | | margin-top: 12rpx; |
| | | background-color: #f7f7f7; |
| | | padding: 14rpx 20rpx; |
| | | border-radius: 8rpx; |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | line-height: 36rpx; |
| | | } |
| | | } |
| | | .carbon { |
| | | display: flex; |
| | | width: 590rpx; |
| | | overflow-x: auto; |
| | | margin-top: 12rpx; |
| | | .carbon_item { |
| | | text-align: center; |
| | | flex-shrink: 0; |
| | | width: 100rpx; |
| | | image { |
| | | width: 60rpx; |
| | | height: 60rpx; |
| | | margin: 0 auto; |
| | | } |
| | | view { |
| | | font-size: 26rpx; |
| | | color: #777777; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .module_list { |
| | | .item { |
| | | padding: 30rpx 0; |
| | | border-bottom: 1rpx solid #e5e5e5; |
| | | |
| | | .label { |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | |
| | | .value { |
| | | font-size: 30rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .avatar_wrap { |
| | | margin-right: 20rpx; |
| | | width: 120rpx; |
| | | height: 120rpx; |
| | | border-radius: 8rpx; |
| | | border: 2rpx solid #e5e5e5; |
| | | } |
| | | |
| | | .info { |
| | | flex: 1; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | font-size: 26rpx; |
| | | color: #666666; |
| | | |
| | | .name { |
| | | font-size: 30rpx; |
| | | color: #333333; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .status_wrap { |
| | | position: relative; |
| | | padding: 30rpx 0; |
| | | |
| | | .name { |
| | | font-weight: 600; |
| | | font-size: 32rpx; |
| | | margin-bottom: 20rpx; |
| | | color: #222222; |
| | | } |
| | | |
| | | .desc { |
| | | font-size: 26rpx; |
| | | color: #999999; |
| | | } |
| | | |
| | | .status { |
| | | position: absolute; |
| | | right: -30rpx; |
| | | top: 0; |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | padding: 0 32rpx; |
| | | border-radius: 0rpx 0rpx 0rpx 30rpx; |
| | | background-color: #e9edff; |
| | | color: $uni-color-primary; |
| | | } |
| | | } |
| | | |
| | | .main_footer { |
| | | padding-bottom: 64rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .btn { |
| | | width: 336rpx; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | background: #ffffff; |
| | | border-radius: 44rpx; |
| | | border: 1rpx solid #999999; |
| | | font-size: 32rpx; |
| | | text-align: center; |
| | | margin: 16rpx 0; |
| | | } |
| | | |
| | | .agree { |
| | | background: $uni-color-primary; |
| | | color: #fff; |
| | | border: 1rpx solid $uni-color-primary; |
| | | } |
| | | } |
| | | |
| | | .appr_modal { |
| | | padding: 36rpx 30rpx 0; |
| | | |
| | | .title { |
| | | font-weight: 600; |
| | | font-size: 32rpx; |
| | | color: #222222; |
| | | margin-bottom: 40rpx; |
| | | text-align: center; |
| | | } |
| | | |
| | | textarea { |
| | | box-sizing: border-box; |
| | | width: 690rpx; |
| | | background-color: #f7f7f7; |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | padding: 24rpx; |
| | | border-radius: 8rpx; |
| | | margin-bottom: 30rpx; |
| | | } |
| | | } |
| | | |
| | | .emyty { |
| | | width: 750rpx; |
| | | height: 20rpx; |
| | | background-color: #f7f7f7; |
| | | margin: 0 -30rpx; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <view class="info loading">{{ item.info }}</view> |
| | | </view> |
| | | <view class="box_list_item_nr"> |
| | | <view v-if="item.param1.arriveDate" class="box_list_item_nr_item"> |
| | | <text></text> |
| | | <text>{{ item.param1.arriveDate }}</text> |
| | | </view> |
| | | <view v-if="item.param1.inType" class="box_list_item_nr_item"> |
| | | <text></text> |
| | | <text>{{ item.param1.inType }}</text> |
| | | </view> |
| | | <view v-if="item.param1.totalNum" class="box_list_item_nr_item"> |
| | | <text></text> |
| | | <text>{{ item.param1.totalNum }}</text> |
| | | </view> |
| | | <view v-if="item.param1.carNum" class="box_list_item_nr_item"> |
| | | <text></text> |
| | | <text>{{ item.param1.carNum }}</text> |
| | | </view> |
| | | |
| | | <view v-if="item.param1.name" class="box_list_item_nr_item"> |
| | | <text></text> |
| | | <text>{{ item.param1.name }}</text> |
| | |
| | | uni.navigateTo({ |
| | | url: `/pages/staff/task/vDangetAppr?id=${objId}&objType=${objType}` |
| | | }) |
| | | } else if (objType === 6 || objType === 5) { |
| | | uni.navigateTo({ |
| | | url: `/pages/staff/task/driver?id=${objId}&objType=${objType}` |
| | | }) |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: `/pages/staff/task/visitorApprove?id=${objId}&objType=${objType}` |
| | |
| | | " |
| | | /> |
| | | <image |
| | | v-if="item.status == 2" |
| | | class="status" |
| | | src="@/static/staff/liucheng_success@2x.png" |
| | | mode="widthFix" |
| | | /> |
| | | <image |
| | | v-if="item.status == 3" |
| | | class="status" |
| | | src="@/static/staff/liucheng_fail@2x.png" |
| | | mode="widthFix" |
| | | /> |
| | | </view> |
| | | <view class="content"> |
| | | <view class="head"> |
| | |
| | | const token = uni.getStorageSync('token') |
| | | const time = uni.getStorageSync('time') |
| | | const userInfo = uni.getStorageSync('userInfo') |
| | | const driverInfo = uni.getStorageSync('driverInfo') |
| | | const sessionKey = uni.getStorageSync('sessionKey') |
| | | |
| | | const store = new Vuex.Store({ |
| | |
| | | token: token || null, |
| | | time: time || null, |
| | | userInfo: userInfo || {}, |
| | | driverInfo: driverInfo || {}, |
| | | height: height || '0', |
| | | sessionKey: sessionKey || '', |
| | | primaryColor: '#279baa' |
| | |
| | | state.userInfo = obj |
| | | uni.setStorageSync('userInfo', obj) |
| | | }, |
| | | // è®¾ç½®å¸æºä¿¡æ¯ |
| | | setDriverInfo(state, obj) { |
| | | state.driverInfo = obj |
| | | uni.setStorageSync('driverInfo', obj) |
| | | }, |
| | | // 设置SessionKey |
| | | setSessionKey(state, val) { |
| | | state.sessionKey = val |
| | |
| | | public ApiResponse<String> login (@Validated @RequestBody LoginDTO dto, ServerWebExchange serverWebExchange) { |
| | | try { |
| | | ServerHttpRequest request = serverWebExchange.getRequest(); |
| | | dto.setCheckCode(true); |
| | | LoginUserInfo user = systemLoginService.loginByPasswordNew(dto,request); |
| | | String token = jwtTokenUtil.generateToken(user); |
| | | return ApiResponse.success(token); |
| | |
| | | } |
| | | } |
| | | |
| | | @PreventRepeat(limit = 10, lockTime = 10000) |
| | | @ApiOperation("叿ºç»å½") |
| | | @PostMapping("/loginDriver") |
| | | @LoginNoRequired |
| | | public ApiResponse<String> loginDriver (@Validated @RequestBody LoginDTO dto, ServerWebExchange serverWebExchange) { |
| | | try { |
| | | ServerHttpRequest request = serverWebExchange.getRequest(); |
| | | dto.setCheckCode(false); |
| | | LoginUserInfo user = systemLoginService.driverLogin(dto,request); |
| | | String token = jwtTokenUtil.generateToken(user); |
| | | return ApiResponse.success(token); |
| | | }catch (BusinessException e){ |
| | | return ApiResponse.failed(e.getCode(),e.getMessage()); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ApiResponse.failed(ResponseStatus.SERVER_ERROR); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å·æ°JWT令ç,ç¨æ§çä»¤çæ¢æ°ç令ç |
| | |
| | | import com.doumee.dao.system.model.SystemPermission; |
| | | import com.doumee.dao.system.model.SystemRole; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | loginUserInfo.setCompany(company); |
| | | // 设置è§è²ä¿¡æ¯ |
| | | List<String> rs = new ArrayList<>(); |
| | | if(CollectionUtils.isNotEmpty(roles)){ |
| | | for (SystemRole role : roles) { |
| | | rs.add(role.getCode()); |
| | | } |
| | | } |
| | | loginUserInfo.setSessionId(sessionId); |
| | | loginUserInfo.setRoles(rs); |
| | | // 设置æéä¿¡æ¯ |
| | | List<String> pms = new ArrayList<>(); |
| | | if(CollectionUtils.isNotEmpty(permissions)){ |
| | | for (SystemPermission permission : permissions) { |
| | | pms.add(permission.getCode()); |
| | | } |
| | | } |
| | | loginUserInfo.setPermissions(pms); |
| | | return loginUserInfo; |
| | | } |
| | |
| | | package com.doumee.core.utils; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.fasterxml.jackson.databind.PropertyNamingStrategy; |
| | | import io.swagger.models.auth.In; |
| | | import org.apache.batik.util.Platform; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | |
| | | // è¶
æ¶é¢è¦é
ç½® |
| | | public static final String TIMEOUT_WARNING = "TIMEOUT_WARNING"; |
| | | // FTPæä»¶æå¡å¨èµæºè®¿é®å°å |
| | | //æå°é¢çº¦æå |
| | | public static final String PLATFORM_BOOKING_TIPS = "PLATFORM_BOOKING_TIPS"; |
| | | //æå°å¯¼è§å¾ |
| | | public static final String PLATFORM_GUIDEMAP = "PLATFORM_GUIDEMAP"; |
| | | |
| | | |
| | | public static String getRandom6Num( ) { |
| | | Random random = new Random(); |
| | |
| | | int cityUseCar = 3;//å¸å
ç¨è½¦ |
| | | int unCityUseCar = 4;//å¸å¤ç¨è½¦ |
| | | int logisticsCarUse = 5;//ç©æµè½¦é¢çº¦ |
| | | int reason = 6;//å
¥ååå |
| | | } |
| | | |
| | | |
| | |
| | | }else if(Constants.equalsInteger(approveType,Constants.approveObjectType.cityUseCar) |
| | | ||Constants.equalsInteger(approveType,Constants.approveObjectType.unCityUseCar)){ |
| | | return Constants.noticesObjectType.useCar; |
| | | }else if(Constants.equalsInteger(approveType,Constants.approveObjectType.logisticsCarUse)){ |
| | | return Constants.noticesObjectType.logisticsCarUse; |
| | | }else if(Constants.equalsInteger(approveType, approveObjectType.reason)){ |
| | | return noticesObjectType.reason; |
| | | }else { |
| | | return Constants.noticesObjectType.system; |
| | | } |
| | |
| | | int dangerDeal = 3;//鿣å¤ç |
| | | int logisticsCarUse = 4;//ç©æµè½¦å®¡æ¹ |
| | | int system = 5;//ç³»ç»æ¶æ¯ |
| | | int reason = 6;//å
¥ååå |
| | | } |
| | | |
| | | |
| | |
| | | // StringUtil.getNotNullStr(request.getParameter(strParamName)); |
| | | // return getDateByString(strStr); |
| | | // } |
| | | /** |
| | | * å¾å°å½åæ¥æï¼æ ¼å¼yyyy-MM-ddã |
| | | * |
| | | * @return String æ ¼å¼åçæ¥æå符串 |
| | | */ |
| | | public static String getCurrDate() { |
| | | return getFormattedDate(getDateByString("")); |
| | | } |
| | | |
| | | /** |
| | | * å¾å°å½åæ¥æï¼æ ¼å¼yyyy-MM-ddã |
| | |
| | | } |
| | | |
| | | /** |
| | | * å¾å°å½åæ¥ææ¶é´,æ ¼å¼ä¸ºyyyy-MM-dd. |
| | | * |
| | | * @return String |
| | | */ |
| | | public static String getCurrDate() { |
| | | Timestamp date = new Timestamp(System.currentTimeMillis()); |
| | | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); |
| | | return formatter.format(date); |
| | | } |
| | | |
| | | /** |
| | | * å¾å°æå®çæ¥æï¼å¦ä¸å¹´ä¸ä¸ªæé¶ä¹å¤©å(以yyyy/MM/ddæ ¼å¼æ¾ç¤º)åæ°ä¸º("yyyy/MM/dd",1,3,9) |
| | | * |
| | | * @param strFormat |
| | |
| | | |
| | | LoginUserInfo loginByPasswordNew (LoginDTO dto, ServerHttpRequest request); |
| | | |
| | | LoginUserInfo driverLogin(LoginDTO dto, ServerHttpRequest request); |
| | | /** |
| | | * æ ¹æ® openIdç»å½ |
| | | * @param userId |
| | |
| | | loginLog.setOsInfo(Utils.User_Client.getOS(request)); |
| | | } |
| | | loginLog.setServerIp(Utils.Server.getIP()); |
| | | if(isDebug == null || !isDebug){ |
| | | if(isDebug == null || !isDebug && dto.getCheckCode()){ |
| | | // æ ¡éªéªè¯ç |
| | | try { |
| | | captchaService.check(dto.getUuid(), dto.getCode()); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public LoginUserInfo driverLogin(LoginDTO dto, ServerHttpRequest request) { |
| | | SystemLoginLog loginLog = new SystemLoginLog(); |
| | | loginLog.setLoginUsername(dto.getUsername()); |
| | | loginLog.setLoginTime(new Date()); |
| | | loginLog.setSystemVersion(systemVersion); |
| | | loginLog.setLocation(Utils.Location.getLocationString(loginLog.getIp())); |
| | | if(request!=null&&request.getHeaders()!=null && request.getHeaders().size()>0){ |
| | | loginLog.setIp(Utils.User_Client.getIP(request)); |
| | | loginLog.setPlatform(Utils.User_Client.getPlatform(request)); |
| | | loginLog.setClientInfo(Utils.User_Client.getBrowser(request)); |
| | | loginLog.setOsInfo(Utils.User_Client.getOS(request)); |
| | | } |
| | | loginLog.setServerIp(Utils.Server.getIP()); |
| | | // æ ¹æ®ç¨æ·åæ¥è¯¢ç¨æ·å¯¹è±¡ |
| | | SystemUser queryDto = new SystemUser(); |
| | | queryDto.setUsername(dto.getUsername()); |
| | | queryDto.setDeleted(Boolean.FALSE); |
| | | SystemUser user = systemUserService.findOne(queryDto); |
| | | if (user == null) { |
| | | throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT); |
| | | } |
| | | String pwd = Utils.Secure.encryptPassword(new String(dto.getPassword()), user.getSalt()); |
| | | // æ¯è¾å¯ç |
| | | if( !StringUtils.equals(pwd, user.getPassword())){ |
| | | throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT); |
| | | } |
| | | Company company = new Company(); |
| | | if(Objects.nonNull(user.getCompanyId())){ |
| | | company = companyMapper.selectById(user.getCompanyId()); |
| | | } |
| | | LoginUserInfo userInfo = LoginUserInfo.from(user, null, null,company,null); |
| | | return userInfo; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å
é¨äººå ä¸ å¸æº æ ¹æ®codeæ¥è¯¢openIdåè¿è¡ç»å½æ¥å£ |
| | | * @return |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.Platform; |
| | | import com.doumee.service.business.PlatformJobService; |
| | | import com.doumee.service.business.PlatformService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | |
| | | |
| | | @Autowired |
| | | private PlatformService platformService; |
| | | |
| | | @Autowired |
| | | private PlatformJobService platformJobService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | |
| | | return ApiResponse.success(platformService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ ¹æ®æå°ç»è·åæå°å表信æ¯") |
| | | @GetMapping("/listByGroupId") |
| | | @CloudRequiredPermission("business:platform:query") |
| | | public ApiResponse<List<Platform>> listByGroupId (@RequestParam Integer groupId, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(platformJobService.getPlatformList(groupId,this.getLoginUser(token))); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:platform:exportExcel") |
| | |
| | | package com.doumee.cloud.web; |
| | | |
| | | import cn.hutool.http.useragent.Platform; |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.config.annotation.LoginRequired; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.business.model.PlatformBooks; |
| | | import com.doumee.dao.business.model.PlatformJob; |
| | | import com.doumee.dao.business.model.Visits; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.web.reqeust.*; |
| | | import com.doumee.dao.web.response.DriverHomeVO; |
| | | import com.doumee.dao.web.response.LineUpVO; |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | |
| | | @Autowired |
| | | private PlatformBooksService platformBooksService; |
| | | |
| | | @Autowired |
| | | private PlatformReasonService platformReasonService; |
| | | |
| | | |
| | | |
| | | @ApiOperation("å
¥ååå ") |
| | | @GetMapping("/platformReasonList") |
| | | public ApiResponse<List<PlatformReason>> platformReasonList (@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | List<PlatformReason> platformReasons = platformReasonService.findList(null); |
| | | return ApiResponse.success(platformReasons); |
| | | } |
| | | |
| | | @ApiOperation("叿ºé¦é¡µä¿¡æ¯") |
| | | @GetMapping("/driverHome") |
| | | public ApiResponse<DriverHomeVO> driverHome (@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | DriverHomeVO driverHomeVO = platformJobService.getDriverHome(getLoginUser(token).getMemberId()); |
| | | DriverHomeVO driverHomeVO = platformJobService.getDriverHome(getLoginUser(token)); |
| | | return ApiResponse.success(driverHomeVO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ¥è¯¢å¯é¢çº¦é") |
| | | @PostMapping("/checkSurplusNum") |
| | |
| | | @ApiOperation("ç©æµè½¦é¢çº¦") |
| | | @PostMapping("/apply") |
| | | public ApiResponse<Integer> apply (@RequestBody PlatformBooksApplyDTO platformBooksApplyDTO , @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | platformBooksApplyDTO.setUserId(getLoginUser(token).getMemberId()); |
| | | LoginUserInfo loginUserInfo = getLoginUser(token); |
| | | platformBooksApplyDTO.setUserId(loginUserInfo.getMemberId()); |
| | | platformBooksApplyDTO.setDriverId(loginUserInfo.getMemberId()); |
| | | return ApiResponse.success(platformBooksService.apply(platformBooksApplyDTO)); |
| | | } |
| | | |
| | | @ApiOperation("ç©æµè½¦é¢çº¦è®°å½") |
| | | @PostMapping("/page") |
| | | public ApiResponse<PageData<PlatformBooks>> findPage (@RequestBody PageWrap<PlatformBooks> pageWrap, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | LoginUserInfo loginUserInfo = this.getLoginUser(token); |
| | | pageWrap.getModel().setQueryDate(DateUtil.getBeforDay(new Date(),30)); |
| | | pageWrap.getModel().setDriverPhone(loginUserInfo.getMobile()); |
| | | return ApiResponse.success(platformBooksService.findPage(pageWrap)); |
| | | } |
| | | |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.business.model.PlatformBooks; |
| | | import com.doumee.dao.business.model.PlatformGroup; |
| | | import com.doumee.dao.business.model.PlatformJob; |
| | | import com.doumee.dao.business.model.PlatformShowParam; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.web.reqeust.*; |
| | | import com.doumee.dao.web.response.DriverHomeVO; |
| | | import com.doumee.dao.web.response.LineUpVO; |
| | |
| | | @Autowired |
| | | private PlatformShowParamService platformShowParamService; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private PlatformService platformService; |
| | | |
| | | @ApiOperation("è·åæå°ç»ä¿¡æ¯") |
| | | @ApiImplicitParams({ |
| | |
| | | } |
| | | |
| | | @ApiOperation("æ´æ°æå°é
置信æ¯") |
| | | @GetMapping("/updUserPlatformConfig") |
| | | @PostMapping("/updUserPlatformConfig") |
| | | public ApiResponse updUserPlatformConfig (@RequestBody List<Integer> ids, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | platformShowParamService.updUserConfig(ids,getLoginUser(token)); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹ç¦å¯ç¨ç¶æ") |
| | | @PostMapping("/updPlatformStatus") |
| | | public ApiResponse updPlatformStatus (@RequestBody Platform platform, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | platformService.updateStatusById(platform); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | |
| | | platformJobService.platformInPark(jobOperateDTO); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "å
³èä¸å¡ä¸»é®") |
| | | private Integer objId; |
| | | |
| | | @ApiModelProperty(value = "å
³èä¸å¡ç±»åï¼0éæ½å·¥äººå访客ç³è¯· 1éæ½å·¥äººå访客ç³è¯· 2访客æ¥å¤ 3å
¬è½¦å¸å
ç¨è½¦ 4å
¬è½¦å®¤å¤ç¨è½¦ 5å¸å
¬å¸ç©æµè½¦é¢çº¦") |
| | | @ApiModelProperty(value = "å
³èä¸å¡ç±»åï¼0éæ½å·¥äººå访客ç³è¯· 1éæ½å·¥äººå访客ç³è¯· 2访客æ¥å¤ 3å
¬è½¦å¸å
ç¨è½¦ 4å
¬è½¦å®¤å¤ç¨è½¦ 5å¸å
¬å¸ç©æµè½¦é¢çº¦ 6å
¥åé¢çº¦") |
| | | private Integer objType; |
| | | |
| | | @ApiModelProperty(value = "2审æ¹éè¿ 3å®¡æ¹æªéè¿") |
| | |
| | | @ExcelColumn(name="æ¯å¦ä¿®æ¹ç®çå° 0å¦ 1æ¯") |
| | | private Integer addrParam; |
| | | |
| | | @ApiModelProperty(value = "å
³èä¸å¡ç±»åï¼0éæ½å·¥äººå访客ç³è¯· 1éæ½å·¥äººå访客ç³è¯· 2访客æ¥å¤ 3å
¬è½¦å¸å
ç¨è½¦ 4å
¬è½¦å®¤å¤ç¨è½¦ 5å¸å
¬å¸ç©æµè½¦é¢çº¦", example = "1") |
| | | @ExcelColumn(name="å
³èä¸å¡ç±»åï¼0éæ½å·¥äººå访客ç³è¯· 1éæ½å·¥äººå访客ç³è¯· 2访客æ¥å¤ 3å
¬è½¦å¸å
ç¨è½¦ 4å
¬è½¦å®¤å¤ç¨è½¦ 5å¸å
¬å¸ç©æµè½¦é¢çº¦") |
| | | @ApiModelProperty(value = "å
³èä¸å¡ç±»åï¼0éæ½å·¥äººå访客ç³è¯· 1éæ½å·¥äººå访客ç³è¯· 2访客æ¥å¤ 3å
¬è½¦å¸å
ç¨è½¦ 4å
¬è½¦å®¤å¤ç¨è½¦ 5å¸å
¬å¸ç©æµè½¦é¢çº¦ 6å
¥ååå ", example = "1") |
| | | @ExcelColumn(name="å
³èä¸å¡ç±»åï¼0éæ½å·¥äººå访客ç³è¯· 1éæ½å·¥äººå访客ç³è¯· 2访客æ¥å¤ 3å
¬è½¦å¸å
ç¨è½¦ 4å
¬è½¦å®¤å¤ç¨è½¦ 5å¸å
¬å¸ç©æµè½¦é¢çº¦ 6å
¥ååå ") |
| | | private Integer objType; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0å®¡æ¹ 1æé", example = "1") |
| | |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "åç§° 0éæ½å·¥äººå访客ç³è¯· 1æ½å·¥äººå访客ç³è¯· 2访客æ¥å¤ 3å
¬è½¦å¸å
ç¨è½¦ 4å
¬è½¦å®¤å¤ç¨è½¦ 5å¸å
¬å¸ç©æµè½¦é¢çº¦", example = "1") |
| | | @ExcelColumn(name="åç§° 0éæ½å·¥äººå访客ç³è¯· 1æ½å·¥äººå访客ç³è¯· 2访客æ¥å¤ 3å
¬è½¦å¸å
ç¨è½¦ 4å
¬è½¦å®¤å¤ç¨è½¦ 5å¸å
¬å¸ç©æµè½¦é¢çº¦") |
| | | @ApiModelProperty(value = "åç§° 0éæ½å·¥äººå访客ç³è¯· 1æ½å·¥äººå访客ç³è¯· 2访客æ¥å¤ 3å
¬è½¦å¸å
ç¨è½¦ 4å
¬è½¦å®¤å¤ç¨è½¦ 5å¸å
¬å¸ç©æµè½¦é¢çº¦ 6å
¥ååå ", example = "1") |
| | | @ExcelColumn(name="åç§° 0éæ½å·¥äººå访客ç³è¯· 1æ½å·¥äººå访客ç³è¯· 2访客æ¥å¤ 3å
¬è½¦å¸å
ç¨è½¦ 4å
¬è½¦å®¤å¤ç¨è½¦ 5å¸å
¬å¸ç©æµè½¦é¢çº¦ 6å
¥ååå ") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "åç§°") |
| | |
| | | @TableField(exist = false) |
| | | private String queryDate; |
| | | |
| | | @ApiModelProperty(value = "å¾çåç¼") |
| | | @TableField(exist = false) |
| | | private String prefixUrl; |
| | | |
| | | @ApiModelProperty(value = "审æ¹ä¿¡æ¯æ°æ®") |
| | | @TableField(exist = false) |
| | | private ApproveDataVO approveDateVO; |
| | |
| | | |
| | | @ApiModelProperty(value = "åæ¹æéæ°é", example = "1") |
| | | @TableField(exist = false) |
| | | private Long lineUpNum; |
| | | private Integer lineUpNum; |
| | | |
| | | @ApiModelProperty(value = "é¢è®¡çå¾
æ¶é´", example = "1") |
| | | @TableField(exist = false) |
| | | private String waitTime; |
| | | |
| | | @ApiModelProperty(value = "é¢è®¡å®ææ¶é´", example = "1") |
| | | @TableField(exist = false) |
| | | private String finishTimeStr; |
| | | |
| | | @ApiModelProperty(value = "å
³èæå°ç»ç¼ç ï¼å
³èplatform_group表ï¼", example = "1") |
| | | @TableField(exist = false) |
| | |
| | | @TableField(exist = false) |
| | | private BigDecimal getDistance; |
| | | |
| | | @ApiModelProperty(value = "æå°ä½ä¸æçï¼ä¸æ¯/å°æ¶ï¼", hidden = true) |
| | | @TableField(exist = false) |
| | | private BigDecimal workRate; |
| | | |
| | | @ApiModelProperty(value = "ä¸å¡è§¦åæ¶é´ æ¶é´") |
| | | @TableField(exist = false) |
| | |
| | | @Api(tags = "å
¥åé¢çº¦ç³è¯·ä¿¡æ¯" ) |
| | | public class PlatformBooksApplyDTO { |
| | | |
| | | @ApiModelProperty(value = "ä¸»é® - ä¿®æ¹ä½¿ç¨") |
| | | private Integer id; |
| | | @ApiModelProperty(value = "ååå·") |
| | | private String contractNum; |
| | | |
| | |
| | | @ApiModelProperty(value = "æå°ä»»å¡å表") |
| | | private List<PlatformJob> platformJobList; |
| | | |
| | | @ApiModelProperty(value = "é¢çº¦æå") |
| | | private String bookingTips; |
| | | |
| | | @ApiModelProperty(value = "ååºå¯¼è§å¾") |
| | | private String reservationMap; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | void createApproveFlow(Integer tempType,Integer businessId,Integer createMemberId); |
| | | |
| | | void createApproveForPlatfrom(Integer tempId,Integer businessId,Integer createMemberId); |
| | | |
| | | ApproveDataVO arrangeApprovedData(Integer businessId, Integer businessType, Integer memberId); |
| | | |
| | | void approved(ApproveDTO approveDTO); |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Platform; |
| | | import com.doumee.dao.business.model.PlatformJob; |
| | | import com.doumee.dao.web.reqeust.JobDetailDTO; |
| | | import com.doumee.dao.web.reqeust.JobOperateDTO; |
| | |
| | | */ |
| | | long count(PlatformJob platformJob); |
| | | |
| | | DriverHomeVO getDriverHome(Integer memberId); |
| | | DriverHomeVO getDriverHome(LoginUserInfo loginUserInfo); |
| | | |
| | | /** |
| | | * è·ç¦»ç¾å° |
| | |
| | | */ |
| | | void finishWork(JobOperateDTO jobOperateDTO); |
| | | |
| | | /** |
| | | * è·åæå°ä¸çä»»å¡ä¿¡æ¯ |
| | | * @param groupId |
| | | * @param loginUserInfo |
| | | * @return |
| | | */ |
| | | List<Platform> getPlatformList(Integer groupId, LoginUserInfo loginUserInfo); |
| | | |
| | | } |
| | |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import io.swagger.models.auth.In; |
| | | import javafx.application.Platform; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.xpath.operations.Bool; |
| | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void createApproveForPlatfrom(Integer tempId,Integer businessId,Integer createMemberId){ |
| | | //æ¥è¯¢å¤çæ¨¡æ¿ |
| | | ApproveTempl approveTempl = approveTemplMapper.selectById(tempId); |
| | | if(Objects.isNull(approveTempl)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°å®¡æ¹æµé
置模æ¿"); |
| | | } |
| | | //æ¥è¯¢é
ç½®æµç¨ |
| | | List<ApproveParam> approveParamAllList = approveParamMapper.selectList(new QueryWrapper<ApproveParam>() |
| | | .lambda().eq(ApproveParam::getIsdeleted,Constants.ZERO) |
| | | .eq(ApproveParam::getTemplId,approveTempl.getId()) |
| | | .orderByAsc(ApproveParam::getType) |
| | | .orderByAsc(ApproveParam::getLevel) |
| | | ); |
| | | if(Objects.isNull(approveParamAllList)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªé
ç½®å®¡æ¹æµç¨"); |
| | | } |
| | | //审æ¹é
ç½® |
| | | List<ApproveParam> approveParamList = approveParamAllList.stream().filter(i->i.getType().equals(Constants.ZERO)).collect(Collectors.toList()); |
| | | if(Objects.isNull(approveParamList)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªé
ç½®å®¡æ¹æµç¨"); |
| | | } |
| | | List<ApproveParam> approveCopyList = approveParamAllList.stream().filter(i->i.getType().equals(Constants.ONE)).collect(Collectors.toList()); |
| | | |
| | | Member createMember = memberMapper.selectById(createMemberId); |
| | | if(Objects.isNull(createMember)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"ç³è¯·äººç»ç»ä¿¡æ¯å¼å¸¸"); |
| | | } |
| | | List<Approve> approveList = new ArrayList<>(); |
| | | |
| | | this.organizeApproveData(approveTempl,approveParamList,createMember,businessId,approveList); |
| | | |
| | | if(CollectionUtils.isEmpty(approveList)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å®¡æ¹æµé
ç½®é误"); |
| | | } |
| | | |
| | | //å¤çæéæ°æ® |
| | | if(CollectionUtils.isNotEmpty(approveCopyList)){ |
| | | this.organizeApproveCopyData(approveTempl,approveCopyList,businessId,approveList); |
| | | } |
| | | approveJoinMapper.insert(approveList); |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ç»ç»å®¡æ¹æµæ°æ® |
| | | * @param approveTempl |
| | |
| | | jsonMap.put("eTime", "ç»ææ¶é´:" + DateUtil.DateToStr(carUseBook.getEndTime() , "yyyy-MM-dd HH:mm")); |
| | | jsonMap.put("usrNum", StringUtils.isBlank(carUseBook.getMemberIds())?"ä¹è½¦äººæ°: 0人": "ä¹è½¦äººæ°: " +carUseBook.getMemberIds().split(",").length +"人"); |
| | | jsonMap.put("mdd", StringUtils.isBlank(carUseBook.getAddr())?"ç®çå°: - ": "ç®çå°:" +carUseBook.getAddr()); |
| | | }else { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED); |
| | | }else if(Constants.equalsInteger(noticeType,Constants.noticesObjectType.reason)){ |
| | | //ç©æµè½¦é¢çº¦ |
| | | PlatformBooks platformBooks = platformBooksMapper.selectById(businessId); |
| | | if(Objects.isNull(platformBooks)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªæ¥è¯¢å°ä¸å¡æ°æ®ä¿¡æ¯"); |
| | | } |
| | | title = "ãç©æµè½¦å
¥åé¢çº¦ãç³è¯·äºº - " + platformBooks.getDriverName(); |
| | | jsonMap.put("inType", "å
¥åºç±»åï¼"+(Constants.equalsInteger(platformBooks.getInType(),Constants.ZERO)?"æ´æç":"ä»¶ç")); |
| | | jsonMap.put("totalNum", "æ»è¿è¾éï¼"+platformBooks.getTotalNum()+"䏿¯"); |
| | | jsonMap.put("arriveDate", "å°åºæ¶é´ï¼" + DateUtil.DateToStr(platformBooks.getArriveDate() , "yyyy-MM-dd HH:mm")); |
| | | jsonMap.put("carNum", "车çç
§ï¼"+platformBooks.getCarCodeFront()); |
| | | } |
| | | return title; |
| | | } |
| | |
| | | }else if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar)||approveDTO.getObjType().equals( |
| | | Constants.approveObjectType.unCityUseCar)){ |
| | | this.updDriver(approveDTO,approve,true); |
| | | }else if(approveDTO.getObjType().equals(Constants.approveObjectType.logisticsCarUse)){ |
| | | }else if(approveDTO.getObjType().equals(Constants.approveObjectType.reason)){ |
| | | //ç©æµè½¦é¢çº¦ |
| | | PlatformBooks platformBooks = platformBooksMapper.selectById(approveDTO.getObjId()); |
| | | if(Objects.isNull(platformBooks)){ |
| | |
| | | systemUser.setUsername(registerDriverDTO.getPhone()); |
| | | systemUser.setRealname(registerDriverDTO.getName()); |
| | | systemUser.setMemberId(member.getId()); |
| | | systemUser.setMobile(registerDriverDTO.getPhone()); |
| | | systemUser.setSalt(salt); |
| | | systemUser.setPassword(member.getPassward()); |
| | | systemUser.setStatus(Constants.ZERO); |
| | |
| | | } |
| | | //æ¥è¯¢æ¯æ¥é
ç½®çæ»é¢çº¦é |
| | | PlatformReason platformReason = platformReasonMapper.selectById(platformBooksCheckNumDTO.getReasonId()); |
| | | if(Objects.isNull(platformReason)|| Constants.equalsInteger(platformReason.getIsdeleted(),Constants.ZERO)){ |
| | | if(Objects.isNull(platformReason)|| !Constants.equalsInteger(platformReason.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å
¥ååå ä¿¡æ¯å¼å¸¸,è¯·å·æ°éè¯"); |
| | | } |
| | | List<PlatformBooks> platformBooksList = platformBooksMapper.selectList(new QueryWrapper<PlatformBooks>().lambda() |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformReason platformReason = platformReasonMapper.selectById(platformBooksApplyDTO.getReasonId()); |
| | | if(Objects.isNull(platformReason)|| Constants.equalsInteger(platformReason.getIsdeleted(),Constants.ZERO)){ |
| | | if(Objects.isNull(platformReason)|| !Constants.equalsInteger(platformReason.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å
¥ååå ä¿¡æ¯å¼å¸¸,è¯·å·æ°éè¯"); |
| | | } |
| | | ApproveTempl approveTempl = approveTemplMapper.selectOne(new QueryWrapper<ApproveTempl>().lambda() |
| | | .eq(ApproveTempl::getIsdeleted,Constants.ZERO) |
| | | .eq(ApproveTempl::getObjId,platformReason.getId()) |
| | | .last(" limit 1") |
| | | ); |
| | | ApproveTempl approveTempl = approveTemplMapper.selectById(platformReason.getId()); |
| | | if(Objects.isNull(approveTempl)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªé
ç½®å®¡æ¹æµ,请è系管çå"); |
| | | } |
| | | |
| | | if(Constants.equalsInteger(platformBooksApplyDTO.getUserId(),platformBooksApplyDTO.getDriverId())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"人åä¿¡æ¯å¹é
é误"); |
| | | } |
| | | if(Objects.nonNull(platformReason.getLimitNum())&&platformReason.getLimitNum().compareTo(platformBooksApplyDTO.getTotalNum())>0){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"è¶
åºå
¥åç³è¯·çº¿è´¨é"); |
| | | if(!Constants.equalsInteger(approveTempl.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å®¡æ¹æµå·²åç¨,请è系管çå"); |
| | | } |
| | | PlatformBooks platformBooks = new PlatformBooks(); |
| | | BeanUtils.copyProperties(platformBooksApplyDTO,platformBooks); |
| | |
| | | platformBooksMapper.insert(platformBooks); |
| | | |
| | | //åå»ºå®¡æ¹æµä¿¡æ¯ |
| | | approveService.createApproveFlow(5,platformBooks.getId(),platformBooks.getDriverId()); |
| | | approveService.createApproveForPlatfrom(platformReason.getApproveTemplId(),platformBooks.getId(),platformBooks.getDriverId()); |
| | | return platformBooks.getId(); |
| | | } |
| | | |
| | | |
| | | |
| | | // @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public Integer edit(PlatformBooksApplyDTO platformBooksApplyDTO){ |
| | | if(Objects.isNull(platformBooksApplyDTO) |
| | | || Objects.isNull(platformBooksApplyDTO.getId()) |
| | | || StringUtils.isBlank(platformBooksApplyDTO.getContractNum()) |
| | | || Objects.isNull(platformBooksApplyDTO.getArriveDate()) |
| | | || Objects.isNull(platformBooksApplyDTO.getInType()) |
| | | || Objects.isNull(platformBooksApplyDTO.getTotalNum()) |
| | | || StringUtils.isBlank(platformBooksApplyDTO.getCarCodeFront()) |
| | | || StringUtils.isBlank(platformBooksApplyDTO.getCarCodeBack()) |
| | | || Objects.isNull(platformBooksApplyDTO.getDriverId()) |
| | | || StringUtils.isBlank(platformBooksApplyDTO.getDriverPhone()) |
| | | || StringUtils.isBlank(platformBooksApplyDTO.getDriverName()) |
| | | || StringUtils.isBlank(platformBooksApplyDTO.getTransportImg()) |
| | | || Objects.isNull(platformBooksApplyDTO.getReasonId()) |
| | | || StringUtils.isBlank(platformBooksApplyDTO.getInReason()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformBooks platformBooks = platformBooksMapper.selectById(platformBooksApplyDTO.getId()); |
| | | if(Objects.isNull(platformBooks)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformBooks.getStatus(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä¸å¡ç¶æå·²æµè½¬"); |
| | | } |
| | | BeanUtils.copyProperties(platformBooksApplyDTO,platformBooks); |
| | | platformBooks.setEditDate(new Date()); |
| | | platformBooksMapper.insert(platformBooks); |
| | | return platformBooks.getId(); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | |
| | | if(Objects.isNull(model)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°é¢çº¦è®°å½"); |
| | | } |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() + |
| | | systemDictDataBiz.queryByCode(Constants.FTP,Constants.PLATFORM).getCode(); |
| | | model.setPrefixUrl(prefixUrl); |
| | | |
| | | ApproveDataVO approveDataVO = approveService.arrangeApprovedData(id, |
| | | 5, |
| | | 6, |
| | | memberId); |
| | | model.setApproveDateVO(approveDataVO); |
| | | List<Approve> approveList = approveDataVO.getApproveList(); |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.PlatformGroupMapper; |
| | | import com.doumee.dao.business.PlatformShowParamMapper; |
| | | import com.doumee.dao.business.join.PlatformJobJoinMapper; |
| | | import com.doumee.dao.business.join.PlatformJoinMapper; |
| | | import com.doumee.dao.business.model.Platform; |
| | | import com.doumee.dao.business.model.PlatformGroup; |
| | | import com.doumee.dao.business.model.PlatformJob; |
| | | import com.doumee.dao.business.model.PlatformShowParam; |
| | | import com.doumee.service.business.PlatformGroupService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.service.business.PlatformJobService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.java.Log; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | |
| | | @Autowired |
| | | private PlatformShowParamMapper platformShowParamMapper; |
| | | |
| | | @Autowired |
| | | private PlatformJobJoinMapper platformJobJoinMapper; |
| | | |
| | | @Override |
| | | public Integer create(PlatformGroup platformGroup) { |
| | |
| | | .selectAll(Platform.class) |
| | | .select(" ( select count(1) from platform_job pj where t.id = pj.PLATFORM_ID and pj.STATUS = "+Constants.PlatformJobStatus.WORKING.getKey()+" ) as workStatus ") |
| | | .eq(Platform::getIsdeleted, Constants.ZERO) |
| | | .eq(Platform::getStatus, Constants.ZERO) |
| | | .eq(Objects.nonNull(queryType)&&!Constants.equalsInteger(queryType,Constants.ZERO),Platform::getStatus,Constants.ZERO) |
| | | ); |
| | | //å¤çæçæå°ä¿¡æ¯ æ¯å¦é
ç½®éè |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.join.PlatformJobJoinMapper; |
| | | import com.doumee.dao.business.join.PlatformJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.web.reqeust.JobDetailDTO; |
| | | import com.doumee.dao.web.reqeust.JobOperateDTO; |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | |
| | | @Autowired |
| | | private PlatformMapper platformMapper; |
| | | private PlatformJoinMapper platformJoinMapper; |
| | | |
| | | @Autowired |
| | | private PlatformLogMapper platformLogMapper; |
| | |
| | | |
| | | @Autowired |
| | | private PlatformWmsDetailMapper platformWmsDetailMapper; |
| | | |
| | | @Autowired |
| | | private PlatformGroupMapper platformGroupMapper; |
| | | |
| | | @Autowired |
| | | private PlatformShowParamMapper platformShowParamMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public PageData<PlatformJob> findPage(PageWrap<PlatformJob> pageWrap) { |
| | | IPage<PlatformJob> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<PlatformJob> queryWrapper = new QueryWrapper<>(); |
| | | MPJLambdaWrapper<PlatformJob> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper.lambda() |
| | | queryWrapper |
| | | .selectAll(PlatformJob.class) |
| | | .selectAs(Platform::getName,PlatformJob::getPlatformName) |
| | | .selectAs(Platform::getWorkRate,PlatformJob::getWorkRate) |
| | | .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId) |
| | | .eq(pageWrap.getModel().getId() != null, PlatformJob::getId, pageWrap.getModel().getId()) |
| | | .eq(pageWrap.getModel().getCreator() != null, PlatformJob::getCreator, pageWrap.getModel().getCreator()) |
| | | .ge(pageWrap.getModel().getCreateDate() != null, PlatformJob::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())) |
| | |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | |
| | | PageData<PlatformJob> pageData = PageData.from(platformJobMapper.selectPage(page, queryWrapper)); |
| | | pageData.getRecords().forEach(i->{ |
| | | IPage<PlatformJob> platformJobIPage = platformJobJoinMapper.selectJoinPage(page,PlatformJob.class,queryWrapper); |
| | | platformJobIPage.getRecords().forEach(i->{ |
| | | i.dealTime(); |
| | | this.getWmsJobData(i); |
| | | }); |
| | | return pageData; |
| | | return PageData.from(platformJobIPage); |
| | | // PageData<PlatformJob> pageData = PageData.from(platformJobMapper.selectPage(page, queryWrapper)); |
| | | // pageData.getRecords().forEach(i->{ |
| | | // i.dealTime(); |
| | | // this.getWmsJobData(i); |
| | | // }); |
| | | // return pageData; |
| | | } |
| | | |
| | | |
| | |
| | | platformJob.setPlatformWmsJob(platformWmsJob); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | public void queryWaitNum(PlatformJob platformJob){ |
| | | if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey())){ |
| | | //æ¥è¯¢åæ¹æéæ°é |
| | | List<PlatformJob> lineUpNum = platformJobMapper.selectList(new QueryWrapper<PlatformJob>().lambda() |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.WAIT_CALL.getKey() |
| | | ,Constants.PlatformJobStatus.IN_WAIT.getKey() |
| | | ,Constants.PlatformJobStatus.TRANSFERING.getKey()) |
| | | .gt(PlatformJob::getSignDate,platformJob.getSignDate()) |
| | | .eq(PlatformJob::getPlatformGroupId,platformJob.getPlatformGroupId()) |
| | | .like(PlatformJob::getArriveDate,DateUtil.getDate(platformJob.getArriveDate(),"yyyy-MM-dd"))); |
| | | platformJob.setLineUpNum(lineUpNum.size()); |
| | | BigDecimal sumWorkRate = platformJob.getTotalNum(); |
| | | for (PlatformJob linePlatformJob:lineUpNum) { |
| | | this.getWmsJobData(linePlatformJob); |
| | | sumWorkRate = sumWorkRate.add(linePlatformJob.getTotalNum()); |
| | | } |
| | | //计ç®é¢è®¡çå¾
æ¶é´ |
| | | List<Platform> platformList = platformJoinMapper.selectList(new QueryWrapper<Platform>().lambda().eq(Platform::getIsdeleted,Constants.ZERO).eq(Platform::getGroupId,platformJob.getPlatformGroupId())); |
| | | BigDecimal workRate = platformList.stream().map(m->m.getWorkRate()).reduce(BigDecimal.ZERO,BigDecimal::add); |
| | | if(sumWorkRate.compareTo(BigDecimal.ZERO) == Constants.ZERO|| workRate.compareTo(BigDecimal.ZERO) == Constants.ZERO ){ |
| | | BigDecimal sumMinute = sumWorkRate.divide(workRate,1, RoundingMode.HALF_DOWN).multiply(BigDecimal.valueOf(60L)); |
| | | Integer sumMinuteInteger = sumMinute.intValue(); |
| | | Integer hours = sumMinuteInteger/60; |
| | | Integer minus = sumMinuteInteger%60; |
| | | String waitTime = "é¢è®¡çå¾
ï¼"; |
| | | if(!Constants.equalsInteger(hours,Constants.ZERO)){ |
| | | waitTime = waitTime + hours + "å°æ¶"; |
| | | } |
| | | if(!Constants.equalsInteger(hours,Constants.ZERO)){ |
| | | waitTime = waitTime + minus + "åé"; |
| | | } |
| | | platformJob.setWaitTime(waitTime); |
| | | } |
| | | }else if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())){ |
| | | //æ¥è¯¢æåå¼å§ä»»å¡çæå°è®°å½ æ¥å¿è¡¨ å 为åå¨å¼å¸¸æèµ· 转移 çé®é¢ |
| | | PlatformLog platformLog = platformLogMapper.selectOne(new QueryWrapper<PlatformLog>().lambda() |
| | | .eq(PlatformLog::getJobId,platformJob.getId()) |
| | | .eq(PlatformLog::getObjType,Constants.PlatformJobStatus.WORKING.getKey()) |
| | | .orderByDesc(PlatformLog::getCreateDate) |
| | | .last(" limit 1") |
| | | ); |
| | | if(Objects.nonNull(platformLog)){ |
| | | BigDecimal sumMinute = platformJob.getTotalNum().divide(platformJob.getWorkRate(),1, RoundingMode.HALF_DOWN).multiply(BigDecimal.valueOf(60L)); |
| | | platformJob.setFinishTimeStr(DateUtil.DateToStr(DateUtil.afterMinutesDate(platformLog.getCreateDate(),sumMinute.intValue()),"HH:mm")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | //TODO |
| | | @Override |
| | | public DriverHomeVO getDriverHome(Integer memberId){ |
| | | public DriverHomeVO getDriverHome(LoginUserInfo loginUserInfo){ |
| | | DriverHomeVO driverHomeVO = new DriverHomeVO(); |
| | | //TODO è½®æå¾ |
| | | |
| | | List<PlatformJob> platformJobList = platformJobMapper.selectList(new QueryWrapper<PlatformJob>() |
| | | .lambda() |
| | | .eq(PlatformJob::getDriverId,memberId) |
| | | // .like(PlatformJob::get) |
| | | .orderByDesc(PlatformJob::getId)); |
| | | List<PlatformJob> platformJobList = platformJobJoinMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAll(PlatformJob.class) |
| | | .selectAs(Platform::getName,PlatformJob::getPlatformName) |
| | | .selectAs(Platform::getWorkRate,PlatformJob::getWorkRate) |
| | | .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformJob::getDrivierPhone,loginUserInfo.getMobile()) |
| | | .like(PlatformJob::getArriveDate,DateUtil.getCurrDate()) |
| | | .orderByDesc(PlatformJob::getId) |
| | | ); |
| | | for (PlatformJob platformJob:platformJobList) { |
| | | //å¤çWSMæ°é |
| | | this.getWmsJobData(platformJob); |
| | | //æ¥è¯¢åæ¹æéæ°é |
| | | this.queryWaitNum(platformJob); |
| | | } |
| | | |
| | | |
| | | driverHomeVO.setPlatformJobList(platformJobList); |
| | | |
| | | // ååºå¯¼è§å¾ å¾ç |
| | | driverHomeVO.setReservationMap(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.PLATFORM_GUIDEMAP).getCode()); |
| | | // é¢çº¦æå ææ¬ |
| | | driverHomeVO.setBookingTips(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.PLATFORM_BOOKING_TIPS).getCode()); |
| | | |
| | | return driverHomeVO; |
| | | } |
| | |
| | | } |
| | | }else if( Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey()) |
| | | || Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.IN_WAIT.getKey()) |
| | | ){//æ¥è¯¢æéæ
åµ |
| | | Long lineUpNum = platformJobMapper.selectCount(new QueryWrapper<PlatformJob>().lambda() |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .in(PlatformJob::getStatus,Constants.PlatformJobStatus.WAIT_CALL.getKey() |
| | | ,Constants.PlatformJobStatus.IN_WAIT.getKey() |
| | | ,Constants.PlatformJobStatus.TRANSFERING.getKey()) |
| | | .gt(PlatformJob::getSignDate,platformJob.getSignDate()) |
| | | .like(PlatformJob::getArriveDate,DateUtil.getDate(platformJob.getArriveDate(),"yyyy-MM-dd"))); |
| | | platformJob.setLineUpNum(lineUpNum); |
| | | ){ |
| | | //æ¥è¯¢åæ¹æéæ°é |
| | | this.queryWaitNum(platformJob); |
| | | }else if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())){ |
| | | //ä½ä¸æå°ä¿¡æ¯ |
| | | Platform platform = platformMapper.selectById(platformJob.getPlatformId()); |
| | | Platform platform = platformJoinMapper.selectById(platformJob.getPlatformId()); |
| | | if(Objects.nonNull(platform)){ |
| | | platformJob.setPlatformName(platform.getName()); |
| | | } |
| | |
| | | ); |
| | | //è·åæææå°ç» |
| | | List<Integer> platformIdList = platformJobList.stream().map(m->m.getPlatformGroupId()).collect(Collectors.toList()); |
| | | List<Platform> platformList = platformMapper.selectList(new QueryWrapper<Platform>().lambda() |
| | | List<Platform> platformList = platformJoinMapper.selectList(new QueryWrapper<Platform>().lambda() |
| | | .eq(Platform::getIsdeleted,Constants.ZERO) |
| | | .in(Platform::getId,platformIdList)); |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<Platform> getPlatformList(Integer groupId, LoginUserInfo loginUserInfo){ |
| | | //æ¥è¯¢æå°ç»ä¸æææå° |
| | | List<Platform> allPlatformList = platformJoinMapper.selectJoinList(Platform.class, |
| | | new MPJLambdaWrapper<Platform>() |
| | | .selectAll(Platform.class) |
| | | .select(" ( select count(1) from platform_job pj where t.id = pj.PLATFORM_ID and pj.STATUS = "+Constants.PlatformJobStatus.WORKING.getKey()+" ) as workStatus ") |
| | | .eq(Platform::getIsdeleted, Constants.ZERO) |
| | | .eq(Platform::getStatus,Constants.ZERO) |
| | | .eq(Platform::getGroupId,groupId) |
| | | ); |
| | | this.getPlatformShow(allPlatformList,loginUserInfo); |
| | | for (Platform platform:allPlatformList) { |
| | | this.getJobByPlatform(platform,loginUserInfo); |
| | | } |
| | | return allPlatformList; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æå°çå¼å¯æ
åµ |
| | | * @param allPlatformList |
| | | * @param loginUserInfo |
| | | */ |
| | | public void getPlatformShow(List<Platform> allPlatformList , LoginUserInfo loginUserInfo){ |
| | | //å¤çæçæå°ä¿¡æ¯ æ¯å¦é
ç½®éè |
| | | List<PlatformShowParam> platformShowParamList = platformShowParamMapper.selectList(new QueryWrapper<PlatformShowParam>() |
| | | .lambda() |
| | | .eq(PlatformShowParam::getIsdeleted, Constants.ZERO) |
| | | .eq(PlatformShowParam::getMemberId,loginUserInfo.getMemberId()) |
| | | ); |
| | | //妿æªé
ç½®è¯¥æ°æ® åå
¨é¨æ¾ç¤º |
| | | if(CollectionUtils.isEmpty(platformShowParamList)){ |
| | | for (Platform platform:allPlatformList) { |
| | | platform.setShowConfig(true); |
| | | } |
| | | }else{ |
| | | //æ ¹æ®é
ç½®æ¾ç¤ºæ°æ® |
| | | for (PlatformShowParam platformShowParam:platformShowParamList) { |
| | | for (Platform platform:allPlatformList) { |
| | | if(Constants.equalsInteger(platform.getId(),platformShowParam.getPlatformId())){ |
| | | platform.setShowConfig(true); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * è·åæå°ä¸çä»»å¡å表 |
| | | * @param platform |
| | | * @param loginUserInfo |
| | | */ |
| | | public void getJobByPlatform(Platform platform,LoginUserInfo loginUserInfo){ |
| | | List<PlatformJob> platformJobList = platformJobJoinMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAll(PlatformJob.class) |
| | | .selectAs(Platform::getName,PlatformJob::getPlatformName) |
| | | .selectAs(Platform::getWorkRate,PlatformJob::getWorkRate) |
| | | .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId) |
| | | .eq(PlatformJob::getPlatformId,platform.getId()) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformJob::getDrivierPhone,loginUserInfo.getMobile()) |
| | | .like(PlatformJob::getArriveDate, DateUtil.getCurrDate()) |
| | | .orderByDesc(PlatformJob::getId) |
| | | ); |
| | | for (PlatformJob platformJob:platformJobList) { |
| | | //å¤çWSMæ°é |
| | | this.getWmsJobData(platformJob); |
| | | //æ¥è¯¢åæ¹æéæ°é |
| | | this.queryWaitNum(platformJob); |
| | | } |
| | | platform.setWorkJobList(platformJobList); |
| | | } |
| | | |
| | | } |
| | |
| | | @Override |
| | | public List<PlatformReason> findList(PlatformReason platformReason) { |
| | | QueryWrapper<PlatformReason> wrapper = new QueryWrapper<>(platformReason); |
| | | wrapper.eq("isdeleted",Constants.ZERO); |
| | | return platformReasonMapper.selectList(wrapper); |
| | | } |
| | | |
| | |
| | | QueryWrapper<VisitReason> wrapper = new QueryWrapper<>(visitReason); |
| | | return visitReasonMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |