ch
2022-09-15 fb21c32041a7bd6a2cfce0f05f9340eea9dd49fa
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
10个文件已修改
1个文件已添加
344 ■■■■ 已修改文件
DBUtility/业务单据/ClsXt_BaseBillMain.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/LMESController.cs 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/POStockInBillController.cs 186 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsSc_MESBeginWorkBill.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/ClsSc_MESBeginWorkBillMain.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/其它/ReciveBill_FastModel.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/动态列/OptionListModel.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/ÒµÎñµ¥¾Ý/ClsXt_BaseBillMain.cs
@@ -45,5 +45,6 @@
        public Int64 HPRDORGID;
        //有效状态 
        public bool HUseFlag;
    }
}
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
@@ -743,6 +743,10 @@
                    {
                        omodel.Kf_MoveStockStepInBill_FIFOCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MoveStockStepInBill_SourceBarCodeCtl")
                    {
                        omodel.Kf_MoveStockStepInBill_SourceBarCodeCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    //采购退料单
                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_POStockInBackBill_AutoCheck")
Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
@@ -194,6 +194,7 @@
        public string Kf_MoveStockStepInBill_SourceWHSPCtl;   //是否取源单中仓库仓位('Y'为是)
        public string Kf_MoveStockStepInBill_FIFOList;        //先进先出下架清单
        public string Kf_MoveStockStepInBill_FIFOCtl;         //先进先出控制
        public string Kf_MoveStockStepInBill_SourceBarCodeCtl;   //是否进行源单对应条码核对('Y'为核对)
        //采购退料
        public string Kf_POStockInBackBill_AutoCheck;       //是否自动审核
WebAPI/Controllers/LMESController.cs
@@ -60,14 +60,14 @@
            try
            {
                //判断是否有查询权限
                if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查询权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "无查询权限!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 " + sWhere+ " order by hmainid desc ", "h_v_Sc_ProcessExchangeBillQuery");
@@ -140,15 +140,15 @@
            DataSet ds;
            try
            {
                //判断是否有查询权限
                if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查询权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ////判断是否有查询权限
                //if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "无查询权限!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeIssueBillQuery where 1 = 1 " + sWhere + " order by hmainid desc ", "h_v_Sc_ProcessExchangeIssueBillQuery");
                objJsonResult.code = "1";
WebAPI/Controllers/POStockInBillController.cs
@@ -847,8 +847,6 @@
                return objJsonResult;
            }
        }
        [Route("POStockInBill/Delete_Json")]
        [HttpGet]
        public object Delete_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string sHBillType)
@@ -985,7 +983,6 @@
            }
            catch (Exception)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删除失败!";
