| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if(DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | TopRowCount = 0, |
| | | StartRow = 0, |
| | | Limit = 0 |
| | | };; |
| | | }; ; |
| | | var _result = InvokeHelper.Query(sFormId, JsonConvert.SerializeObject(sJson)); |
| | | var _saveObj = JArray.Parse(_result); |
| | | |
| | |
| | | else if (lsmain[0].HMainSourceBillType == "3710") |
| | | { |
| | | websLsmain.HMainSourceBillType = "ç产订å"; |
| | | } |
| | | else if (lsmain[0].HMainSourceBillType == "1256") |
| | | { |
| | | websLsmain.HMainSourceBillType = "çäº§é¢æç³è¯·å"; |
| | | } |
| | | else |
| | | { |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region ç产éåº ä¸ä¼ çå |
| | | |
| | | #region ç产éåº æ ¡éªæ¨¡å¼ |
| | | |
| | | /// <summary> |
| | | /// ç产éåºæ ¡éªä¸ä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_SaveProductInBackBill_BillCheck_Json")] |
| | | [HttpPost] |
| | | public object set_SaveProductInBackBill_BillCheck_Json([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | |
| | | try |
| | | { |
| | | List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getICStockBillMainByJson(msg1); |
| | | |
| | | WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain(); |
| | | |
| | | websLsmain.HInterID = lsmain[0].HInterID; |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HBillType = "1245"; |
| | | websLsmain.HMaker = lsmain[0].HMaker; |
| | | websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; |
| | | |
| | | if (oWebs.set_SaveProductInBackBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ç产éåºæ ¡éªå¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | #region éè´éæ ä¸ä¼ çå |
| | | |
| | | #region éè´éæ æ°å¢æ¨¡å¼ |
| | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "éè´éæåä¸ä¼ 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region éè´éæ æ ¡éªæ¨¡å¼ |
| | | |
| | | /// <summary> |
| | | /// éè´éææ ¡éªä¸ä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_SavePOStockInBackBill_BillCheck_Json")] |
| | | [HttpPost] |
| | | public object set_SavePOStockInBackBill_BillCheck_Json([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | |
| | | try |
| | | { |
| | | List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getICStockBillMainByJson(msg1); |
| | | |
| | | WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain(); |
| | | |
| | | websLsmain.HInterID = lsmain[0].HInterID; |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HBillType = "1239"; |
| | | websLsmain.HMaker = lsmain[0].HMaker; |
| | | websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; |
| | | |
| | | if (oWebs.set_SavePOStockInBackBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "éè´éææ ¡éªå¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region çäº§éæ æ ¡éªæ¨¡å¼ |
| | | |
| | | /// <summary> |
| | | /// çäº§éææ ¡éªä¸ä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_SaveMateOutBackBill_BillCheck_Json")] |
| | | [HttpPost] |
| | | public object set_SaveMateOutBackBill_BillCheck_Json([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | |
| | | try |
| | | { |
| | | List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getICStockBillMainByJson(msg1); |
| | | |
| | | WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain(); |
| | | |
| | | websLsmain.HInterID = lsmain[0].HInterID; |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HBillType = "1244"; |
| | | websLsmain.HMaker = lsmain[0].HMaker; |
| | | websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; |
| | | |
| | | if (oWebs.set_SaveMateOutBackBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "çäº§éææ ¡éªå¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | #region éå®éè´§ ä¸ä¼ çå |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region éå®éè´§ æ ¡éªæ¨¡å¼ |
| | | |
| | | /// <summary> |
| | | /// éå®éè´§æ ¡éªä¸ä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_SaveSellOutBackBill_BillCheck_Json")] |
| | | [HttpPost] |
| | | public object set_SaveSellOutBackBill_BillCheck_Json([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | |
| | | try |
| | | { |
| | | List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getICStockBillMainByJson(msg1); |
| | | |
| | | WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain(); |
| | | |
| | | websLsmain.HInterID = lsmain[0].HInterID; |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HBillType = "1247"; |
| | | websLsmain.HMaker = lsmain[0].HMaker; |
| | | websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; |
| | | |
| | | if (oWebs.set_SaveSellOutBackBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "éå®éè´§æ ¡éªå¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | #region å§å¤éæ ä¸ä¼ çå |
| | | |
| | | #region å§å¤éæ æ ¡éªæ¨¡å¼ |
| | | |
| | | /// <summary> |
| | | /// å§å¤éææ ¡éªä¸ä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_SaveEntrustOutBackBill_BillCheck_Json")] |
| | | [HttpPost] |
| | | public object set_SaveEntrustOutBackBill_BillCheck_Json([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | |
| | | try |
| | | { |
| | | List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getICStockBillMainByJson(msg1); |
| | | |
| | | WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain(); |
| | | |
| | | websLsmain.HInterID = lsmain[0].HInterID; |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HBillType = "1238"; |
| | | websLsmain.HMaker = lsmain[0].HMaker; |
| | | websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; |
| | | |
| | | if (oWebs.set_SaveEntrustOutBackBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å§å¤éææ ¡éªå¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | #region æ£éªå ä¸ä¼ çå |
| | | |
| | | #region æ£éªå åæ ¼å |
| | | |
| | | /// <summary> |
| | | /// æ£éªåæ°å¢ä¸ä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_SaveQCPOStockInCheckBill_Json")] |
| | | [HttpGet] |
| | | public object set_SaveQCPOStockInCheckBill_Json(Int64 HInterID, string HBillNo, string HSourceBillType, string HSourceBillNo, Int64 HSourceInterID, string sHSourceEntryID, Int64 HFirstCheckEmp, string HMaker) |
| | | { |
| | | try |
| | | { |
| | | ClsQC_POStockInCheckBillMain oMain = new ClsQC_POStockInCheckBillMain(); |
| | | oMain.HInterID = HInterID; |
| | | oMain.HBillNo = HBillNo; |
| | | oMain.HBillType = "7503"; |
| | | oMain.HDate = DateTime.Today; |
| | | oMain.HMainSourceBillType = HSourceBillType; |
| | | oMain.HMainSourceBillNo = HSourceBillNo; |
| | | oMain.HMainSourceInterID = HSourceInterID; |
| | | oMain.HFirstCheckEmp = HFirstCheckEmp; |
| | | oMain.HMaker = HMaker; |
| | | |
| | | if (set_SaveQCPOStockInCheckBill(oMain, HSourceBillType, sHSourceEntryID, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ£éªåä¸ä¼ 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | //çææ£éªå |
| | | public bool set_SaveQCPOStockInCheckBill(Model.ClsQC_POStockInCheckBillMain oMain, string HSourceBillType, string sHSourceEntryID, ref string sErrMsg) |
| | | { |
| | | string sRemark = ""; |
| | | string HReturn; |
| | | |
| | | //ä¸ä¼ å夿 |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | DataSet BfDs = oCn.RunProcReturn("exec h_p_QC_BeforeUpload_POStockInCheckBill " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + HSourceBillType + "','" + sHSourceEntryID + "'," + oMain.HFirstCheckEmp.ToString(), "h_p_QC_BeforeUpload_POStockInCheckBill"); |
| | | if (BfDs == null || BfDs.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "ä¸ä¼ åå¤ææ°æ®å®æ´æ§å¤±è´¥ï¼"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(BfDs.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | sErrMsg = "åæ®å·ï¼" + oMain.HBillNo + "ï¼åæ®IDï¼" + oMain.HInterID + "ï¼" + DBUtility.ClsPub.isStrNull(BfDs.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | } |
| | | sRemark = sRemark + " ï¼ä¸ä¼ å夿" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | |
| | | //è¿åæéæ°æ® |
| | | DataSet Ds; |
| | | Ds = oCn.RunProcReturn("exec h_p_QC_POStockInCheckBill_CLD " + oMain.HMainSourceInterID.ToString() + ",'" + sHSourceEntryID + "'," + oMain.HFirstCheckEmp.ToString(), "h_p_QC_POStockInCheckBill_CLD"); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "æ ¹æ®æ¶æéç¥åï¼" + oMain.HMainSourceBillNo + " è·åæ°æ®å¤±è´¥ï¼"; |
| | | return false; |
| | | } |
| | | sRemark = sRemark + " ï¼è·åCLOUDåæ®APIéå
¥å¼" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | |
| | | //è·ååæ®ä¸»è¡¨æéæ°æ® |
| | | oMain.HSupID = Pub_Class.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSupID"]); |
| | | oMain.HSTOCKORGID = Pub_Class.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSTOCKORGID"]); |
| | | |
| | | //è·åç³»ç»åæ° |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(oMain.HSTOCKORGID, ref sErrMsg) == false) |
| | | { |
| | | sErrMsg = "è·åç³»ç»åæ°å¤±è´¥ï¼ " + sErrMsg; |
| | | return false; |
| | | } |
| | | |
| | | try |
| | | { |
| | | //夿ä¼è®¡ææ¯å¦åç |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sErrMsg = s; |
| | | return false; |
| | | } |
| | | oMain.HYear = sYear; |
| | | oMain.HPeriod = sPeriod; |
| | | |
| | | oCn.BeginTran(); |
| | | //çææ£éªå |
| | | //åå
¥ä¸»è¡¨ |
| | | oCn.RunProc("Insert Into QC_POStockInCheckBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark,HSTOCKORGID,HSupID,HMaterID" + |
| | | ",HInstockQty,HCheckQty,HRightQty,HBadQty,HFirstCheckEmp" + |
| | | ",HCheckerResult,HSteelStoveNo,HSteelCompReport,HAspect,HSize" + |
| | | ") " + |
| | | " values('" + oMain.HBillType + "','" + oMain.HBillType + "'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "','" + oMain.HMaker + "',getdate()" + |
| | | ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "'," + oMain.HSTOCKORGID.ToString() + "," + oMain.HSupID.ToString() + "," + oMain.HMaterID.ToString() + |
| | | ", " + oMain.HCheckQty.ToString() + "," + oMain.HCheckQty.ToString() + "," + oMain.HRightQty.ToString() + "," + oMain.HBadQty.ToString() + "," + oMain.HFirstCheckEmp.ToString() + |
| | | ",'" + oMain.HCheckerResult + "','" + oMain.HSteelStoveNo + "','" + oMain.HSteelCompReport + "','" + oMain.HAspect + "','" + oMain.HSize + "'" + |
| | | ") "); |
| | | |
| | | //åå
¥å表 |
| | | for (int i = 0; i < Ds.Tables[1].Rows.Count; i++) |
| | | { |
| | | Model.ClsQC_POStockInCheckBillSub oSub = new Model.ClsQC_POStockInCheckBillSub(); |
| | | oSub.HEntryID = i + 1; |
| | | oSub.HSourceInterID = Pub_Class.ClsPub.isLong(Ds.Tables[1].Rows[i]["HSourceInterID"]); |
| | | oSub.HSourceEntryID = Pub_Class.ClsPub.isLong(Ds.Tables[1].Rows[i]["HSourceEntryID"]); |
| | | oSub.HSourceBillNo = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HSourceBillNo"]); |
| | | oSub.HSourceBillType = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HSourceBillType"]); |
| | | oSub.HResult = "åæ ¼"; |
| | | oSub.HProcCheckEmp = oMain.HFirstCheckEmp; |
| | | oSub.HMaterID = Pub_Class.ClsPub.isLong(Ds.Tables[1].Rows[i]["HMaterID"]); |
| | | oSub.HInStockQty = Pub_Class.ClsPub.isDoule(Ds.Tables[1].Rows[i]["HInStockQty"]); |
| | | oSub.HCheckQty = Pub_Class.ClsPub.isDoule(Ds.Tables[1].Rows[i]["HCheckQty"]); |
| | | oSub.HRightQty = Pub_Class.ClsPub.isDoule(Ds.Tables[1].Rows[i]["HRightQty"]); |
| | | oSub.HBadQty = Pub_Class.ClsPub.isDoule(Ds.Tables[1].Rows[i]["HBadQty"]); |
| | | |
| | | oCn.RunProc("Insert Into QC_POStockInCheckBillSub " + |
| | | "(HInterID,HEntryID,HBillNo_bak,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" + |
| | | ",HQCCheckClassID,HQCCheckItemID,HQCStd,HQCRelValue" + |
| | | ",HResult,HProcCheckEmp,HProcCheckTime" + |
| | | ",HMaterID,HInStockQty,HCheckQty,HRightQty,HBadQty" + |
| | | ") " + |
| | | " values(" + oMain.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oMain.HBillNo + "','" + oSub.HRemark + "'" + |
| | | ", " + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'" + |
| | | ", " + oSub.HQCCheckClassID.ToString() + "," + oSub.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HQCRelValue + "'" + |
| | | ",'" + oSub.HResult + "'," + oSub.HProcCheckEmp.ToString() + ",getdate()" + |
| | | ", " + oSub.HMaterID.ToString() + "," + oSub.HInStockQty.ToString() + "," + oSub.HCheckQty.ToString() + "," + oSub.HRightQty.ToString() + "," + oSub.HBadQty.ToString() + |
| | | ") "); |
| | | } |
| | | sRemark = sRemark + " ï¼çææ£éªååæ®" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | |
| | | //è·åéè¶äºAPIæééå
¥æ°æ® |
| | | string sJson_MainCustom = ""; //主表èªå®ä¹å段 |
| | | sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]); |
| | | |
| | | string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\",\"IsEntryBatchFill\":\"True\",\"Model\":{\"FBillNo\":\"" + oMain.HBillNo + "\"," + |
| | | //\"FID\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FID"]) + "\"," + |
| | | "\"FBillTypeID\":{ \"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBillTypeID"]) + "\" }," + |
| | | "\"FBusinessType\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBusinessType"]) + "\"," + |
| | | "\"FDATE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDATE"]) + "\"," + |
| | | "\"FSourceOrgId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSourceOrgId"]) + "\"}," + |
| | | "\"FInspectOrgId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInspectOrgId"]) + "\"}," + |
| | | "\"FInspectDepId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInspectDepId"]) + "\"}," + |
| | | //"\"FInspectGroupId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInspectGroupId"]) + "\"}," + |
| | | "\"FInspectorId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInspectorId"]) + "\"}," + |
| | | //"\"FDescription\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDescription"]) + "\"," + |
| | | //"\"FUpScanBox\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FUpScanBox"]) + "\"," + |
| | | //"\"FDefScanBox\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDefScanBox"]) + "\"," + |
| | | //"\"FCheckQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FCheckQty"]) + "\"," + |
| | | //"\"FInspectValScanBox\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FInspectValScanBox"]) + "\"," + |
| | | "\"FIsSynced\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FIsSynced"]) + "\"," + |
| | | sJson_MainCustom + |
| | | "\"FEntity\":["; |
| | | string sJson_Entry = ""; |
| | | for (int i = 0; i < Ds.Tables[1].Rows.Count; i++) |
| | | { |
| | | if (sJson_Entry != "") |
| | | { |
| | | sJson_Entry = sJson_Entry + " , "; |
| | | } |
| | | string sJson_BatchNo = ""; |
| | | string sJson_StockPlace = ""; |
| | | string sJson_FProduceDate = ""; //çäº§æ¥æ |
| | | string sJson_FExpiryDate = ""; //æææè³ |
| | | string sJson_FAUXPROPID = ""; |
| | | string sJson_SubCustom = ""; //å表èªå®ä¹å段 |
| | | |
| | | //å表èªå®ä¹å段 |
| | | sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]); |
| | | |
| | | //æ¯å¦å¯ç¨æ¹æ¬¡ç®¡ç |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") |
| | | { |
| | | sJson_BatchNo = " \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"}, \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\" , "; |
| | | } |
| | | else |
| | | { |
| | | sJson_BatchNo = ""; |
| | | } |
| | | |
| | | //æ¯å¦å¯ç¨ä¿è´¨ææ§å¶ |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1") |
| | | { |
| | | sJson_FProduceDate = " \"FProduceDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FProduceDate"]) + "\","; |
| | | sJson_FExpiryDate = " \"FExpiryDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FExpiryDate"]) + "\","; |
| | | } |
| | | else |
| | | { |
| | | sJson_FProduceDate = ""; |
| | | sJson_FExpiryDate = ""; |
| | | } |
| | | |
| | | //æ¯å¦å¯ç¨ä»ä½ |
| | | if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "") |
| | | { |
| | | sJson_StockPlace = ""; |
| | | } |
| | | else |
| | | { |
| | | sJson_StockPlace = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) + "\"}},"; |
| | | } |
| | | |
| | | //è¾
å©å±æ§ |
| | | sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},"; |
| | | |
| | | sJson_Entry = sJson_Entry + "{" + |
| | | //"FEntryID": 0, |
| | | "\"FMaterialId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMaterialId"]) + "\"}," + |
| | | //"FQCSchemeId": {"FNUMBER": ""}, |
| | | "\"FUnitID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FUnitID"]) + "\"}," + |
| | | "\"FInspectQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FInspectQty"]) + "\"," + //æ£éªæ°é |
| | | "\"FQualifiedQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FQualifiedQty"]) + "\"," + //åæ ¼æ°é |
| | | "\"FUnqualifiedQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FUnqualifiedQty"]) + "\"," + //ä¸åæ ¼æ°é |
| | | //"FSampleDamageQty": 0, |
| | | //"FSUnqualifiedQty": 0, |
| | | "\"FInspectResult\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FInspectResult"]) + "\"," + //æ£éªç»æ |
| | | "\"FQCStatus\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FQCStatus"]) + "\"," + //è´¨æ£ç¶æ |
| | | //"FBaseSUnqualifiedQty": 0, |
| | | //"FSampleQty": 0, |
| | | //"FMemo": "", |
| | | "\"FIsRelated\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FIsRelated"]) + "\"," + |
| | | "\"FSrcBillType0\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcBillType0"]) + "\"," + |
| | | "\"FSrcBillNo0\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcBillNo0"]) + "\"," + |
| | | "\"FSrcInterId0\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcInterId0"]) + "\"," + |
| | | "\"FSrcEntryId0\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcEntryId0"]) + "\"," + |
| | | "\"FSrcEntrySeq0\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcEntrySeq0"]) + "\"," + |
| | | "\"FBaseUnitId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBaseUnitId"]) + "\"}," + |
| | | //"FQCBusinessType": "", |
| | | //"FBFLowId": {"FNAME": ""}, |
| | | //"FSampleSchemeId": {"FNUMBER": ""}, |
| | | //"FAcceptQty": 0, |
| | | //"FRejectQty": 0, |
| | | //"FInspectEndDate": "1900-01-01", |
| | | "\"FBaseInspectQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBaseInspectQty"]) + "\"," + //åºæ¬å使£éªæ°é |
| | | "\"FSupplierId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSupplierId"]) + "\"}," + |
| | | //"FCustomerId": {"FNUMBER": ""}, |
| | | //"FProductLineId": {"FNUMBER": ""}, |
| | | //"FPrdLineLocation": {"FLOCATIONCODE": ""}, |
| | | //"FWorkshopId": {"FNUMBER": ""}, |
| | | "\"FStockId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockId"]) + "\"}," + |
| | | sJson_BatchNo + |
| | | "\"FInspectTimes\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FInspectTimes"]) + "\"," + //æ£éªæ¬¡æ° |
| | | sJson_StockPlace + |
| | | //"FConsumeTime": 0, |
| | | //"FInspectStartDate": "1900-01-01", |
| | | "\"FTimeUnit\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FTimeUnit"]) + "\"," + |
| | | //"FBaseSampleDamageQty": 0, |
| | | //"FBaseUnqualifiedQty": 0, |
| | | //"FOperNumber": 0, |
| | | "\"FSampleDamageBearer\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSampleDamageBearer"]) + "\"," + |
| | | "\"FIsFirstInspect\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FIsFirstInspect"]) + "\"," + |
| | | "\"FBaseQualifiedQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBaseQualifiedQty"]) + "\"," + //åºæ¬åä½åæ ¼æ° |
| | | "\"FBaseAcceptQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBaseAcceptQty"]) + "\"," + //åºæ¬å使¥æ¶æ° |
| | | sJson_FAUXPROPID + |
| | | //"FPrdUnitId": {"FNumber": ""}, |
| | | //"FBaseReAcceptQty": 0, |
| | | //"FOperDescription": "", |
| | | //"FUnitTransHeadQty": 0, |
| | | //"FUnitTransOperQty": 0, |
| | | //"FSNUnitID": {"FNumber": ""}, |
| | | //"FBaseWBInspectQty": 0, |
| | | //"FBaseUnQuaSalQty": 0, |
| | | //"FSupplierLot": "", |
| | | sJson_FProduceDate + |
| | | sJson_FExpiryDate + |
| | | //"FNewExpiryDate": "1900-01-01", |
| | | "\"FCurrency\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FCurrency"]) + "\"}," + |
| | | //"FDiscountQty": 0, |
| | | "\"FIsSplitRow\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FIsSplitRow"]) + "\"," + |
| | | sJson_SubCustom + |
| | | |
| | | //使ç¨å³çè¡¨ä½ |
| | | "\"FPolicyDetail\": [ { " + |
| | | //"FDetailID": 0, |
| | | "\"FPolicyMaterialId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FPolicyMaterialId"]) + "\"}," + |
| | | "\"FPolicyStatus\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FPolicyStatus"]) + "\"," + |
| | | "\"FPolicyQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FPolicyQty"]) + "\"," + |
| | | "\"FBasePolicyQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBasePolicyQty"]) + "\"," + |
| | | "\"FUsePolicy\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FUsePolicy"]) + "\"," + |
| | | //"FSerialId": { "FNUMBER": ""}, |
| | | "\"FIsCheck\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FIsCheck"]) + "\"," + |
| | | "\"FIsDefectProcess\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FIsDefectProcess"]) + "\"," + |
| | | "\"FCanSale\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FCanSale"]) + "\"," + |
| | | "\"FIsMRBReview\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FIsMRBReview"]) + "\"," + |
| | | "\"FIsReturn\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FIsReturn"]) + "\"," + |
| | | "\"FIsRelatedDefect\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FIsRelatedDefect"]) + "\"" + |
| | | //"FMRBReviewStatus": "", |
| | | //"FBoxNumber": "", |
| | | //"FMemo1": "", |
| | | //"FPolicyAuxPropId": {"FPOLICYAUXPROPID__FF100005": { "FNumber": ""},"FPOLICYAUXPROPID__FF100002": { "FNumber": ""}} |
| | | " } ]," + |
| | | |
| | | //缺é·è®°å½è¡¨ä½ |
| | | //"\"FDefectDetail\": [ { " + |
| | | ////"FDetailID": 0, |
| | | ////"FDSerialId": {"FNUMBER": ""}, |
| | | ////"FDefectTypeId": {"FNUMBER": ""}, |
| | | ////"FDefectQty": 0, |
| | | ////"FBaseDefectQty1": 0, |
| | | ////"FDefectReasonId": {"FNUMBER": ""}, |
| | | ////"FDefectLevel": "", |
| | | ////"FDefectResultId": {"FNUMBER": ""}, |
| | | ////"FDefectMemo": "" |
| | | //" } ]," + |
| | | |
| | | //æ£éªé¡¹ç®è¡¨ä½ |
| | | //"\"FItemDetail\": [ { " + |
| | | ////"FDetailID": 0, |
| | | ////"FInspectItemId": { "FNUMBER": ""}, |
| | | ////"FInspectResult1": "", |
| | | ////"FAnalysisMethod": "", |
| | | ////"FQualityStdId": { "FNUMBER": ""}, |
| | | ////"FUnitId2": { "FNUMBER": ""}, |
| | | ////"FInspectValQ": 0, |
| | | ////"FInspectValB": { "FNUMBER": ""}, |
| | | ////"FInspectValT": "", |
| | | ////"FInspectMethodId": { "FNUMBER": ""}, |
| | | ////"FInspectInstrumentId": { "FNUMBER": ""}, |
| | | ////"FDefectlevel1": "", |
| | | ////"FDestructInspect": "false", |
| | | ////"FKeyInspect": "false", |
| | | ////"FInspectBasisId": { "FNUMBER": ""}, |
| | | ////"FSampleSchemeId1": { "FNUMBER": ""}, |
| | | ////"FItemStatus": "", |
| | | ////"FCompareSymbol": "", |
| | | ////"FSampleQty1": 0, |
| | | ////"FAcceptQty1": 0, |
| | | ////"FRejectQty1": 0, |
| | | ////"FSampleDamageQty1": 0, |
| | | ////"FBaseSampleDamageQty1": 0, |
| | | ////"FItemMemo": "", |
| | | ////"FSUnqualifiedQty1": 0, |
| | | ////"FBaseSUnqualifiedQty1": 0, |
| | | ////"FTargetVal": "", |
| | | ////"FInspectVal": "", |
| | | ////"FUpLimit": "", |
| | | ////"FDownLimit": "", |
| | | ////"FUpOffset": "", |
| | | ////"FDownOffset": "", |
| | | ////"FInspectValKey": "", |
| | | ////"FTargetValKey": "", |
| | | ////"FUpLimitKey": "", |
| | | ////"FDownLimitKey": "", |
| | | ////"FUpOffsetKey": "", |
| | | ////"FDownOffsetKey": "", |
| | | ////"FTargetValQ": 0, |
| | | ////"FUpLimitQ": 0, |
| | | ////"FDownLimitQ": 0, |
| | | ////"FUpOffsetQ": 0, |
| | | ////"FDownOffsetQ": 0, |
| | | ////"FTargetValB": { "FNUMBER": ""}, |
| | | ////"FUpLimitB": { "FNUMBER": ""}, |
| | | ////"FDownLimitB": { "FNUMBER": ""}, |
| | | ////"FUpOffsetB": { "FNUMBER": ""}, |
| | | ////"FDownOffsetB": { "FNUMBER": ""}, |
| | | ////"FTargetValT": "", |
| | | ////"FUpLimitT": "", |
| | | ////"FDownLimitT": "", |
| | | ////"FUpOffsetT": "", |
| | | ////"FDownOffsetT": "", |
| | | ////"FValueGrid": [ |
| | | //// { |
| | | //// "FGridId": 0, |
| | | //// "FInspectResult2": "", |
| | | //// "FInspectValueB": { "FNUMBER": ""}, |
| | | //// "FInspectValueT": "", |
| | | //// "FInspectValue": 0, |
| | | //// "FVSerialId": { "FNUMBER": ""} |
| | | //// } |
| | | ////] |
| | | //" } ]," + |
| | | |
| | | //åèè¡¨ä½ |
| | | "\"FReferDetail\": [ { " + |
| | | //"FDetailID": 0, |
| | | "\"FSrcBillType\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcBillType"]) + "\"," + |
| | | "\"FSrcBillNo\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcBillNo"]) + "\"," + |
| | | "\"FSrcInterId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcInterId"]) + "\"," + |
| | | "\"FSrcEntryId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcEntryId"]) + "\"," + |
| | | "\"FSrcEntrySeq\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSrcEntrySeq"]) + "\"," + |
| | | "\"FOrderType\":{\"FID\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FOrderType"]) + "\"}," + |
| | | "\"FOrderBillNo\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FOrderBillNo"]) + "\"," + |
| | | "\"FOrderId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FOrderId"]) + "\"," + |
| | | "\"FOrderEntryId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FOrderEntryId"]) + "\"," + |
| | | "\"FOrderEntrySeq\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FOrderEntrySeq"]) + "\"" + |
| | | " } ]," + |
| | | |
| | | //å
³èå
³ç³»è¡¨ |
| | | "\"FEntity_Link\": [ { " + |
| | | "\"FEntity_Link_FFlowId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FFlowId"]) + "\"," + |
| | | "\"FEntity_Link_FFlowLineId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FFlowLineId"]) + "\"," + |
| | | "\"FEntity_Link_FRuleId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FRuleId"]) + "\"," + |
| | | "\"FEntity_Link_FSTableName\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FSTableName"]) + "\"," + |
| | | "\"FEntity_Link_FSBillId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FSBillId"]) + "\"," + |
| | | "\"FEntity_Link_FSId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FSId"]) + "\"," + |
| | | "\"FEntity_Link_FBaseAcceptQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FBaseAcceptQty"]) + "\"," + |
| | | "\"FEntity_Link_FBaseAcceptQtyOld\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FBaseAcceptQtyOld"]) + "\"," + |
| | | "\"FEntity_Link_FBaseInspectQtyOld\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FBaseInspectQtyOld"]) + "\"," + |
| | | "\"FEntity_Link_FInspectQtyOld\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FInspectQtyOld"]) + "\"" + |
| | | " } ] } "; |
| | | } |
| | | string sJson_End = " ] }}"; |
| | | string sJson = sJson_Main + sJson_Entry + sJson_End; |
| | | |
| | | //CLOUDéè¶äºè´¦å·å¯ç ç»å
¥ |
| | | var loginRet = InvokeHelper.LoginUser(oMain.HMaker); |
| | | var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>(); |
| | | sRemark = sRemark + " ï¼è·åéªè¯CLOUDè´¦å·å¯ç " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | |
| | | //çæéè¶äºåæ® |
| | | if (isSuccess == 1) |
| | | { |
| | | string result = InvokeHelper.Save("QM_InspectBill", sJson); //ä¿å |
| | | sRemark = sRemark + " ï¼çæCLOUDåæ®" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | |
| | | HReturn = result.ToString(); |
| | | |
| | | if (HReturn.Contains("\"IsSuccess\":false") == true) |
| | | { |
| | | //ååºååjsonæ°æ® |
| | | var retModel = JsonConvert.DeserializeObject<KingdeeResponse>(HReturn); |
| | | //æ¥æ¶éè¶æ¥éä¿¡æ¯ |
| | | var strErrorMsg = string.Empty; |
| | | //éåè·åæ¥éä¿¡æ¯ |
| | | foreach (var item in retModel.Result.ResponseStatus.Errors) |
| | | { |
| | | strErrorMsg += item.Message + "\r\n"; |
| | | }; |
| | | sErrMsg = "çææ£éªå失败ï¼éè¶äºæç¤ºï¼" + strErrorMsg; |
| | | LogService.Write("çææ£éªå失败ï¼" + HReturn + sJson); //åå
¥txtææ¬ |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | sRemark = sRemark + sJson; |
| | | // æäº¤åä¿ååæ® |
| | | string result1 = string.Empty; |
| | | string result2 = string.Empty; |
| | | var fID = JObject.Parse(result)["Result"]["Id"].ToString(); |
| | | var fBillNo = JObject.Parse(result)["Result"]["Number"].ToString(); |
| | | var json = new |
| | | { |
| | | Ids = fID, |
| | | }; |
| | | |
| | | result1 = InvokeHelper.Submit("QM_InspectBill", JsonConvert.SerializeObject(json));//æäº¤ |
| | | result2 = InvokeHelper.Audit("QM_InspectBill", JsonConvert.SerializeObject(json));//å®¡æ ¸ |
| | | if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | oCn.RollBack(); |
| | | sErrMsg = $"æ¥ææ£éªåå·ï¼{fBillNo}ï¼æäº¤å¤±è´¥" + result; |
| | | return false; |
| | | } |
| | | oCn.Commit(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "çææ£éªå失败ï¼éè¶äºç»å½å¤±è´¥ï¼"; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write("çæåæ»" + e.Message + sRemark); |
| | | sErrMsg = "çææ£éªå失败ï¼" + e.Message; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | |
| | | if (oSystemParameter.omodel.QC_POStockInCheckBill_AutoCheck.ToUpper() == "Y") //ç³»ç»åæ° èªå¨å®¡æ ¸ |
| | | { |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | //å®¡æ ¸WMSåæ® |
| | | oCn.RunProc("Update QC_POStockInCheckBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString()); |
| | | |
| | | //æäº¤ãå®¡æ ¸éè¶äºåæ® |
| | | HReturn = ""; |
| | | string sJson2 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}"; |
| | | var result2 = InvokeHelper.Submit("QM_InspectBill", sJson2); //æäº¤ |
| | | sRemark = sRemark + " ï¼æäº¤CLOUDåæ®" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | |
| | | var result3 = InvokeHelper.Audit("QM_InspectBill", sJson2); //å®¡æ ¸ |
| | | sRemark = sRemark + " ï¼å®¡æ ¸CLOUDåæ®" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); |
| | | |
| | | HReturn = result2.ToString() + "," + result3.ToString(); |
| | | |
| | | if (HReturn.Contains("\"IsSuccess\":false") == true) |
| | | { |
| | | //ååºååjsonæ°æ® |
| | | var retModel = JsonConvert.DeserializeObject<KingdeeResponse>(result3); |
| | | //æ¥æ¶éè¶æ¥éä¿¡æ¯ |
| | | var strErrorMsg = string.Empty; |
| | | //éåè·åæ¥éä¿¡æ¯ |
| | | foreach (var item in retModel.Result.ResponseStatus.Errors) |
| | | { |
| | | strErrorMsg += item.Message + "\r\n"; |
| | | }; |
| | | sErrMsg = "çææ£éªåæåï¼å®¡æ ¸åæ®å¤±è´¥ï¼éè¶äºæç¤ºï¼" + strErrorMsg; |
| | | LogService.Write("å®¡æ ¸åæ®å¤±è´¥" + sRemark + HReturn); |
| | | oCn.RollBack(); |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | LogService.Write("çæå¹¶å®¡æ ¸æ£éªåæåï¼" + sRemark); |
| | | sErrMsg = "çæå¹¶å®¡æ ¸æ£éªåæåï¼åæ®å·ä¸ºï¼" + oMain.HBillNo; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write("å®¡æ ¸åæ»" + sRemark + HReturn); |
| | | sErrMsg = "å®¡æ ¸æ£éªå失败ï¼" + e.Message; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | LogService.Write("çææ£éªåæåï¼" + sRemark); |
| | | sErrMsg = "çææ£éªåæåï¼åæ®å·ä¸ºï¼" + oMain.HBillNo; |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | #region çäº§ç»æå ä¸ä¼ çå |
| | |
| | | try |
| | | { |
| | | |
| | | DataSet ds=oCn.RunProcReturn($"select * from h_v_get_PackUnionBill where æ æ¿ç ='{HBarCode_Pack}'", "h_v_get_PackUnionBill"); |
| | | DataSet ds = oCn.RunProcReturn($"select * from h_v_get_PackUnionBill where æ æ¿ç ='{HBarCode_Pack}'", "h_v_get_PackUnionBill"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | { |
| | | |
| | | //å é¤åæ§å¶========================================= |
| | | DataSet dds = oCn.RunProcReturn("Exec h_p_KF_ICInventory_WorkShop_BeforeDelCtrl " + mainList[0].HInterID.ToString() , "h_p_KF_ICInventory_WorkShop_BeforeDelCtrl"); |
| | | DataSet dds = oCn.RunProcReturn("Exec h_p_KF_ICInventory_WorkShop_BeforeDelCtrl " + mainList[0].HInterID.ToString(), "h_p_KF_ICInventory_WorkShop_BeforeDelCtrl"); |
| | | |
| | | if (dds == null) |
| | | { |
| | |
| | | sAutoBarCode = "Y"; |
| | | } |
| | | } |
| | | //éè´éæå |
| | | else if (HBillType == "1239") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | //å
æ«ç©ææ¡ç 模å¼ï¼'Y'ä¸ºä¸æ«ç©ææ¡ç ï¼ |
| | | if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_AutoBarCode.ToUpper() == "Y") |
| | | { |
| | | sAutoBarCode = "Y"; |
| | | } |
| | | } |
| | | //ç产éåºå |
| | | else if (HBillType == "1245") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | //å
æ«ç©ææ¡ç 模å¼ï¼'Y'ä¸ºä¸æ«ç©ææ¡ç ï¼ |
| | | if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_AutoBarCode.ToUpper() == "Y") |
| | | { |
| | | sAutoBarCode = "Y"; |
| | | } |
| | | } |
| | | //ç产éæå |
| | | else if (HBillType == "1244") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | //å
æ«ç©ææ¡ç 模å¼ï¼'Y'ä¸ºä¸æ«ç©ææ¡ç ï¼ |
| | | if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_AutoBarCode.ToUpper() == "Y") |
| | | { |
| | | sAutoBarCode = "Y"; |
| | | } |
| | | } |
| | | //éå®éè´§å |
| | | else if (HBillType == "1247") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | //å
æ«ç©ææ¡ç 模å¼ï¼'Y'ä¸ºä¸æ«ç©ææ¡ç ï¼ |
| | | if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_AutoBarCode.ToUpper() == "Y") |
| | | { |
| | | sAutoBarCode = "Y"; |
| | | } |
| | | } |
| | | //å§å¤éæå |
| | | else if (HBillType == "1238") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | //å
æ«ç©ææ¡ç 模å¼ï¼'Y'ä¸ºä¸æ«ç©ææ¡ç ï¼ |
| | | if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_AutoBarCode.ToUpper() == "Y") |
| | | { |
| | | sAutoBarCode = "Y"; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "å®ç") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | |
| | | |
| | | #region ç³»ç»åæ°è·å |
| | | //çäº§é¢æå-å
è¿å
åºæ§å¶ |
| | | if (HBillType == "1204" |
| | | if (HBillType == "1204" |
| | | && oSystemParameter.omodel.Kf_MateOutBillCheck_AutoBarCode.ToUpper() == "N" //å
æ«ç©ææ¡ç 模å¼ï¼'Y'ä¸ºä¸æ«ç©ææ¡ç ï¼ |
| | | && oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl.ToUpper() == "N" //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | && (oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl == "3")) |
| | |
| | | } |
| | | //å
è¿å
åºæ§å¶ |
| | | sFIFOCtl = oSystemParameter.omodel.Kf_MoveStockBillCheck_FIFOCtl; |
| | | } |
| | | //éè´éæå |
| | | else if (HBillType == "1239") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //ç产éåºå |
| | | else if (HBillType == "1245") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //ç产éæå |
| | | else if (HBillType == "1244") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //éå®éè´§å |
| | | else if (HBillType == "1247") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //å§å¤éæå |
| | | else if (HBillType == "1238") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //éè´éæå |
| | | else if (HBillType == "1239") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //ç产éåºå |
| | | else if (HBillType == "1245") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //ç产éæå |
| | | else if (HBillType == "1244") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //éå®éè´§å |
| | | else if (HBillType == "1247") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //å§å¤éæå |
| | | else if (HBillType == "1238") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | try |
| | |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_GetCheckBillList '" + HBillType + "'," + HStockOrgID.ToString() + ",'" + HBillNo + "','" + HMater + "','" + HCustom + "'", "h_p_WMS_GetCheckBillList"); |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_GetCheckBillList '" + HBillType + "'," + HStockOrgID.ToString() + ",'" + HBillNo + "','" + HMater + "','" + HCustom + "'", "h_p_WMS_GetCheckBillList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | #endregion |
| | | |
| | | #region çäº§ç»æåæ¨¡å æ«æå®¢æ·ç®±ï¼æï¼æ¡ç -å¯è´è£
ç®±å 20251103 |
| | | |
| | | |
| | | [Route("WEBSController/Get_PackBarCode_PackUnionBill_New_Json_Cus")] |
| | | [HttpGet] |
| | | public object Get_PackBarCode_PackUnionBill_New_Json_Cus(Int64 HInterID, string HBillNo, string HBillType, string HBillSubType, string HBarCode_Pack, string HSourceBillNo) |
| | |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | #region æ ¹æ®snç 寻æ¾å¯¹åºçä¸ç®±ç |
| | | [Route("WEBSController/getMiddleCodeBySn")] |
| | | [HttpGet] |
| | | public object getMiddleCodeBySn(string HBarCode, int HStockOrgID) |
| | | { |
| | | DataSet dss = oCn.RunProcReturn("select * from Gy_CaseCodeRelation where HBarCode='" + HBarCode + "'", "Gy_CaseCodeRelation"); |
| | | |
| | | if (dss.Tables[0].Rows[0]["HCaseCode"].ToString() == "" || dss == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æªæ¾å°snç æå¯¹åºçä¸ç®±ç "; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = dss.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #endregion |
| | |
| | | /// <returns></returns> |
| | | [Route("WEBSController/BindCarAndWH")] |
| | | [HttpGet] |
| | | public object BindCarAndWH( string HMaker, Int64 HWhID, Int64 HSPID, string HCarBarCode, Int64 HStockOrgID,int bindsignal) |
| | | public object BindCarAndWH(string HMaker, Int64 HWhID, Int64 HSPID, string HCarBarCode, Int64 HStockOrgID, int bindsignal) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_bindingCarintoWh " + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HCarBarCode + "','" + HMaker+ "'," + HStockOrgID.ToString()+","+ bindsignal, "h_p_bindingCarintoWh"); |
| | | ds = oCn.RunProcReturn("exec h_p_bindingCarintoWh " + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HCarBarCode + "','" + HMaker + "'," + HStockOrgID.ToString() + "," + bindsignal, "h_p_bindingCarintoWh"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | // 转移模å |
| | | [Route("WEBSController/CheckHW")] |
| | | [HttpGet] |
| | | public object CheckHW(int HWhID,int HSPID,int HWhID2,int HSPID2,string HBarCode,string HCarBarCode1,string HCarBarCode2,string UserID) |
| | | public object CheckHW(int HWhID, int HSPID, int HWhID2, int HSPID2, string HBarCode, string HCarBarCode1, string HCarBarCode2, string UserID) |
| | | { |
| | | try |
| | | { |
| | |
| | | [HttpGet] |
| | | public Object get_BillBarCode_BillCheck_Json_MateOut_HuiKang(string HBillNo, string HBillType, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | |
| | | |
| | | try |
| | | { |
| | | WebSoBar = null; |
| | |
| | | List<string> HBillNoList = new List<string>(); |
| | | foreach (DataRow row in ds.Tables[0].Rows) |
| | | { |
| | | if (string.IsNullOrWhiteSpace(row["HChecker"].ToString())){ |
| | | if (string.IsNullOrWhiteSpace(row["HChecker"].ToString())) { |
| | | // 2. å¤æåæ®å®¡æ ¸ç¶æï¼æ¥æ¾æªè¢«å®¡æ ¸çåæ® |
| | | WebSoBar = oWebs.get_BillBarCode_BillCheck(row["HBillNo"].ToString(), HBillType, row["HMaker"].ToString(), HStockOrgID, ref DBUtility.ClsPub.sErrInfo); |
| | | |
| | |
| | | { |
| | | try |
| | | { |
| | | |
| | | |
| | | string sql = $"exec [h_p_Sc_ICMOBillWorkQtyStatus_Save] {HInterID}"; |
| | | ds = oCn.RunProcReturn(sql, "[h_p_Sc_ICMOBillWorkQtyStatus_Save]"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | |
| | | #region æ£éªå æ«ææºå æ ¹æ®åæ®ç±»å æºåç±»å æºåå· è§£æå¹¶è¿åæ£éªé¡¹ç® |
| | | [Route("WEBSController/get_CheckBillBarCode_Json_CheckItem")] |
| | | [HttpGet] |
| | | public Object get_CheckBillBarCode_Json_CheckItem(int HBillType, int HSourceBillType, string HBarCode, string HInterID, string HEntryID, int Mode,string user) |
| | | public Object get_CheckBillBarCode_Json_CheckItem(int HBillType, int HSourceBillType, string HBarCode, string HInterID, string HEntryID, int Mode, string user) |
| | | { |
| | | try |
| | | { |
| | | string sErrMsg = ""; |
| | | oSystemParameter.ShowBill(ref sErrMsg); |
| | | // åèå®¢æ· |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "åè") |
| | | { |
| | | if (!string.IsNullOrWhiteSpace(HBarCode)) |
| | | { |
| | | HBarCode = HBarCode.Split('-')[0]; |
| | | } |
| | | } |
| | | |
| | | // Mode = 1 表示 æ«ç æ¨¡å¼ Mode = 2 表示 é忍¡å¼ |
| | | if(Mode == 1) |
| | | if (Mode == 1) |
| | | { |
| | | //æ«ç 模å¼éè¦è§£ææ¡ç è·åHInterIDåHEntryID |
| | | ds = oCn.RunProcReturn($@" |
| | | exec h_p_CheckBillBarCode_AnalysisBarcode |
| | | @HBillType={HBillType}, |
| | | @HSourceBillType={HSourceBillType}, |
| | | @HBarCode={HBarCode}, |
| | | @HBillType='{HBillType}', |
| | | @HSourceBillType='{HSourceBillType}', |
| | | @HBarCode='{HBarCode}', |
| | | @user = '{user}' |
| | | ", "h_p_CheckBillBarCode_AnalysisBarcode"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | if (ds is null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | HEntryID = ds.Tables[0].Rows[0]["HEntryID"].ToString(); |
| | | } |
| | | // é忍¡å¼ç´æ¥éå
¥HInterID å HEntryID æ ¹æ® åè´¨æ£æ¹æ¡æ¥æº è·å æ£éªé¡¹ç® |
| | | ds = oCn.RunProcReturn($@" |
| | | exec h_p_CheckBillBarCode_CheckItem |
| | | @HBillType={HBillType}, |
| | | @HSourceBillType={HSourceBillType}, |
| | | @HInterID={HInterID}, |
| | | @HEntryID={HEntryID} |
| | | ", "h_p_CheckBillBarCode_CheckItem"); |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "åè") |
| | | { |
| | | //åèåæ«ä»¶çæ¶å è¦ç¥éæè¿ä¸ªæ¡ç 对åºçæ°éæ¯å¤å°ï¼åªè½ææ¡ç ä¼ å
¥è¿å»è¿è¡æ¥æ¾ |
| | | ds = oCn.RunProcReturn($@"exec h_p_CheckBillBarCode_CheckItem @HBillType='{HBillType}',@HSourceBillType='{HSourceBillType}', |
| | | @HInterID='{HInterID}',@HEntryID='{HEntryID}',@HBarCode='{HBarCode}'", "h_p_CheckBillBarCode_CheckItem"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCn.RunProcReturn($@"exec h_p_CheckBillBarCode_CheckItem @HBillType='{HBillType}',@HSourceBillType='{HSourceBillType}', |
| | | @HInterID='{HInterID}',@HEntryID='{HEntryID}'", "h_p_CheckBillBarCode_CheckItem"); |
| | | } |
| | | |
| | | |
| | | if(ds.Tables[0].Rows.Count == 0) |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«æåæ®æ¡ç å¤±è´¥ï¼æ ç»å®è´¨æ£æ¹æ¡ä¿¡æ¯"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "åè") |
| | | { |
| | | if (HBillType == 7507) // åæ®ç±»åæ¯æ«ä»¶æ£éªå æ¥æ¾åæ®æ¯å¦éå¤ï¼æ£éªæ¯å¦åæ ¼ï¼åæ®éå¤éè¦è¿åä¸åçç¶æ |
| | | { |
| | | var ds2 = oCn.RunProcReturn($"select top 1 * from QC_ProcessCheckBillMain where HMainSourceBillNo = '{HBarCode}' order by HDate desc", "QC_ProcessCheckBillMain"); |
| | | if (ds2.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds2.Tables[0].Rows[0]["HCheckerResult"].ToString() == "true") // æ£éªåæ ¼æç¤ºæ¯å¦éè¦æ°å¢ |
| | | { |
| | | objJsonResult.code = "2"; // è¿åCode为2è¡¨ç¤ºåæ®éå¤ï¼éè¦æç¤ºæ¯å¦éè¦æ°å¢åæ® |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "successï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«æåæ®æ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.Message = "æ«æåæ®æ¡ç 失败ï¼" + e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | #endregion |
| | | |
| | | #region æ·»åº·æ ¹æ®å°è½¦æ¡ç æ¾åºç¸åºç©æ |
| | | |
| | | |
| | | [Route("WEBSController/GetMaterIDByCarBarCode")] |
| | | [HttpGet] |
| | | public object GetMaterIDByCarBarCode(string CarBarCode) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("select * from GetMaterMesByCarBarCode where å°è½¦='" + CarBarCode.ToString() + "'" , "GetMaterMesByCarBarCode"); |
| | | ds = oCn.RunProcReturn("select * from GetMaterMesByCarBarCode where HQty>=0 and å°è½¦='" + CarBarCode.ToString() + "'", "GetMaterMesByCarBarCode"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region [åæ ·å] è·åæªä¸æ¨ææ£éªåçåæ ·åå表 |
| | | [Route("WEBSController/AwaitCheckSampleBillList")] |
| | | [HttpGet] |
| | | public Object AwaitCheckSampleBillList(string user) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn($@" |
| | | exec h_p_AwaitCheckSampleBillList @user={user} |
| | | ", "h_p_CheckBillBarCode_CheckItem"); |
| | | |
| | | //æ·»å åå |
| | | 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 = "successï¼"; |
| | | objJsonResult.data = ds.Tables; |
| | | 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 è£
箱追溯 |
| | | |
| | | #region [è£
箱追溯] æ«æSNæ¡ç |
| | | [Route("WEBSController/get_SNBarCode_PackUnionCarryUp")] |
| | | [HttpGet] |
| | | public object get_SNBarCode_PackUnionCarryUp(string sHBarCode, int sInterID, string HBillType, string sBillNo, string sHBarCode_Pack, string sMaker, int HStockOrgID) |
| | | { |
| | | if (oWebs.get_SNBarCode_PackUnionCarryUp(sHBarCode, sInterID, HBillType, sBillNo, sHBarCode_Pack, sMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region [è£
箱追溯] æ«æç®±æ¡ç |
| | | [Route("WEBSController/get_BarCode_PackUnionCarryUp")] |
| | | [HttpGet] |
| | | public object get_BarCode_PackUnionCarryUp(int sInterID, string HBillType, string sBillNo, string sHBarCode_Pack, string sMaker, int HStockOrgID) |
| | | { |
| | | var oBar = oWebs.get_BarCode_PackUnionCarryUp(sInterID, sBillNo, HBillType, sHBarCode_Pack, sMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); |
| | | if (oBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = oBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region [è£
箱追溯] è·å表ä½ç©æä¿¡æ¯ |
| | | [Route("WEBSController/GetBillEntry_TmpList_PackUnionCarryUp")] |
| | | [HttpGet] |
| | | public object GetBillEntry_TmpList_PackUnionCarryUp(int sInterID, string HBillType, string sBillNo, int HStockOrgID) |
| | | { |
| | | DataSet oDs = oWebs.GetBillEntry_TmpList_PackUnionCarryUp(sInterID, sBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo); |
| | | if (oDs == null || oDs.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = oDs.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region [è£
箱追溯] å é¤ |
| | | [Route("WEBSController/set_DelPackUnionBill_Temp_Pack")] |
| | | [HttpGet] |
| | | public object set_DelPackUnionBill_Temp_Pack(int HInterID) |
| | | { |
| | | if (oWebs.DeleteTemp_PackUnionBill(HInterID, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region [è£
箱追溯] ä¸ä¼ çå |
| | | [Route("WEBSController/set_SavePackUnionCarryUpBill")] |
| | | [HttpPost] |
| | | public object set_SavePackUnionCarryUpBill(string ModRightNamePackUnionCarryUp, int sInterID, |
| | | string HBillType, string sBillNo, string sHBarCode_Pack, |
| | | string sMaker, int HStockOrgID) |
| | | { |
| | | if (!oWebs.CheckModRight(ModRightNamePackUnionCarryUp, DBUtility.ClsPub.CurUserName, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | // é´æ |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "é´æå¤±è´¥ï¼è¯¥ç¨æ·æ æéä¸ä¼ åæ®! "; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | if(oWebs.set_SavePackUnionCarryUpBill_New(sInterID, HBillType, sBillNo, sHBarCode_Pack, sMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "çæç产è£
箱追溯åæåï¼åæ®å·ä¸ºï¼" + sBillNo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "çæå¤±è´¥ï¼åå :" + DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region [è£
箱追溯] ç¼è¾ç¼ååè¡¨åæ® |
| | | [Route("WEBSController/TempList_Modify_Pack")] |
| | | [HttpGet] |
| | | public object TempList_Modify_Pack(Int64 HInterID, string HBillNo, string HBillType) |
| | | { |
| | | if(oWebs.TempList_Modify_Pack(HInterID, HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | // æå (æ å·²ä¸ä¼ è®°å½) |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | |
| | | } |
| | | else |
| | | { |
| | | // 失败 |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region [è£
箱追溯] è·åç¼åå表 |
| | | [Route("WEBSController/GetSc_PackUnionBill_TempList_Pack")] |
| | | [HttpGet] |
| | | public object GetSc_PackUnionBill_TempList(string HBillType, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | DataSet oDs = oWebs.GetSc_PackUnionBill_TempList(HBillType, HMaker, HStockOrgID); |
| | | if(oDs == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //å¤±è´¥ï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //æåï¼ |
| | | objJsonResult.data = oDs.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region [è£
箱追溯] å é¤ç¼ååè¡¨åæ® |
| | | [Route("WEBSController/DeleteTemp_PackUnionBill_Pack")] |
| | | [HttpGet] |
| | | public object DeleteTemp_PackUnionBill_Pack(Int64 HInterID) |
| | | { |
| | | if(oWebs.DeleteTemp_PackUnionBill(HInterID, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | // å 餿å |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | |
| | | } |
| | | else |
| | | { |
| | | // å é¤å¤±è´¥ |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #endregion |
| | | } |
| | | } |