| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 返回工序出站汇报单列表 20240926新增 |
| | | [Route("Cj_StationOutBillController/GetSc_StationOutBillList_Json")] |
| | | [HttpGet] |
| | | public object GetSc_StationOutBillList_Json(string sWhere, string HMaker, string HBillSubType, string OperationType, string ViewName) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //判断权限 |
| | | if (HBillSubType == "SUB") |
| | | { |
| | | //判断是否有查询权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Sub_Query", 1, false, HMaker)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "完工单无查询权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else if(OperationType == "1") |
| | | { |
| | | //判断是否有查询权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Query", 1, false, HMaker)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "出站单无查询权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | //获取系统参数 |
| | | string Ret = ""; |
| | | if (oSystemParameter.ShowBill(ref Ret)) |
| | | { |
| | | //判断客户为龙山汽配 |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "龙山汽配") |
| | | { |
| | | //获取需要拼接的字符串 |
| | | string sql_splice = DBUtility.ClsPub.SpliceSQL(HMaker, "工序汇报单列表"); |
| | | |
| | | if (sql_splice == "没有查询到相关用户信息") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有查询到相关用户信息!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | sWhere += sql_splice; |
| | | } |
| | | } |
| | | } |
| | | |
| | | //返回列表信息 |
| | | ds = oCN.RunProcReturn("select * from " + ViewName + " where 1=1 " + sWhere + " order by hmainid desc", ViewName); |
| | | |
| | | //添加列名 |
| | | 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 = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "成功!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "查询列表信息失败!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 工序出站汇报单 子表查询 |
| | | [Route("Cj_StationOutBill/get_SubDisplay")] |
| | | [HttpGet] |