@@ -1413,6 +1410,11 @@
            return HInterID;
        }
        /// <summary>
        /// åˆ°è´§ç¡®è®¤æ‰«æ”¶æ–™é€šçŸ¥å•号 èŽ·å–è¡¨ä½“å’Œè¡¨å¤´æ•°æ®
        /// </summary>
        /// <param name="HBarCode"></param>
        /// <returns></returns>
        public json Get_ReciveBillCheckDate(string HBarCode)
        {
            json objjson = new json();
@@ -1459,6 +1461,184 @@
            }
        }
        [Route("POStockInBillList/AuditPOInStockBillPost")]
        [HttpPost]
        public object AuditPOInStockBill([FromBody] JObject msg)
        {
            try
            {
                string _msg = msg["msg"].ToString();
                _msg = _msg.Replace("\\", "");
                _msg = _msg.Replace("\n", "");
                List<Models.ReciveBill_FastModel> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ReciveBill_FastModel>>(_msg);
                DAL.ClsCg_POInStockBill oBill = new DAL.ClsCg_POInStockBill();
                var hinterID = list[0].HInterID;
                var FID = list[0].FID;
                oCn.BeginTran();
                string sql = string.Empty;
                foreach (var item in list)
                {
                    if (item.HSQty == 0)
                        continue;
                    sql = $"update Cg_POInStockBillSub set Hqty = {item.HSQty} where HInterID ={item.HInterID} and HEntryID = {item.HEntryID}";
                    oCn.RunProc(sql);
                }
                oCn.RunProc("exec h_p_Cg_UpDatePOOrderRelation_Del " + hinterID);//删除关联关系
                JObject jsonRoot = new JObject();
                jsonRoot.Add("Creator", "");
                jsonRoot.Add("NeedUpDateFields", new JArray());
                jsonRoot.Add("NeedReturnFields", new JArray());
                jsonRoot.Add("IsDeleteEntry", "false");
                jsonRoot.Add("SubSystemId", "");
                jsonRoot.Add("IsVerifyBaseDataField", "");
                JObject jsonModel = new JObject();
                jsonModel.Add("FID", FID);
                JArray Entry = new JArray();
                foreach (var item in list)
                {
                    if (item.HSQty == 0)
                        continue;
                    JObject jsonFPOOrderEntry = new JObject();
                    jsonFPOOrderEntry.Add("FEntryID", item.FEntryID);
                    jsonFPOOrderEntry.Add("FHQty ", item.HSQty); ;
                    Entry.Add(jsonFPOOrderEntry);
                }
                jsonModel.Add("FEntity", Entry);
                jsonRoot.Add("Model", jsonModel);
                var loginRet = InvokeHelper.Login();
                var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
                if (isSuccess <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = loginRet;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var result = InvokeHelper.Save("PUR_ReceiveBill", jsonRoot.ToString());
                //LogService.Write(result);
                if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() == "TRUE")
                {
                    LogService.Write("收料通知单修改失败jsonRoot:" + jsonRoot.ToString());
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "金蝶收料通知单更新失败" + result;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                var json = new
                {
                    Ids = FID,
                };
                //提交
                var _result = InvokeHelper.Submit("PUR_ReceiveBill", JsonConvert.SerializeObject(json));
                var _saveObj = JObject.Parse(_result);
                if (_saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
                {
                    LogService.Write("收料通知单提交失败jsonRoot:" + jsonRoot.ToString());
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "金蝶收料通知单提交失败" + _result;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //审核
                _result = InvokeHelper.Audit("PUR_ReceiveBill", JsonConvert.SerializeObject(json));
                _saveObj = JObject.Parse(_result);
                if (_saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
                {
                    LogService.Write("收料通知单审核失败jsonRoot:" + jsonRoot.ToString());
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "金蝶收料通知单审核失败jsonRoot" + _result;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                sql = string.Format(@"update Cg_POInStockBillMain set
HBillStatus = 2 ,
HCheckDate   = getdate()
where HInterID in ({0})",  HInterID);
                oCn.RunProc(sql);//更新mes状态
                //更新成功后 åŒæ­¥æ›´æ–°é‡‘蝶
                oCn.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "操作成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCn.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "异常!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// åˆ°è´§ç¡®è®¤ æ‰«æ¡ç  æ ¡éªŒ
        /// </summary>
        /// <param name="HBarcode"></param>
        /// <param name="HInterID"></param>
        /// <returns></returns>
        [Route("POStockInBillList/Get_ReciveBillByBarcode")]
        [HttpGet]
        public object Get_ReciveBillByBarcode(string HBarcode, string HInterID)
        {
            try
            {
                //校验条码是否存在
                string sql = $"select* from  Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode}'";
                DataSet ds = oCn.RunProcReturn(sql, "H_v_SRM_POOrderBillList");
                if (ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "条码不存在!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
                //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
                //string sql = $"select * from H_v_SRM_POInStockBillList where å•据号 ='{HBillno}'";
                //ds = oCn.RunProcReturn(sql, "H_v_SRM_POInStockBillList");
                //if (ds == null || ds.Tables[0].Rows.Count == 0)
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "没有返回任何记录!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                //else
                //{
                //}
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        //收料通知单审核 å®¡æ ¸æäº¤
        [Route("POStockInBillList/Exec_ReciveBillCheck")]
        [HttpGet]
WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
@@ -201,7 +201,7 @@
        /// <returns></returns>
        [Route("Sc_MESBeginWorkBill/DeltetMESBeginWorkBill")]
        [HttpGet]
        public object DeltetMESBeginWorkBill(string HInterID,string UserName)
        public object DeltetMESBeginWorkBill(string HInterID, string UserName)
        {
            DBUtility.ClsPub.CurUserName = UserName;
            //编辑权限
@@ -287,7 +287,7 @@
        [HttpGet]
        public object AuditProcessReportList(int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "MES_MESBeginWorkBill_Check";
            string ModRightNameCheck = "MES_MESBeginWorkBill_Check";
            DBUtility.ClsPub.CurUserName = CurUserName;
            try
            {
@@ -467,7 +467,7 @@
        [HttpPost]
        public object SaveGetMESBeginWorkFrom([FromBody] JObject msg)
        {
            var _value = msg["msg"].ToString();
            string msg1 = _value.ToString();
            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
@@ -496,7 +496,7 @@
                objJsonResult.data = null;
                return objJsonResult;
            }
            ListModels oListModels = new ListModels();
            try
            {
@@ -555,8 +555,19 @@
                            return objJsonResult;
                        }
                    }
                    DBUtility.ClsPub.CurUserName =oItem.HMaker;
                    ClsXt_SystemParameter oClsXt_SystemParameter = new ClsXt_SystemParameter();
                    string sCapName = oClsXt_SystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref DBUtility.ClsPub.sExeReturnInfo);
                    if (sCapName.Contains("凯贝"))
                    {
                        DataTable dt = getInfodatanow(oItem.HSourceID.ToString());
                        if (dt.Rows.Count > 0)
                        {
                            DataRow dr = dt.Rows[0];
                            oItem.HRunStatus = dr["runStu"].ToString();
                            oItem.HSourceBeginQty = Convert.ToDecimal(dr["countAll"]);
                        }
                    }
                    DBUtility.ClsPub.CurUserName = oItem.HMaker;
                    oItem.HBillType = "3787";
                    oItem.HBillSubType = "3787";
                    oItem.HBillStatus = 1;   //单据状态(1未审,2审核通过,3关闭,4作废,5审核退回,6审核中,7已阅,8已回复,9结案,10验证,11下达,12开工,13申请审批,15申请检验,16 åˆ¤å®šåˆæ ¼ï¼Œ17判定不合格)     
@@ -579,9 +590,9 @@
                bool bResult;
                if (oBill.omodel.HInterID == 0)
                {
                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                    if (bResult)
                    if (bResult)
                    {
                        objJsonResult.HInterID = DBUtility.ClsPub.sExeReturnInfo; //返回主ID
                        //系统参数  è‡ªåŠ¨å®¡æ ¸
@@ -598,7 +609,7 @@
                            }
                        }
                    }
                }
                else
                {
@@ -607,7 +618,7 @@
                }
                if (bResult)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "保存成功!";
@@ -633,6 +644,14 @@
            }
        }
        #endregion
        public DataTable getInfodatanow(string hsoucreID)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            string sql = $" select HMacAddr, isnull(runStu,'')runStu, isnull(countAll,0)countAll from Gy_Source t1  left join HX_LIOTsys..Info_data_now t2 on t1.HMacAddr = t2.hid where t1.hitemid={hsoucreID}";
            DataTable dt = oCn.RunProcReturn(sql, "dt").Tables[0];
            return dt;
        }
        #region  æŠ¥å·¥å¹³å°éªŒè¯å•据状态
        [Route("Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus")]
@@ -709,7 +728,7 @@
            return new SQLHelper.ClsCN().RunProcReturn(sql, "Sc_ICMOBillWorkQtyStatus_Tmp");
        }
        #endregion
        #region æŠ¥å·¥å¹³å°äº§é‡æ±‡éªŒè¯æ±‡æŠ¥æ•°é‡æ˜¯å¦è¶…出计划数量辑
        /// <summary>
        /// 
@@ -849,7 +868,7 @@
                    if (bResult)
                    {
                        objJsonResult.HInterID = DBUtility.ClsPub.sExeReturnInfo; //返回主ID
                        //系统参数  è‡ªåŠ¨å®¡æ ¸
                                                                                  //系统参数  è‡ªåŠ¨å®¡æ ¸
                        string sReturn = "";
                        if (oSystemParameter.ShowBill(ref sReturn) == true)
                        {
@@ -907,7 +926,7 @@
        /// <returns></returns>
        [Route("Sc_MESBeginWorkBill/MESProductAuditProcessReportList")]
        [HttpGet]
        public object MESProductAuditProcessReportList(int HSourceID,int HSourceInterID,int HSourceEntryID,string HSourceBillNo, int HICMOInterID,int HICMOEntryID, int HInterID, int IsAudit, string CurUserName)
        public object MESProductAuditProcessReportList(int HSourceID, int HSourceInterID, int HSourceEntryID, string HSourceBillNo, int HICMOInterID, int HICMOEntryID, int HInterID, int IsAudit, string CurUserName)
        {
            string ModRightNameCheck = "MES_ProcExchReport_Check";
            DBUtility.ClsPub.CurUserName = CurUserName;
@@ -915,7 +934,7 @@
            {
                string StrMessage = "";
                //审核权限
                if (!WebClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName,ref  StrMessage))
                if (!WebClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName, ref StrMessage))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -987,7 +1006,7 @@
                if (IsAudit == 0) //审核提交
                {
                    //审核提交
                    if (oBill.CheckBill(HSourceID, HSourceInterID,HSourceEntryID,HSourceBillNo,HICMOInterID, HICMOEntryID, lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    if (oBill.CheckBill(HSourceID, HSourceInterID, HSourceEntryID, HSourceBillNo, HICMOInterID, HICMOEntryID, lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
@@ -1040,19 +1059,19 @@
        #region æŠ¥å·¥å¹³å°äº§é‡æ±‡æŠ¥åˆ é™¤
        [Route("Sc_MESBeginWorkBill/DeltetMESProductReportBill")]
        [HttpGet]
        public object DeleteGetLineBindBillList(string HInterID,string HICMOInterID,string HICMOEntryID,string UserName)
        public object DeleteGetLineBindBillList(string HInterID, string HICMOInterID, string HICMOEntryID, string UserName)
        {
            try
            {
                oCN.BeginTran();
                //查询产量汇报临时表数量
                ds = oCN.RunProcReturn("select isnull(HQty,0) HQty,isnull(HWasterQty,0) HWasterQty,isnull(HBadQty,0) HBadQty  from Sc_ICMOBillWorkQtyStatus_Tmp where HInterID='" + HInterID + "' and HICMOInterID='" + HICMOInterID + "' and HICMOEntryID='" + HICMOEntryID + "'", "Sc_ICMOBillWorkQtyStatus_Tmp");
                double HQty =double.Parse(ds.Tables[0].Rows[0]["HQty"].ToString());
                double HQty = double.Parse(ds.Tables[0].Rows[0]["HQty"].ToString());
                double HWasterQty = double.Parse(ds.Tables[0].Rows[0]["HWasterQty"].ToString());
                double HBadQty = double.Parse(ds.Tables[0].Rows[0]["HBadQty"].ToString());
                double sumqty = HQty + HBadQty + HWasterQty;  //汇报数量+不良+报废
                //更新产量装量临时表已汇报数量
                string sql1 = string.Format(@"update Sc_ICMOBillStatus_Tmp  set  HICMOStatus='1',HFinishFlag='0', HRelationInterID=0,HSplitRelationQty=HSplitRelationQty-" + sumqty + ",HDateFinishQty=HDateFinishQty-"+ sumqty + "   where  HICMOInterID='"+ HICMOInterID + "' and HICMOEntryID='"+ HICMOEntryID + "'");
                                                              //更新产量装量临时表已汇报数量
                string sql1 = string.Format(@"update Sc_ICMOBillStatus_Tmp  set  HICMOStatus='1',HFinishFlag='0', HRelationInterID=0,HSplitRelationQty=HSplitRelationQty-" + sumqty + ",HDateFinishQty=HDateFinishQty-" + sumqty + "   where  HICMOInterID='" + HICMOInterID + "' and HICMOEntryID='" + HICMOEntryID + "'");
                oCN.RunProc(sql1);
                //更新切换状态值
                string sql = string.Format(@"delete Sc_ICMOBillWorkQtyStatus_Tmp  where HInterID='" + HInterID + "'");
@@ -1081,8 +1100,8 @@
        #region æŠ¥å·¥å¹³å°æŠ¥æ£€ç”³è¯·ä¿å­˜
        [Route("Sc_MESBeginWorkBill/SaveGetMESProductReportBillList")]
        [HttpGet]
        public object SaveGetMESProductReportBillList(string ScMaxWork,string HSourceBillType, string workcode,int HSourceID,int HICMOInterID,int HICMOEntryID,string HMaker,string Czybm)
        {
        public object SaveGetMESProductReportBillList(string ScMaxWork, string HSourceBillType, string workcode, int HSourceID, int HICMOInterID, int HICMOEntryID, string HMaker, string Czybm)
        {
            ListModels oListModels = new ListModels();
            try
            {
@@ -1110,9 +1129,9 @@
                //}
                string sHSourceType = HSourceBillType;
                string  BillType = "3711";  //单据类型 (生产汇报单)
                //得到mainid
                 long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                string BillType = "3711";  //单据类型 (生产汇报单)
                                           //得到mainid
                long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //oCN.BeginTran();
                //根据单号、资源ID、订单主ID、订单子ID、制单人过滤产量汇报报检申请提交数据
                //string sql = string.Format(@"update Sc_ICMOBillWorkQtyStatus_Tmp set 
@@ -1126,14 +1145,14 @@
                //ds = oCN.RunProcReturn("select top 1 * from  Sc_ICMOBillWorkQtyStatus_Tmp where HICMOReportInterID='" + HInterID + "' and HICMOReportBillNo='" + ScMaxWork + "'", "Sc_ICMOBillWorkQtyStatus_Tmp");
                //if (ds.Tables[0].Rows.Count <= 0)
                //{
                    //oCN.RollBack();
                //oCN.RollBack();
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "当前单据无产量汇报记录!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                WebS.ClsSc_ICMOReportBillMain model = new WebS.ClsSc_ICMOReportBillMain();
                model.HInterID = HInterID;
                model.HBillNo = ScMaxWork;
@@ -1148,9 +1167,9 @@
                //model.HPRDORGID = DBUtility.ClsPub.isLong(ds0.Tables[0].Rows[0]["HPRDORGID"]);
                model.HMainSourceInterID = HICMOInterID;
                model.HMainSourceEntryID = HICMOEntryID;
                //oWebs.Timeout = 30000;
                bool flag=oWebs.set_SaveICMOProductReportBill_Layui(model,workcode,HSourceID, sHSourceType, ref DBUtility.ClsPub.sErrInfo);
                bool flag = oWebs.set_SaveICMOProductReportBill_Layui(model, workcode, HSourceID, sHSourceType, ref DBUtility.ClsPub.sErrInfo);
                if (flag)
                {
                    //oCN.Commit();
@@ -1160,12 +1179,12 @@
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                else
                else
                {
                    //oCN.RollBack();
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败!"+ flag+ ";"+ DBUtility.ClsPub.sErrInfo;
                    objJsonResult.Message = "保存失败!" + flag + ";" + DBUtility.ClsPub.sErrInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -1184,6 +1203,6 @@
    }
}
WebAPI/DLL/ClsSc_MESBeginWorkBill.cs
@@ -163,7 +163,7 @@
                ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HBeginWorkTime,HSourceID" +
                ",HSourceInterID_Main,HSourceEntryID_Main,HSourceBillNo_Main,HSourceBillType_Main" +
                ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" +
                 ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" +
                 ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate,HRunStatus,HSourceBeginQty" +
                ") " +
                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",getdate(),'" + omodel.HMaker+ "',getdate()" +
                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" +
@@ -171,7 +171,7 @@
                ",'" + omodel.HProcExchBillNo + "'," + omodel.HMaterID.ToString() + "," + omodel.HProcID.ToString() + "," + omodel.HICMOQty.ToString() + "," + omodel.HPlanQty.ToString() + ",getdate()," + omodel.HSourceID.ToString() +
                ",'" + omodel.HMainSourceInterID.ToString() + "'," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo.ToString() + "','" + omodel.HMainSourceBillType.ToString() + "'" +
                ",'" + omodel.HMainSourceInterID.ToString() + "'," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo.ToString() + "','" + omodel.HMainSourceBillType.ToString() + "'" +
                "," + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HEmpID.ToString() + ",'" + omodel.HBarCode + "','" + omodel.HAddr + "','" + omodel.HBarCodeMaker + "',getdate()" +
                "," + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HEmpID.ToString() + ",'" + omodel.HBarCode + "','" + omodel.HAddr + "','" + omodel.HBarCodeMaker + "',getdate(),'"+ omodel.HRunStatus + "','"+ omodel.HSourceBeginQty.ToString() + "'" +
              ") ");
                //再次验证 ä¿å­˜æ˜¯å¦ åˆç†
WebAPI/Models/ClsSc_MESBeginWorkBillMain.cs
@@ -31,7 +31,8 @@
        public String HBarCodeMaker;
        public DateTime HBarCodeMakeDate;
        new public string HMainSourceEntryID;
        public string HRunStatus;
        public decimal HSourceBeginQty;
        //public int HSourceInterID_Main;
        //public int HSourceEntryID_Main;
        //public string HSourceBillNo_Main;
WebAPI/Models/ÆäËü/ReciveBill_FastModel.cs
New file
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebAPI.Models
{
    public class OptionListModel
    {
        public string field { get; set; }
        public string title { get; set; }
        public bool sort { get; set; }
        public bool hide { get; set; }
    }
}
WebAPI/Models/¶¯Ì¬ÁÐ/OptionListModel.cs
@@ -5,12 +5,15 @@
namespace WebAPI.Models
{
    public class OptionListModel
    public class ReciveBill_FastModel
    {
        public string field { get; set; }
        public string title { get; set; }
        public bool sort { get; set; }
        public bool hide { get; set; }
        public string HInterID { get; set; }
        public string HEntryID { get; set; }
        public decimal HQty { get; set; }
        public decimal HSQty { get; set; }
        public string FID { get; set; }
        public string FEntryID { get; set; }
    }
}
WebAPI/WebAPI.csproj
@@ -580,6 +580,7 @@
    <Compile Include="Models\Sc_WorkBillSortBillSub.cs" />
    <Compile Include="Models\Sc_WorkDemandPlanBillMain.cs" />
    <Compile Include="Models\Sc_WorkDemandPlanBillSub.cs" />
    <Compile Include="Models\其它\ReciveBill_FastModel.cs" />
    <Compile Include="Models\动态列\OptionListModel.cs" />
    <Compile Include="Models\基础资料\Gy_ClassTimePrj.cs" />
    <Compile Include="Models\工资管理\ClsGy_ClassTimePrj_Model.cs" />