using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web;
using System.Web.Http;
using VueWebApi.DLL.BLL;
using VueWebApi.Tools;
namespace VueWebApi.Controllers
{
[RoutePrefix(prefix: "api/AppQualityManagement")]
[ControllerGroup("App质量管理", "在线接口")]
[ChannelActionFilterAttributeApp]
public class AppQualityManagementController : ApiController
{
//定义全局信息返回变量
ToMessage mes = new ToMessage();
RedisHelper redis = new RedisHelper();
#region[入厂检验,扫描采购到货生成标签]
///
/// 入厂检验,扫描采购到货生成标签
///
/// 采购到货生成标签
///
[Route(template: "InFactoryCheckScanLabCode")]
[HttpGet]
public HttpResponseMessage InFactoryCheckScanLabCode(string labcode)
{
mes = AppQualityManagementBLL.InFactoryCheckScanLabCode(labcode);
return TJson.toJson(mes);
}
#endregion
#region[入厂检验,根据选择的检验方案查找检验项目]
///
/// 入厂检验,根据选择的检验方案查找检验项目
///
/// 检验方案编码
///
[Route(template: "InFactoryCheckItem")]
[HttpGet]
public HttpResponseMessage InFactoryCheckItem(string checkstandcode)
{
mes = AppQualityManagementBLL.InFactoryCheckItem(checkstandcode);
return TJson.toJson(mes);
}
#endregion
#region[入厂检验,提交]
///
/// 入厂检验,提交
///
///
[Route(template: "InFactoryCheckSave")]
[HttpGet]
public HttpResponseMessage InFactoryCheckSave()
{
string hbillno = HttpContext.Current.Request["hbillno"].ToString();//采购订单号
string labcode = HttpContext.Current.Request["labcode"].ToString();//标签编号
string checkstandcode = HttpContext.Current.Request["checkstandcode"].ToString();//质检方案编码
string check_type = HttpContext.Current.Request["check_type"].ToString();//检验类型(入厂检验(InCheck))
string sampmethod = HttpContext.Current.Request["sampmethod"].ToString();//抽检方式:固定抽检(FIXED) 比例抽检(SCARE)
string partcode = HttpContext.Current.Request["partcode"].ToString();//物料编码
string customercode = HttpContext.Current.Request["customercode"].ToString();//往来单位(外购供方编码)
string batchno = HttpContext.Current.Request["batchno"].ToString();//批次号
string qualitystatus = HttpContext.Current.Request["qualitystatus "].ToString(); //质量状态(合格、不合格)
string labqty = HttpContext.Current.Request["labqty"].ToString();//物料数量(标签数量)
string sampleqty = HttpContext.Current.Request["sampleqty"].ToString();//样本数量
string goodqty = HttpContext.Current.Request["goodqty"].ToString();//合格数量
string ngqty = HttpContext.Current.Request["ngqty"].ToString();//不合格数量
string issyncbatch = HttpContext.Current.Request["issyncbatch"].ToString();//同步相同批次
string checkitemcont = HttpContext.Current.Request["checkitemcont"].ToString();//检验项目数据
string username = HttpContext.Current.Request["admin"].ToString();//操作人员
mes = AppQualityManagementBLL.InFactoryCheckSave(hbillno, labcode, checkstandcode, check_type, sampmethod, partcode, customercode, batchno, qualitystatus, labqty, sampleqty, goodqty, ngqty, issyncbatch, checkitemcont, username);
return TJson.toJson(mes);
}
#endregion
}
}