1.工艺路线删除判断工艺路路线是否被存货绑定
2.新增质检方案列表查询、列表查看编辑带回接口
| | |
| | | |
| | | |
| | | |
| | | |
| | | #region[工序检验项目列表查询] |
| | | /// <summary> |
| | | /// 工序检验项目列表查询 |
| | |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | #region[工序检验记录列表查询] |
| | |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[质检方案列表查询] |
| | | /// <summary> |
| | | /// 质检方案列表查询 |
| | | /// </summary> |
| | | /// <param name="qualityinsptcode">质检方案编码</param> |
| | | /// <param name="qualityinsptname">质检方案名称</param> |
| | | /// <param name="status">有效状态</param> |
| | | /// <param name="checktype">质检类型</param> |
| | | /// <param name="sampltype">抽样方式</param> |
| | | /// <param name="suitobject">适用对象</param> |
| | | /// <param name="page">页码</param> |
| | | /// <param name="rows">每页显示条数</param> |
| | | /// <param name="prop">排序字段</param> |
| | | /// <param name="order">排序规则</param> |
| | | /// <returns></returns> |
| | | [Route(template: "QualityInspectionSearch")] |
| | | [HttpGet] |
| | | public HttpResponseMessage QualityInspectionSearch(string qualityinsptcode = null, string qualityinsptname = null, string status=null, string checktype=null,string sampltype=null,string suitobject = null, int page = 0, int rows = 0, string prop = null, string order = null) |
| | | { |
| | | int startNum = rows * (page - 1) + 1; //起始记录rowNum |
| | | int endNum = rows * page; //结束记录 rowNum |
| | | mes = QualityManagementBLL.QualityInspectionSearch(qualityinsptcode, qualityinsptname, status, checktype, sampltype, suitobject, startNum, endNum, prop, order); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | |
| | | #region[质检方案查看编辑] |
| | | /// <summary> |
| | | /// 质检方案查看编辑 |
| | | /// </summary> |
| | | /// <param name="qualityinsptcode">质检方案编码</param> |
| | | /// <returns></returns> |
| | | [Route(template: "QualityInspectionSeeEdit")] |
| | | [HttpGet] |
| | | public HttpResponseMessage QualityInspectionSeeEdit(string qualityinsptcode) |
| | | { |
| | | mes = QualityManagementBLL.QualityInspectionSeeEdit(qualityinsptcode); |
| | | return TJson.toJson(mes); |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | return QualityManagementDAL.StepCheckTableOutExcel(wocode, partcode, partname, partapec, stepname, standname, checktype, checkresult, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region[质检方案列表查询] |
| | | public static ToMessage QualityInspectionSearch(string qualityinsptcode, string qualityinsptname, string status, string checktype, string sampltype,string suitobject, int startNum, int endNum, string prop, string order) |
| | | { |
| | | return QualityManagementDAL.QualityInspectionSearch(qualityinsptcode, qualityinsptname, status, checktype, sampltype, suitobject, startNum, endNum, prop, order); |
| | | } |
| | | #endregion |
| | | |
| | | #region[质检方案查看编辑] |
| | | public static ToMessage QualityInspectionSeeEdit(string qualityinsptcode) |
| | | { |
| | | return QualityManagementDAL.QualityInspectionSeeEdit(qualityinsptcode); |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | var dynamicParams = new DynamicParameters(); |
| | | try |
| | | { |
| | | //判断工艺路路线是否被存货绑定 |
| | | sql = @"select * from TMateriel_Route where route_code=@routecode"; |
| | | dynamicParams.Add("@routecode", routecode); |
| | | var data_0 = DapperHelper.selectdata(sql, dynamicParams); |
| | | if (data_0.Rows.Count > 0) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.Message = "存货档案已关联工艺路线,不允许删除!"; |
| | | mes.data = null; |
| | | return mes; |
| | | } |
| | | //判断工艺路线是否被工单引用(被引用则不能删除) |
| | | sql = @"select * from TK_Wrk_Man where route_code=@routecode"; |
| | | dynamicParams.Add("@routecode", routecode); |
| | |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region[质检方案列表查询] |
| | | public static ToMessage QualityInspectionSearch(string qualityinsptcode, string qualityinsptname, string status, string checktype, string sampltype,string suitobject, int startNum, int endNum, string prop, string order) |
| | | { |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = ""; |
| | | try |
| | | { |
| | | if (qualityinsptcode != "" && qualityinsptcode != null) |
| | | { |
| | | search += "and AA.code like '%'+@qualityinsptcode+'%' "; |
| | | dynamicParams.Add("@qualityinsptcode", qualityinsptcode); |
| | | } |
| | | if (qualityinsptname != "" && qualityinsptname != null) |
| | | { |
| | | search += "and AA.name like '%'+@qualityinsptname+'%' "; |
| | | dynamicParams.Add("@qualityinsptname", qualityinsptname); |
| | | } |
| | | if (status != "" && status != null) |
| | | { |
| | | search += "and AA.status=@status "; |
| | | dynamicParams.Add("@status", status); |
| | | } |
| | | if (checktype != "" && checktype != null) |
| | | { |
| | | search += "and AA.checktype=@checktype "; |
| | | dynamicParams.Add("@checktype", checktype); |
| | | } |
| | | if (sampltype != "" && sampltype != null) |
| | | { |
| | | search += "and AA.sampmethod=@sampltype "; |
| | | dynamicParams.Add("@sampltype", sampltype); |
| | | } |
| | | if (suitobject != "" && suitobject != null) |
| | | { |
| | | search += "and AA.suitobject=@suitobject "; |
| | | dynamicParams.Add("@suitobject", suitobject); |
| | | } |
| | | if (search == "") |
| | | { |
| | | search = "and 1=1 "; |
| | | } |
| | | search = search.Substring(3);//截取索引2后面的字符 |
| | | // --------------查询指定数据-------------- |
| | | var total = 0; //总条数 |
| | | var sql = @"select * from( |
| | | select code,name,status,checktype,sampmethod,sampscare,suitobject,descr,suitpart, |
| | | case when suitobject='P' then |
| | | STUFF(( SELECT ';' + partname |
| | | FROM TMateriel_Info |
| | | where PATINDEX('%;' + RTRIM(TMateriel_Info.partcode) + ';%',';' + TStepCheckStandard.suitpart + ';')>0 |
| | | FOR XML PATH('')), 1, 1,'') |
| | | when suitobject='PY' |
| | | then |
| | | STUFF(( SELECT ';' + name |
| | | FROM T_Dict |
| | | where PATINDEX('%;' + RTRIM(T_Dict.code) + ';%',';' + TStepCheckStandard.suitpart + ';')>0 |
| | | FOR XML PATH('')), 1, 1,'') |
| | | end as suitpartname |
| | | from TStepCheckStandard |
| | | ) as AA |
| | | where " + search; |
| | | var data = DapperHelper.GetPageList<object>(sql, dynamicParams, prop, order, startNum, endNum, out total); |
| | | mes.code = "200"; |
| | | mes.Message = "查询成功!"; |
| | | mes.count = total; |
| | | mes.data = data.ToList(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.Message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | |
| | | #region[质检方案查看编辑] |
| | | public static ToMessage QualityInspectionSeeEdit(string qualityinsptcode) |
| | | { |
| | | string sql = ""; |
| | | var dynamicParams = new DynamicParameters(); |
| | | try |
| | | { |
| | | sql = @"select A.stepcheckitem_seq,A.stepcheckitem_code,B.name as stepcheckitem_name,A.required, |
| | | A.numberjudge,A.unit,A.decimal,A.standvalue,A.uppervalue,A.lowervalue |
| | | from TStepCheckStandardSub A |
| | | inner join TStepCheckItem B on A.stepcheckitem_code=B.code |
| | | where A.stepstaned_code=@qualityinsptcode"; |
| | | dynamicParams.Add("@qualityinsptcode", qualityinsptcode); |
| | | var data = DapperHelper.selectdata(sql, dynamicParams); |
| | | |
| | | mes.code = "200"; |
| | | mes.Message = "查询成功!"; |
| | | mes.data = data; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | mes.code = "300"; |
| | | mes.count = 0; |
| | | mes.Message = e.Message; |
| | | mes.data = null; |
| | | } |
| | | return mes; |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | D:\新凯迪MES\MES产品\VueWebApi\VueWebApi\obj\Release\VueWebApi.csproj.CopyComplete |
| | | D:\新凯迪MES\MES产品\VueWebApi\VueWebApi\obj\Release\VueWebApi.dll |
| | | D:\新凯迪MES\MES产品\VueWebApi\VueWebApi\obj\Release\VueWebApi.pdb |
| | | D:\新凯迪MES\MES产品\VueWebApi\VueWebApi\obj\Release\VueWebApi.csproj.AssemblyReference.cache |