Merge remote-tracking branch 'origin/master'
| | |
| | | "dayjs": "^1.11.11", |
| | | "echarts": "^5.5.1", |
| | | "pinia": "^2.1.7", |
| | | "postcss-px2rem": "^0.3.0", |
| | | "px2rem-loader": "^0.1.9", |
| | | "uqrcodejs": "^4.0.7", |
| | | "v-scale-screen": "^2.0.0", |
| | | "vue": "^3.4.21", |
| | | "vue-router": "^4.3.0" |
| | | }, |
| | |
| | | |
| | | import App from './App.vue' |
| | | import router from './router' |
| | | import '@/utils/scale_screen' |
| | | |
| | | const app = createApp(App) |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | // remçæ¯éé
é
ç½®æä»¶ |
| | | // åºåå¤§å° |
| | | const baseSize = 14 |
| | | // 设置 rem 彿° |
| | | function setRem() { |
| | | // å½å页é¢å®½åº¦ç¸å¯¹äº 1920宽çç¼©æ¾æ¯ä¾ï¼å¯æ ¹æ®èªå·±éè¦ä¿®æ¹ã |
| | | const scale = document.documentElement.clientWidth / 1920 |
| | | // è®¾ç½®é¡µé¢æ ¹èç¹åä½å¤§å°ï¼âMath.min(scale, 2)â ææé«æ¾å¤§æ¯ä¾ä¸º2ï¼å¯æ ¹æ®å®é
ä¸å¡éæ±è°æ´ï¼ |
| | | document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + 'px' |
| | | } |
| | | // åå§å |
| | | setRem() |
| | | // æ¹åçªå£å¤§å°æ¶éæ°è®¾ç½® rem |
| | | window.onresize = function () { |
| | | setRem() |
| | | } |
| | | |
| | |
| | | import { getLargeScreenData } from '@/utils/request' |
| | | import duration from 'dayjs/plugin/duration' |
| | | dayjs.extend(duration) |
| | | import VScaleScreen from 'v-scale-screen' |
| | | |
| | | const qrcode = ref('') |
| | | const contentList = ref([]) |
| | |
| | | var qr = new UQRCode() |
| | | // 设置äºç»´ç å
容 |
| | | qr.data = qrcode.value |
| | | qr.size = 210 |
| | | qr.size = 220 |
| | | // è°ç¨å¶ä½äºç»´ç æ¹æ³ |
| | | qr.make() |
| | | var canvas = document.getElementById("qrcode") |
| | |
| | | newTime.value = dayjs().format('HH:mm') |
| | | }, 1000) |
| | | |
| | | const isFullscreen = ref(false); |
| | | const isFullscreen = ref(false) |
| | | const handleFull = () => { |
| | | if(!isFullscreen.value){ |
| | | if (!isFullscreen.value) { |
| | | handleFullScreen() |
| | | }else{ |
| | | } else { |
| | | cancelFullscreen() |
| | | } |
| | | } |
| | | setTimeout(() => { |
| | | handleFull() |
| | | }, 1000) |
| | | const handler = () => { |
| | | isFullscreen.value = document.fullscreenElement !== null; |
| | | isFullscreen.value = document.fullscreenElement !== null |
| | | if (!isFullscreen) { |
| | | // éåºå
¨å±æ¶åè§£é¤çå¬ï¼ä¸ç¶æ¯æ¬¡çå¬é½ä¼æ·»å 䏿¬¡ç»å® |
| | | document.removeEventListener("fullscreenchange", handler); |
| | | document.removeEventListener("fullscreenchange", handler) |
| | | } |
| | | }; |
| | | document.addEventListener("fullscreenchange", handler); |
| | | } |
| | | document.addEventListener("fullscreenchange", handler) |
| | | const handleFullScreen = () => { |
| | | let elem = document.documentElement |
| | | // å°è¯å¯ç¨å
¨å±æ¨¡å¼ |
| | |
| | | } |
| | | function cancelFullscreen() { |
| | | if (document.exitFullscreen) { |
| | | document.exitFullscreen(); |
| | | document.exitFullscreen() |
| | | } else if (document.msExitFullscreen) { |
| | | document.msExitFullscreen(); |
| | | document.msExitFullscreen() |
| | | } else if (document.mozCancelFullScreen) { |
| | | document.mozCancelFullScreen(); |
| | | document.mozCancelFullScreen() |
| | | } else if (document.webkitExitFullscreen) { |
| | | document.webkitExitFullscreen(); |
| | | document.webkitExitFullscreen() |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | <template> |
| | | <div class="main_app"> |
| | | <div class="main_header"> |
| | | <img class="bg" src="@/assets/images/call/title@2x.png" alt=""> |
| | | <div class="title">宿³°æºæ
§ç©æµååº-车è¾å«å·å¤§å±</div> |
| | | <div class="time_wrap"> |
| | | <div class="left"> |
| | | <div class="week">{{ newWeek }}</div> |
| | | <div class="date">{{ newDate }}</div> |
| | | </div> |
| | | <div class="time">{{ newTime }}</div> |
| | | </div> |
| | | </div> |
| | | <div class="main_content"> |
| | | <div class="list"> |
| | | <div class="line header"> |
| | | <div class="item no">åºå·</div> |
| | | <div class="item">车çå·</div> |
| | | <div class="item status">ç¶æ</div> |
| | | <div class="item">åé æå°</div> |
| | | <div class="item">æ¶é´</div> |
| | | </div> |
| | | <div class="line" v-for="item in contentTempList" :key="item.id"> |
| | | <div class="item no">{{ item.signNum }}</div> |
| | | <div class="item">{{ item.carCodeFront }}</div> |
| | | <div class="item"> |
| | | <div :class="{ |
| | | call_ed: item.status == 4, |
| | | underway: item.status == 5, |
| | | padding: item.status == 2 || item.status == 3, |
| | | }" class="status">{{ statusMap[item.status] }}</div> |
| | | <v-scale-screen width="1920" height="1080" :fullScreen="true"> |
| | | <div class="main_app"> |
| | | <div class="main_header"> |
| | | <img class="bg" src="@/assets/images/call/title@2x.png" alt=""> |
| | | <div class="title">宿³°æºæ
§ç©æµååº-车è¾å«å·å¤§å±</div> |
| | | <div class="time_wrap" @click="handleFull"> |
| | | <div class="left"> |
| | | <div class="week">{{ newWeek }}</div> |
| | | <div class="date">{{ newDate }}</div> |
| | | </div> |
| | | <div class="item">{{ item.platformName || '-' }}</div> |
| | | <div class="item"> |
| | | <div v-if="item.optTimeTemp" class="time_place">é¢è®¡å®ææ¶é´</div> |
| | | <div>{{ item.optTimeTemp || '-' }}</div> |
| | | </div> |
| | | <div class="time">{{ newTime }}</div> |
| | | </div> |
| | | </div> |
| | | <div class="current"> |
| | | <div class="tip_wrap"> |
| | | <img src="@/assets/images/call/ic_left@2x.png" class="icon icon_l" alt=""> |
| | | <img src="@/assets/images/call/ic_right@2x.png" class="icon icon_r" alt=""> |
| | | <div v-if="callList.length > 0" class="current_plat"> |
| | | <div class="id_card">{{ activeCall.carCodeFront }}</div> |
| | | <div class="no">({{ activeCall.signNum }})</div> |
| | | <div class="place"> |
| | | <span>åå¾</span> |
| | | <span class="plat"> {{ activeCall.platformName }} </span> |
| | | <span>ä½ä¸</span> |
| | | <div class="main_content"> |
| | | <div class="list"> |
| | | <div class="line header"> |
| | | <div class="item no">åºå·</div> |
| | | <div class="item">车çå·</div> |
| | | <div class="item status">ç¶æ</div> |
| | | <div class="item">åé æå°</div> |
| | | <div class="item">æ¶é´</div> |
| | | </div> |
| | | <div class="line" v-for="item in contentTempList" :key="item.id"> |
| | | <div class="item no">{{ item.signNum }}</div> |
| | | <div class="item">{{ item.carCodeFront }}</div> |
| | | <div class="item"> |
| | | <div :class="{ |
| | | call_ed: item.status == 4, |
| | | underway: item.status == 5, |
| | | padding: item.status == 2 || item.status == 3, |
| | | }" class="status">{{ statusMap[item.status] }}</div> |
| | | </div> |
| | | <div class="item">{{ item.platformName || '-' }}</div> |
| | | <div class="item"> |
| | | <div v-if="item.optTimeTemp" class="time_place">é¢è®¡å®ææ¶é´</div> |
| | | <div>{{ item.optTimeTemp || '-' }}</div> |
| | | </div> |
| | | </div> |
| | | <div v-else class="empty"> |
| | | <div class="title">温馨æç¤º</div> |
| | | <div class="line">1ãè¯·å¸æºæ ¹æ®å«å·å±æç¤ºå
¥å</div> |
| | | <div class="line">2ãæªå«å·è½¦è¾è¯·èå¿çå¾
</div> |
| | | <div class="line">3ã请æåºæéå
¥å</div> |
| | | <div class="line">4ãè£
å¸è´§ç»æç¦æ¢å¨ååºéç</div> |
| | | <div class="line">5ã请éµå®ååºå®å
¨è§ç« å¶åº¦</div> |
| | | </div> |
| | | </div> |
| | | <div class="qrcode_wrap"> |
| | | <div class="qrcode"> |
| | | <canvas id="qrcode" width="210" height="210"></canvas> |
| | | <div class="current"> |
| | | <div class="tip_wrap"> |
| | | <img src="@/assets/images/call/ic_left@2x.png" class="icon icon_l" alt=""> |
| | | <img src="@/assets/images/call/ic_right@2x.png" class="icon icon_r" alt=""> |
| | | <div v-if="callList.length > 0" class="current_plat"> |
| | | <div class="id_card">{{ activeCall.carCodeFront }}</div> |
| | | <div class="no">({{ activeCall.signNum }})</div> |
| | | <div class="place"> |
| | | <span>åå¾</span> |
| | | <span class="plat"> {{ activeCall.platformName }} </span> |
| | | <span>ä½ä¸</span> |
| | | </div> |
| | | </div> |
| | | <div v-else class="empty"> |
| | | <div class="title">温馨æç¤º</div> |
| | | <div class="line">1ãè¯·å¸æºæ ¹æ®å«å·å±æç¤ºå
¥å</div> |
| | | <div class="line">2ãæªå«å·è½¦è¾è¯·èå¿çå¾
</div> |
| | | <div class="line">3ã请æåºæéå
¥å</div> |
| | | <div class="line">4ãè£
å¸è´§ç»æç¦æ¢å¨ååºéç</div> |
| | | <div class="line">5ã请éµå®ååºå®å
¨è§ç« å¶åº¦</div> |
| | | </div> |
| | | </div> |
| | | <div class="title">请æ«ç ç¾å°</div> |
| | | <div class="qrcode_wrap"> |
| | | <div class="qrcode"> |
| | | <canvas id="qrcode" width="220" height="220"></canvas> |
| | | </div> |
| | | <div class="title">请æ«ç ç¾å°</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="main_footer"> |
| | | <img src="@/assets/images/call/ic_news@2x.png" class="icon" alt=""> |
| | | <div class="title">è¯·æ ¹æ®éåæç¤ºä¿¡æ¯ï¼ä¾æ¬¡çåè¿åº</div> |
| | | <div class="icon"></div> |
| | | </div> |
| | | </div> |
| | | <div class="main_footer"> |
| | | <img @click="handleFull" src="@/assets/images/call/ic_news@2x.png" class="icon" alt=""> |
| | | <div class="title">è¯·æ ¹æ®éåæç¤ºä¿¡æ¯ï¼ä¾æ¬¡çåè¿åº</div> |
| | | <div class="icon"></div> |
| | | </div> |
| | | </div> |
| | | </v-scale-screen> |
| | | |
| | | </template> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | |
| | | .main_app { |
| | | color: #fff; |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100vh; |
| | | width: 1920px; |
| | | height: 1080px; |
| | | overflow: hidden; |
| | | background-color: #092030; |
| | | position: relative; |
| | |
| | | |
| | | .main_header { |
| | | width: 100%; |
| | | height: 112px; |
| | | flex: 10.3; |
| | | position: relative; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 0 50px; |
| | | z-index: 11; |
| | | |
| | | .title { |
| | | font-weight: 800; |
| | | font-size: 48px; |
| | |
| | | } |
| | | |
| | | .main_content { |
| | | flex: 1; |
| | | flex: 82.2; |
| | | display: flex; |
| | | padding: 30px 20px; |
| | | position: relative; |
| | |
| | | font-size: bold; |
| | | font-size: 36px; |
| | | } |
| | | |
| | | background: linear-gradient(180deg, #00B5D1 0%, #003C57 100%) !important; |
| | | } |
| | | } |
| | |
| | | padding: 30px 40px; |
| | | color: #FFA000; |
| | | height: 100%; |
| | | |
| | | .id_card { |
| | | font-weight: 500; |
| | | font-size: 68px; |
| | |
| | | font-weight: 500; |
| | | font-size: 26px; |
| | | height: 100%; |
| | | |
| | | .title { |
| | | text-align: center; |
| | | font-weight: bold; |
| | |
| | | |
| | | .main_footer { |
| | | background-color: #1D8D9E; |
| | | height: 80px; |
| | | flex: 7.4; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 50px; |
| | |
| | | spring: |
| | | profiles: |
| | | active: pro |
| | | active: dev |
| | | application: |
| | | name: system_gateway |
| | | # å®å
¨é
ç½® |
| | |
| | | int currentMonth = Integer.parseInt(sdfMonth.format(currentDate)); |
| | | List<String> list = new ArrayList<>(); |
| | | |
| | | System.out.println("è¿12个æä»½ï¼"); |
| | | for (int i = 0; i < month; i++) { |
| | | int tempYear = currentYear; |
| | | int tempMonth = currentMonth - i; |
| | |
| | | |
| | | public class SmsConstants { |
| | | |
| | | |
| | | |
| | | public static final String inventCode ="inventCode" ; |
| | | public static final String visit ="visit" ; |
| | | public static final String visitReport ="visitReport" ; |
| | | public static final String hiddenDanger ="hiddenDanger" ; |
| | | public static final String carUse ="carUse" ; |
| | | public static final String meeting ="meeting" ; |
| | | public static final String platformBook ="platformBook" ; |
| | | public static final String platformJob ="platformJob" ; |
| | | public static final String inventCode ="0" ; |
| | | public static final String visit ="1" ; |
| | | public static final String visitReport ="2" ; |
| | | public static final String hiddenDanger ="3" ; |
| | | public static final String carUse ="4" ; |
| | | public static final String meeting ="5" ; |
| | | public static final String platformBook ="6" ; |
| | | public static final String platformJob ="7" ; |
| | | |
| | | |
| | | /** |
| | |
| | | String carUseBookCancel = "carUseBookCancel"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ç©æµè½¦é¢çº¦ |
| | | */ |
| | |
| | | //ç©æµè½¦é¢çº¦-审æ¹é©³åçä¿¡éç¥æ¨¡æ¿ï¼ç»ç³è¯·äººï¼ |
| | | String platformBookAuditFail = "platformBookAuditFail"; |
| | | //ç©æµè½¦é¢çº¦-å
¥åé¢çº¦åæ¶çä¿¡éç¥æ¨¡æ¿ï¼ç»ç³è¯·äººï¼ |
| | | String carUseBookCancel = "carUseBookCancel"; |
| | | String platformBookCancel = "platformBookCancel"; |
| | | } |
| | | |
| | | |
| | |
| | | //ç©æµè½¦ä½ä¸-è¿è¾ä»»å¡ä¸æ¢æéï¼ç»å¸æºï¼ï¼ã |
| | | String platformJobStopJob = "platformJobStopJob"; |
| | | //ç©æµè½¦é¢çº¦-å«å·å
¥åçå¾
ï¼ç»å¸æºï¼ |
| | | String platformBookCallIn = "platformBookCallIn"; |
| | | String platformJobCallIn = "platformJobCallIn"; |
| | | //ç©æµè½¦é¢çº¦-æå°å«å·ï¼ç»å¸æºï¼ |
| | | String platformBookSingIn = "platformBookSingIn"; |
| | | String platformJobSingIn = "platformJobSingIn"; |
| | | //ç©æµè½¦é¢çº¦-æå°å«å·è¿å·ï¼ç»å¸æºï¼ |
| | | String platformBookOverNum = "platformBookOverNum"; |
| | | String platformJobOverNum = "platformJobOverNum"; |
| | | //ç©æµè½¦é¢çº¦-ä½ä¸å¼å§ï¼ç»å¸æºï¼ |
| | | String platformBookWorking = "platformBookWorking"; |
| | | String platformJobWorking = "platformJobWorking"; |
| | | //ç©æµè½¦é¢çº¦-ä½ä¸å®æï¼ç»å¸æºï¼ |
| | | String platformBookFinish = "platformBookFinish"; |
| | | String platformJobFinish = "platformJobFinish"; |
| | | //ç©æµè½¦é¢çº¦-ä½ä¸å¼å¸¸æèµ·ï¼ç»å¸æºï¼ |
| | | String platformBookError = "platformBookError"; |
| | | String platformJobError = "platformJobError"; |
| | | //ç©æµè½¦é¢çº¦-æå°è½¬ç§»ï¼ç»å¸æºï¼ |
| | | String platformBookMove = "platformBookMove"; |
| | | String platformJobMove = "platformJobMove"; |
| | | //ç©æµè½¦é¢çº¦-æå°åé è¶
æ¶ï¼ç»å¸æºï¼ |
| | | String platformBookTimeOut = "platformBookTimeOut"; |
| | | |
| | | String platformJobTimeOut = "platformJobTimeOut"; |
| | | } |
| | | |
| | | |
| | |
| | | spring: |
| | | profiles: |
| | | active: pro |
| | | active: dev |
| | | application: |
| | | name: visitsAdmin |
| | | # å®å
¨é
ç½® |
| | |
| | | @TableField(exist = false) |
| | | private String auditName; |
| | | |
| | | |
| | | @ApiModelProperty(value = "审æ¹ä¿¡æ¯æ°æ®") |
| | | @TableField(exist = false) |
| | | private ApproveDataVO approveDateVO; |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.SmsConstants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | |
| | | 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.third.EmayService; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private VisitParkMapper visitParkMapper; |
| | | |
| | | @Autowired |
| | | private SmsConfigMapper smsConfigMapper; |
| | | |
| | | @Autowired |
| | | private SmsEmailMapper smsEmailMapper; |
| | | |
| | | @Autowired |
| | | private EmayService emayService; |
| | | |
| | | |
| | | @Override |
| | |
| | | this.organizeApproveCopyData(approveTempl,approveCopyList,businessId,approveList); |
| | | } |
| | | approveJoinMapper.insert(approveList); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | approve.setAddrParam(approveParam.getAddrParam()); |
| | | approve.setType(Constants.ZERO); |
| | | approveList.add(approve); |
| | | |
| | | if(Constants.equalsInteger(approve.getStatus(),Constants.ONE)){ |
| | | //åéçä¿¡éç¥ |
| | | if(Constants.equalsInteger(noticeType,Constants.noticesObjectType.reason)){ |
| | | //ç©æµè½¦é¢çº¦ |
| | | SmsEmailServiceImpl.sendPlatformBookSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformBooksMapper,businessId, |
| | | SmsConstants.platformBookContent.platformBookWaitAudit, |
| | | null,null |
| | | ); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | .in(Approve::getId,approveList.stream().map(m->m.getId()).collect(Collectors.toList()))); |
| | | } |
| | | /**å¼å¯ä¸ä¸çº§å«çæ°æ®ä¸ºå¾
å®¡æ ¸**/ |
| | | |
| | | List<Approve> waitAuditList = approveJoinMapper.selectJoinList(Approve.class, |
| | | new MPJLambdaWrapper<Approve>() |
| | | .selectAll(Approve.class) |
| | | .selectAs(Member::getPhone,Approve::getMemberPhone) |
| | | .leftJoin(Member.class,Member::getId,Approve::getChekorId) |
| | | .eq(Approve::getStatus,Constants.approveStatus.wait) |
| | | .eq(Approve::getObjId,approve.getObjId()) |
| | | .eq(Approve::getObjType,approve.getObjType()) |
| | | .eq(Approve::getLevel,(approve.getLevel()+1))); |
| | | |
| | | approveJoinMapper.update(null,new UpdateWrapper<Approve>() |
| | | .lambda() |
| | | .set(Approve::getStatus,Constants.approveStatus.auditIng) |
| | |
| | | .eq(Approve::getObjType,approve.getObjType()) |
| | | .eq(Approve::getLevel,(approve.getLevel()+1)) |
| | | ); |
| | | //åéçä¿¡éç¥ ä¸çº§å®¡æ¹äºº |
| | | |
| | | |
| | | List<String> memberPhone = waitAuditList.stream().filter(i->StringUtils.isNotBlank(i.getMemberPhone())).map(i->i.getMemberPhone()).collect(Collectors.toList()); |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.reason)){ |
| | | SmsEmailServiceImpl.sendPlatformBookSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformBooksMapper,approveDTO.getObjId(), |
| | | SmsConstants.platformBookContent.platformBookWaitAudit, |
| | | approveDTO.getCheckInfo(),memberPhone |
| | | ); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.unConstructionVisit) |
| | | ||approveDTO.getObjType().equals(Constants.approveObjectType.constructionVisit) |
| | | ||approveDTO.getObjType().equals(Constants.approveObjectType.visitReporting)) { |
| | |
| | | visitsMapper.update(null,new UpdateWrapper<Visits>().lambda().set(Visits::getStatus,Constants.ONE).eq(Visits::getId,visits.getId())); |
| | | } |
| | | } |
| | | |
| | | |
| | | }else if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar)||approveDTO.getObjType().equals( |
| | | Constants.approveObjectType.unCityUseCar)){ |
| | | this.updDriver(approveDTO,approve,false); |
| | |
| | | visits.setEditDate(new Date()); |
| | | visits.setEditor(approveDTO.getLoginUserInfo().getMemberId()); |
| | | //ä¸å访客æ¥å¤è½¦è¾ä¿¡æ¯ |
| | | |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.visitReporting)){ |
| | | if(Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)&&approveDTO.getObjType().equals(Constants.approveObjectType.visitReporting)){ |
| | | Boolean sendStatus = true; |
| | | //æ¥è¯¢å½åå¯ç¨çåè½¦åº |
| | | List<Parks> parksList = parksMapper.selectList(new QueryWrapper<Parks>() |
| | |
| | | platformBooks.setStatus(approveDTO.getStatus()); |
| | | platformBooks.setEditDate(new Date()); |
| | | platformBooks.setEditor(approveDTO.getLoginUserInfo().getMemberId()); |
| | | PlatformReason platformReason = platformReasonMapper.selectById(platformBooks.getReasonId()); |
| | | if(Objects.isNull(platformReason)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°å
¥ååå æ°æ®"); |
| | | } |
| | | PlatformGroup platformGroup = platformGroupMapper.selectById(platformReason.getGroupId()); |
| | | if(Objects.isNull(platformGroup)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°å
¥ååå é
ç½®æå°ç»æ°æ®"); |
| | | } |
| | | if(Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)){ |
| | | PlatformReason platformReason = platformReasonMapper.selectById(platformBooks.getReasonId()); |
| | | if(Objects.isNull(platformReason)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°å
¥ååå æ°æ®"); |
| | | } |
| | | PlatformGroup platformGroup = platformGroupMapper.selectById(platformReason.getGroupId()); |
| | | if(Objects.isNull(platformGroup)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°å
¥ååå é
ç½®æå°ç»æ°æ®"); |
| | | } |
| | | |
| | | //çæä»»å¡è®°å½ |
| | | PlatformJob platformJob = platformBooks.toPlatformJob(); |
| | | platformJob.setId(null); |
| | | platformJob.setPlatformGroupId(platformReason.getGroupId().intValue()); |
| | | if(Constants.equalsInteger(platformGroup.getType(),Constants.ZERO)){ |
| | | platformJob.setType(Constants.platformJobType.wxcxh); |
| | | }else if(Constants.equalsInteger(platformGroup.getType(),Constants.ONE)){ |
| | | platformJob.setType(Constants.platformJobType.wxczh); |
| | | }else{ |
| | | platformJob.setType(Constants.platformJobType.sgscxh); |
| | | //çæä»»å¡è®°å½ |
| | | PlatformJob platformJob = platformBooks.toPlatformJob(); |
| | | platformJob.setId(null); |
| | | platformJob.setPlatformGroupId(platformReason.getGroupId().intValue()); |
| | | if(Constants.equalsInteger(platformGroup.getType(),Constants.ZERO)){ |
| | | platformJob.setType(Constants.platformJobType.wxcxh); |
| | | }else if(Constants.equalsInteger(platformGroup.getType(),Constants.ONE)){ |
| | | platformJob.setType(Constants.platformJobType.wxczh); |
| | | }else{ |
| | | platformJob.setType(Constants.platformJobType.sgscxh); |
| | | } |
| | | platformJob.setStatus(Constants.PlatformJobStatus.WART_SIGN_IN.getKey()); |
| | | platformJobMapper.insert(platformJob); |
| | | platformBooks.setJobId(platformJob.getId()); |
| | | platformBooksMapper.updateById(platformBooks); |
| | | //çæä»»å¡æä½è®°å½ |
| | | PlatformLog platformLog = new PlatformLog(); |
| | | platformLog.setCreateDate(new Date()); |
| | | platformLog.setJobId(platformJob.getId()); |
| | | platformLog.setIsdeleted(Constants.ZERO); |
| | | platformLog.setParam4(platformJob.getCarCodeFront()); |
| | | platformLog.setContent(Constants.PlatformJobLogType.CREATE.getInfo()); |
| | | platformLog.setObjType(Constants.PlatformJobLogType.CREATE.getKey()); |
| | | platformLog.setObjId(platformJob.getId().toString()); |
| | | platformLog.setAfterContent(JSONObject.toJSONString(platformJob)); |
| | | platformLogMapper.insert(platformLog); |
| | | } |
| | | platformJob.setStatus(Constants.PlatformJobStatus.WART_SIGN_IN.getKey()); |
| | | platformJobMapper.insert(platformJob); |
| | | platformBooks.setJobId(platformJob.getId()); |
| | | platformBooksMapper.updateById(platformBooks); |
| | | //çæä»»å¡æä½è®°å½ |
| | | PlatformLog platformLog = new PlatformLog(); |
| | | platformLog.setCreateDate(new Date()); |
| | | platformLog.setJobId(platformJob.getId()); |
| | | platformLog.setIsdeleted(Constants.ZERO); |
| | | platformLog.setParam4(platformJob.getCarCodeFront()); |
| | | platformLog.setContent(Constants.PlatformJobLogType.CREATE.getInfo()); |
| | | platformLog.setObjType(Constants.PlatformJobLogType.CREATE.getKey()); |
| | | platformLog.setObjId(platformJob.getId().toString()); |
| | | platformLog.setAfterContent(JSONObject.toJSONString(platformJob)); |
| | | platformLogMapper.insert(platformLog); |
| | | //åéçä¿¡éç¥ |
| | | SmsEmailServiceImpl.sendPlatformBookSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformBooksMapper,platformBooks.getId(), |
| | | Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?SmsConstants.platformBookContent.platformBookAuditSuccess: |
| | | SmsConstants.platformBookContent.platformBookAuditFail, |
| | | approveDTO.getCheckInfo(),null |
| | | ); |
| | | |
| | | //TODO åé微信å
¬ä¼å·æ¶æ¯ |
| | | |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.SmsConstants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.join.ApproveJoinMapper; |
| | |
| | | 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.third.EmayService; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.tomcat.util.bcel.Const; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | @Autowired |
| | | private CarsMapper carsMapper; |
| | | |
| | | @Autowired |
| | | private SmsConfigMapper smsConfigMapper; |
| | | |
| | | @Autowired |
| | | private SmsEmailMapper smsEmailMapper; |
| | | |
| | | @Autowired |
| | | private EmayService emayService; |
| | | |
| | | @Override |
| | | public Integer create(PlatformBooks platformBooks) { |
| | |
| | | if(carsMapper.selectCount(new QueryWrapper<Cars>().lambda().eq(Cars::getIsdeleted,Constants.ZERO).eq(Cars::getCode,platformBooksApplyDTO.getCarCodeFront()))>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"["+platformBooksApplyDTO.getCarCodeFront()+"]å±äºå
é¨è½¦è¾ï¼æ æ³é¢çº¦"); |
| | | }; |
| | | ApproveTempl approveTempl = approveTemplMapper.selectById(platformReason.getId()); |
| | | ApproveTempl approveTempl = approveTemplMapper.selectById(platformReason.getApproveTemplId()); |
| | | if(Objects.isNull(approveTempl)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªé
ç½®å®¡æ¹æµ,请è系管çå"); |
| | | } |
| | |
| | | platformBooksMapper.insert(platformBooks); |
| | | |
| | | //åå»ºå®¡æ¹æµä¿¡æ¯ |
| | | approveService.createApproveForPlatfrom(platformReason.getApproveTemplId(),platformBooks.getId(),platformBooks.getDriverId()); |
| | | approveService.createApproveForPlatfrom(approveTempl.getId(),platformBooks.getId(),platformBooks.getDriverId()); |
| | | return platformBooks.getId(); |
| | | } |
| | | |
| | |
| | | .eq(Approve::getObjType,Constants.approveObjectType.logisticsCarUse) |
| | | .eq(Approve::getObjId,revokeDTO.getId()) |
| | | ); |
| | | |
| | | //åéçä¿¡éç¥ |
| | | SmsEmailServiceImpl.sendPlatformBookSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformBooksMapper,model.getId(), |
| | | SmsConstants.platformBookContent.platformBookCancel, |
| | | null,null |
| | | ); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.PositionUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.utils.*; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.join.PlatformJobJoinMapper; |
| | | import com.doumee.dao.business.join.PlatformJoinMapper; |
| | |
| | | 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.impl.hksync.HkSyncPushServiceImpl; |
| | | import com.doumee.service.business.third.EmayService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.*; |
| | | import java.util.Date; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private VisitParkMapper visitParkMapper; |
| | | |
| | | @Autowired |
| | | private SmsConfigMapper smsConfigMapper; |
| | | |
| | | @Autowired |
| | | private SmsEmailMapper smsEmailMapper; |
| | | |
| | | @Autowired |
| | | private EmayService emayService; |
| | | |
| | | @Autowired |
| | | private PlatformBroadcastLogMapper platformBroadcastLogMapper; |
| | | |
| | | @Override |
| | | public Integer create(PlatformJob platformJob) { |
| | |
| | | savePlatformLog(Constants.PlatformJobLogType.IN_WAIT.getKey(),oldPlatformJob,platformJob, |
| | | Constants.PlatformJobLogType.IN_WAIT.getInfo()); |
| | | |
| | | //åéçä¿¡ä¿¡æ¯ |
| | | SmsEmailServiceImpl.sendPlatformJobSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobCallIn,null,null |
| | | ); |
| | | |
| | | return platformJob; |
| | | } |
| | | |
| | |
| | | //å卿使¥å¿ |
| | | savePlatformLog(Constants.PlatformJobLogType.CALLED.getKey(),oldPlatformJob,platformJob, |
| | | Constants.PlatformJobLogType.CALLED.getInfo().replace("{data}",platform.getName())); |
| | | |
| | | //åéçä¿¡ä¿¡æ¯ |
| | | SmsEmailServiceImpl.sendPlatformJobSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobSingIn,platform.getName(),null |
| | | ); |
| | | |
| | | //广æ ledéç¥ |
| | | this.broadcastAndLEed(platformJob,Constants.PlatformBroadcastContent.CALLING.getInfo().replace("{param2}",platform.getName())); |
| | | return platformJob; |
| | | } |
| | | |
| | | |
| | | public void broadcastAndLEed(PlatformJob model,String content){ |
| | | int speed = 13; |
| | | try { |
| | | speed = Integer.parseInt(systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.LED_CONTENT_SPEED).getCode()); |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | List<PlatformDevice> deviceList = platformDeviceMapper.selectList(new QueryWrapper<PlatformDevice>().lambda() |
| | | .eq(PlatformDevice::getPlatformId,model.getPlatformId()) |
| | | .eq(PlatformDevice::getIsdeleted,Constants.ZERO)); |
| | | if(deviceList ==null || deviceList.size() == 0){ |
| | | return; |
| | | } |
| | | content = content.replace("${param}",model.getPlatformName()); |
| | | content = content.replace("${param2}",model.getCarCodeFront()); |
| | | List<String> broadcastList = new ArrayList<>(); |
| | | List<String> ledList = new ArrayList<>(); |
| | | String bNames = ""; |
| | | List<PlatformBroadcastLog> logList = new ArrayList<>(); |
| | | for(PlatformDevice device : deviceList){ |
| | | if(StringUtils.isNotBlank(device.getHkId())){ |
| | | continue; |
| | | } |
| | | if(Constants.equalsInteger(device.getType(),Constants.ZERO)){ |
| | | //妿æ¯LED |
| | | PlatformBroadcastLog log = HkSyncPushServiceImpl.dealLedContentBiz(device.getHkNo(),device.getName(),content,speed,1); |
| | | logList.add(log); |
| | | ledList.add(device.getHkId()); |
| | | }else if(Constants.equalsInteger(device.getType(),Constants.ZERO)){ |
| | | //妿æ¯å¹¿æç¹ |
| | | bNames += device.getName()+";"; |
| | | broadcastList.add(device.getHkId()); |
| | | } |
| | | } |
| | | if(broadcastList.size()>0){ |
| | | PlatformBroadcastLog log = HkSyncPushServiceImpl.dealBroadcastBiz(model,broadcastList,bNames,Constants.PlatformBroadcastContent.WRONG_IN.getInfo()); |
| | | logList.add(log); |
| | | } |
| | | if(logList.size()>0){ |
| | | platformBroadcastLogMapper.insert(logList); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | //å卿使¥å¿ |
| | | savePlatformLog(Constants.PlatformJobLogType.TRANSFERING.getKey(),oldPlatformJob,platformJob, |
| | | Constants.PlatformJobLogType.TRANSFERING.getInfo().replace("{data}",oldPlatform.getName())); |
| | | |
| | | |
| | | //åéçä¿¡ä¿¡æ¯ |
| | | SmsEmailServiceImpl.sendPlatformJobSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobMove,oldPlatform.getName(),platform.getName() |
| | | ); |
| | | } |
| | | |
| | | |
| | |
| | | //å卿使¥å¿ |
| | | savePlatformLog(Constants.PlatformJobLogType.OVER_NUMBER.getKey(),oldPlatformJob,platformJob, |
| | | Constants.PlatformJobLogType.OVER_NUMBER.getInfo()); |
| | | //åéçä¿¡ä¿¡æ¯ |
| | | SmsEmailServiceImpl.sendPlatformJobSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobOverNum,null,null |
| | | ); |
| | | |
| | | |
| | | return platformJob; |
| | | } |
| | | |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·,ä¸å¡ç¶æå·²æµè½¬ï¼"); |
| | | } |
| | | |
| | | Platform platform = platformJoinMapper.selectById(platformJob.getPlatformId()); |
| | | |
| | | PlatformJob oldPlatformJob = new PlatformJob(); |
| | | BeanUtils.copyProperties(platformJob,oldPlatformJob); |
| | | |
| | |
| | | //å卿使¥å¿ |
| | | savePlatformLog(Constants.PlatformJobLogType.EXCEPTION.getKey(),oldPlatformJob,platformJob, |
| | | Constants.PlatformJobLogType.EXCEPTION.getInfo()); |
| | | |
| | | //åéçä¿¡ä¿¡æ¯ |
| | | SmsEmailServiceImpl.sendPlatformJobSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobError,platform.getName(),null |
| | | ); |
| | | } |
| | | |
| | | |
| | |
| | | if(Objects.isNull(platform)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°æå°ä¿¡æ¯"); |
| | | } |
| | | |
| | | |
| | | |
| | | PlatformJob oldPlatformJob = new PlatformJob(); |
| | | BeanUtils.copyProperties(platformJob,oldPlatformJob); |
| | | if(Objects.isNull(platformJob.getStartDate())){ |
| | |
| | | savePlatformLog(Constants.PlatformJobLogType.WORKING.getKey(),oldPlatformJob,platformJob, |
| | | Constants.PlatformJobLogType.WORKING.getInfo().replace("{data}",platform.getName())); |
| | | |
| | | //åéçä¿¡ä¿¡æ¯ |
| | | SmsEmailServiceImpl.sendPlatformJobSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobWorking,platform.getName(),null |
| | | ); |
| | | |
| | | return platformJob; |
| | | } |
| | | |
| | |
| | | ||Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.EXCEPTION.getKey()) )){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·,ä¸å¡ç¶æå·²æµè½¬ï¼"); |
| | | } |
| | | |
| | | |
| | | Platform platform = platformJoinMapper.selectById(platformJob.getPlatformId()); |
| | | if(Objects.isNull(platform)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°æå°ä¿¡æ¯"); |
| | | } |
| | | |
| | | PlatformJob oldPlatformJob = new PlatformJob(); |
| | | BeanUtils.copyProperties(platformJob,oldPlatformJob); |
| | | |
| | |
| | | //TODO å¤å车å¸è´§ æè
å¸å
¬å¸è½¦å¸è´§ åæ ¹æ®ä»»å¡æ
åµ |
| | | |
| | | } |
| | | |
| | | //åéçä¿¡ä¿¡æ¯ |
| | | SmsEmailServiceImpl.sendPlatformJobSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobFinish,platform.getName(),null |
| | | ); |
| | | |
| | | //广æ ledéç¥ |
| | | this.broadcastAndLEed(platformJob,Constants.PlatformBroadcastContent.DONE.getInfo()); |
| | | return platformJob; |
| | | } |
| | | |
| | |
| | | savePlatformLog(Constants.PlatformJobLogType.AUTHED_LEAVE.getKey(),oldPlatformJob,platformJob , |
| | | Constants.PlatformJobLogType.AUTHED_LEAVE.getInfo()); |
| | | return platformJob; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A; |
| | | 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.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.SmsConstants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.PlatformBooksMapper; |
| | | import com.doumee.dao.business.PlatformJobMapper; |
| | | import com.doumee.dao.business.SmsConfigMapper; |
| | | import com.doumee.dao.business.SmsEmailMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.SmsEmail; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.service.business.SmsEmailService; |
| | | import com.doumee.service.business.third.EmayService; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * çä¿¡é®ä»¶ä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public static void sendBusiness(EmayService emayService ,SmsEmailMapper smsEmailMapper ,List<String> phoneList,String objType,String content,Integer objId){ |
| | | for (String phone:phoneList) { |
| | | boolean result= emayService.sendSingleSms(phone,content); |
| | | if(!result){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼çä¿¡éªè¯ç åé失败ï¼è¯·ç¨åéè¯ï¼"); |
| | | /** |
| | | * ç¨è½¦ç³è¯· çä¿¡éç¥é
ç½® |
| | | * @param emayService |
| | | * @param smsEmailMapper |
| | | * @param smsConfigMapper |
| | | * @param platformBooksMapper |
| | | * @param objId |
| | | * @param objCode |
| | | * @param msg |
| | | * @param auditUser |
| | | */ |
| | | public static void sendPlatformBookSms(SystemDictDataBiz systemDictDataBiz,EmayService emayService ,SmsEmailMapper smsEmailMapper ,SmsConfigMapper smsConfigMapper, |
| | | PlatformBooksMapper platformBooksMapper,Integer objId,String objCode,String msg,List<String> auditUser){ |
| | | try{ |
| | | SmsConfig smsConfig = smsConfigMapper.selectOne(new QueryWrapper<SmsConfig>().lambda().eq(SmsConfig::getCode, |
| | | objCode).last(" limit 1 ")); |
| | | //å¼å¯çä¿¡éç¥ |
| | | if(Objects.nonNull(smsConfig) || Constants.equalsInteger(smsConfig.getStatus(),Constants.ZERO)){ |
| | | String content = systemDictDataBiz.queryByCode(Constants.SMS,Constants.SMS_COMNAME).getCode() + smsConfig.getContent(); |
| | | PlatformBooks platformBooks = platformBooksMapper.selectById(objId); |
| | | if(Objects.nonNull(platformBooks)){ |
| | | if(objCode.equals(SmsConstants.platformBookContent.platformBookAuditSuccess)){ |
| | | //æ¨çã车è¾å
¥åç³è¯·ãå·²ç»å®¡æ¹éè¿ï¼å
¥åæ¶é´ä¸º{å
¥åæ¶é´}ï¼è¯·æå30åéåå¾ç°åºç¾å°ãå¦è®¡åæåï¼è¯·åæ¶èç³»å®¡æ ¸äººåã |
| | | content = content.replace("{å
¥åæ¶é´}",DateUtil.getDate(platformBooks.getArriveDate(),"yyyy-MM-dd HH:mm")); |
| | | sendBusinessSms(emayService,smsEmailMapper, |
| | | Arrays.asList(platformBooks.getDriverPhone().split(",")),SmsConstants.platformBook,content,platformBooks.getId()); |
| | | }else if(objCode.equals(SmsConstants.platformBookContent.platformBookAuditFail) || objCode.equals(SmsConstants.platformBookContent.platformBookCancel)){ |
| | | //æ¨çã车è¾å
¥åç³è¯·ã已被驳åï¼é©³ååå 为ï¼{驳ååå }ã妿çé®ï¼è¯·èç³»å®¡æ ¸äººåã |
| | | content = content.replace("{驳ååå }",msg); |
| | | //æ¨çã车è¾å
¥åç³è¯·ãå·²è¢«åæ¶ï¼åæ¶åå 为ï¼{åæ¶åå }ã妿çé®ï¼è¯·èç³»å®¡æ ¸äººåã |
| | | content = content.replace("{åæ¶åå }",msg); |
| | | sendBusinessSms(emayService,smsEmailMapper, |
| | | Arrays.asList(platformBooks.getDriverPhone().split(",")),SmsConstants.platformBook,content,platformBooks.getId()); |
| | | }else{ |
| | | //æ¨æä¸æ¡ã车è¾å
¥åç³è¯·ãéè¦å¤çï¼è¯¦ç»ä¿¡æ¯è¯·åå¾å¾®ä¿¡å
¬ä¼å·æ¥çã |
| | | sendBusinessSms(emayService,smsEmailMapper, |
| | | auditUser,SmsConstants.platformBook,content,platformBooks.getId()); |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ç¨è½¦ç³è¯· çä¿¡éç¥é
ç½® |
| | | * @param emayService |
| | | * @param smsEmailMapper |
| | | * @param smsConfigMapper |
| | | * @param platformJobMapper |
| | | * @param objId |
| | | * @param objCode |
| | | * @param platformName |
| | | */ |
| | | public static void sendPlatformJobSms(SystemDictDataBiz systemDictDataBiz,EmayService emayService , SmsEmailMapper smsEmailMapper , SmsConfigMapper smsConfigMapper, |
| | | PlatformJobMapper platformJobMapper, Integer objId, String objCode, String platformName,String newPlatformName){ |
| | | //platformJobNewJob {车çå·}车主æ¨å¥½ï¼æ¨æä¸ä¸ªæ°çè¿è¾ä»»å¡ï¼è¯¦ç»ä¿¡æ¯è¯·åå¾å¾®ä¿¡å
¬ä¼å·æ¥çã |
| | | //platformJobStopJob {车çå·}车主æ¨å¥½ï¼æ¨çè¿è¾ä»»å¡å·²è¢«åæ¶ï¼è¯¦ç»ä¿¡æ¯è¯·åå¾å¾®ä¿¡å
¬ä¼å·æ¥çã |
| | | //platformJobCallIn {车çå·}车主æ¨å¥½ï¼è¯·å¨10åéå
ï¼åå¾ååºçå¾
åºçå¾
å«å·ä½ä¸ã |
| | | //platformJobSingIn {车çå·}车主æ¨å¥½ï¼è¯·å¨10åéå
ï¼åå¾{æå°åç§°}è¿è¡ä½ä¸ã |
| | | //platformJobOverNum {车çå·}车主æ¨å¥½ï¼æ¨çä»»å¡å·²è¿å·ï¼è¯·éæ°ç¾å°æéçå¾
ã |
| | | //platformJobWorking {车çå·}车主æ¨å¥½ï¼æ¨ç车è¾å·²å¨{æå°åç§°}å¼å§ä½ä¸ï¼è¯·éæ¶å
³æ³¨ä½ä¸æ
åµã |
| | | //platformJobFinish {车çå·}车主æ¨å¥½ï¼æ¨ç车è¾å·²å¨{æå°åç§°}宿ä½ä¸ï¼è¯·åæ¶é©¶ç¦»æå°ã |
| | | //platformJobError {车çå·}车主æ¨å¥½ï¼æ¨å¨{æå°åç§°}çä½ä¸ä»»å¡å·²ç»è¢«å¼å¸¸æèµ·ï¼è¯·åæ¶å
³æ³¨å
·ä½æ
åµã |
| | | //platformJobMove {车çå·}车主æ¨å¥½ï¼æ¨å¨{æå°åç§°}çä½ä¸ä»»å¡å·²ç»å·²è¢«è½¬ç§»è³{转移åæå°åç§°}ï¼è¯·åæ¶å
³æ³¨å«å·æ
åµã |
| | | //platformJobTimeOut {车çå·}车主æ¨å¥½ï¼æ¨å¨{æå°åç§°}å·²åé è¶
æ¶ï¼è¯·å°½å¿«é©¶ç¦»ä»¥å
å½±ååç»ä½ä¸ã |
| | | try{ |
| | | SmsConfig smsConfig = smsConfigMapper.selectOne(new QueryWrapper<SmsConfig>().lambda().eq(SmsConfig::getCode, |
| | | objCode).last(" limit 1 ")); |
| | | //å¼å¯çä¿¡éç¥ |
| | | if(Objects.nonNull(smsConfig) || Constants.equalsInteger(smsConfig.getStatus(),Constants.ZERO)){ |
| | | String content = systemDictDataBiz.queryByCode(Constants.SMS,Constants.SMS_COMNAME).getCode() + smsConfig.getContent(); |
| | | PlatformJob platformJob = platformJobMapper.selectById(objId); |
| | | if(Objects.nonNull(platformJob)){ |
| | | content = content.replace("{车çå·}",platformJob.getCarCodeFront()); |
| | | if(StringUtils.isNotBlank(platformName)&&content.indexOf("{æå°åç§°}")>=Constants.ZERO){ |
| | | content = content.replace("{æå°åç§°}",platformName); |
| | | } |
| | | if(StringUtils.isNotBlank(newPlatformName)&&content.indexOf("{转移åæå°åç§°}")>=Constants.ZERO){ |
| | | content = content.replace("{转移åæå°åç§°}",newPlatformName); |
| | | } |
| | | sendBusinessSms(emayService,smsEmailMapper, |
| | | Arrays.asList(platformJob.getDrivierPhone().split(",")),SmsConstants.platformJob,content,platformJob.getId()); |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | public static void sendBusinessSms(EmayService emayService, SmsEmailMapper smsEmailMapper, List<String> phoneList, String objType, String content, Integer objId){ |
| | | for (String phone:phoneList) { |
| | | SmsEmail smsEmail = new SmsEmail(); |
| | | smsEmail.setIsdeleted(Constants.ZERO); |
| | | smsEmail.setCreateDate(new Date()); |
| | | smsEmail.setStatus(Constants.ONE); |
| | | smsEmail.setType(Constants.ZERO); |
| | | smsEmail.setTitle("ä¸å¡çä¿¡"); |
| | | smsEmail.setPhone(phone); |
| | | smsEmail.setContent(content); |
| | | smsEmail.setObjType(objType); |
| | | smsEmail.setObjId(objId); |
| | | smsEmailMapper.insert(smsEmail); |
| | | emayService.sendSingleSms(phone,content); |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | if(broadcastList.size()>0){ |
| | | PlatformBroadcastLog log = dealBroadcastBiz(model,broadcastList,bNames); |
| | | PlatformBroadcastLog log = dealBroadcastBiz(model,broadcastList,bNames,Constants.PlatformBroadcastContent.WRONG_IN.getInfo()); |
| | | logList.add(log); |
| | | } |
| | | if(logList.size()>0){ |
| | | platformBroadcastLogMapper.insert(logList); |
| | | } |
| | | } |
| | | public static PlatformBroadcastLog dealBroadcastBiz(PlatformJob model, List<String> broadcastList,String bNames) { |
| | | |
| | | /** |
| | | * 广æéç¥ |
| | | * @param model |
| | | * @param broadcastList |
| | | * @param bNames |
| | | * @param content1 |
| | | * @return |
| | | */ |
| | | public static PlatformBroadcastLog dealBroadcastBiz(PlatformJob model, List<String> broadcastList,String bNames , String content1) { |
| | | PlatformBroadcastLog log = new PlatformBroadcastLog(); |
| | | String content1 =Constants.PlatformBroadcastContent.WRONG_IN.getInfo(); |
| | | content1 = content1.replace("${param}",model.getCarCodeFront()); |
| | | |
| | | log.setCreateDate(new Date()); |