Exemple #1
0
        public ActionResult GetTwoAndFace(GetTwoAndFaceInput input)
        {
            HttpPostedFileBase file = Request.Files[0];


            var twoAndFaceInput = new GetTwoAndFaceInput();

            if (input.PhotoBuffer == null)
            {
                return(new EmptyResult());
            }
            //var bytes = new byte[input.PhotoBuffer.ContentLength];
            //input.PhotoBuffer.InputStream.Read(bytes, 0, bytes.Length);
            //input.PhotoBuffer.InputStream.Seek(0, SeekOrigin.Begin);



            //test data
            //twoAndFaceInput.Name = "王海滨";
            //twoAndFaceInput.IdCardNo = "362330198209067199";
            //twoAndFaceInput.PhotoBuffer = "/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCABZAFADASIAAhEBAxEB/8QAGwAAAgIDAQAAAAAAAAAAAAAAAwUEBgACBwH/xAAYAQADAQEAAAAAAAAAAAAAAAABAgMABP/aAAwDAQACEAMQAAABtu4yI3giU1g+LRQuvUtapbU0cMoZWZ5mLRZsdUGiqrEkzqeiVS3PLYe8IBhi7CrGNGOtSK/MS2O6/MpDferM6we+K9ArfRZurhhBhx7XozJengBKA7dY8Aapkls6y5j02eK8WQ6B1kSik2Fqobikpajp0ZG5uHp2Y0tP0zNuch6Zg3Mmd6Kd/8QAKBAAAgIBAgUEAgMAAAAAAAAAAgMBBAAREgUQEyEiFDEyNRUwM0FC/9oACAEBAAEFAt/l2LNsxhtBcHfUvFX0N5zn+tvnpjDha3ETJKc1zh92YLlMc7nlHpwgG0InPx56MSaJSfUTk82jqdpwRK5OVseW90y+qA7Fzm+epr3ycIYLJiIAlCcysduWLQoIygWEkuptsYAvEvfHBrkTsFR6vZcFZWLQvseoF9qZ8t2bs+UPrx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26mKdlvD5fxCIBQAApgA1CJQBHAw445lLzeAzKOHGlFXFoweQieRjS9jW1f+0o7chBJoWzXURINLqF2vVeD9uep5AI/SXcKs45DrXA/MvPO/DeRwTPlVtSO30EZ11h+4GQYLhF+1p7JYs0VKiywb8AczGGQDi8vB4JYUQuXmA6lLFENMX2d6h+zEXjscfcQao8OiuPiK2D25WnnuZ2tAMUmcPepUCG1v3nB6JmaMosAKrs1gbTgO4rlXW7zmIjkuXG5/wBWH8qf/9k=";



            twoAndFaceInput.Name     = input.Name;
            twoAndFaceInput.IdCardNo = input.IdCardNo;
            //twoAndFaceInput.PhotoBuffer = Convert.ToBase64String();


            var twoAndFace = _ctidRecogAppService.GetTwoAndFace(twoAndFaceInput);

            return(Json(twoAndFace));
        }
        /// <summary>
        /// 2 项信息+人像 0x42
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public ResultModelDto GetTwoAndFace(GetTwoAndFaceInput input)
        {
            var queryParam = new QueryParam
            {
                name        = input.Name,
                idcard      = input.IdCardNo,
                cammerPhoto = input.PhotoBuffer,
                recogCode   = Ctid.RecoRequestMode.Eleven
            };

            ResultModelDto result = OnlineFr(queryParam);

            return(result);
        }