| | |
| | | string sReturn = ""; |
| | | if (oSystemParameter.ShowBill(ref sReturn) == true) |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "乔一") //系统参数 判断客户 |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "乔一" || oSystemParameter.omodel.WMS_CampanyName == "杭州斯莫尔") //系统参数 判断客户 |
| | | { |
| | | //判断生产资源 |
| | | if (HSourceID <= 0) |
| | |
| | | objJsonResult.Verify = "N"; |
| | | } |
| | | } |
| | | |
| | | //测试语句=========================================================================================================== |
| | | string msg_str = ""; |
| | | string sql_str = "select a.HQty HQty_Main,b.HQty HQty_Sub " + |
| | | "from Sc_ProcessExchangeBillMain as a " + |
| | | "inner join Sc_ProcessExchangeBillSub as b on a.HInterID = b.HInterID " + |
| | | "where a.HInterID = " + HProcExchInterID; |
| | | DataSet ds_str = oCN.RunProcReturn(sql_str, "Sc_ProcessExchangeBillMain"); |
| | | if (ds_str.Tables[0].Rows.Count > 0) |
| | | { |
| | | msg_str = "HQty_Main:" + ds_str.Tables[0].Rows[0]["HQty_Main"].ToString() + ";HQty_Sub:"; |
| | | for (int j = 0; j < ds_str.Tables[0].Rows.Count; j++) |
| | | { |
| | | msg_str += ds_str.Tables[0].Rows[j]["HQty_Sub"].ToString() + ","; |
| | | } |
| | | } |
| | | |
| | | oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "修改工序进站单据:" + HBillNo + "[工序流转卡号:" + HProcExchBillNo + "]" + msg_str + "','LMES-工序出站模块','" + DBUtility.ClsPub.IPAddress + "','新增或修改单据'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //============================================================================================================== |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "新增单据成功!"; |
| | |
| | | Where a.HInterID={HProcExchInterID} and b.HEntryID={HProcExchEntryID} |
| | | ) a |
| | | inner join ( |
| | | select a.HICMOInterID,a.HICMOEntryID, b.HProcID |
| | | select a.HICMOInterID,a.HICMOEntryID,isnull(c.HItemID,0) HProcID |
| | | from Sc_PPBomBillMain a with(nolock) |
| | | inner join Sc_PPBomBillSub b with(nolock) on a.HInterID=b.HInterID |
| | | Where b.HKeyMaterID_Line<>0 |
| | | left join Gy_Process c on b.HProcName = c.HName |
| | | )b on a.HICMOInterID=b.HICMOInterID and a.HICMOEntryID=b.HICMOEntryID and a.HProcID=b.HProcID", "Sc_ProcessExchangeBillMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0) { |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 返回工序进站接收单列表-分页 |
| | | [Route("Cj_StationInBill/get_Display_ByPage")] |
| | | [HttpGet] |
| | | public object get_Display_ByPage(string sWhere, string user, string Organization, int page, int size, string HBillSubType) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | if (HBillSubType == "SUB") |
| | | { |
| | | //判断是否有查询权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationInBill_Sub_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "开工单无查询权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //判断是否有查询权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationInBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "进站单无查询权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | sWhere = sWhere.Replace("'", "''"); |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_MES_StationInBillList " + page + "," + size + ",'" + Organization + "'," + "''", "h_p_MES_StationInBillList"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_MES_StationInBillList " + page + "," + size + ",'" + Organization + "','" + sWhere + "'", "h_p_MES_StationInBillList"); |
| | | } |
| | | |
| | | //添加列名 |
| | | 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 = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.list = columnNameList; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "查询数据异常,请与管理员联系!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 编辑前判断 |
| | | [Route("Cj_StationInBill/set_ShowBillJudge")] |
| | | [HttpGet] |