| | |
| | | <el-table-column v-if="containPermissions(['business:visits:update', 'business:visits:delete'])" label="æä½" |
| | | min-width="200" fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="departure(row.id)" icon="el-icon-delete" style="color: red" v-if="row.status == 7">离å</el-button> |
| | | <el-button type="text" @click="cancel(row.id)" v-permissions="['business:visits:cancel']" |
| | | icon="el-icon-delete" style="color: red" v-if="row.status == 5">åæ¶é¢çº¦</el-button> |
| | | <el-button type="text" @click="departure(row.id)" icon="el-icon-delete" style="color: red" v-if="row.status == 7">离åº</el-button> |
| | | <!-- <el-button type="text" @click="cancel(row.id)" v-permissions="['business:visits:cancel']" |
| | | icon="el-icon-delete" style="color: red" v-if="row.status == 5">åæ¶é¢çº¦</el-button>--> |
| | | <el-button type="text" @click="resend(row.id)" v-permissions="['business:visits:update']" |
| | | icon="el-icon-edit" v-if="row.status == 6">éæ°ä¸å</el-button> |
| | | <!-- <el-button type="text" @click="$refs.OperaVisitsDesWindow.open('详æ
', row.id)" icon="el-icon-view">详æ
</el-button> --> |
| | |
| | | <template slot-scope="{ row }"> |
| | | <template> |
| | | <el-button type="text" @click="$refs.operaBookingsDetailWindow.open('ä¼è®®è¯¦æ
', row)">æ¥ç详æ
</el-button> |
| | | <el-button v-if="row.meetingStatus == '1'" type="text" |
| | | @click="$refs.operaBookingsWindow.open('ç¼è¾ä¼è®®é¢çº¦', row)" |
| | | v-permissions="['business:bookings:update']">ç¼è¾</el-button> |
| | | <el-button type="text" v-if="row.meetingStatus == '1' || row.meetingStatus == '4'" @click="handleStart(row)">å¼å§</el-button> |
| | | <el-button type="text" v-if="row.meetingStatus == '2'" @click="handleEnd(row)">ç»æ</el-button> |
| | | <el-button v-if="row.meetingStatus == '1' || row.meetingStatus == '4'" type="text" @click="cancelMeeting(row.id)" |
| | | v-permissions="['business:bookings:update']">æ¤å</el-button> |
| | | <el-button v-if="row.meetingStatus == '1' && row.creator===userInfo.id" type="text" |
| | | @click="$refs.operaBookingsWindow.open('ç¼è¾ä¼è®®é¢çº¦', row)" >ç¼è¾</el-button> |
| | | <el-button type="text" v-if="row.creator===userInfo.id &&(row.meetingStatus == '1' || row.meetingStatus == '4')" @click="handleStart(row)">å¼å§</el-button> |
| | | <el-button type="text" v-if="row.creator===userInfo.id && row.meetingStatus == '2'" @click="handleEnd(row)">ç»æ</el-button> |
| | | <el-button v-if="row.creator===userInfo.id &&(row.meetingStatus == '1' || row.meetingStatus == '4')" type="text" @click="cancelMeeting(row.id)">æ¤å</el-button> |
| | | </template> |
| | | <!-- <el-button v-else type="text" @click="deleteById(row)" v-permissions="['business:bookings:delete']">å é¤</el-button> --> |
| | | </template> |
| | |
| | | data() { |
| | | return { |
| | | date: [], |
| | | userInfo: this.$store.state.userInfo, |
| | | // æç´¢ |
| | | searchForm: { |
| | | roomId: '', |
| | |
| | | v-permissions="['business:cars:create', 'business:cars:exportExcel', 'business:parkBook:create']"> |
| | | <li><el-button type="primary" @click="handleEdit" icon="el-icon-plus" |
| | | v-permissions="['business:cars:create']">æ°å»º</el-button></li> |
| | | <li><el-button type="primary" @click="$refs.OperaCarsImportWindowRef.open('人å导å
¥', searchForm.companyType)" v-permissions="['business:cars:create']">车è¾å¯¼å
¥</el-button> |
| | | <li><el-button type="primary" @click="$refs.OperaCarsImportWindowRef.open('车è¾å¯¼å
¥', searchForm.companyType)" v-permissions="['business:cars:create']">车è¾å¯¼å
¥</el-button> |
| | | </li> |
| | | <li><el-button type="primary" @click="exportExcel" v-permissions="['business:cars:exportExcel']">导åº</el-button> |
| | | </li> |
| | |
| | | stagingHead,
|
| | | wxAuthorize,
|
| | | refreshToken,
|
| | | app_url, |
| | | app_url,
|
| | | delHkUserOpenid
|
| | | } from '@/api'
|
| | | export default {
|
| | |
| | | } else if (yw == 7) {
|
| | | this.jump('/pages/staff/task/driver?id=' + ywinfo.ywid)
|
| | | } else if (yw == 5) {
|
| | | this.jump('/pages/staff/vehicle/sendACarDetail')
|
| | | this.jump('/pages/staff/vehicle/sendACarDetail?id=' + ywinfo.ywid)
|
| | | }
|
| | | }, 100)
|
| | | }
|
| | |
| | | loginOut() {
|
| | | logoutPost({
|
| | | isH5: 1
|
| | | }).then(res => { |
| | | const userInfo = uni.getStorageSync('userInfo') |
| | | const openId = uni.getStorageSync('openId') |
| | | this.$store.commit('empty') |
| | | if(openId){ |
| | | delHkUserOpenid({ |
| | | userName: userInfo.username, |
| | | openId |
| | | }).then(ress => { |
| | | setTimeout(() => { |
| | | window.location.href = app_url |
| | | }, 300) |
| | | }) |
| | | }else{ |
| | | setTimeout(() => { |
| | | window.location.href = app_url |
| | | }, 300) |
| | | } |
| | | |
| | | }).then(res => {
|
| | | const userInfo = uni.getStorageSync('userInfo')
|
| | | const openId = uni.getStorageSync('openId')
|
| | | this.$store.commit('empty')
|
| | | if(openId){
|
| | | delHkUserOpenid({
|
| | | userName: userInfo.username,
|
| | | openId
|
| | | }).then(ress => {
|
| | | setTimeout(() => {
|
| | | window.location.href = app_url
|
| | | }, 300)
|
| | | })
|
| | | }else{
|
| | | setTimeout(() => {
|
| | | window.location.href = app_url
|
| | | }, 300)
|
| | | }
|
| | |
|
| | | })
|
| | | },
|
| | | getTaskInfo() {
|
| | |
| | | height: 40rpx;
|
| | | }
|
| | | }
|
| | | </style> |
| | | </style>
|
| | |
| | | * æ é¢è¡å· |
| | | */ |
| | | private int headerNum; |
| | | /** |
| | | * æ é¢è¡å· |
| | | */ |
| | | private CellType changeType; |
| | | |
| | | /** |
| | | * æé 彿° |
| | |
| | | throws InvalidFormatException, IOException { |
| | | this(multipartFile.getOriginalFilename(), multipartFile.getInputStream(), headerNum, sheetIndex); |
| | | } |
| | | /** |
| | | * æé 彿° (éè¦) |
| | | * @param--file 导å
¥æä»¶å¯¹è±¡ |
| | | * @param headerNum æ é¢è¡å·ï¼æ°æ®è¡å·=æ é¢è¡å·+1 |
| | | * @param sheetIndex å·¥ä½è¡¨ç¼å· |
| | | * @throws InvalidFormatException |
| | | * @throws IOException |
| | | */ |
| | | public ExcelImporter(MultipartFile multipartFile, int headerNum, int sheetIndex, CellType cellType) |
| | | throws InvalidFormatException, IOException { |
| | | this(multipartFile.getOriginalFilename(), multipartFile.getInputStream(), headerNum, sheetIndex,cellType); |
| | | } |
| | | |
| | | /** |
| | | * æé 彿° ï¼ï¼ |
| | |
| | | this.headerNum = headerNum; |
| | | log.debug("Initialize success."); |
| | | } |
| | | public ExcelImporter(String fileName, InputStream in, int headerNum, int sheetIndex,CellType cellType) |
| | | throws InvalidFormatException, IOException { |
| | | if (StringUtils.isBlank(fileName)){ |
| | | throw new RuntimeException("导å
¥ææ¡£ä¸ºç©º!"); |
| | | }else if(fileName.toLowerCase().endsWith("xls")){ |
| | | this.wb = new HSSFWorkbook(in); |
| | | }else if(fileName.toLowerCase().endsWith("xlsx")){ |
| | | this.wb = new XSSFWorkbook(in); |
| | | }else{ |
| | | throw new RuntimeException("ææ¡£æ ¼å¼ä¸æ£ç¡®!"); |
| | | } |
| | | if (this.wb.getNumberOfSheets()<sheetIndex){ |
| | | throw new RuntimeException("ææ¡£ä¸æ²¡æå·¥ä½è¡¨!"); |
| | | } |
| | | this.sheet = this.wb.getSheetAt(sheetIndex); |
| | | this.headerNum = headerNum; |
| | | this.changeType = cellType; |
| | | log.debug("Initialize success."); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * è·åè¡å¯¹è±¡ |
| | |
| | | Cell cell = row.getCell(column); |
| | | if (cell != null){ |
| | | if (cell.getCellType() == CellType.NUMERIC){ |
| | | val = cell.getNumericCellValue(); |
| | | cell.setCellType(CellType.STRING); // ç¡®ä¿åå
æ ¼ç±»å为å符串 |
| | | val = cell.getStringCellValue(); |
| | | }else if (cell.getCellType() == CellType.STRING){ |
| | | val = cell.getStringCellValue(); |
| | | }else if (cell.getCellType() == CellType.FORMULA){ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="utf-8" ?> |
| | | <configuration> |
| | | <appender name="consoleLog" class="ch.qos.logback.core.ConsoleAppender"> |
| | | <layout class="ch.qos.logback.classic.PatternLayout"> |
| | | <pattern>%highlight(%date{yyyy-MM-dd HH:mm:ss}) | %highlight(%-5level) | %highlight(%thread) | %highlight(%logger) | %msg%n</pattern> |
| | | </layout> |
| | | </appender> |
| | | <property name="log.path" value="/usr/local/jars/logs/systemTimer"></property> |
| | | <property name="log.fileSize" value="100MB"></property> |
| | | <property name="log.historyDays" value="7"></property> |
| | | |
| | | <appender name="fileInfoLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>ERROR</level> |
| | | <!--å¹é
å°±èå»--> |
| | | <onMatch>DENY</onMatch> |
| | | <onMismatch>ACCEPT</onMismatch> |
| | | </filter> |
| | | <encoder> |
| | | <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
| | | </encoder> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| | | <!--è·¯å¾--> |
| | | <fileNamePattern>${log.path}/info.%d.%i.log</fileNamePattern> |
| | | <maxFileSize>${log.fileSize}</maxFileSize> |
| | | <maxHistory>${log.historyDays}</maxHistory> |
| | | <totalSizeCap>1GB</totalSizeCap> |
| | | </rollingPolicy> |
| | | </appender> |
| | | |
| | | <appender name="fileErrorLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
| | | <level>ERROR</level> |
| | | </filter> |
| | | <encoder> |
| | | <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
| | | </encoder> |
| | | <!--æ»å¨çç¥--> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| | | <!--è·¯å¾--> |
| | | <fileNamePattern>${log.path}/error.%d.%i.log</fileNamePattern> |
| | | <maxFileSize>${log.fileSize}</maxFileSize> |
| | | <maxHistory>${log.historyDays}</maxHistory> |
| | | <totalSizeCap>1GB</totalSizeCap> |
| | | </rollingPolicy> |
| | | </appender> |
| | | <!-- 弿¥åå
¥æ¥å¿ --> |
| | | <appender name ="ASYNC" class= "ch.qos.logback.classic.AsyncAppender"> |
| | | <!-- ä¸ä¸¢å¤±æ¥å¿.é»è®¤ç,妿éåç80%已满,åä¼ä¸¢å¼TRACTãDEBUGãINFO级å«çæ¥å¿ --> |
| | | <discardingThreshold >0</discardingThreshold> |
| | | <!-- æ´æ¹é»è®¤çéåçæ·±åº¦,该å¼ä¼å½±åæ§è½.é»è®¤å¼ä¸º256 --> |
| | | <queueSize>512</queueSize> |
| | | <!-- æ·»å éå çappender,æå¤åªè½æ·»å ä¸ä¸ª --> |
| | | <appender-ref ref ="fileInfoLog"/> |
| | | </appender> |
| | | <root level="info"> |
| | | <appender-ref ref="consoleLog"/> |
| | | <appender-ref ref="fileInfoLog"/> |
| | | <appender-ref ref="fileErrorLog"/> |
| | | </root> |
| | | </configuration> |
| | |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.service.business.third.model.ApiResponse; |
| | | import com.doumee.service.business.third.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | |
| | | param.getParameters().setDriverTel("00000000000");//ææºå·å¿
å¡« |
| | | }*/ |
| | | LoginUserInfo user = this.getLoginUser(token); |
| | | if(user ==null){ |
| | | throw new BusinessException(ResponseStatus.NO_LOGIN); |
| | | } |
| | | param.getParameters().setDriverTel(user.getUsername()); |
| | | return ApiResponse.success(tmsService.getDriverTaskList(param)); |
| | | } |
| | |
| | | String[] regionDataRanking= new String[]{"/api/ecm/v1/energy/regionDataRanking","æ¶é²çæ¿-4è·ååºåç¨éæå-è½èçæ¿"};//æ¶é²çæ¿-è·ååºåç¨éæå - è½èçæ¿ |
| | | String[] energyTotal= new String[]{"/api/ecm/v1/energy/energyTotal","æ¶é²çæ¿-4æ ¹æ®æ¶é´åæ¶é´ç»´åº¦è·åååºè½èæ°æ®"};//æ¶é²çæ¿-æ ¹æ®æ¶é´åæ¶é´ç»´åº¦è·åååºè½èæ°æ® |
| | | String[] findDeviceStatistics= new String[]{"/api/v1/device/findDeviceStatistics","å页æ¥è¯¢è®¾å¤ç以åä¸å±ä¼ æå¨æ°æ®çç¶æç»è®¡"};// å页æ¥è¯¢è®¾å¤ç以åä¸å±ä¼ æå¨æ°æ®çç¶æç»è®¡ |
| | | String[] iccmSignoff= new String[]{"/api/iccm/v1/signoff","iccm访客ç¾ç¦»"};// iccm访客ç¾ç¦» |
| | | } |
| | | /** |
| | | * éå½A.55æ¶é²è®¾å¤ç±»å |
| | |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.visitOut,body); |
| | | } |
| | | /** |
| | | * iccmç¾ç¦»è®¿å®¢é¢çº¦ |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String iccmSignoff(String body) { |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.iccmSignoff,body); |
| | | } |
| | | /** |
| | | * iccmåæ¶è®¿å®¢é¢çº¦ |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String iccmCancelAppointment(String body) { |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.iccmCancelAppointment,body); |
| | | } |
| | | /** |
| | | * 访客æéç» |
| | | * @param body |
| | | * @return |
| | |
| | | return null; |
| | | } |
| | | /** |
| | | *iccm访客é¢çº¦ç¾ç¦» |
| | | * @return |
| | | */ |
| | | public static BaseResponse iccmSignoff(VisitAppointmentOutRequest param){ |
| | | log.info("ãæµ·åº·iccm访客é¢çº¦ç¾ç¦»ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.iccmSignoff(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse>(){}; |
| | | BaseResponse result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康iccm访客é¢çº¦ç¾ç¦»"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·iccm访客é¢çº¦ç¾ç¦»ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *iccm访客é¢çº¦åæ¶ |
| | | * @return |
| | | */ |
| | | public static BaseResponse iccmCancelAppointment(VisitAppointmentCancelRequest param){ |
| | | log.info("ãæµ·åº·iccm访客é¢çº¦åæ¶ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.iccmCancelAppointment(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse>(){}; |
| | | BaseResponse result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康iccm访客é¢çº¦åæ¶"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·iccm访客é¢çº¦åæ¶ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *访客å
ç»è®°é¢çº¦ |
| | | * @return |
| | | */ |
| | |
| | | paramMap.put("touser", openId); |
| | | paramMap.put("data", dataMap); |
| | | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯å
容ï¼{}", JSONObject.toJSONString(paramMap)); |
| | | log.error("·==++--·æ¨é微信模æ¿ä¿¡æ¯å
容ï¼{}", JSONObject.toJSONString(paramMap)); |
| | | if(StringUtils.isBlank(response)){ |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", "失败"); |
| | | log.error("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", "失败"); |
| | | }else{ |
| | | JSONObject json = JSONObject.parseObject(response); |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", Constants.equalsInteger(json.getInteger("errcode"),Constants.ZERO)?"æå":"失败"+json.getString("errmsg")); |
| | | log.error("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", Constants.equalsInteger(json.getInteger("errcode"),Constants.ZERO)?"æå":"失败"+json.getString("errmsg")); |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.doumee.dao.web.response; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.dao.business.model.PlatformJob; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("æå°ä»»å¡æ°æ®") |
| | | public class PlatformWorkVO { |
| | | |
| | | @ApiModelProperty(value = "æå¡å¨å½åæ¶é´") |
| | | private Date currentDate; |
| | | @ApiModelProperty(value = "ä»»å¡å表") |
| | | private List<PlatformJob> platformJobList; |
| | | |
| | |
| | | import com.doumee.service.business.third.EmayService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.checkerframework.checker.units.qual.C; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | if(StringUtils.isBlank(f.getFileurl())){ |
| | | continue; |
| | | } |
| | | if(f.getType() == null){ |
| | | if(StringUtils.endsWithIgnoreCase(f.getFileurl(),".mp4")){ |
| | | f.setType(Constants.ONE); |
| | | }else if(StringUtils.endsWithIgnoreCase(f.getFileurl(),".jpg") |
| | | ||StringUtils.endsWithIgnoreCase(f.getFileurl(),".jpeg") |
| | | ||StringUtils.endsWithIgnoreCase(f.getFileurl(),".png")){ |
| | | f.setType(Constants.ZERO); |
| | | }else{ |
| | | f.setType(Constants.TWO); |
| | | } |
| | | } |
| | | f.setFileurlFull(path+f.getFileurl()); |
| | | if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.HIDDEN_DANGER_SUBMIT.getKey())){ |
| | | //ç°åºæ
åµ |
| | |
| | | multifile.setCreateDate(new Date()); |
| | | multifile.setCreator(hiddenDanger.getEditor()); |
| | | multifile.setIsdeleted(Constants.ZERO); |
| | | if(multifile.getType() == null){ |
| | | if(StringUtils.endsWithIgnoreCase(multifile.getFileurl(),".mp4")){ |
| | | multifile.setType(Constants.ONE); |
| | | }else if(StringUtils.endsWithIgnoreCase(multifile.getFileurl(),".jpg") |
| | | ||StringUtils.endsWithIgnoreCase(multifile.getFileurl(),".jpeg") |
| | | ||StringUtils.endsWithIgnoreCase(multifile.getFileurl(),".png")){ |
| | | multifile.setType(Constants.ZERO); |
| | | }else{ |
| | | multifile.setType(Constants.TWO); |
| | | } |
| | | } |
| | | multifile.setObjId(hiddenDanger.getId()); |
| | | multifile.setCreator(hiddenDanger.getLoginUserInfo().getId()); |
| | | multifile.setObjType(Constants.MultiFile.HIDDEN_DANGER_DEAL_BEFORE.getKey()); |
| | |
| | | multifileMapper.update(null,new UpdateWrapper<Multifile>().lambda() |
| | | .set(Multifile::getIsdeleted,Constants.ONE ) |
| | | .eq(Multifile::getObjType,Constants.MultiFile.HIDDEN_DANGER_DEAL_BEFORE.getKey()) |
| | | .set(Multifile::getObjId,hiddenDanger.getId()) |
| | | .eq(Multifile::getObjId,hiddenDanger.getId()) |
| | | ); |
| | | } |
| | | if(hiddenDanger.getStatus().equals(Constants.ONE)){ |
| | |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.commons.lang3.RandomStringUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.ss.usermodel.CellType; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | ExcelImporter ie = null; |
| | | List<MemberImport> dataList =null; |
| | | try { |
| | | ie = new ExcelImporter(file,1,0); |
| | | ie = new ExcelImporter(file,1,0, CellType.STRING); // ç¡®ä¿åå
æ ¼ç±»å为å符串); |
| | | dataList = ie.getDataList(MemberImport.class,null); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | |
| | | public static PlatformWorkVO getPlatformWorkVO(Platform platform,List<PlatformJob> platformJobList){ |
| | | PlatformWorkVO platformWorkVO = new PlatformWorkVO(); |
| | | platformWorkVO.setCurrentDate(new Date()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformJobList)){ |
| | | //è·åæå°ç»ä¸çææä½ä¸æ°æ® |
| | | List<PlatformJob> platformJobs = platformJobList.stream().filter( |
| | |
| | | .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.EXCEPTION.getKey()) |
| | | ) |
| | | ); |
| | | |
| | | platformGroupWorkVO.setWaitNum(platformJobJoinMapper.selectJoinCount(new MPJLambdaWrapper<PlatformJob>() |
| | | .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | |
| | | BeanUtils.copyProperties(platformJob,oldPlatformJob); |
| | | |
| | | if(Constants.equalsInteger(signInDTO.getSignType(),Constants.ZERO)){ |
| | | if(!StringUtils.equals(platformJob.getDrivierPhone(),signInDTO.getLoginUserInfo().getMobile())){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä¸å¡ç¶æå·²æµè½¬ï¼è¯·å·æ°æ¥ç"); |
| | | } |
| | | this.distanceSignIn(signInDTO,platformJob); |
| | | }else if(Constants.equalsInteger(signInDTO.getSignType(),Constants.ONE)){ |
| | | if(!StringUtils.equals(platformJob.getDrivierPhone(),signInDTO.getLoginUserInfo().getMobile())){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä¸å¡ç¶æå·²æµè½¬ï¼è¯·å·æ°æ¥ç"); |
| | | } |
| | |
| | | || Objects.isNull(signInDTO.getLnt())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"ç»çº¬åº¦ä¿¡æ¯å¼å¸¸"); |
| | | } |
| | | |
| | | //è·åç¾å°ç¹çç»çº¬åº¦ |
| | | Double lat = Double.parseDouble(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_PLACE_LAT).getCode()); |
| | | Double lnt = Double.parseDouble(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_PLACE_LNT).getCode()); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public PlatformJob getDetail(JobDetailDTO jobDetailDTO){ |
| | | if(Objects.isNull(jobDetailDTO) |
| | | || Objects.isNull(jobDetailDTO.getJobId())){ |
| | | if(Objects.isNull(jobDetailDTO) || Objects.isNull(jobDetailDTO.getJobId())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | PlatformJob platformJob = platformJobMapper.selectById(jobDetailDTO.getJobId()); |
| | |
| | | if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){ |
| | | //å¾
ç¾å° 计ç®è·ç¦» |
| | | if(Objects.nonNull(jobDetailDTO.getLnt())&&Objects.nonNull(jobDetailDTO.getLat())){ |
| | | //è·åç¾å°ç¹çç»çº¬åº¦ |
| | | Double lat = Double.parseDouble(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_PLACE_LAT).getCode()); |
| | | Double lnt = Double.parseDouble(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_PLACE_LNT).getCode()); |
| | | //è·å2个ç¹çè·ç¦»Xç±³ |
| | | Double getDistanceDouble = PositionUtil.getDistance(jobDetailDTO.getLnt(),jobDetailDTO.getLat(),lnt,lat); |
| | | //转æ¢km |
| | | BigDecimal getDistance = BigDecimal.valueOf(getDistanceDouble).divide(new BigDecimal(1000),2,BigDecimal.ROUND_HALF_UP); |
| | | platformJob.setGetDistance(getDistance); |
| | | if(jobDetailDTO.getLat()!=null && jobDetailDTO.getLnt()!=null){ |
| | | //è·åç¾å°ç¹çç»çº¬åº¦ |
| | | Double lat = Double.parseDouble(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_PLACE_LAT).getCode()); |
| | | Double lnt = Double.parseDouble(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_PLACE_LNT).getCode()); |
| | | //è·å2个ç¹çè·ç¦»Xç±³ |
| | | Double getDistanceDouble = PositionUtil.getDistance(jobDetailDTO.getLnt(),jobDetailDTO.getLat(),lnt,lat); |
| | | //转æ¢km |
| | | BigDecimal getDistance = BigDecimal.valueOf(getDistanceDouble).divide(new BigDecimal(1000),2,BigDecimal.ROUND_HALF_UP); |
| | | platformJob.setGetDistance(getDistance); |
| | | } |
| | | } |
| | | }else if( Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey()) |
| | | || Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.IN_WAIT.getKey()) |
| | |
| | | ); |
| | | |
| | | //å
¬ä¼å·æ¨¡æ¿æ¶æ¯ |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | if(Objects.nonNull(platformJob.getDrivierPhone())) { |
| | | this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobCallIn,platformJob); |
| | | } |
| | | return platformJob; |
| | |
| | | public void sendWxNotice(String objCode,PlatformJob platformJob){ |
| | | SystemUser driver = systemUserMapper.selectOne(new QueryWrapper<SystemUser>().lambda() |
| | | .eq(SystemUser::getDeleted, Constants.ZERO) |
| | | .eq(SystemUser::getType, Constants.ZERO) |
| | | .in(SystemUser::getType, Constants.ZERO,Constants.TWO) |
| | | .eq(SystemUser::getMobile,platformJob.getDrivierPhone()) |
| | | .last(" limit 1 ")); |
| | | if (Objects.nonNull(driver) && StringUtils.isNotBlank(driver.getOpenid())) { |
| | |
| | | ); |
| | | |
| | | //å
¬ä¼å·æ¨¡æ¿æ¶æ¯ |
| | | if(Objects.nonNull(platformJob.getDriverId())){ |
| | | if(Objects.nonNull(platformJob.getDrivierPhone())){ |
| | | this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobSingIn,platformJob); |
| | | } |
| | | |
| | |
| | | ); |
| | | |
| | | //å
¬ä¼å·æ¨¡æ¿æ¶æ¯ |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | if(Objects.nonNull(platformJob.getDrivierPhone())) { |
| | | this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobMove,platformJob); |
| | | } |
| | | |
| | |
| | | ); |
| | | |
| | | //å
¬ä¼å·æ¨¡æ¿æ¶æ¯ |
| | | if(Objects.nonNull(platformJob.getDriverId())){ |
| | | if(Objects.nonNull(platformJob.getDrivierPhone())){ |
| | | this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobOverNum,platformJob); |
| | | } |
| | | |
| | |
| | | ); |
| | | |
| | | //å
¬ä¼å·æ¨¡æ¿æ¶æ¯ |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | if(Objects.nonNull(platformJob.getDrivierPhone())) { |
| | | this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobError,platformJob); |
| | | } |
| | | |
| | |
| | | SmsConstants.platformJobContent.platformJobWorking,platform.getName(),null |
| | | ); |
| | | //å
¬ä¼å·æ¨¡æ¿æ¶æ¯ |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | if(Objects.nonNull(platformJob.getDrivierPhone())) { |
| | | this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobWorking,platformJob); |
| | | } |
| | | //广æ ledéç¥ |
| | |
| | | ); |
| | | |
| | | //å
¬ä¼å·æ¨¡æ¿æ¶æ¯ |
| | | if(Objects.nonNull(platformJob.getDriverId())) { |
| | | if(Objects.nonNull(platformJob.getDrivierPhone())) { |
| | | this.sendWxNotice(WxPlatConstants.platformJobContent.platformJobFinish,platformJob); |
| | | } |
| | | |
| | |
| | | List<PlatformJob> calledList = platformJobList.stream().filter(i->Constants.equalsInteger(i.getStatus(),Constants.PlatformJobStatus.CALLED.getKey())).collect(Collectors.toList()); |
| | | largeScreenDataVO.setWaitWorkList(calledList); |
| | | } |
| | | // String u = (String) redisTemplate.opsForValue().get(Constants.RedisKeys.BIGSCREEN_UUID); |
| | | // if(StringUtils.isBlank(u)){ |
| | | String u = UUID.randomUUID().toString(); |
| | | redisTemplate.opsForValue().set(Constants.RedisKeys.BIGSCREEN_UUID,u,3, TimeUnit.MINUTES); |
| | | // } |
| | | String url = Constants.getWxUrl(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.WX_REDIRECT_URL).getCode(),Constants.WxUrlParams.BISCREEN_CODE,u); |
| | | largeScreenDataVO.setQrCode(url); |
| | | largeScreenDataVO.setAttention(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_ATTENTION).getCode()); |
| | |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.VisitAppointmentCancelRequest; |
| | | import com.doumee.core.haikang.model.param.request.VisitAppointmentOutRequest; |
| | | import com.doumee.core.haikang.model.param.request.VisitAppointmentRequest; |
| | | import com.doumee.core.haikang.model.param.respose.VisitAppointmentResponse; |
| | |
| | | VisitAppointmentOutRequest request = new VisitAppointmentOutRequest(); |
| | | request.setOrderId(visits.getHkId()); |
| | | //è°ç¨æµ·åº·å¼ºå¶ç¾ç¦» |
| | | BaseResponse response = HKService.outVisitAppiontment(request); |
| | | BaseResponse response = HKService.iccmSignoff(request); |
| | | // BaseResponse response = HKService.outVisitAppiontment(request); |
| | | visitsMapper.update(null,new UpdateWrapper<Visits>().lambda().set(Visits::getStatus,Constants.VisitStatus.signout) |
| | | .eq(Visits::getId,visitId)); |
| | | //产åºå¨åºäººåä¿¡æ¯ |
| | |
| | | if(!visits.getStatus().equals(Constants.VisitStatus.xfSuccess)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"访客记å½ç¶æé误ï¼è¯·å·æ°éè¯"); |
| | | } |
| | | VisitAppointmentOutRequest request = new VisitAppointmentOutRequest(); |
| | | request.setOrderId(visits.getHkId()); |
| | | VisitAppointmentCancelRequest request = new VisitAppointmentCancelRequest(); |
| | | request.setAppointRecordIds(new String[]{visits.getHkId()}); |
| | | //è°ç¨æµ·åº·å¼ºå¶ç¾ç¦» |
| | | BaseResponse response = HKService.outVisitAppiontment(request); |
| | | // BaseResponse response = HKService.outVisitAppiontment(request); |
| | | BaseResponse response = HKService.iccmCancelAppointment(request); |
| | | visitsMapper.update(null,new UpdateWrapper<Visits>().lambda().set(Visits::getStatus,Constants.VisitStatus.signout) |
| | | .eq(Visits::getId,visitId)); |
| | | //产åºå¨åºäººåä¿¡æ¯ |
| | |
| | | @Override |
| | | public YearDeviceDataVO yearFightingAdminDeviceData(){ |
| | | YearDeviceDataVO data = new YearDeviceDataVO(); |
| | | |
| | | FireStatisticRequest param = new FireStatisticRequest(); |
| | | param.setIndexCode("api_fire_statistic"); |
| | | BaseResponse<FireStatisticResponse> response = HKService.fireStatistic(param); |
| | |
| | | data.setProtectNum(Constants.formatIntegerNum(response.getData().getMaintenanceNum())); |
| | | data.setPlanProtectTotal(Constants.formatIntegerNum(response.getData().getDeviceTotalNum())); |
| | | } |
| | | |
| | | param = new FireStatisticRequest(); |
| | | param.setIndexCode("api_fire_statistic_month"); |
| | | BaseResponse<FireStatisticResponse> response1 = HKService.fireStatisticMonth(param); |
| | |
| | | data.setMonthTotalNum(Constants.formatIntegerNum(response1.getData().getDeviceTotalNum())); |
| | | } |
| | | return data; |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | BaseResponse<List<FindDeviceStatisticsResponse>> response = HKService.findDeviceStatistics(param1); |
| | | if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) && response.getData()!=null ){ |
| | | for(FindDeviceStatisticsResponse r :response.getData()){ |
| | | DeviceNumByTypeVO t = new DeviceNumByTypeVO(); |
| | | t.setTypeName(r.getDeviceTypeName()); |
| | | t.setTotalDeviceNum(Constants.formatIntegerNum(r.getTotalDeviceCount())); |
| | | if(r.getDevices()!=null){ |
| | | for(FindDeviceStatisticsInfoResponse td : r.getDevices()){ |
| | | DeviceNumByTypeVO t = new DeviceNumByTypeVO(); |
| | | t.setTypeName(td.getDeviceName()); |
| | | //å±è½æ° |
| | | t.setShieldDeviceNum(Constants.formatIntegerNum(t.getShieldDeviceNum() )+ Constants.formatIntegerNum(td.getShieldSensorCount())); |
| | | //æ¥è¦æ° |
| | |
| | | t.setErrDeviceNum(Constants.formatIntegerNum(t.getErrDeviceNum())+ Constants.formatIntegerNum(td.getFaultSensorCount())); |
| | | //æ»è®¾å¤æ° |
| | | t.setTotalDeviceNum(Constants.formatIntegerNum(t.getTotalDeviceNum())+ Constants.formatIntegerNum(td.getTotalSensorCount())); |
| | | list.add(t); |
| | | // data.setOfflineDeviceNum(Constants.formatIntegerNum( data.getOfflineDeviceNum())+Constants.formatIntegerNum(t.getOfflineDeviceNum())); |
| | | data.setShieldDeviceNum(Constants.formatIntegerNum( data.getShieldDeviceNum())+Constants.formatIntegerNum(t.getShieldDeviceNum())); |
| | | data.setAlarmDeviceNum(Constants.formatIntegerNum( data.getAlarmDeviceNum())+Constants.formatIntegerNum(t.getAlarmDeviceNum())); |
| | | data.setOnlineDeviceNum(Constants.formatIntegerNum( data.getOnlineDeviceNum())+Constants.formatIntegerNum(t.getOnlineDeviceNum())); |
| | | data.setErrDeviceNum(Constants.formatIntegerNum( data.getErrDeviceNum())+Constants.formatIntegerNum(t.getErrDeviceNum())); |
| | | data.setTotalDeviceNum(Constants.formatIntegerNum( data.getTotalDeviceNum())+Constants.formatIntegerNum(t.getTotalDeviceNum())); |
| | | } |
| | | } |
| | | list.add(t); |
| | | data.setOfflineDeviceNum(Constants.formatIntegerNum( data.getOfflineDeviceNum())+Constants.formatIntegerNum(t.getOfflineDeviceNum())); |
| | | data.setShieldDeviceNum(Constants.formatIntegerNum( data.getAlarmDeviceNum())+Constants.formatIntegerNum(t.getShieldDeviceNum())); |
| | | data.setAlarmDeviceNum(Constants.formatIntegerNum( data.getAlarmDeviceNum())+Constants.formatIntegerNum(t.getAlarmDeviceNum())); |
| | | data.setOnlineDeviceNum(Constants.formatIntegerNum( data.getOnlineDeviceNum())+Constants.formatIntegerNum(t.getOnlineDeviceNum())); |
| | | data.setErrDeviceNum(Constants.formatIntegerNum( data.getErrDeviceNum())+Constants.formatIntegerNum(t.getErrDeviceNum())); |
| | | data.setTotalDeviceNum(Constants.formatIntegerNum( data.getTotalDeviceNum())+Constants.formatIntegerNum(t.getTotalDeviceNum())); |
| | | } |
| | | } |
| | | /* FireDevStatusTotalRequest param = new FireDevStatusTotalRequest(); |