Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="LED空闲文案:" prop="remark"> |
| | | <el-input type="text" v-model="form.remark" placeholder="请输入LED空闲文案" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="同时作业数量:" prop="workingNum"> |
| | | <el-input type="number" v-model="form.workingNum" placeholder="请输入同时作业数量" v-trim /> |
| | | </el-form-item> |
| | |
| | | startTime: '', |
| | | endTime: '', |
| | | workingNum: 1, |
| | | remark: '', |
| | | workRate: '', |
| | | stayTimeoutAlarmTime: '', |
| | | workTimeoutAlarmTime: '', |
| | |
| | | </el-table-column> --> |
| | | <el-table-column prop="broadcastNames" label="关联广播" min-width="100px"></el-table-column> |
| | | <el-table-column prop="ledNames" label="关联LED" min-width="100px"></el-table-column> |
| | | <el-table-column prop="remark" label="LED空闲文案" min-width="180px"></el-table-column> |
| | | <el-table-column prop="hkDate" label="同步时间" min-width="150px"></el-table-column> |
| | | <el-table-column label="月台状态" fixed="right" width="100px"> |
| | | <template slot-scope="{row}"> |
| | |
| | | return s.substring(0,5)+"*******"+s.substring(l-6,l); |
| | | } |
| | | |
| | | |
| | | public static String carCodeTuominStr(String s){ |
| | | if(StringUtils.isEmpty(s)){ |
| | | return ""; |
| | | } |
| | | int l = s.length(); |
| | | if(Constants.equalsInteger(l,7)){ |
| | | return s.substring(0,3)+"***"+s.substring(l-1,l); |
| | | } |
| | | if(l <= 8){ |
| | | return s.substring(0,3)+"****"+s.substring(l-1,l); |
| | | } |
| | | return s; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 切分逗号拼接的整形集合 |
| | | * @param memberIds |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println(Constants.getVehiclePlateNo("皖AA10991").getDescription()); |
| | | System.out.println(Constants.carCodeTuominStr("皖A10991")); |
| | | System.out.println(Constants.carCodeTuominStr("皖AA10991")); |
| | | // System.out.println(Constants.getVehiclePlateNo("湘B140D17").getDescription()); |
| | | // System.out.println(Constants.getVehiclePlateNo("宿AP0637").getDescription()); |
| | | |
| | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | active: pro |
| | | application: |
| | | name: visitsAdmin |
| | | # 安全配置 |
| | |
| | | @ApiModelProperty(value = "状态 0待确认 1待签到 2等待叫号 3入园等待 4已叫号 5作业中 6作业完成 7转移中 8异常挂起 9已授权离园 10已离园 11 已过号 12取消(WMS)" , example = "1") |
| | | @ExcelColumn(name="状态 0待确认 1待签到 2等待叫号 3入园等待 4已叫号 5作业中 6作业完成 7转移中 8异常挂起 9已授权离园 10已离园 11 已过号 12取消(WMS)") |
| | | private Integer status; |
| | | @ApiModelProperty(value = "车辆进入状态 0不在 1进入 " , example = "1") |
| | | @ExcelColumn(name="车辆进入状态 0不在 1进入 ") |
| | | private Integer inOut; |
| | | |
| | | @ApiModelProperty(value = "排序码", example = "1") |
| | | @ExcelColumn(name="排序码") |
| | |
| | | @ApiModelProperty(value = "车牌号" ) |
| | | private String carCode; |
| | | @ApiModelProperty(value = "月台状态 0-无车 1-有车 2-超时停靠 3-错误停靠" ) |
| | | private Integer status; |
| | | private Integer status = 0 ; |
| | | |
| | | } |
| | |
| | | ); |
| | | |
| | | //广播 led通知 |
| | | this.broadcastAndLEed(platformJob,Constants.PlatformBroadcastContent.CALLING.getInfo().replace("{param2}",platform.getName())); |
| | | platformJob.setPlatformName(platform.getName()); |
| | | this.broadcastAndLEed(platformJob,Constants.PlatformLedContent.CALLING.getInfo(), |
| | | Constants.PlatformBroadcastContent.CALLING.getInfo() |
| | | ); |
| | | return platformJob; |
| | | } |
| | | |
| | | |
| | | public void broadcastAndLEed(PlatformJob model,String content){ |
| | | public void broadcastAndLEed(PlatformJob model,String ledContent,String broadcastContent){ |
| | | int speed = 13; |
| | | try { |
| | | speed = Integer.parseInt(systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.LED_CONTENT_SPEED).getCode()); |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | log.error("查询LED与广播数据------------------------------------------------------------------------------------------"); |
| | | 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()); |
| | | |
| | | Boolean sendLed = StringUtils.isBlank(ledContent)?false:true; |
| | | Boolean sendBroadcast = StringUtils.isBlank(broadcastContent)?false:true; |
| | | |
| | | if (sendLed) { |
| | | //广播 param2 = 车牌号 param = 月台 |
| | | ledContent = ledContent.replace("${param}",model.getPlatformName()); |
| | | ledContent = ledContent.replace("${param2}",model.getCarCodeFront()); |
| | | } |
| | | if(sendBroadcast){ |
| | | //广播 param2 = 月台 param = 车牌号 |
| | | broadcastContent = broadcastContent.replace("${param2}",model.getPlatformName()); |
| | | broadcastContent = broadcastContent.replace("${param}",model.getCarCodeFront()); |
| | | } |
| | | |
| | | List<String> broadcastList = new ArrayList<>(); |
| | | List<String> ledList = new ArrayList<>(); |
| | | String bNames = ""; |
| | | List<PlatformBroadcastLog> logList = new ArrayList<>(); |
| | | log.error("循环调起led与广播------------------------------------------------------------------------------------------"); |
| | | for(PlatformDevice device : deviceList){ |
| | | if(StringUtils.isNotBlank(device.getHkId())){ |
| | | if(StringUtils.isBlank(device.getHkId())){ |
| | | continue; |
| | | } |
| | | if(Constants.equalsInteger(device.getType(),Constants.ZERO)){ |
| | | if(Constants.equalsInteger(device.getType(),Constants.ZERO)&&sendLed){ |
| | | log.error("调起led------------------------------------------------------------------------------------------"); |
| | | //如果是LED |
| | | PlatformBroadcastLog log = HkSyncPushServiceImpl.dealLedContentBiz(device.getHkNo(),device.getName(),content,speed,1); |
| | | PlatformBroadcastLog log = HkSyncPushServiceImpl.dealLedContentBiz(device.getHkNo(),device.getName(),ledContent,speed,1); |
| | | logList.add(log); |
| | | ledList.add(device.getHkId()); |
| | | }else if(Constants.equalsInteger(device.getType(),Constants.ZERO)){ |
| | | }else if(Constants.equalsInteger(device.getType(),Constants.TWO)&&sendBroadcast){ |
| | | log.error("调起广播------------------------------------------------------------------------------------------"); |
| | | //如果是广播点 |
| | | bNames += device.getName()+";"; |
| | | broadcastList.add(device.getHkId()); |
| | | } |
| | | } |
| | | if(broadcastList.size()>0){ |
| | | PlatformBroadcastLog log = HkSyncPushServiceImpl.dealBroadcastBiz(model,broadcastList,bNames,Constants.PlatformBroadcastContent.WRONG_IN.getInfo()); |
| | | PlatformBroadcastLog log = HkSyncPushServiceImpl.dealBroadcastBiz(model,broadcastList,bNames,broadcastContent); |
| | | logList.add(log); |
| | | } |
| | | if(logList.size()>0){ |
| | |
| | | SmsConstants.platformJobContent.platformJobWorking,platform.getName(),null |
| | | ); |
| | | |
| | | //广播 led通知 |
| | | platformJob.setPlatformName(platform.getName()); |
| | | this.broadcastAndLEed(platformJob,Constants.PlatformLedContent.WORKING.getInfo(), |
| | | null |
| | | ); |
| | | |
| | | return platformJob; |
| | | } |
| | | |
| | |
| | | ); |
| | | |
| | | //广播 led通知 |
| | | this.broadcastAndLEed(platformJob,Constants.PlatformBroadcastContent.DONE.getInfo()); |
| | | platformJob.setPlatformName(platform.getName()); |
| | | this.broadcastAndLEed(platformJob,null, |
| | | Constants.PlatformBroadcastContent.DONE.getInfo()); |
| | | return platformJob; |
| | | } |
| | | |
| | |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformJobList)){ |
| | | for (PlatformJob platformJob:platformJobList) { |
| | | //车牌号脱敏 |
| | | platformJob.setCarCodeFront(Constants.carCodeTuominStr(platformJob.getCarCodeFront())); |
| | | if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())){ |
| | | //计算已作业时长 根据月台工作效率 计算任务量需要时间 |
| | | if(Objects.isNull(platformJob.getWorkNum()) || Objects.isNull(platformJob.getWorkRate())){ |
| | |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.model.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | log.info("月台图片下载开始:=========================="+img1); |
| | | try { |
| | | is = new URL(img1).openStream(); |
| | | byte[] bytes = IOUtils.toByteArray(is); |
| | | is = new ByteArrayInputStream(bytes); |
| | | // is = HttpsUtil.connectionInputsteam(img1,"GET",null,null); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | updateVistis.setEditDate(new Date()); |
| | | //更新访客来访或者签离时间信息 |
| | | visitsMapper.updateById(updateVistis) ; |
| | | |
| | | } |
| | | } |
| | | private Retention getRetentionModelByVisitRequest(Visits visits, String happentTime,String srcType) { |
| | |
| | | .selectAll(PlatformJob.class) |
| | | .selectAs(Platform::getName,PlatformJob::getPlatformName) |
| | | .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId) |
| | | .eq(StringUtils.equals(status.getStockStatus(),"front"),PlatformJob::getCarCodeFront,status.getPlateNo() )//前车牌号 |
| | | .eq(!StringUtils.equals(status.getStockStatus(),"front"),PlatformJob::getCarCodeBack,status.getPlateNo() )//后车牌号 |
| | | // .eq(StringUtils.equals(status.getStockStatus(),"front"),PlatformJob::getCarCodeFront,status.getPlateNo() )//前车牌号 |
| | | // .eq(!StringUtils.equals(status.getStockStatus(),"front"),PlatformJob::getCarCodeBack,status.getPlateNo() )//后车牌号 |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO ) |
| | | .eq(PlatformJob::getPlatformId,model.getPlatformId() ) |
| | | .orderByDesc(PlatformJob::getCallDate) |
| | | .last("limit 1 ")); |
| | | if(job == null){ |
| | | continue;//如果作业为空,跳过处理 |
| | |
| | | //如果是正在作业的状态,标记作业已完成 |
| | | update.setStatus(Constants.PlatformJobStatus.DONE.getKey());//作业已完成 |
| | | update.setDoneDate(update.getEditDate());*/ |
| | | if(Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.DONE.getKey()) || |
| | | Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.AUTHED_LEAVE.getKey())){ |
| | | if(((StringUtils.equals(status.getStockStatus(),"front") && StringUtils.equals(job.getCarCodeFront(),status.getPlateNo())) |
| | | ||(!StringUtils.equals(status.getStockStatus(),"front") && StringUtils.equals(job.getCarCodeBack(),status.getPlateNo())) |
| | | )){ |
| | | //说明车辆进错月台 或者还未叫号状态,发起警告 |
| | | // dealCarsInErrorPlatformBiz(job,status); |
| | | update.setInOut(Constants.ZERO);//车辆已经离开 |
| | | platformJobMapper.updateById(update); |
| | | } |
| | | } |
| | | }else if(StringUtils.equals(status.getMotionStatus(),"enter")){ |
| | | //如果是车辆进入 |
| | | if(job ==null || !Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.CALLED.getKey())){ |
| | | if(Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.CALLED.getKey())){ |
| | | if(!((StringUtils.equals(status.getStockStatus(),"front") && StringUtils.equals(job.getCarCodeFront(),status.getPlateNo())) |
| | | ||(!StringUtils.equals(status.getStockStatus(),"front") && StringUtils.equals(job.getCarCodeBack(),status.getPlateNo())) |
| | | )){ |
| | | //说明车辆进错月台 或者还未叫号状态,发起警告 |
| | | dealCarsInErrorPlatformBiz(job,status); |
| | | }else{ |
| | | //车辆已经进入 |
| | | update.setInOut(Constants.ONE);//车辆已经进入 |
| | | platformJobMapper.updateById(update); |
| | | } |
| | | if(job.getStartDate() == null){ |
| | | } |
| | | /*if(job.getStartDate() == null){ |
| | | update.setStartDate(update.getEditDate()); |
| | | } |
| | | update.setStatus(Constants.PlatformJobStatus.WORKING.getKey());//开始作业 |
| | | */ |
| | | }else{ |
| | | continue;//其他状态不处理,跳过 |
| | | } |
| | |
| | | return; |
| | | } |
| | | String content =Constants.PlatformLedContent.WRONG_IN.getInfo(); |
| | | content = content.replace("${param}",model.getPlatformName()); |
| | | content = content.replace("${param2}",model.getCarCodeFront()); |
| | | content = content.replace("${param2}",model.getPlatformName()); |
| | | content = content.replace("${param}",status.getPlateNo()); |
| | | 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())){ |
| | | if(StringUtils.isBlank(device.getHkId())){ |
| | | continue; |
| | | } |
| | | if(Constants.equalsInteger(device.getType(),Constants.ZERO)){ |
| | |
| | | PlatformBroadcastLog log = dealLedContentBiz(device.getHkNo(),device.getName(),content,speed,1); |
| | | logList.add(log); |
| | | ledList.add(device.getHkId()); |
| | | }else if(Constants.equalsInteger(device.getType(),Constants.ZERO)){ |
| | | }else if(Constants.equalsInteger(device.getType(),Constants.TWO)){ |
| | | //如果是广播点 |
| | | bNames += device.getName()+";"; |
| | | broadcastList.add(device.getHkId()); |
| | | } |
| | | } |
| | | if(broadcastList.size()>0){ |
| | | PlatformBroadcastLog log = dealBroadcastBiz(model,broadcastList,bNames,Constants.PlatformBroadcastContent.WRONG_IN.getInfo()); |
| | | PlatformBroadcastLog log = dealBroadcastBiz(model,broadcastList,bNames,Constants.PlatformBroadcastContent.WRONG_IN.getInfo().replace("${param}",status.getPlateNo())); |
| | | logList.add(log); |
| | | } |
| | | if(logList.size()>0){ |