- 帖子
- 47
- 积分
- 68
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2022-11-27
|
[问题求助] 【已解决】求助通过powershell命令从XML中查找指定内容,再进行判断。
本帖最后由 licunwei 于 2024-6-26 11:22 编辑
通过powershell命令查找D:\SCETC\dataXml文件夹下最新的*603.xml文件,再对最新的*603.xml文件内容CardLocalFee和CardLocalPayfee后面的值进行判断,如果值都为0,就新建文件夹D:\交易失败流水\当天日期,并拷贝当前*603.xml文件到当天日期文件夹内。拷贝文件后再循环监测最新的文件。如果值不为0就直接进入循环监测。
xml文件链接地址:https://pan.baidu.com/s/17J3nVIZy62yh_ESjI9ZGpg
提取码:705g
<?xml version="1.0" encoding="UTF-8"?>
-<datas>
-<data>
<attribute value="S000351001004010100202024062213284227" name="id"/>
<attribute value="{"AUTOVC":"0","ActualFeeClass":"0","AutoAxisInfo":"","AutoVLP":"默A00000","AutoVLPC":"9","AxisInfo":"0","AxleNum":"0","BL_Center":"203","BL_SubCenter":"517","CPCExpireTime":"","CPCID":"","CPCIssueOrg":"紫微站","CPCPower":"0","CPCPowerState":"0","CPCStartTime":"","CPCVer":"0","CPUCardId":"1032232480217486","CPUCardSnNo":"1032232480217486","CPUCardType":"2","CPUEndDate":"20331113","CPUIssueID":"路网?","CPUIssuer":"9901","CPUNetID":"9901","CPUStartDate":"20231204","CPUVehicleType":"13","CPUVersion":"69","CPUVlp":"川LD1611","CPUVlpc":"1","CardBal":"0","CardCnt":"0","CardID":"","CardLocalFee":"0","CardLocalPayfee":"0","CardNet":"","CardSN":"0","CardTotalFee":"0","CardTotalPayfee":"0","CardType":"2","DriveAxisConfidience":"0","DriveAxisCount":"0","DriveMaxWeight":"252027642","DriveShaftIndex":"0","DriveShaftNum":"0","DriveVehAxisInfo":"0","DriveVehTranAxleType":"0","ETCtotalAmount":"0","EnAxleNum":"0","EnLane":"","EnLaneType":"0","EnLimit":"0","EnOper":"","EnPSamTerm":"","EnSpTruck":"0","EnStation":"","EnStdVehType":"0","EnTime":"2024-06-22T13:28:00","EnVC":"0","EnVLP":"川A99C2H","EnVLPC":"0","EnVT":"0","EnWasteSN":"0","EnWeight":"0","GBLaneID":"S00035100100401010020","GBStationID":"S0003510010040","HandChioceAxis":"0","HandChioceAxisMenu":"0","InductCnt":"0","KeyVer":"0","LaneAppver":"2.3.6.7","LaneHex":"5101026233","LaneID":"51","LaneRole":"11100000","LaneState":"1","LimitWeight":"-1","LoginTime":"2024-06-22T10:24:55","MonitorTime":"20240622132800","OBUEndDate":"20291230","OBUFeeSumAfter":"0","OBUFeeSumBefore":"0","OBUInfoTypeRead":"-1","OBUInfoTypeWrite":"-1","OBULastGantryHex":"000000","OBULastGantryTime":"1970-01-01T08:00:00","OBUMAC":"0","OBUMileageAfter":"0","OBUMileageBefore":"0","OBUPassState":"2","OBUProvFeeSumAfter":"0","OBUProvFeeSumBefore":"0","OBUProvPayFeeSumAfter":"0","OBUProvPayFeeSumBefore":"0","OBUProvTradeSuccNumAfter":"1","OBUProvTradeSuccNumBefore":"0","OBUSN":"5104884212120482","OBUStartDate":"20191230","OBUState":"94554301","OBUTotalTradeSuccNumAfter":"1","OBUTotalTradeSuccNumBefore":"0","OBUTradeResult":"0","OBUVehicleType":"1","OBUVersion":"67","OBUVlp":"川A99C2H","OBUVlpc":"0","OBUdiscountFeeSumAfter":"0","OBUdiscountFeeSumBefore":"0","OBUpayFeeSumAfter":"0","OBUpayFeeSumBefore":"0","OBUtotalCount":"0","ObuIssueFlag":"四川Q\u0004","OccurTime":"2024-06-22T13:28:00","Oper":"000000999","OperName":"ETC操作员","OverWeightRate":"0","PCRSUVersion":"0","PSAMTradeSN":"00000000","PSamTerm":"215100004ca6","PVC":"0","PVT":"0","ParaVerPreNew":"8420240531009","PayCardBal":"0","PayCardID":"","PayCardNet":"","PayCardTranSN":"0","PreAxisInfo":"","PreAxleNum":"0","PreLimitWeight":"-1","PreOverWeightRate":"0","PreTotalWeight":"-1","QryEnStation":"","RSUManuID":"337","ReleaseTime":"2024-06-22T13:28:42","Shift":"01","StationHex":"51010262","StationID":"262","StdVehType":"0","TAC":"00000000","TotalWeight":"-1","TransType":"09","TriggerTime":"2024-06-22T13:28:42","UnionPayInfo":"","VC":"0","VLP":"川A99C2H","VLPC":"0","VSpeed":"0","VT":"0","Vcnt":"0","VerifyCode":"0","WasteSN":"125","algorithmIdentifier":"1","antennaID":"51","appointId":"","balanceafter":"0","batchNum":"S0003510010040101002020240622102455000000999","bnErrCause":"B409","cardSn":"0","cardVersion":"69","cardfeeSumAfter":"0","cardfeeSumBefore":"0","chargeMode":"1","checkSign":"0","collectFee":"0","consumeTime":"672","description":"0","direction":"1","discountFee":"0","discountFeeGroup":"0","discountType":"","enLaneHex":"5101026233","enStationHex":"51010262","enStdStation":"0","enTollLaneId":"S00035100100401010020","enTollStationId":"0","enTollStationName":"","enlanetype":"3","entime":"2024-06-22T13:28:00","exHeight":"0","exLength":"0","exWidth":"0","fee":"0","feeBoardPlay":"0","feeCalcResult":"0","feeCalcSpecials":"0","feeGroup":"0","feeInfo1":"G:S000351001001910010|T:2024-06-22T13:06:08|ES:51010262|ET:2024-06-22T13:06:08|LG:|LT:|CN:9901|UT:27|AC:6|EAC:6|TT:1|CT:23|PH:b4a84c443136313100000000|PC:1|VT:13|EVT:0|VC:25|FSL:-2291209|WL:0|TW:51400|VSF:0|BH:|PSL:0|RSL:0|SP1:0|MV:20240327002|PV:20240531009|vc:25|vt:16|ac:6|ad:0|R:0,201,0=,0:0 ECODE:0x44000","feeInfo2":"8194","feeInfo3":"5C6313","feeMileage":"0","feeProvBeginHex":"","feeProvInfo":"","feeRate":"0.00","feeSpare1":"0","feeSpare2":"0","feeSpare3":"0","feeSumLocalAfter":"0","feeSumLocalBefore":"0","feeVehicleType":"16","gantryHex":"5C6313","gantryHexOpposite":"5D6313","gantryId":"S000351001001910010","gantryOrderNum":"101","gantryPassCount":"0","gantryPassInfo":"","gantryType":"1","holidayState":"0","hourBatchNo":"S00035100100401010020240622102455000000999","id":"S000351001004010100202024062213284227","identification":"0","interruptSignal":"1","intoTime":"20240622132842.205","invoiceCode":"","invoiceType":"0","lDate":"2024-06-22T00:00:00","laneFLag":"1","laneSign":"1","laneType":"1","lastGantryHex":"000000","lastGantryTime":"2024-06-22T13:28:00","logicalFileCause":"99","mediaNo":"5104884212120482","mediaType":"1","miliSecond":"344","modifyFlag":"1","noCardCount":"0","noCardTimesAfter":"0","noCardTimesBefore":"0","obuDiscountFee":"0","obuId":"5104884212120482","obuPayFee":"0","obuSign":"2","obuTotalAmount":"0","obuTotaldisCountAmount":"0","onLineFee":"0","onLinePayFee":"0","operationMedia":"1","originFee":"0","outofTime":"20240622132842.549","overHeight":"0","overLength":"0","overWidth":"0","paraVer":"2100020240330510002405280143000240113015700020240620150002406210165000506220271600024061401170002021102142000240417018800020072703870002007270366000240622548600024061344700002406225480000240520017700024041801010002404250114000210109011900020102601180002010260223000202403302500023091301240002024053084000000000008420240531009","passId":"019901103223248021748620240622132800","passSign":"2","passState":"2","pathFitFlag":"0","payCardType":"","payFee":"0","payFeeGroup":"0","payOrderNum":"","postBalance":"0","preBalance":"0","provFee":"0","provMinFee":"0","provTransCount":"0","provinceCount":"1","provinceDiscountFee":"0","provinceNumAfter":"1","provinceNumBefore":"0","provinceTransGroup":"0","rateCompute":"2","rateFitCount":"0","readCiphertextVerify":"-1","remarks":"","roadType":"1","serviceType":"1","shortFee":"0","shortFeeMileage":"0","signStatus":"1","spare1":"0","spare2":"0","spcRateVersion":"0","specialType":"42","stationName":"紫微站","supplierID":"0","tac":"00000000","ticketFee":"0","tollIntervalId":"S000351001001910","tollIntervalSign":"1","tollLane":"51","tollLaneId":"51","tollModeVer":"5120240327002","tollParaVer":"5120240531009","tollProvinceId":"510201","tollStation":"000262","tollStationId":"262","tradeReadCiphertext":"0000000000000000","tradeResult":"0","tradeType":"0","tradeWriteCiphertext":"00000000","transCode":"0603","transFee":"0","transFlag":"0","transPayType":"0","transTime":"2024-06-22T13:28:00","unifiedFee":"0","unpayFlag":"0","vehSpeed":"0","vehicleHight":"0","vehicleLength":"0","vehicleSeat":"0","vehicleSign":"0xff","vehicleUserType":"0","vehicleWidth":"0","wGroupID":"0","wLaneType":"3","wasteSpare1":"","wasteSpare4":"0","wasteSpare5":"0"}" name="msg"/>
<attribute value="0603" name="transCode"/>
</data>
</datas> |
|