chenhaozhe
4 天以前 291fdb29daf239a13fcfb3f5e08a2f5bf9167534
WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
@@ -514,6 +514,50 @@
        }
        #endregion
        #region 根据设备ID查找设备档案信息PDA  查询条码档案列表
        [Route("Sb_PDA_EquipDotCheckBill/txtHBarCode_KeyDown_ListByHEquipID")]
        [HttpGet]
        public object txtHBarCode_KeyDown_ListByHEquipID(string HEquipID)
        {
            try
            {
                if (HEquipID == null || HEquipID.Equals(""))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "设备内码不能为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //得到信息
                ds = oCN.RunProcReturn("select top 1 * from h_v_Gy_EquipFileMainList  where hmainid= " + HEquipID , "h_v_Gy_EquipFileMainList");
                //写入信息
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "未查询到设备信息!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region 根据设备条码查找设备档案信息PDA  查询条码档案列表
        [Route("Sb_PDA_EquipDotCheckBill/txtHBarCode_KeyDown_List")]
        [HttpGet]
@@ -590,7 +634,7 @@
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    LogService.Write("oItem", oItem.ToString());
                    //oItem.HMaker = "";
                    UserName = oItem.HMaker;  //制单人
                    oItem.HBillType = "3903";
@@ -599,7 +643,9 @@
                    //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"));  //  --维修日期
@@ -632,6 +678,7 @@
                int i = 0;
                foreach (Models.ClsSb_EquipDotCheckBillSub oItemSub in ls)
                {
                    LogService.Write("oItemSub", oItemSub.ToString());
                    i++;
                    oItemSub.HEntryID = i;