工艺路线保存时 图号版本,总装图号,材质,成品编号,版本 改为 必录项目
jit 完善
产量汇报 删除反写
瑞琪生产入库包装标识
| | |
| | | |
| | | public json AddBillMain(string msg1) |
| | | { |
| | | string sErrMsg = ""; |
| | | oSystemParameter.ShowBill(ref sErrMsg); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | |
| | | int IsProNo = mainList[0].IsProNo;//æ¯å¦è½¬å·¥åº |
| | | HName_LongShan = mainList[0].HName;//å·¥èºè·¯çº¿åç§° |
| | | |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "") |
| | | { |
| | | if (HPicNumVer == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å¾å·çæ¬ä¸è½ä¸ºç©º!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HPicNumAssemble == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ»è£
å¾å·ä¸è½ä¸ºç©º!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HMaterTexture == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æè´¨ä¸è½ä¸ºç©º!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HProductNum == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æåç¼å·ä¸è½ä¸ºç©º!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HVerNum == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "çæ¬ä¸è½ä¸ºç©º!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (OperationType == 2) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList where åæ®å·='" + HBillNo + "'", "h_v_Gy_RoutingBillList"); |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | string sErrMsg = ""; |
| | | if (oSystemParameter.ShowBill(ref sErrMsg)) |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "çä¸ç¥º") |
| | | { |
| | | if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y" && OperationType == 1) |
| | |
| | | //è®¾ç½®è½¬å·¥åº |
| | | oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //æ¯å¦å¾éé»è®¤å·¥èºè·¯çº¿ |
| | |
| | | objJsonResult = AddBillSub(HInterID == 0 ? list[i]["hmainid"].ToString() : HInterID.ToString() |
| | | , HBillNo == "" ? list[i]["åæ®å·"].ToString() : HBillNo |
| | | , DateTime.Parse(DateTime.Now.AddDays(j).ToString("yyyy-MM-dd").ToString()) |
| | | , int.Parse(list[i][DateTime.Now.AddDays(j).ToString("yyyy-MM-dd")].ToString())); |
| | | , int.Parse(list[i][DateTime.Now.AddDays(j).ToString("yyyy-MM-dd")].ToString()) |
| | | , list[i]); |
| | | |
| | | if (objJsonResult.count == 1) |
| | | { |
| | |
| | | //ä¸»è¡¨ææ°æ® åè¡¨æ æ°æ® |
| | | if (j == 30 && SumCount == 0 && HInterID != 0 && HBillNo != "") |
| | | { |
| | | objJsonResult = AddBillSub(HInterID.ToString(), HBillNo, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd").ToString()), 0); |
| | | objJsonResult = AddBillSub(HInterID.ToString(), HBillNo, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd").ToString()), 0, list[i]); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | public json AddBillSub(string HInterID, string HBillNo, DateTime date, int HQTY) |
| | | public json AddBillSub(string HInterID, string HBillNo, DateTime date, int HQTY, Dictionary<string, string> dic) |
| | | { |
| | | //è·åè¡¨æ ¼æ°æ® |
| | | ds = oCN.RunProcReturn($"select * from h_v_JIT_Sc_WorkBillSortBillList where åæ®å·='{HBillNo}'", "h_v_JIT_Sc_WorkBillSortBillList"); |
| | |
| | | { |
| | | if (DateTime.Parse(ds.Tables[0].Rows[i]["æ¥è®¡åçäº§æ¥æ"].ToString()) == date) |
| | | { |
| | | oCN.RunProc($"update Sc_WorkBillSortBillSub set HMasterDate='{date}',HQty={HQTY}" + |
| | | oCN.RunProc($"update Sc_WorkBillSortBillSub set HMasterDate='{date}',HQty={HQTY},HUseTimes={(dic["å°æ¶äº§è½"]==""?0: HQTY / float.Parse(dic["å°æ¶äº§è½"].ToString()))}" + |
| | | $" where HInterID={HInterID} and HEntryID={ds.Tables[0].Rows[i]["hsubid"].ToString()}"); |
| | | count += 1; |
| | | } |
| | |
| | | { |
| | | //æå
¥å表 |
| | | oCN.RunProc("insert into Sc_WorkBillSortBillSub(HInterID,HSEQ," + |
| | | "HMasterDate,HQty)" + |
| | | "HMasterDate,HQty,HUseTimes)" + |
| | | $"values({HInterID}, {(ds.Tables[0].Rows.Count + 1)}," + |
| | | $" '{date}', {HQTY})"); |
| | | $" '{date}', {HQTY},{(dic["å°æ¶äº§è½"] == "0" ? 0 : HQTY / float.Parse(dic["å°æ¶äº§è½"].ToString()))})"); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | |
| | | { |
| | | try |
| | | { |
| | | string sErr = ""; |
| | | oSystemParameter.ShowBill(ref sErr); |
| | | |
| | | |
| | | //è·åçäº§æ±æ¥åæå¤§InterIDååæ®å· |
| | | Int64 HInterID = DBUtility.ClsPub.CreateBillID("3711", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | string HBillNo = DBUtility.ClsPub.CreateBillCode("3711", ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | |
| | | FentityModel.Add("FCostRate", dr1["FCostRate"].ToString());// ææ¬æé |
| | | FentityModel.Add("FISBACKFLUSH", dr1["FISBACKFLUSH"].ToString() == "1" ? true : false);// åå²é¢æ |
| | | FentityModel.Add("FMOMAINENTRYID", dr1["FMOENTRYID"].ToString());// |
| | | //FentityModel.Add("F_bsv_Base1", new JObject() { ["Fnumber"] = dr1["FPREBDONENUMBER"].ToString() }); //å
è£
æ è¯ |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "çä¸ç¥º") |
| | | { |
| | | FentityModel.Add("F_bsv_Base1", new JObject() { ["Fnumber"] = dr1["FPREBDONENUMBER"].ToString() });//å
è£
æ è¯ |
| | | } |
| | | FentityModel.Add("FLot", new JObject() { ["FNumber"] = dr1["FBATCHNO"].ToString() }); //æ¹å· |
| | | FentityModel.Add("F_bsv_Text", dr1["å·¥åºæµè½¬å¡å·"].ToString()); //æµè½¬å¡å· |
| | | JArray Fentity2 = new JArray(); |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | ds = oCN.RunProcReturn("select * from Sc_ICMOBillWorkQtyStatus_Tmp where HInterID=" + HInterID + " and HSourceInterID=" + HICMOInterID + " and HSourceEntryID=" + HICMOEntryID, "Sc_ICMOBillWorkQtyStatus_Tmp"); |
| | | if (ds.Tables[0].Rows.Count == 0) { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥æ æ°æ®!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | //å é¤äº§éæ±æ¥è¡¨ |
| | | string sql = string.Format(@"delete Sc_ICMOBillWorkQtyStatus_Tmp where HInterID='" + HInterID + "'"); |
| | | oCN.RunProc(sql); |
| | | double sumqty = double.Parse(ds.Tables[0].Rows[0]["HQty"].ToString()) + double.Parse(ds.Tables[0].Rows[0]["HBadQty"].ToString()) + double.Parse(ds.Tables[0].Rows[0]["HWasterQty"].ToString()); //æ±æ¥æ°é+ä¸è¯+æ¥åº |
| | | //ååçäº§ç¶æä¸´æ¶è¡¨Sc_ICMOBillStatus_Tmpæåæ±æ¥æ°é HSplitRelationQty |
| | | oCN.RunProc("update Sc_ICMOBillStatus_Tmp set HSplitRelationQty=HSplitRelationQty-" + sumqty + " where HICMOBillNo='" + ds.Tables[0].Rows[0]["HICMOBillNo"].ToString() + "' and HSourceID='" + ds.Tables[0].Rows[0]["HSourceID"].ToString() + "' and HICMOInterID='" + ds.Tables[0].Rows[0]["HICMOInterID"].ToString() + "' and HICMOEntryID='" + ds.Tables[0].Rows[0]["HICMOEntryID"].ToString() + "' and HInterID=" + ds.Tables[0].Rows[0]["HSourceInterID"].ToString()); |
| | | |
| | | |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |