| | |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | LogService.Write("oItem", oItem.ToString()); |
| | | //oItem.HMaker = ""; |
| | | UserName = oItem.HMaker; //制单人 |
| | | oItem.HBillType = "3903"; |
| | |
| | | //oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --日期 |
| | | //oItem.HInnerBillNo = ""; // --内部单据号 |
| | | oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); |
| | | oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | |
| | | //oItem.HEquipID = 0; //设备ID(Gy_EquipMent) |
| | | //oItem.HPeriod = 0; |
| | | //oItem.HCheckBeginDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); // --维修日期 |
| | |
| | | int i = 0; |
| | | foreach (Models.ClsSb_EquipDotCheckBillSub oItemSub in ls) |
| | | { |
| | | LogService.Write("oItemSub", oItemSub.ToString()); |
| | | |
| | | i++; |
| | | oItemSub.HEntryID = i; |
| | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存成功!"; |
| | | //WebAPIController.Add_Log("送货单下推", UserName, "生成送货单"); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | #region 设备点检记录PDA 保存后 查询是否有NG 调整安灯 |
| | | |
| | | [Route("Sb_EquipDotCheckBill/getbSB_EquipDotCheckBill_Result")] |
| | | [HttpGet] |
| | | public object getbSB_EquipDotCheckBill_Result(string HBillNO, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | string sql = "select * from h_v_Sb_EquipDotCheckBillList where 单据号='" + HBillNO + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBillList"); |
| | | |
| | | //添加列名 |
| | | 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 ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "查询数据异常,请与管理员联系!" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |