| | |
| | | using System.Threading.Tasks; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | using WebAPI.Service; |
| | | using System.Threading; |
| | | using SyntacticSugar.constant; |
| | | using WebApiWithFleck; |
| | | |
| | | namespace WebAPI.Controllers.SCGL |
| | | { |
| | |
| | | } |
| | | if (bResult) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存成功!"; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | // 个推方式推送数据 |
| | | GeTuiService.PubishSingle(HInterID); |
| | | |
| | | // webSocket方式推送数据 |
| | | // WebSocketServer.PushOne(HInterID); |
| | | } |
| | | if (IsAudit == 1) //反审核提交 |
| | | { |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | string sql = "select * from OA_WorkLinkBillSub where HInterID = '" + HInterID + "'order by HDate desc"; |
| | | string sql = $@"select HSendMan 回复人, HDescription 回复内容, HDate 回复时间, |
| | | case HSendStatus |
| | | when 1 then '普通' |
| | | when 10 then '验证通过' |
| | | when 9 then '结案' |
| | | end as 类型 |
| | | ,* from OA_WorkLinkBillSub where HInterID = '" + HInterID + "'order by HDate desc"; |
| | | ds = oCN.RunProcReturn(sql, "OA_WorkLinkBillSub"); |
| | | |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名 |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | |
| | | { |
| | | try |
| | | { |
| | | string sql = ""; |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | string sql = "select a.HSourceBillNo 流转卡号,a.HSourceBillType 流转卡类型,a.HSourceInterID 流转卡主内码,a.HSourceEntryID 流转卡子内码,b.HNumber 物料代码,b.HName 物料名称,b.HModel 规格型号,a.HDatePlanQty 计划数量,a.HSourceID,c.HName 生产资源 from Sc_ICMOBillStatus_Tmp a " + |
| | | if (!string.IsNullOrEmpty(HSourceBill) && HSourceBill.Substring(0, 6) == "GXCZHB") |
| | | { |
| | | HSourceBill = HSourceBill.Split('-')[0]; |
| | | //华舟做末件发起安灯的时候 传过来的是出站单的单据号 |
| | | sql = @"select a.HProcExchInterID 流转卡主内码,a.HProcExchEntryID 流转卡子内码,a.HProcExchBillNo 流转卡号,a.HSourceID,b.HName 生产资源, c.HNumber 物料代码, c.HName 物料名称, c.HModel 规格型号, a.HPlanQty 计划数量 |
| | | from Sc_StationOutBillMain a left join Gy_Source b on a.HSourceID = b.HItemID left join Gy_Material c on a.HMaterID = c.HItemID where a.HBillNo = '" + HSourceBill + "'"; |
| | | } |
| | | else |
| | | { |
| | | //报工台传过来的是流转卡的 |
| | | sql = "select a.HSourceBillNo 流转卡号,a.HSourceBillType 流转卡类型,a.HSourceInterID 流转卡主内码,a.HSourceEntryID 流转卡子内码,b.HNumber 物料代码,b.HName 物料名称,b.HModel 规格型号,a.HDatePlanQty 计划数量,a.HSourceID,c.HName 生产资源 from Sc_ICMOBillStatus_Tmp a " + |
| | | "left join Gy_Material b on a.HMaterID=b.HItemID left join Gy_Source c on a.HSourceID=c.HItemID where HSourceBillNo='" + HSourceBill + "' and a.HICMOStatus=1"; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn(sql, "Sc_ICMOBillStatus_Tmp"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |