| | |
| | | |
| | | |
| | | public interface RedisKeys { |
| | | public static final String IMPORTING_CARS ="IMPORTING_CARS"; |
| | | public static final String IMPORTING_MEMBER ="IMPORTING_MEMBER"; |
| | | public static final String IMPORTING_GAS ="IMPORTING_GAS"; |
| | | public static final String ERP_TOKEN ="ERP_TOKEN"; |
| | |
| | | |
| | | /** |
| | | * æå°ä½ä¸ ç¶æ |
| | | * 0å¾
确认 1å¾
ç¾å° 2çå¾
å«å· 3å
¥åçå¾
4å·²å«å· 5ä½ä¸ä¸ 6ä½ä¸å®æ 7è½¬ç§»ä¸ 8å¼å¸¸æèµ· 9å·²ææç¦»å 10已离å 11 å·²è¿å· |
| | | * 0å¾
确认 1å¾
ç¾å° 2çå¾
å«å· 3å
¥åçå¾
4å·²å«å· 5ä½ä¸ä¸ 6ä½ä¸å®æ 7è½¬ç§»ä¸ 8å¼å¸¸æèµ· 9å·²ææç¦»å 10已离å 11 å·²è¿å· 12已忶 |
| | | */ |
| | | public enum PlatformJobStatus { |
| | | WAIT_CONFIRM(0, "å¾
确认","å¾
确认" ), |
| | |
| | | |
| | | |
| | | }; |
| | | String[] carsPhone = new String[]{ |
| | | "çAB6219-15256553434", |
| | | "çAE301R-13866781208", |
| | | "çA01213-13856004205", |
| | | "çA9G467-18855126212", |
| | | "çAAT569-13705600310", |
| | | "çAA8196-13705691362", |
| | | "çAAT561-13705600310", |
| | | "çAA8593-15055179136", |
| | | "çAA8559-13485727850", |
| | | "çAA8565-17505515701", |
| | | "çAA8573-13966686381", |
| | | "çAA8117-15155165536", |
| | | "çAA8580-18949230358", |
| | | "çAJ5118-15955159992", |
| | | "çAJ1371-18010863058", |
| | | "çAJ0691-13965105584", |
| | | "çAJ0665-15255133586", |
| | | "çAJ8818-13955160295", |
| | | "çAJ9221-13966655585", |
| | | "çAJ0609-13866171458", |
| | | "çAJ3080-13075519010", |
| | | "çAL0601-15055107708", |
| | | "çAL1971-13655604645", |
| | | "çAL8313-13965137528", |
| | | "çAL1761-17505690187", |
| | | "çAL9179-13965020562", |
| | | "çAL0390-18010882575", |
| | | "çAL5131-13515644306", |
| | | "çAL0201-13905601520", |
| | | "çAL2771-13637094407", |
| | | "çAL7131-13865991467", |
| | | "çK9072C-15905583796", |
| | | "çAF69F5-13955008600", |
| | | "çMGG862-13955008855", |
| | | "çAC669Y-13605511715", |
| | | "çAY6Y57-13856987728", |
| | | "çAA99719-13855002548", |
| | | "çAF727Y-13965073377", |
| | | "çA7H319-15375258610", |
| | | "çAA32898-13965029965", |
| | | "çAD15312-18056098020", |
| | | "çABB189-13855191889", |
| | | "çA81B27-18856963616", |
| | | "çA783GX-15255621599", |
| | | "çAQM306-18856963616", |
| | | "çA22U80-13866161051", |
| | | "çASJ523-13866161051", |
| | | "çAWX972-13956088283", |
| | | "çAXU128-13956055677", |
| | | "çAA1535-13956055677", |
| | | "çAY9T09-13856085586", |
| | | "çAFJ4499-13856085586", |
| | | "çBX111S-13966767600", |
| | | "çAD9Z39-18055162696", |
| | | "æ¥ACH956-13855159797", |
| | | "æ¥ADR5227-13865509512", |
| | | "æ¥AJ617Z-13866754556", |
| | | "æ¥AV063U-18855192890", |
| | | "æ¥AV5P23-18155183418", |
| | | "æ¥A6VF72-18656025577", |
| | | "æ¥ANR728-13866796112", |
| | | "çA43970-13956077896", |
| | | "çANN900-13956975120", |
| | | "çAL1Z26-13956975120", |
| | | "çALP828-13739262204", |
| | | "çAC289Y-13956008165", |
| | | "çAA0G39-19956003192", |
| | | "çAGU016-13856056195", |
| | | "çAL56R0-13956908148", |
| | | "çAA01110-18055417732", |
| | | "çAPY305-18055417732", |
| | | "çARL218-13955132837", |
| | | "çAZH216-15155141103", |
| | | "çAG2088-18005694101", |
| | | "çAA61999-18255991615", |
| | | "çAA38669-19956003192", |
| | | "çADK9306-13956808695", |
| | | "çA10110-13855153156", |
| | | "çA135NR-13339299171", |
| | | "çA38566-18919690881", |
| | | "çA39961-18919690772", |
| | | "çAE4W46-18856910835", |
| | | "çAF293T-18919690767", |
| | | "çA2953B-18919690767", |
| | | "çAB13A8-18956055277", |
| | | "çAQ69X7-13956977985", |
| | | "çAB7M36-18856910817", |
| | | "çAH39X5-13856019166", |
| | | "çA7UK93-13855176573", |
| | | "çA1DK59-13855140034", |
| | | "çA3MK59-18919690767", |
| | | "çA0BL38-18856910907", |
| | | "çAV31B8-13665655857", |
| | | "çAEE842-18919690767", |
| | | "çA8315A-13856063769", |
| | | "çA2NK09-18856910815", |
| | | "çA1729B-18919690767", |
| | | "çAE0W92-18919690767", |
| | | "çAEN372-18919690767", |
| | | "çAVM416-18919690767", |
| | | "çAYC151-18919690767", |
| | | "çA0265F-18919690767", |
| | | "çAE5N69-18919690767", |
| | | "çA0CM93-18919690767", |
| | | "çAC935U-18919690767", |
| | | "çAW092Z-13855123707", |
| | | "çAV50A0-18856910853", |
| | | "çA7VM93-13956079487", |
| | | "çAW5B19-18955151555", |
| | | "çA2EL08-13855195399", |
| | | "çAP33B9-13505612412", |
| | | "çAM39A3-18856910800", |
| | | "çAD2250-15395033218", |
| | | "çA46E69-13855192234", |
| | | "çAX32A1-13764070633", |
| | | "çAAC748-19956056535", |
| | | "çA0352Z-13605516917", |
| | | "çA5X011-13605516917", |
| | | "çAA1292-13605516917", |
| | | "çADD1065-13605516917", |
| | | "çAQ23R8-19159080805", |
| | | "çAM17R9-13965056178", |
| | | "çAH31S9-19956075570", |
| | | "çA091R6-13739278846", |
| | | "çACB455-15375429056", |
| | | "çAD1372-15395033218", |
| | | "çAL1W38-18655123031", |
| | | "çAK08R2-18256958373", |
| | | "çAR5497-15256591763", |
| | | "çAF700T-13955140157", |
| | | "çA03X40-17856513485", |
| | | "çA69S96-18356525286", |
| | | "çAU23G6-13866669923", |
| | | "çA62Y24-19956056535", |
| | | "çAD77683-19956056535", |
| | | "æµEQE628-13339117728", |
| | | "çA0R0B5-13956041029", |
| | | "çA32MC8-13955140157", |
| | | "çA3QM38-13739278846", |
| | | "çA7U2B9-18956078866", |
| | | "çADW275-13605516917", |
| | | "çAE181E-18175335887", |
| | | "çAXJ332-13866685119", |
| | | "çA13C37-18956078866", |
| | | "çA2U747-13615606800", |
| | | "çAX63G1-13615606800", |
| | | "çA2651Z-13956041029", |
| | | "çA12931-13339299171", |
| | | "çAH4Y07-18919690772", |
| | | "çAFH3616-18919690781", |
| | | "çAX7K28-18919690781", |
| | | "çA05LG0-17818588089", |
| | | "çAA7985-17818588089", |
| | | "çA98E57-18919690762", |
| | | "çA916N9-13965103313", |
| | | "çAAT378-13855153156", |
| | | "çA29601-18919690881", |
| | | "çADN1577-13966384376", |
| | | "çABR530-15375352357", |
| | | "çAQ360T-13966384376", |
| | | "çAC2M88-13855196288", |
| | | "çA63917-13955186028", |
| | | "çA6607G-13866683455", |
| | | "çA9158Z-13645651772", |
| | | "çADM3277-13645651772", |
| | | "çAG277B-13955199214", |
| | | "çA711G1-13505658626", |
| | | "çAG67E6-15256507992", |
| | | "çA0KM07-13966334117", |
| | | "çA9LC70-18856910807", |
| | | "çAFB925-15956505627", |
| | | "çA7LZ59-13866700557", |
| | | "çAR335F-13866700557", |
| | | "çALT825-19159082371", |
| | | "çA18J84-13866984826", |
| | | "çADH0855-13856960608", |
| | | "çAT067X-13856960608", |
| | | "çAQ6L13-13966375158", |
| | | "çAW983Z-18949847129", |
| | | "çA9HH77-13856004013", |
| | | "çA09L92-13966379444", |
| | | "çA61K85-18005657566", |
| | | "çA98X01-13956095631", |
| | | "çAWE926-18919690770", |
| | | "çAN0412-18919690771", |
| | | "çAPV960-18919690890", |
| | | "çAM261P-18955150503", |
| | | "çA3T655-13956917233", |
| | | "çAG85H1-13956917233", |
| | | "çA3XJ79-13966696265", |
| | | "çA59CM8-13856515377", |
| | | "çATT645-18919690668", |
| | | "çAPX519-17333068189", |
| | | "çALV519-18955151555", |
| | | "çA818E5-18856910910", |
| | | "çAMM988-13035066988", |
| | | "çADS3180-13866666650", |
| | | "çAC333A-13866666650", |
| | | "çADS3810-13866666650", |
| | | "çAV0282-13855195399", |
| | | "çAD4Y98-13605697998", |
| | | "çAD7L59-18856910823", |
| | | "çAR67M2-13856063769", |
| | | "çAD67620-19965044178", |
| | | "çAL5Y13-19965044178", |
| | | "çA9T097-13855176573", |
| | | "çAF177Z-18919690775", |
| | | "çA1C196-13956919655", |
| | | "çAY731G-18856910780", |
| | | "çA157FM-13966670004", |
| | | "çADC9936-13505612412", |
| | | "çAGH153-18856910894", |
| | | "çAR0R28-18856910835", |
| | | "çAH906T-13965052135", |
| | | "çAH306Q-13856001805", |
| | | "çAR903R-18856910891", |
| | | "çA57H80-13966687088", |
| | | "çCFD672-13856057477", |
| | | "çA0CT25-13805604117", |
| | | "çA39R99-18956055277", |
| | | "çAS5399-18956055277", |
| | | "çNYC109-18856910800", |
| | | "çA7XG67-13956977985", |
| | | "çA5L003-18856910803", |
| | | "çA8D2B0-18856910803", |
| | | "çAW6595-18856910826", |
| | | "çAS6K77-18856910847", |
| | | "çA833H7-13956079487", |
| | | "çA2L428-13856019166", |
| | | "çA0Q880-18856910827", |
| | | "çA833GJ-13955171029", |
| | | "çA860J6-18856910791", |
| | | "çAU3Z77-18856910804", |
| | | "çAK327T-13965104222", |
| | | "çAK6N66-13965104222", |
| | | "çA0780R-18919690780", |
| | | "çAA77996-18919690767", |
| | | "çAM6847-18919690767", |
| | | "çA912D3-18856910802", |
| | | "çA9UV52-18856910832", |
| | | "çAL218F-18856910832", |
| | | "çA6TW79-18856910837", |
| | | "çA009B9-18856910901", |
| | | "çA52AA8-18856910806", |
| | | "çAP981A-18856910794", |
| | | "çA62W52-18856910843", |
| | | "çASF208-18856910789", |
| | | "çATG275-18856910885", |
| | | "çA388S3-18856910829", |
| | | "çA64691-18856910866", |
| | | "çAP252C-18856910836", |
| | | "çAV7B16-18856910833", |
| | | "çAUX783-13956957683", |
| | | "çA21C11-13956918895", |
| | | "çA276FV-18856910907", |
| | | "çAE5170-13665655857", |
| | | "çAQ83G7-18856910788", |
| | | "çAF2347-18856910801", |
| | | "çAMB148-13965121479", |
| | | "çA3WR69-18856910813", |
| | | "çA950ZJ-13515609707", |
| | | "çA50KF9-18856910815", |
| | | "çA7NZ95-18856910841", |
| | | "çAT063K-13855140034", |
| | | "çA3A237-13965109187", |
| | | "çA4Y333-13856954333", |
| | | "çAD11433-13856954333", |
| | | "çAZ427Y-17333038030", |
| | | "çAN006Z-13855123707", |
| | | "çAZU635-18856080703", |
| | | "çA022P6-18856910895", |
| | | "çALM129-18856910895", |
| | | "çABB479-18856910853", |
| | | "çAH708Z-18856910906", |
| | | "çAK222N-18856910876", |
| | | "çA6013L-18856910913", |
| | | "çA802RD-18856910910", |
| | | "çAA81395-18856910804", |
| | | "çAGZ396-18919690782", |
| | | "çAV25V3-18856910892", |
| | | "çADX8899-15856391419", |
| | | "çAA1R27-18856910892", |
| | | "çAL9Q85-18155166465", |
| | | "çAR977R-13856557658", |
| | | "çAD11948-15856391419", |
| | | "çAD23329-15856391419", |
| | | "çAFD8929-13905600222", |
| | | "çAFJ4994-13966334117", |
| | | "çA918HP-18856910836", |
| | | "çAP6021-18919690780", |
| | | "çAF16980-13955190131", |
| | | "çAD80156-13956917233", |
| | | "çAD46432-15209856136", |
| | | "çAL2A95-13685695039", |
| | | "çAP015K-13865918124", |
| | | "çAS7306-15855138721", |
| | | "çA5189D-13764070633", |
| | | "çAD60216-13866683455", |
| | | "çAQ3U58-13866794323", |
| | | "çADM9383-19159080805", |
| | | "çA9787S-19956075570", |
| | | "çA19F82-13739278846", |
| | | "çA7HL78-15375429056", |
| | | "çAF5386-13865918124", |
| | | "çAY2981-15395033218", |
| | | "çAU712D-18655123031", |
| | | "çADZ1413-18324700273", |
| | | "çA36BJ6-15357746918", |
| | | "èAH783E-18155175195", |
| | | "çA208S8-13966727745", |
| | | "çAU99S0-13966727745", |
| | | "çAR3L55-13866745813", |
| | | "çAY13L9-15851629713", |
| | | "çAR67C1-15056091913", |
| | | "çA53P02-13866134408", |
| | | "çA847R8-13856536567", |
| | | "çAS7X22-13866134408", |
| | | "çAT329C-18256958373", |
| | | "çA578VX-18956022800", |
| | | "çA680PB-18225600905", |
| | | "çAD69563-15256591763", |
| | | "çADS6785-18326009919", |
| | | "çAK88T7-13866669923", |
| | | "çAS3W13-13866669923", |
| | | "çAU28Z3-13866669923", |
| | | "çAL4717-18326042219", |
| | | "çA9A826-13855192234", |
| | | "çA810GD-13955140157", |
| | | "çA3ME38-15155956381", |
| | | "çAQC660-18356525286", |
| | | "çAF26531-15026632182", |
| | | "çAN0224-15026632182", |
| | | "çAFD9565-18792130858", |
| | | "çHZC115-18175335887", |
| | | "çA6J275-17333038030", |
| | | "çAD23053-13866685119", |
| | | "çADN3355-13866685119", |
| | | "çA2VY16-18956078866", |
| | | "çAHB882-15256703850", |
| | | "çA20634-13956041029", |
| | | "çAA61213-19956075570", |
| | | "çAAB5386-13865918124", |
| | | "çAQ66D5-19965465419", |
| | | "çA172ZR-13955190131", |
| | | "çAV2X71-13866669923", |
| | | "çADG2839-13865918124", |
| | | "çA05HH7-15956505555", |
| | | "çA7H955-15956505555", |
| | | "çAJ38C0-18919690550", |
| | | "çA09AC8-13856566161", |
| | | "çADN8219-18919690669", |
| | | "çA86768-", |
| | | "çA64565-", |
| | | "çAF6869-18919690669", |
| | | "çAK510F-18919690681", |
| | | "çAE7556-13865926243", |
| | | "çAS1119-18955110529", |
| | | "çA9WR16-18955110570", |
| | | "çANB777-18955111333", |
| | | "çAW3263-18919690976", |
| | | "çAD86556-13635517189", |
| | | "çAE385å¦-13866170921", |
| | | "çAA3339-13955160295", |
| | | "çA1LX68-15956972822", |
| | | "çAA27620-13866721086", |
| | | "çA753NH-15955105569", |
| | | "çDHS500-13355690737", |
| | | "çA96G59-18949846563", |
| | | "çAG596H-15256938193", |
| | | "çA90059-15855155005", |
| | | "çADG301-13865991467", |
| | | "çADG5027-13655604645", |
| | | "çAZS392-13856004205", |
| | | "çAN03G8-15900512688", |
| | | "çAVV938-13866171458", |
| | | "çA5WB51-13075519010", |
| | | "çAG6G57-13705600310", |
| | | "çAD12718-15055107708", |
| | | "çA2AP97-17505690187", |
| | | "çAV9709-13515644306", |
| | | "çA6H0F8-13661571869", |
| | | "çAD207M-15855102446", |
| | | "çAT35Z8-18019919636", |
| | | "çAX108S-13965053771", |
| | | "çAM818W-13965137528", |
| | | "çAV08L2-15955159992", |
| | | "çAX677C-18715603668", |
| | | "çA92K29-18855126212", |
| | | "çAF08F0-15155165536", |
| | | "çAX1U50-17333152686", |
| | | "çA00F85-13485727850", |
| | | "çA105B5-13966686381", |
| | | "çA33Z13-17505515701", |
| | | "çA377AF-15375439937", |
| | | "çLM9202-17769930887", |
| | | "çAW785K-15055179136", |
| | | "çA621G7-13865966506", |
| | | "çAK661G-13965020562", |
| | | "çAZF353-13965105584", |
| | | "çAM528Y-15255133586", |
| | | "çAS2G87-18010863058", |
| | | "çAHX962-13905601520", |
| | | "çA2NL59-18010882575", |
| | | "çA39L66-13637094407", |
| | | "çAW130C-13966655585", |
| | | "çAV502K-18326156618", |
| | | "çEA5002-13701829756", |
| | | "çAG11D2-18895374416", |
| | | "çAG2Q90-13721067138", |
| | | "çA088PX-18095652570", |
| | | "çRB6090-15256666090", |
| | | "çADD4298-13033052361", |
| | | "çAMOT18-13996529050", |
| | | "çA7CA06-18055115106", |
| | | "çA1YR63-18949230358", |
| | | "çAC616P-18155182329", |
| | | "çAF8905-18755162349", |
| | | "çAU796W-13956994808", |
| | | "çA852YX-13309691098", |
| | | "çALH073-13865980010", |
| | | "çA2ZM95-13856018311", |
| | | "çAW7F21-13966653390", |
| | | "çA7P081-13955196906", |
| | | "çAAB9158-13955196906", |
| | | "çAM205G-13865957523", |
| | | "çAD19422-18315335159", |
| | | "çA65D99-18315335159", |
| | | "çA825R2-", |
| | | "çA9TL21-13965109187", |
| | | "çAY4619-18856080703", |
| | | "çA0PQ03-18856910788", |
| | | "çAFP638-13955188202", |
| | | "çA0VW17-18855187627", |
| | | "çATR386-13965689770", |
| | | "çAC503H-13856537989", |
| | | |
| | | }; |
| | | List<String> noCars = new ArrayList<>(); |
| | | List<String> yesCars = new ArrayList<>(); |
| | | List<String> phoneNoCars = new ArrayList<>(); |
| | | FLAG: for(String str :allCars){ |
| | | String[] temp = str.split("-"); |
| | | for(String s : cars){ |
| | | String[] temp = str.split("-"); |
| | | if(StringUtils.equals(s,temp[0])){ |
| | | yesCars.add(s); |
| | | continue FLAG; |
| | |
| | | } |
| | | noCars.add(str); |
| | | } |
| | | FLAG1: |
| | | for(String s : carsPhone){ |
| | | String[] tt = s.split("-"); |
| | | for(String str : allCars){ |
| | | String[] temp= str.split("-"); |
| | | if(StringUtils.equals(tt[0],temp[0]) |
| | | ){ |
| | | if((tt.length>1 |
| | | && temp.length>4 |
| | | && !StringUtils.equals(tt[1],temp[4])) |
| | | || (tt.length >1 && temp.length<=4) |
| | | || (tt.length <=1 && temp.length>4) ) |
| | | phoneNoCars.add(s + "|ææ°è½¦ä¸»ï¼"+temp[4]); |
| | | continue FLAG1; |
| | | } |
| | | } |
| | | } |
| | | |
| | | for(String t :noCars){ |
| | | System.out.println(t); |
| | | } |
| | | System.out.println("--------宿´è½¦è¾ï¼"+allCars.length); |
| | | System.out.println("--------å·²å½å
¥è½¦è¾ï¼"+cars.length); |
| | | System.out.println("--------对åºå½å
¥è½¦è¾ï¼"+yesCars.size()); |
| | | System.out.println("--------对åºå½å
¥è½¦è¾ï¼"+yesCars.size()); |
| | | System.out.println("--------æªå½è½¦è¾ï¼"+noCars.size()); |
| | | |
| | | for(String t :phoneNoCars){ |
| | | System.out.println(t); |
| | | } |
| | | System.out.println("--------车主对ä¸ä¸ç车è¾ï¼"+phoneNoCars.size()); |
| | | } |
| | | } |
| | |
| | | import com.doumee.dao.business.model.Cars; |
| | | import com.doumee.service.business.CarsService; |
| | | import com.doumee.service.business.impl.hksync.fhk.HkSyncVehicleFromHKServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | /** |
| | |
| | | public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(carsService.findById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "车è¾ä¿¡æ¯å¯¼å
¥" ,notes = "车è¾ä¿¡æ¯å¯¼å
¥") |
| | | @PostMapping("/importExcel") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "file", value = "file", required = true, paramType = "query", dataType = "file", dataTypeClass = File.class), |
| | | }) |
| | | @CloudRequiredPermission("business:cars:create") |
| | | public ApiResponse<String> importExcel (@ApiParam(value = "file") MultipartFile file, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(carsService.importBatch(file,this.getLoginUser(token))); |
| | | } |
| | | } |
| | |
| | | package com.doumee.cloud.board; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.business.PlatformLogMapper; |
| | | import com.doumee.dao.business.model.Platform; |
| | | import com.doumee.dao.business.model.PlatformJob; |
| | | import com.doumee.dao.business.model.PlatformLog; |
| | | import com.doumee.dao.openapi.request.HkBaseTokenRequest; |
| | | import com.doumee.dao.system.join.NoticesJoinMapper; |
| | | import com.doumee.dao.web.response.platformReport.*; |
| | | import com.doumee.service.business.PlatformJobService; |
| | | import com.doumee.service.business.PlatformLogService; |
| | | import io.swagger.annotations.*; |
| | | import com.doumee.service.business.third.BoardService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | |
| | | |
| | | @Autowired |
| | | private PlatformLogMapper platformLogMapper; |
| | | @Autowired |
| | | private BoardService boardService; |
| | | |
| | | |
| | | |
| | |
| | | @ApiOperation("ä¸å¿æ°æ®") |
| | | @GetMapping("/centerData") |
| | | public ApiResponse<OnSitDispatchBoardVO> centerData() { |
| | | OnSitDispatchBoardVO data = new OnSitDispatchBoardVO(); |
| | | data.setPlatformTotal(100); |
| | | data.setFreePlatform(8); |
| | | data.setReservationCar(97); |
| | | data.setWorkingCar(56); |
| | | data.setLineUpCar(35); |
| | | OnSitDispatchBoardVO data = boardService.getCnddCenterData(); |
| | | if(data == null){ |
| | | data = new OnSitDispatchBoardVO(); |
| | | data.setPlatformTotal(100); |
| | | data.setFreePlatform(8); |
| | | data.setReservationCar(97); |
| | | data.setWorkingCar(56); |
| | | data.setLineUpCar(35); |
| | | } |
| | | return ApiResponse.success(data); |
| | | } |
| | | |
| | |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.haikang.model.param.respose.PageRegionInfoResponse; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.web.response.platformReport.*; |
| | | import com.doumee.service.business.third.BoardService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/board/api/security") |
| | | public class SecurityController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BoardService boardService; |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("ä¸å¿æ°æ®") |
| | |
| | | visitDataVO.setRetentionRata(BigDecimal.valueOf(random.nextInt(20))); |
| | | return ApiResponse.success(visitDataVO); |
| | | } |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("æ å½¢åºåé忥å£") |
| | | @GetMapping("/regionTree") |
| | | public ApiResponse<List<PageRegionInfoResponse>> regionTree(CarmeraListVO param) { |
| | | return ApiResponse.success(boardService.getRegionTree(param)); |
| | | } |
| | | @LoginNoRequired |
| | | @ApiOperation("å¹³éºç»æåºåé忥å£") |
| | | @GetMapping("/regionList") |
| | | public ApiResponse<List<PageRegionInfoResponse>> regionList(CarmeraListVO param) { |
| | | return ApiResponse.success(boardService.regionList(param)); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | String[] loginOut= new String[]{"/xauthplus-plugin/logout","éåºç»å½"};//éåºç»å½ |
| | | String[] sendSms= new String[]{"/api/smsps/v1/smsService/sms","çä¿¡éªè¯ç "};//çä¿¡éªè¯ç |
| | | String[] getMenus= new String[]{"/api/privilegeService/v1/menus/list","è·åç¨æ·ææéçèååè½é¡¹"};//è·åç¨æ·ææéçèååè½é¡¹ |
| | | String[] rootRegion= new String[]{"/api/resource/v1/regions/root","è·åæ ¹åºåä¿¡æ¯æ¥å£"};//è·åæ ¹åºåä¿¡æ¯æ¥å£ |
| | | String[] subRegions= new String[]{"/api/resource/v1/regions/subRegions","æ ¹æ®åºåç¼å·è·åä¸ä¸çº§åºåå表"};//æ ¹æ®åºåç¼å·è·åä¸ä¸çº§åºåå表 |
| | | String[] pageRegions= new String[]{"/api/resource/v1/regions","å页è·ååºåå表"};//å页è·ååºåå表 |
| | | String[] pageCameras= new String[]{"/api/resource/v1/cameras","å页è·åçæ§ç¹èµæº"};//å页è·åçæ§ç¹èµæº |
| | | String[] cameraPreviewURLs= new String[]{"/api/video/v1/cameras/previewURLs","è·åçæ§ç¹é¢è§åæµURL"};//è·åçæ§ç¹é¢è§åæµURL |
| | | String[] pageFireChannel= new String[]{"/api/resource/v1/fireChannel/get","å页è·åæ¶é²ä¼ æå¨å表"};//å页è·åæ¶é²ä¼ æå¨å表 |
| | | String[] pageSensorStatus= new String[]{"/api/fpnms/v2/sensor/status/search","å页æ¥è¯¢æ¶é²ä¼ æå¨é¨ä»¶ç¶æv2"};//å页æ¥è¯¢æ¶é²ä¼ æå¨é¨ä»¶ç¶æv2 |
| | | } |
| | | |
| | | /** |
| | | * éå½A.55æ¶é²è®¾å¤ç±»å |
| | | */ |
| | | public interface XiaofangCGQType{ |
| | | String[] hzbjzj = new String[]{"1020001" , "ç«ç¾æ¥è¦ä¸»æº" } ; |
| | | String[] gycgq = new String[]{"1020002" , "æçä¼ æå¨" } ; |
| | | String[] gwcgs = new String[]{"1020003" , "ææ¸©ä¼ æå¨" } ; |
| | | String[] sdbjan = new String[]{"1020004" , "æå¨æ¥è¦æé®" } ; |
| | | String[] krqtcgq = new String[]{"1020005" , "å¯çæ°ä½ä¼ æå¨" } ; |
| | | String[] dqwdcgq = new String[]{"1020007" , "çµæ°æ¸©åº¦ä¼ æå¨" } ; |
| | | String[] sydlcgq = new String[]{"1020008" , "å©ä½çµæµä¼ æå¨" } ; |
| | | String[] ywcgq = new String[]{"1020009" , "æ¶²ä½ä¼ æå¨" } ; |
| | | String[] sycgq = new String[]{"1020010" , "æ°´åä¼ æå¨" } ; |
| | | String[] tycgq = new String[]{"1020011" , "éç¨ä¼ æå¨" } ; |
| | | String[] sgbjq = new String[]{"1020015" , "声å
æ¥è¦å¨" } ; |
| | | |
| | | } |
| | | /** |
| | | * éå½A.55æ¶é²è®¾å¤ç±»å |
| | | */ |
| | | public interface XiaofangDeviceType{ |
| | | String[] uitDevice = new String[]{"20001" , "uitDevice","ç¨æ·ä¿¡æ¯ä¼ è¾è£
ç½®" } ; |
| | | String[] electricDevice = new String[]{"20002" , "electricDevice","ç¨çµä¸»æº" } ; |
| | | String[] wirelessWaterDevice = new String[]{"20003" , "wirelessWaterDevice","ç¨æ°´ä¸»æº" } ; |
| | | String[] independentGasDevice = new String[]{"20004" , "independentGasDevice","ç¬ç«å¼å¯çæ°ä½æ¥è¦å¨" } ; |
| | | String[] independentSmokeDevice = new String[]{"20005" , "independentSmokeDevice","ç¬ç«å¼æçæ¥è¦å¨" } ; |
| | | String[] iogDTUDevice = new String[]{"20008" , "iogDTUDevice","ç©èç½ç½å
³ï¼DTUï¼" } ; |
| | | String[] siterwell433gwDevice = new String[]{"20009" , "siterwell433gwDevice","ç©èç½æ¶é²æ¥è¦ç½å
³(433)" } ; |
| | | String[] outdoorHydrantDevice = new String[]{"20010" , "outdoorHydrantDevice","室夿¶ç«æ " } ; |
| | | String[] cameraSmokeDevice = new String[]{"20011" , "cameraSmokeDevice","è§é¢çæ" } ; |
| | | String[] cameraTempDevice = new String[]{"20012" , "cameraTempDevice","è§é¢æ¸©æ" } ; |
| | | String[] intelligentAnalyzer = new String[]{"20013" , "intelligentAnalyzer","æºè½åæä»ª" } ; |
| | | String[] chargingPile = new String[]{"20014" , "chargingPile","å
çµæ¡©" } ; |
| | | String[] iPCVideoGateway = new String[]{"20015" , "IPCVideoGateway","IPCè§é¢ç½å
³" } ; |
| | | String[] smartElectricityGateway = new String[]{"20016" , "smartElectricityGateway","æºè½ç¨çµç½å
³" } ; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ä»»åé¡å |
| | | */ |
| | | public enum TASK_TYPE { |
| | |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.platformsList,body); |
| | | } |
| | | /** |
| | | * è·åæ¶é²ä¼ æå¨å表 |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String pageFireChannel(String body) { |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.pageFireChannel,body); |
| | | } |
| | | /** |
| | | * æ¥è¯¢æ¶é²ä¼ æå¨é¨ä»¶ç¶æv2 |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String pageSensorStatus(String body) { |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.pageSensorStatus,body); |
| | | } |
| | | /** |
| | | * è·åæå°ç¶æ |
| | | * @return |
| | | */ |
| | |
| | | public static String getHkMenu(Map<String,String> body) { |
| | | return startDoGetStringArtemis(HKConstants.InterfacePath.getMenus,body); |
| | | } |
| | | /** |
| | | * å页è·ååºåå表 |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String pageRegions(Map<String,String> header,String body) { |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.pageRegions,null,header,body); |
| | | } |
| | | /** |
| | | * å页è·åçæ§ç¹èµæº |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String pageCameras(Map<String,String> header,String body) { |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.pageCameras,null,header,body); |
| | | } |
| | | /** |
| | | * è·åçæ§ç¹é¢è§åæµURL |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String cameraPreviewURLs(Map<String,String> header,String body) { |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.cameraPreviewURLs,null,header,body); |
| | | } |
| | | |
| | | |
| | | /** |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class BaseListPageRequest { |
| | | private String userId;// Head String true ç¨æ·ID |
| | | private Integer pageNo ;//integer True 页ç ,pageNoâ¥1 |
| | | private Integer pageSize;// integer True åé¡µå¤§å° |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class CameraPreviewURLsRequest { |
| | | private String userId;// Head String true ç¨æ·ID |
| | | private String domainId ;// Head Number true ç½åID |
| | | private String cameraIndexCode ;// Body String true çæ§ç¹å¯ä¸æ è¯ï¼#API@å页è·åçæ§ç¹èµæº@#æ¥å£è·åè¿ååæ°cameraIndexCode |
| | | private Integer streamType ;// Body Number false ç æµç±»åï¼0:ä¸»ç æµ<br>1:åç æµ<br>2:第ä¸ç æµ<br>åæ°ä¸å¡«ï¼é»è®¤ä¸ºä¸»ç æµ |
| | | private String protocol ;// Body String false åæµåè®®ï¼åºç¨å±åè®®ï¼ï¼ârtspâ:RTSPåè®®,ârtmpâ:RTMPåè®®,âhlsâ:HLSåè®®ï¼HLSåè®®åªæ¯ææµ·åº·SDKåè®®ãEHOMEåè®®ãGB28181åè®®ãONVIFåè®®æ¥å
¥ç设å¤ï¼åªæ¯æH264è§é¢ç¼ç åAACé³é¢ç¼ç ï¼,åæ°ä¸å¡«ï¼é»è®¤ä¸ºRTSPåè®® |
| | | private Integer transmode ;// Body Number false ä¼ è¾åè®®ï¼ä¼ è¾å±åè®®ï¼ï¼0:UDP<br>1:TCP<br>é»è®¤æ¯TCP<br>注ï¼<br>GB28181 2011å以åçæ¬åªæ¯æUDPä¼ è¾ |
| | | private String expand ;// Body String false æ è¯æ©å±å
å®¹ï¼æ ¼å¼ï¼key=valueï¼<br>è°ç¨æ¹æ ¹æ®å
¶ææ¾æ§ä»¶æ¯æçè§£ç æ ¼å¼éæ©ç¸åºçå°è£
ç±»åï¼<br>æ¯æçå
容详è§[éå½F expandæ©å±å
容说æ]@[æºæ
§ååºç®¡çå¹³å°V1.6.0-éå½-éå½F expandæ©å±å
容说æ] |
| | | |
| | | } |
| | |
| | | private Integer channelType;// Number false ä¼ æå¨ç±»åï¼è¯¦è§[éå½A.57 æ¶é²ä¼ æå¨å¤§ç±»å]@[æºæ
§ååºç®¡çå¹³å°V1.4.301-éå½-éå½A æ°æ®åå
¸#éå½A.57 æ¶é²ä¼ æå¨å¤§ç±»å] |
| | | private Integer unitStatus;// Number false é¨ä»¶ç¶æï¼0ï¼æªæ³¨å 1ï¼æ£å¸¸ 2: ä¿®å¤ä¸ 3ï¼å¼å¸¸ç¶æï¼ä¿®å¤ä¸ç¶æç®å没ç¨å°ï¼æªæ³¨åæ¶è®¾å¤æ²¡æå¨ç¦»çº¿ç¶æï¼ 空-ææç¶æ |
| | | private String channelIndexCode ;//String false ä¼ æå¨ç¼å· |
| | | private String userId ; |
| | | private int pageNo;// Query Number false 页ç |
| | | private int pageSize;// Query Number false é¡µå¤§å° |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class CamerasPreviewURLsResponse { |
| | | |
| | | private String url ;// Body String false åæµURL |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class PageCameraInfoResponse { |
| | | |
| | | |
| | | private String altitude ;// Body String false æµ·æ |
| | | private String cameraIndexCode ;// Body String false çæ§ç¹å¯ä¸æ è¯ |
| | | private String cameraName ;//Body String false çæ§ç¹åç§° |
| | | private Integer cameraType ;// Body Number false çæ§ç¹ç±»å |
| | | private String cameraTypeName ;// Body String false çæ§ç¹ç±»å说æ |
| | | private String capabilitySet ;// Body String false è½åéï¼è¯¦è§æ°æ®åå
¸ï¼typeCode为xresmgr.capability_setï¼<br><br> |
| | | private String capabilitySetName ;// Body String false è½åé说æ |
| | | private String intelligentSet ;// Body String false æºè½åæè½åé |
| | | private String intelligentSetName ;// Body String false æºè½åæè½åé说æ |
| | | private String channelNo ;// Body String false ééç¼å· |
| | | private String channelType ;// Body String false ééç±»å |
| | | private String channelTypeName ;// Body String false ééåç±»å说æ |
| | | private String createTime ;// Body String false å建æ¶é´ |
| | | private String encodeDevIndexCode ;// Body String false æå±ç¼ç 设å¤å¯ä¸æ è¯ |
| | | private String encodeDevResourceType ;// Body String false æå±è®¾å¤ç±»åï¼è¯¦è§æ°æ®åå
¸ï¼typeCode为xresmgr.resource_typeï¼<br><br> |
| | | private String encodeDevResourceTypeName ;// Body String false æå±è®¾å¤ç±»å说æ |
| | | private String gbIndexCode ;// Body String false çæ§ç¹å½æ ç¼å· |
| | | private String installLocation ;// Body String false å®è£
ä½ç½® |
| | | private String keyBoardCode ;// Body String false é®çæ§å¶ç |
| | | private String latitude ;// Body String false 纬度 |
| | | private String longitude ;// Body String false ç»åº¦ |
| | | private Integer pixel ;// Body Number false æåæºåç´ ï¼1-æ®éåç´ ï¼2-130ä¸é«æ¸
ï¼3-200ä¸é«æ¸
ï¼4-300ä¸é«æ¸
ï¼åå¼åèæ°æ®åå
¸ï¼typeCode为xresmgr.piexlï¼<br><br> |
| | | private Integer ptz ;// Body Number false äºéç±»åï¼1-å
¨æ¹ä½äºå°ï¼å¸¦è½¬å¨ååç¦ï¼ï¼2-åªæåç¦,ä¸å¸¦è½¬å¨ï¼3-åªæè½¬å¨ï¼ä¸å¸¦åç¦ï¼4-æ äºå°ï¼æ åç¦ï¼åå¼åèæ°æ®åå
¸ï¼typeCode为xresmgr.ptz_typeï¼<br><br> |
| | | private Integer ptzController ;// Body Number false äºå°æ§å¶(1-DVRï¼2-模æç©éµï¼3-MU4000ï¼4-NC600ï¼åå¼åèæ°æ®åå
¸ï¼typeCode为xresmgr.ptz_control_type)<br><br> |
| | | private String ptzControllerName ;// Body String false äºå°æ§å¶è¯´æ |
| | | private String ptzName ;// Body String false äºéç±»å说æ |
| | | private String recordLocation ;// Body String false å½ååå¨ä½ç½®ï¼0-ä¸å¿åå¨ï¼1-设å¤åå¨ï¼åå¼åèæ°æ®åå
¸ï¼typeCode为xresmgr.record_locationï¼<br><br> |
| | | private String recordLocationName ;// Body String false å½ååå¨ä½ç½®è¯´æ |
| | | private String regionIndexCode ;// Body String false æå±åºåå¯ä¸æ è¯ |
| | | private Integer status ;// Body Number false å¨çº¿ç¶æï¼0-ä¸å¨çº¿ï¼1-å¨çº¿ï¼åå¼åèæ°æ®åå
¸ï¼typeCode为xresmgr.statusï¼<br><br> |
| | | private String statusName ;// Body String false ç¶æè¯´æ |
| | | private Integer transType ;// Body Number false ä¼ è¾åè®®ï¼0-UDPï¼1-TCPï¼ |
| | | private String transTypeName ;// Body String false ä¼ è¾å议类å说æ |
| | | private String treatyType ;// Body String false æ¥å
¥åè®®ï¼è¯¦è§æ°æ®åå
¸ï¼typeCode为xresmgr.protocol_typeï¼<br><br> |
| | | private String treatyTypeName ;// Body String false æ¥å
¥å议类å说æ |
| | | private String viewshed ;//Body String false å¯è§åç¸å
³ï¼JSONæ ¼å¼ï¼ |
| | | private String updateTime ;//Body String false æ´æ°æ¶é´<br>éç¨ISO8601æ åï¼å¦2018-07-26T21:30:08+08:00<br>表示å京æ¶é´2017å¹´7æ26æ¥21æ¶30å08ç§<br> |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PageFireChannelInfoResponse { |
| | | private String regionPath ;//Body String false æå±åºåå±çº§ï¼æ ¼å¼ï¼@æ ¹èç¹@ååºå1@ |
| | | private String regionIndexCode ;//Body String false æå±åºåç¼å· |
| | | private String regionPathName ;//Body String false æå±åºåå±çº§åç§° |
| | | private String fireproChannelSubType ;//Body Number false ä¼ æå¨å°ç±»åï¼è¯¦è§[éå½A.56] |
| | | private String indexCode ;//Body String false èµæºå¯ä¸æ å¿ |
| | | private String description ;//Body String false æè¿° |
| | | private String updateTime ;//Body String false æ´æ°æ¶é´ï¼ISO8601æ å |
| | | private String fireproChannelMaxValue ;//Body String false æå¤§éå¼ |
| | | private String createTime ;//Body String false å建æ¶é´ï¼ISO8601æ å |
| | | private String name ;//Body String false èµæºåç§° |
| | | private String fireproChannelAddressCode ;//Body String false ä¼ æå¨å°åç |
| | | private String comId ;//Body String false ç»ä»¶ID |
| | | private String fireproChannelType ;//Body Number false ä¼ æå¨å¤§ç±»åï¼è¯¦è§[éå½A.64] |
| | | private String parentIndexCode ;//Body String false æå±è®¾å¤ç¼ç |
| | | private String resourceType ;//Body String false èµæºç±»åï¼fireSensorï¼æ¶é²ä¼ æå¨ï¼è¯¦è§[éå½A.64] |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import com.doumee.dao.web.response.platformReport.CarmeraListVO; |
| | | import com.doumee.dao.web.response.platformReport.RegionTreeVO; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class PageRegionInfoResponse { |
| | | |
| | | @ApiModelProperty(value = "åºåå¯ä¸æ è¯ç ") |
| | | private String regionIndexCode;// Body String false åºåå¯ä¸æ è¯ç |
| | | |
| | | @ApiModelProperty(value = "åºååç§°") |
| | | private String regionName ;// Body String false åºååç§° |
| | | |
| | | @ApiModelProperty(value = "ç¶åºåå¯ä¸æ è¯ç ") |
| | | private String parentIndexCode ;// Body String false ç¶åºåå¯ä¸æ è¯ç |
| | | |
| | | @ApiModelProperty(value = "æ ç¼å·") |
| | | private String treeCode ;// Body String false æ ç¼å· |
| | | |
| | | |
| | | @ApiModelProperty(value = "ä¸çº§éå") |
| | | private List<PageRegionInfoResponse> childList; |
| | | @ApiModelProperty(value = "çæ§ç¹éå") |
| | | private List<CarmeraListVO> carmeraList; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class PageSensorStatusResponse { |
| | | private String regionPath ;//Body String false æå±åºåå±çº§ï¼æ ¼å¼ï¼@æ ¹èç¹@ååºå1@ |
| | | private String regionIndexCode ;//Body String false æå±åºåç¼å· |
| | | private String regionPathName ;//Body String false æå±åºåå±çº§åç§° |
| | | private String fireproChannelSubType ;//Body Number false ä¼ æå¨å°ç±»åï¼è¯¦è§[éå½A.56] |
| | | private String indexCode ;//Body String false èµæºå¯ä¸æ å¿ |
| | | private String description ;//Body String false æè¿° |
| | | private String updateTime ;//Body String false æ´æ°æ¶é´ï¼ISO8601æ å |
| | | private String fireproChannelMaxValue ;//Body String false æå¤§éå¼ |
| | | private String createTime ;//Body String false å建æ¶é´ï¼ISO8601æ å |
| | | private String name ;//Body String false èµæºåç§° |
| | | private String fireproChannelAddressCode ;//Body String false ä¼ æå¨å°åç |
| | | private String comId ;//Body String false ç»ä»¶ID |
| | | private String fireproChannelType ;//Body Number false ä¼ æå¨å¤§ç±»åï¼è¯¦è§[éå½A.64] |
| | | private String parentIndexCode ;//Body String false æå±è®¾å¤ç¼ç |
| | | private String resourceType ;//Body String false èµæºç±»åï¼fireSensorï¼æ¶é²ä¼ æå¨ï¼è¯¦è§[éå½A.64] |
| | | } |
| | |
| | | package com.doumee.core.haikang.service; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.HKTools; |
| | | import com.doumee.core.haikang.model.param.BaseListPageResponse; |
| | | import com.doumee.core.haikang.model.param.BaseRequst; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.BaseListPageRequest; |
| | | import com.doumee.core.haikang.model.param.request.*; |
| | | import com.doumee.core.haikang.model.param.respose.*; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.HttpsUtil; |
| | | import com.hikvision.artemis.sdk.config.ArtemisConfig; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | @Slf4j |
| | | public class HKService { |
| | |
| | | return null; |
| | | } |
| | | /** |
| | | *å页è·ååºåå表ï¼åé¡µï¼ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<PageRegionInfoResponse>> pageRegions(BaseListPageRequest param){ |
| | | log.info("ãæµ·åº·å页è·ååºåå表ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | Map<String ,String> header = new HashMap<>(); |
| | | // header.put("userId",param.getUserId()); |
| | | String res = HKTools.pageRegions(header,JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<BaseListPageResponse<PageRegionInfoResponse>> >(){}; |
| | | BaseResponse<BaseListPageResponse<PageRegionInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康å页è·ååºåå表"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·å页è·ååºåå表ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *è·åçæ§ç¹é¢è§åæµURL |
| | | * @return |
| | | */ |
| | | public static BaseResponse<CamerasPreviewURLsResponse> cameraPreviewURLs(CameraPreviewURLsRequest param){ |
| | | log.info("ãæµ·åº·è·åçæ§ç¹é¢è§åæµURLã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | Map<String ,String> header = new HashMap<>(); |
| | | // header.put("userId",param.getUserId()); |
| | | // header.put("domainId ",param.getDomainId()); |
| | | String res = HKTools.cameraPreviewURLs(header,JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<CamerasPreviewURLsResponse> >(){}; |
| | | BaseResponse<CamerasPreviewURLsResponse> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康è·åçæ§ç¹é¢è§åæµURL"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·è·åçæ§ç¹é¢è§åæµURLã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *å页è·åçæ§ç¹èµæºï¼åé¡µï¼ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<PageCameraInfoResponse>> pageCameras(BaseListPageRequest param){ |
| | | log.info("ãæµ·åº·å页è·åçæ§ç¹èµæºã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | Map<String ,String> header = new HashMap<>(); |
| | | header.put("userId",param.getUserId()); |
| | | String res = HKTools.pageCameras(header,JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<BaseListPageResponse<PageCameraInfoResponse>> >(){}; |
| | | BaseResponse<BaseListPageResponse<PageCameraInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康å页è·åçæ§ç¹èµæº"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·å页è·åçæ§ç¹èµæºã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *è·åæ¶é²ä¼ æå¨å表ï¼åé¡µï¼ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<PageFireChannelInfoResponse>> pageFireChannel(BaseListPageRequest param){ |
| | | log.info("ãæµ·åº·å页è·åæ¶é²ä¼ æå¨å表ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.pageFireChannel(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<BaseListPageResponse<PageFireChannelInfoResponse>> >(){}; |
| | | BaseResponse<BaseListPageResponse<PageFireChannelInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康å页è·åæ¶é²ä¼ æå¨å表"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·å页è·åæ¶é²ä¼ æå¨å表ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *æ¥è¯¢æ¶é²ä¼ æå¨é¨ä»¶ç¶æv2ï¼åé¡µï¼ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<PageSensorStatusResponse>> pageSensorStatus(SensorStatusListRequest param){ |
| | | log.info("ãæµ·åº·å页æ¥è¯¢æ¶é²ä¼ æå¨é¨ä»¶ç¶æv2ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.pageSensorStatus(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<BaseListPageResponse<PageSensorStatusResponse>> >(){}; |
| | | BaseResponse<BaseListPageResponse<PageSensorStatusResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康å页æ¥è¯¢æ¶é²ä¼ æå¨é¨ä»¶ç¶æv2"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·å页æ¥è¯¢æ¶é²ä¼ æå¨é¨ä»¶ç¶æv2ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *æ ¹æ®ç¨æ·æ è¯è·å客æ·ç«¯TGCæ¥å£ |
| | | * @return |
| | | */ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.admin.request; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * å工信æ¯å¯¼å
¥è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Data |
| | | @ApiModel("å工信æ¯å¯¼å
¥") |
| | | public class CarsImport { |
| | | |
| | | |
| | | @ExcelColumn(name="*车çå·ç ",value = "code",index = 1) |
| | | private String code; |
| | | @ExcelColumn(name="*ä¸å¡ç±»å",value = "categoryName",index = 2) |
| | | private String categoryName; |
| | | |
| | | @ExcelColumn(name="*ç»ç»è·¯å¾",value = "companyName",index = 3) |
| | | private String companyName; |
| | | |
| | | @ExcelColumn(name="车主å§å" , value = "memberName" ,index = 4) |
| | | private String memberName; |
| | | |
| | | @ExcelColumn(name="ææºå·" , value = "phone",index = 5) |
| | | private String phone; |
| | | @ExcelColumn(name="æ§å«" , value = "sex",index = 6) |
| | | private String sex; |
| | | @ExcelColumn(name="身份è¯å·" , value = "idcard",index = 7) |
| | | private String idcard; |
| | | @ExcelColumn(name="å车åºåç§°" , value = "parkName",index = 8) |
| | | private String parkName; |
| | | @ExcelColumn(name="å¼å§æ¶é´" , value = "startTime",index = 9) |
| | | private String startTime; |
| | | @ExcelColumn(name="ç»ææ¶é´" , value = "endTime",index = 10) |
| | | private String endTime; |
| | | } |
| | |
| | | @ApiModelProperty(value = "ä½ä¸é" ,hidden = true) |
| | | @TableField(exist = false) |
| | | private BigDecimal workNum ; |
| | | @ApiModelProperty(value = "ç»è®¡é" ,hidden = true) |
| | | @TableField(exist = false) |
| | | private Integer countum ; |
| | | |
| | | |
| | | @ApiModelProperty(value = "WMS任塿¶é´") |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.response.platformReport; |
| | | |
| | | import com.doumee.core.haikang.model.param.respose.PageRegionInfoResponse; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * çæ§ç¹éå |
| | | * |
| | | * @Author : JP |
| | | * @create 2024/10/25 10:59 |
| | | */ |
| | | @Data |
| | | public class CarmeraListVO { |
| | | |
| | | @ApiModelProperty(value = "çæ§ç¹åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "å¯ä¸ç´¢å¼") |
| | | private String indexCode; |
| | | @ApiModelProperty(value = "åºåç¼ç ") |
| | | private String reginCode; |
| | | @ApiModelProperty(value = "æ¯å¦æ¥è¯¢çæ§ç¹æ°æ®ï¼0ä¸å
å« 1å
å«") |
| | | private Integer withCameras; |
| | | @ApiModelProperty(value = "设å¤ç¶æï¼ä¸å¨çº¿ï¼1-å¨çº¿") |
| | | private Integer status; |
| | | @ApiModelProperty(value = "设å¤ç¶ææè¿°") |
| | | private String statusName; |
| | | } |
| | |
| | | public class OnSitDispatchBoardVO { |
| | | |
| | | @ApiModelProperty(value = "æå°æ°é") |
| | | private Integer platformTotal; |
| | | private int platformTotal; |
| | | |
| | | @ApiModelProperty(value = "ç©ºé²æå°æ°é") |
| | | private Integer freePlatform; |
| | | private int freePlatform; |
| | | |
| | | @ApiModelProperty(value = "é¢çº¦è½¦è¾") |
| | | private Integer reservationCar; |
| | | private int reservationCar; |
| | | |
| | | @ApiModelProperty(value = "ä½ä¸è½¦è¾") |
| | | private Integer workingCar; |
| | | private int workingCar; |
| | | |
| | | @ApiModelProperty(value = "æé车è¾") |
| | | private Integer lineUpCar; |
| | | private int lineUpCar; |
| | | |
| | | @ApiModelProperty(value = "仿¥æå°å®æè®¢åç»è®¡" , hidden = true) |
| | | private List<PlatformGroupFinishVO> platformGroupFinishList; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.response.platformReport; |
| | | |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.core.haikang.model.param.respose.PageRegionInfoResponse; |
| | | import com.doumee.dao.business.model.Company; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * åºåæ å½¢ç»æ |
| | | * |
| | | * @Author : JP |
| | | * @create 2024/10/25 10:59 |
| | | */ |
| | | @Data |
| | | public class RegionTreeVO { |
| | | public List<PageRegionInfoResponse> nodeList = new ArrayList<>(); |
| | | |
| | | /** |
| | | * æé æ¹æ³ |
| | | * @param nodeList å°æ°æ®éåèµå¼ç»nodeListï¼å³æææ°æ®ä½ä¸ºææèç¹ã |
| | | */ |
| | | public RegionTreeVO(List<PageRegionInfoResponse> nodeList ){ |
| | | this.nodeList = nodeList; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·åéæå»ºçæææ ¹èç¹ï¼é¡¶çº§èç¹ï¼ "0" |
| | | * @return æææ ¹èç¹Listéå |
| | | */ |
| | | public List<PageRegionInfoResponse> getRootNode(){ |
| | | // ä¿åæææ ¹èç¹ï¼æææ ¹èç¹çæ°æ®ï¼ |
| | | List<PageRegionInfoResponse> rootNodeList = new ArrayList<>(); |
| | | // treeNodeï¼æ¥è¯¢åºçæ¯ä¸æ¡æ°æ®ï¼èç¹ï¼ |
| | | for (PageRegionInfoResponse treeNode : nodeList){ |
| | | // 夿å½åèç¹æ¯å¦ä¸ºæ ¹èç¹ï¼æ¤å¤æ³¨æï¼è¥parentIdç±»åæ¯Stringï¼åè¦éç¨equals()æ¹æ³å¤æã |
| | | if (Objects.isNull(treeNode.getParentIndexCode()) |
| | | || StringUtils.equals(treeNode.getParentIndexCode(),"null")) { |
| | | // æ¯ï¼æ·»å |
| | | rootNodeList.add(treeNode); |
| | | } |
| | | |
| | | } |
| | | return rootNodeList; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®æ¯ä¸ä¸ªé¡¶çº§èç¹ï¼æ ¹èç¹ï¼è¿è¡æå»ºæ å½¢ç»æ |
| | | * @return æå»ºæ´æ£µæ |
| | | */ |
| | | public List<PageRegionInfoResponse> buildTree(){ |
| | | // treeNodesï¼ä¿åä¸ä¸ªé¡¶çº§èç¹ææå»ºåºæ¥ç宿´æ å½¢ |
| | | List<PageRegionInfoResponse> treeNodes = new ArrayList<PageRegionInfoResponse>(); |
| | | // getRootNode()ï¼è·åææçæ ¹èç¹ |
| | | for (PageRegionInfoResponse treeRootNode : getRootNode()) { |
| | | // å°é¡¶çº§èç¹è¿è¡æå»ºåæ |
| | | treeRootNode = buildChildTree(treeRootNode); |
| | | // 宿ä¸ä¸ªé¡¶çº§èç¹ææå»ºçæ å½¢ï¼å¢å è¿æ¥ |
| | | treeNodes.add(treeRootNode); |
| | | } |
| | | return treeNodes; |
| | | } |
| | | |
| | | /** |
| | | * éå½-----æå»ºåæ å½¢ç»æ |
| | | * @param pNode æ ¹èç¹ï¼é¡¶çº§èç¹ï¼ |
| | | * @return æ´æ£µæ |
| | | */ |
| | | public PageRegionInfoResponse buildChildTree(PageRegionInfoResponse pNode){ |
| | | List<PageRegionInfoResponse> childTree = new ArrayList<>(); |
| | | // nodeListï¼ææèç¹éåï¼æææ°æ®ï¼ |
| | | for (PageRegionInfoResponse treeNode : nodeList) { |
| | | // 夿å½åèç¹çç¶èç¹IDæ¯å¦çäºæ ¹èç¹çIDï¼å³å½åèç¹ä¸ºå
¶ä¸çåèç¹ |
| | | if (!Objects.isNull(treeNode.getParentIndexCode())&&treeNode.getParentIndexCode().equals(pNode.getRegionIndexCode())) { |
| | | // åéå½è¿è¡å¤æå½åèç¹çæ
åµï¼è°ç¨èªèº«æ¹æ³ |
| | | childTree.add(buildChildTree(treeNode)); |
| | | } |
| | | } |
| | | // for循ç¯ç»æï¼å³èç¹ä¸æ²¡æä»»ä½èç¹ï¼æ å½¢æå»ºç»æï¼è®¾ç½®æ ç»æ |
| | | pNode.setChildList(childTree); |
| | | return pNode; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.dao.admin.request.CarsQuery; |
| | | import com.doumee.dao.admin.response.CarsDTO; |
| | | import com.doumee.dao.business.model.Cars; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return PageData<Cars> |
| | | */ |
| | | PageData<Cars> findPage(PageWrap<Cars> pageWrap); |
| | | |
| | | String importBatch(MultipartFile file, LoginUserInfo loginUserInfo); |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | |
| | | 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.core.annotation.excel.ExcelImporter; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.ScientificNotationTUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.admin.request.CarsImport; |
| | | import com.doumee.dao.admin.request.CarsQuery; |
| | | import com.doumee.dao.admin.request.MemberImport; |
| | | import com.doumee.dao.admin.response.CarsDTO; |
| | | import com.doumee.dao.business.CarsMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.*; |
| | | |
| | |
| | | @Autowired |
| | | private CarsMapper carsMapper; |
| | | |
| | | @Autowired |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | @Autowired |
| | | private CarJoinMapper carJoinMapper; |
| | | @Autowired |
| | |
| | | |
| | | return PageData.from(carsDTOIPage); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public String importBatch(MultipartFile file, LoginUserInfo loginUserInfo){ |
| | | Boolean importing = (Boolean) redisTemplate.opsForValue().get(Constants.RedisKeys.IMPORTING_CARS); |
| | | if(importing!=null && importing){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼å·²åå¨è½¦è¾å¯¼å
¥ä»»å¡æ£å¨æ§è¡ä¸ï¼è¯·ç¨ååè¯ï¼"); |
| | | } |
| | | redisTemplate.opsForValue().set(Constants.RedisKeys.IMPORTING_CARS,true); |
| | | try { |
| | | ExcelImporter ie = null; |
| | | List<CarsImport> dataList =null; |
| | | try { |
| | | ie = new ExcelImporter(file,1,0); |
| | | dataList = ie.getDataList(CarsImport.class,null); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | if(dataList == null || dataList.size() ==0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼å½å
¥æ°æ®ä¸ºç©ºï¼"); |
| | | } |
| | | List<Cars> list = carJoinMapper.selectJoinList(Cars.class,new MPJLambdaWrapper<Cars>() |
| | | .selectAll(Cars.class) |
| | | .eq(Cars::getIsdeleted,Constants.ZERO) |
| | | ); |
| | | List<Member> memberList = memberMapper.selectList(new QueryWrapper<Member>().lambda() |
| | | .eq(Member::getType,Constants.TWO) |
| | | .eq(Member::getIsdeleted,Constants.ZERO)); |
| | | List<Cars> newList = new ArrayList<>(); |
| | | for(int i=0;i<dataList.size();i++){ |
| | | CarsImport model = dataList.get(i); |
| | | model.setPhone(ScientificNotationTUtil.convertToString(model.getPhone())); |
| | | /* if(StringUtils.isBlank(model.getCode()) |
| | | &&StringUtils.isBlank(model.getIdcardNo()) |
| | | &&StringUtils.isBlank(model.getPhone()) |
| | | &&StringUtils.isBlank(model.getCompanyName())){ |
| | | continue; |
| | | } |
| | | Cars car = checkModelParam(model,newList,i,loginUserInfo,list,companyList,); |
| | | newList.add(car);*/ |
| | | } |
| | | if(newList == null || newList.size() ==0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼å½å
¥æææ°æ®ä¸ºç©ºï¼"); |
| | | } |
| | | // dealHkUserBizBatch(newList); |
| | | return "导å
¥æå"; |
| | | }catch (BusinessException e){ |
| | | throw e; |
| | | }catch (Exception e){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"车è¾ä¿¡æ¯å¯¼å
¥å¤±è´¥ï¼è¯·ç¨åéè¯"); |
| | | }finally { |
| | | redisTemplate.delete(Constants.RedisKeys.IMPORTING_CARS); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @PostConstruct |
| | | public int initHkConfig(){ |
| | | |
| | | ArtemisConfig.host = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_HOST).getCode(); |
| | | ArtemisConfig.appKey = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_APPKEY).getCode(); |
| | | ArtemisConfig.appSecret = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_APPSECRET).getCode(); |
| | | HKConstants.https = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_HTTPS).getCode(); |
| | | ArtemisConfig.host = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_HOST).getCode(); |
| | | ArtemisConfig.appKey = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_APPKEY).getCode(); |
| | | ArtemisConfig.appSecret = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_APPSECRET).getCode(); |
| | | HKConstants.https = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_HTTPS).getCode(); |
| | | HKTools.interfaceLogService=interfaceLogService; |
| | | return 0; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl.thrid; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.param.BaseListPageResponse; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.BaseListPageRequest; |
| | | import com.doumee.core.haikang.model.param.request.SensorStatusListRequest; |
| | | import com.doumee.core.haikang.model.param.respose.PageCameraInfoResponse; |
| | | import com.doumee.core.haikang.model.param.respose.PageFireChannelInfoResponse; |
| | | import com.doumee.core.haikang.model.param.respose.PageRegionInfoResponse; |
| | | import com.doumee.core.haikang.model.param.respose.PageSensorStatusResponse; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.PlatformJobMapper; |
| | | import com.doumee.dao.business.PlatformLogMapper; |
| | | import com.doumee.dao.business.PlatformMapper; |
| | | import com.doumee.dao.business.model.Platform; |
| | | import com.doumee.dao.business.model.PlatformJob; |
| | | import com.doumee.dao.web.response.platformReport.CarmeraListVO; |
| | | import com.doumee.dao.web.response.platformReport.OnSitDispatchBoardVO; |
| | | import com.doumee.dao.web.response.platformReport.RegionTreeVO; |
| | | import com.doumee.service.business.third.BoardService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * TMSå¹³å°å¯¹æ¥Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class BoardServiceImpl implements BoardService { |
| | | @Autowired |
| | | private PlatformLogMapper platformLogMapper; |
| | | @Autowired |
| | | private PlatformJobMapper platformJobMapper; |
| | | @Autowired |
| | | private PlatformMapper platformMapper; |
| | | /** |
| | | * è·ååºåæ å½¢ç»ææ°æ® |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<PageRegionInfoResponse> getRegionTree(CarmeraListVO req){ |
| | | List<PageRegionInfoResponse> allList = new ArrayList<>(); |
| | | boolean hasNext = true; |
| | | int curTotal = 0; |
| | | int curPage = 1; |
| | | while (hasNext){ |
| | | //å页éåå¾ªç¯æ¥è¯¢ææé¨ç¦è®¾å¤æ°æ® |
| | | BaseListPageRequest param = new BaseListPageRequest(); |
| | | param.setUserId("admin"); |
| | | param.setPageSize(100); |
| | | param.setPageNo(curPage); |
| | | BaseResponse<BaseListPageResponse<PageRegionInfoResponse>> response = HKService.pageRegions(param); |
| | | if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼æµ·åº·åæ¥æ°æ®å¤±è´¥~"); |
| | | } |
| | | BaseListPageResponse<PageRegionInfoResponse> r = response.getData(); |
| | | curTotal += 100; |
| | | if(curTotal >= r.getTotal()){ |
| | | hasNext = false; |
| | | } |
| | | if(r.getList() == null || r.getList().size()==0){ |
| | | hasNext =false; |
| | | }else{ |
| | | allList.addAll(r.getList()); |
| | | } |
| | | curPage++; |
| | | } |
| | | if(Constants.equalsInteger(req.getWithCameras(),Constants.ONE)){ |
| | | initReginCameralList(allList,req.getName());//è·åå
¨é¨çæ§ç¹æ°æ® |
| | | } |
| | | List<PageRegionInfoResponse> data = new RegionTreeVO(allList).buildTree(); |
| | | return data; |
| | | } |
| | | private void initReginCameralList(List<PageRegionInfoResponse> allList,String name) { |
| | | List<CarmeraListVO> carmeraListVOList = cameraList(null); |
| | | if(carmeraListVOList!=null && carmeraListVOList.size()>0){ |
| | | for(PageRegionInfoResponse p : allList){ |
| | | for(CarmeraListVO c : carmeraListVOList){ |
| | | if(StringUtils.equals(p.getRegionIndexCode(),c.getReginCode()) |
| | | && (StringUtils.contains(c.getName(),name) ||StringUtils.isBlank(name))){ |
| | | if(p.getCarmeraList()==null){ |
| | | p.setCarmeraList(new ArrayList<>()); |
| | | } |
| | | p.getCarmeraList().add(c); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * è·ååºåæ å½¢ç»ææ°æ® |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<PageRegionInfoResponse> regionList(CarmeraListVO req){ |
| | | List<PageRegionInfoResponse> allList = new ArrayList<>(); |
| | | boolean hasNext = true; |
| | | int curTotal = 0; |
| | | int curPage = 1; |
| | | while (hasNext){ |
| | | //å页éåå¾ªç¯æ¥è¯¢ææé¨ç¦è®¾å¤æ°æ® |
| | | BaseListPageRequest param = new BaseListPageRequest(); |
| | | param.setUserId("admin"); |
| | | param.setPageSize(100); |
| | | param.setPageNo(curPage); |
| | | BaseResponse<BaseListPageResponse<PageRegionInfoResponse>> response = HKService.pageRegions(param); |
| | | if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼æµ·åº·åæ¥æ°æ®å¤±è´¥~"); |
| | | } |
| | | BaseListPageResponse<PageRegionInfoResponse> r = response.getData(); |
| | | curTotal += 100; |
| | | if(curTotal >= r.getTotal()){ |
| | | hasNext = false; |
| | | } |
| | | if(r.getList() == null || r.getList().size()==0){ |
| | | hasNext =false; |
| | | }else{ |
| | | allList.addAll(r.getList()); |
| | | } |
| | | curPage++; |
| | | } |
| | | if(Constants.equalsInteger(req.getWithCameras(),Constants.ONE)){ |
| | | initReginCameralList(allList,req.getName());//è·åå
¨é¨çæ§ç¹æ°æ® |
| | | } |
| | | return allList; |
| | | } |
| | | @Override |
| | | public List<CarmeraListVO> cameraList(CarmeraListVO req){ |
| | | List<PageCameraInfoResponse> allList = new ArrayList<>(); |
| | | boolean hasNext = true; |
| | | int curTotal = 0; |
| | | int curPage = 1; |
| | | while (hasNext){ |
| | | //å页éåå¾ªç¯æ¥è¯¢ææé¨ç¦è®¾å¤æ°æ® |
| | | BaseListPageRequest param = new BaseListPageRequest(); |
| | | param.setUserId("admin"); |
| | | param.setPageSize(100); |
| | | param.setPageNo(curPage); |
| | | BaseResponse<BaseListPageResponse<PageCameraInfoResponse>> response = HKService.pageCameras(param); |
| | | if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼æµ·åº·åæ¥æ°æ®å¤±è´¥~"); |
| | | } |
| | | BaseListPageResponse<PageCameraInfoResponse> r = response.getData(); |
| | | curTotal += 100; |
| | | if(curTotal >= r.getTotal()){ |
| | | hasNext = false; |
| | | } |
| | | if(r.getList() == null || r.getList().size()==0){ |
| | | hasNext =false; |
| | | }else{ |
| | | allList.addAll(r.getList()); |
| | | } |
| | | curPage++; |
| | | } |
| | | |
| | | List<CarmeraListVO> data = new ArrayList<>(); |
| | | for(PageCameraInfoResponse p : allList){ |
| | | CarmeraListVO t = new CarmeraListVO(); |
| | | t.setIndexCode(p.getCameraIndexCode()); |
| | | t.setReginCode(p.getRegionIndexCode()); |
| | | t.setName(p.getCameraName()); |
| | | t.setStatus(p.getStatus()); |
| | | t.setStatusName(p.getStatusName()); |
| | | data.add(t); |
| | | } |
| | | return data; |
| | | } |
| | | @Override |
| | | public List<PageFireChannelInfoResponse> fireChannelList(){ |
| | | List<PageFireChannelInfoResponse> allList = new ArrayList<>(); |
| | | boolean hasNext = true; |
| | | int curTotal = 0; |
| | | int curPage = 1; |
| | | while (hasNext){ |
| | | //å页éåå¾ªç¯æ¥è¯¢ææé¨ç¦è®¾å¤æ°æ® |
| | | BaseListPageRequest param = new BaseListPageRequest(); |
| | | param.setUserId("admin"); |
| | | param.setPageSize(100); |
| | | param.setPageNo(curPage); |
| | | BaseResponse<BaseListPageResponse<PageFireChannelInfoResponse>> response = HKService.pageFireChannel(param); |
| | | if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼æµ·åº·åæ¥æ°æ®å¤±è´¥~"); |
| | | } |
| | | BaseListPageResponse<PageFireChannelInfoResponse> r = response.getData(); |
| | | curTotal += 100; |
| | | if(curTotal >= r.getTotal()){ |
| | | hasNext = false; |
| | | } |
| | | if(r.getList() == null || r.getList().size()==0){ |
| | | hasNext =false; |
| | | }else{ |
| | | allList.addAll(r.getList()); |
| | | } |
| | | curPage++; |
| | | } |
| | | |
| | | return allList; |
| | | } |
| | | @Override |
| | | public List<PageSensorStatusResponse> sensorStatusList(){ |
| | | List<PageSensorStatusResponse> allList = new ArrayList<>(); |
| | | boolean hasNext = true; |
| | | int curTotal = 0; |
| | | int curPage = 1; |
| | | while (hasNext){ |
| | | //å页éåå¾ªç¯æ¥è¯¢ææé¨ç¦è®¾å¤æ°æ® |
| | | SensorStatusListRequest param = new SensorStatusListRequest(); |
| | | param.setPageSize(100); |
| | | param.setPageNo(curPage); |
| | | BaseResponse<BaseListPageResponse<PageSensorStatusResponse>> response = HKService.pageSensorStatus(param); |
| | | if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼æµ·åº·åæ¥æ°æ®å¤±è´¥~"); |
| | | } |
| | | BaseListPageResponse<PageSensorStatusResponse> r = response.getData(); |
| | | curTotal += 100; |
| | | if(curTotal >= r.getTotal()){ |
| | | hasNext = false; |
| | | } |
| | | if(r.getList() == null || r.getList().size()==0){ |
| | | hasNext =false; |
| | | }else{ |
| | | allList.addAll(r.getList()); |
| | | } |
| | | curPage++; |
| | | } |
| | | |
| | | return allList; |
| | | } |
| | | @Override |
| | | public OnSitDispatchBoardVO getCnddCenterData(){ |
| | | OnSitDispatchBoardVO data = new OnSitDispatchBoardVO(); |
| | | //æå°æ»æ° |
| | | List<Platform> list = platformMapper.selectJoinList(Platform.class,new MPJLambdaWrapper<Platform>() |
| | | .selectAll(Platform.class) |
| | | .select(" ( select count(1) from platform_job pj where t.id = pj.PLATFORM_ID and pj.STATUS = "+Constants.PlatformJobStatus.WORKING.getKey()+" ) as workStatus ") |
| | | .eq(Platform::getIsdeleted,Constants.ZERO) |
| | | ); |
| | | data.setPlatformTotal(list==null?0:list.size()); |
| | | //ç©ºé²æå°æ°é |
| | | data.setFreePlatform( |
| | | list.stream().filter(i->Constants.formatIntegerNum(i.getWorkStatus())<=Constants.ZERO).collect(Collectors.toList()).size() |
| | | ); |
| | | //æ¥è¯¢ä»æ¥æå°ä¸ªç¶æä½ä¸æ°é |
| | | List<PlatformJob> jobList = platformJobMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>() |
| | | .selectAll(PlatformJob.class) |
| | | .select("count(id)" ,PlatformJob::getCountum) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .apply("to_days(create_data) = to_days(now())" ) |
| | | .groupBy(PlatformJob::getStatus ) |
| | | ); |
| | | if(jobList!=null){ |
| | | // * 0å¾
确认 1å¾
ç¾å° 2çå¾
å«å· 3å
¥åçå¾
4å·²å«å· 5ä½ä¸ä¸ 6ä½ä¸å®æ 7è½¬ç§»ä¸ 8å¼å¸¸æèµ· 9å·²ææç¦»å 10已离å 11 å·²è¿å· 12已忶 |
| | | for(PlatformJob model : jobList){ |
| | | //é¢çº¦è½¦è¾ |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.WAIT_CONFIRM.getKey()) |
| | | ||Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){ |
| | | data.setReservationCar(data.getReservationCar()+Constants.formatIntegerNum(model.getCountum())); |
| | | } |
| | | // ä½ä¸è½¦è¾ |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())){ |
| | | data.setWorkingCar(data.getWorkingCar()+Constants.formatIntegerNum(model.getCountum())); |
| | | } |
| | | //æéè½¦è¾ |
| | | if(Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.WAIT_CALL.getKey()) |
| | | ||Constants.equalsInteger(model.getStatus(),Constants.PlatformJobStatus.IN_WAIT.getKey())){ |
| | | data.setLineUpCar(data.getLineUpCar()+Constants.formatIntegerNum(model.getCountum())); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return data; |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.third; |
| | | |
| | | import com.doumee.core.haikang.model.param.respose.PageFireChannelInfoResponse; |
| | | import com.doumee.core.haikang.model.param.respose.PageRegionInfoResponse; |
| | | import com.doumee.core.haikang.model.param.respose.PageSensorStatusResponse; |
| | | import com.doumee.core.tms.model.request.TmsLockStatusQueryRequest; |
| | | import com.doumee.core.tms.model.request.TmsOrderInfoRequest; |
| | | import com.doumee.core.tms.model.request.TmsOrderListRequest; |
| | | import com.doumee.core.tms.model.response.TmsBaseResponse; |
| | | import com.doumee.core.tms.model.response.TmsLockStatusQueryResponse; |
| | | import com.doumee.core.tms.model.response.TmsOrderInfoResponse; |
| | | import com.doumee.core.tms.model.response.TmsOrderListResponse; |
| | | import com.doumee.dao.web.response.platformReport.CarmeraListVO; |
| | | import com.doumee.dao.web.response.platformReport.OnSitDispatchBoardVO; |
| | | import com.doumee.dao.web.response.platformReport.RegionTreeVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æå°ä¿¡æ¯è¡¨Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/06/28 10:03 |
| | | */ |
| | | public interface BoardService { |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * è·ååºåæ å½¢ç»ææ°æ® |
| | | * @return |
| | | */ |
| | | List<PageRegionInfoResponse> getRegionTree(CarmeraListVO param); |
| | | List<PageRegionInfoResponse> regionList(CarmeraListVO param); |
| | | List<CarmeraListVO> cameraList(CarmeraListVO param); |
| | | List<PageFireChannelInfoResponse> fireChannelList(); |
| | | List<PageSensorStatusResponse> sensorStatusList(); |
| | | |
| | | OnSitDispatchBoardVO getCnddCenterData(); |
| | | } |