123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- using System.Web.Http;
- using DataTransfersLibs.Models;
- using GSMarketSys.Service;
- using SysBaseLibs;
- namespace GSMarketSys.Controllers.TransDataWebApi
- {
- [RoutePrefix("api")]
- public class DataTransController : BaseApiController
- {
- [HttpPost]
- [Route("DataUpload")]
- public IHttpActionResult DataUpload()
- {
- string body= Request.Content.ReadAsStringAsync().Result;
- this.LogInfo(body);
- var result = TranslationService.Instance.DataUpload(body);
- return Json(result);
- }
- [HttpPost]
- [HttpGet]
- [Route("Query/Sample")]
- public IHttpActionResult GetSampleInfo(AccountInfo poAccount,string userId=null,string password=null)
- {
- if (poAccount==null)
- {
- poAccount=new AccountInfo()
- {
- UserId = userId,
- Password = password
- };
- }
- var result = TranslationService.Instance.GetSampleInfo(poAccount);
- return Json(result);
- }
- [HttpPost]
- [HttpGet]
- [Route("Query/CheckItem")]
- public IHttpActionResult GetCheckItemInfo(AccountInfo poAccount, string userId = null, string password = null)
- {
- if (poAccount == null)
- {
- poAccount = new AccountInfo()
- {
- UserId = userId,
- Password = password
- };
- }
- var result = TranslationService.Instance.GetCheckItemInfo(poAccount);
-
- return Json(result);
- }
- [HttpPost]
- [HttpGet]
- [Route("Query/CheckMethod")]
- public IHttpActionResult GetCheckMethodInfo(AccountInfo poAccount, string userId = null, string password = null)
- {
- if (poAccount == null)
- {
- poAccount = new AccountInfo()
- {
- UserId = userId,
- Password = password
- };
- }
- var result = TranslationService.Instance.GetCheckMethodInfo(poAccount);
- return Json(result);
- }
- [HttpPost]
- [HttpGet]
- [Route("Query/District")]
- public IHttpActionResult GetDistrictInfo(AccountInfo poAccount, string userId = null, string password = null)
- {
- if (poAccount == null)
- {
- poAccount = new AccountInfo()
- {
- UserId = userId,
- Password = password
- };
- }
- var result = TranslationService.Instance.GetDistrictInfo(poAccount);
- return Json(result);
- }
- }
- }
|