| | |
| | | var HEmpID = list[i]["HEmpID"].ToString(); |
| | | var HWorkQty = list[i]["å°æ¶äº§è½"].ToString(); |
| | | var HSourceName = list[i]["çäº§èµæº"].ToString(); |
| | | var HWorkQty_ProdLine = list[i]["产线æ»äº§è½"].ToString(); |
| | | //var HWorkQty_ProdLine = list[i]["产线æ»äº§è½"].ToString(); |
| | | |
| | | LogService.CustomWriteLog("2.05:" + i, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | |
| | |
| | | " HOrderNeedQty, HSplitQty, HDayPlanSumQty,HPlanBeginDate," + |
| | | "HSeOrderBillNo,HICMOBillType,HSourceStockInQty,HLeftPlanQty,HOrderLev,HPreparatDate," + |
| | | "HMainSourceInterID,HMainSourceEntryID,HICMOInterID_Sec,HICMOEntryID_Sec,HPlanQty" + |
| | | ",HICMOInterID,HICMOEntryID,HPlanEndDate,HEmpID,HWorkQty,HSourceName,HWorkQty_ProdLine)values" + |
| | | ",HICMOInterID,HICMOEntryID,HPlanEndDate,HEmpID,HWorkQty,HSourceName)values" + |
| | | $"({HInterID},'{HBillNo}',{DateTime.Now.Year},{DateTime.Now.Month},'{BillType}'," + |
| | | $"'{BillType}',GETDATE(),1,'{user}',getdate(),'{HICMOBillNo}','{HOrderType}'," + |
| | | $"{(HICMOEntrySEQ == "" ? 0.ToString() : HICMOEntrySEQ)},{(HWorkShopID == "" ? 0.ToString() : HWorkShopID)},{(HSourceID == "" ? 0.ToString() : HSourceID)}, {(HYX == "" ? 0.ToString() : HYX)}, {(HProdORGID == "" ? 0.ToString() : HProdORGID)}," + |
| | |
| | | $" 0, {(HSplitQty == "" ? 0.ToString() : HSplitQty)}, {(HDayPlanSumQty == "" ? 0.ToString() : HDayPlanSumQty)},'{HPlanBeginDate}'," + |
| | | $"'{HSeOrderBillNo}','{HICMOBillType}',{(HSourceStockInQty == "" ? 0.ToString() : HSourceStockInQty)},{(HLeftPlanQty == "" ? 0.ToString() : HLeftPlanQty)},'{HOrderLev}',getdate()," + |
| | | $"{HMainSourceInterID},{HMainSourceEntryID},{HMainSourceInterID},{HMainSourceEntryID},{HPlanQty}," + |
| | | $"{HMainSourceInterID},{HMainSourceEntryID},'{HPlanEndDate}','{HEmpID}','{HWorkQty}','{HSourceName}','{HWorkQty_ProdLine}')"; |
| | | $"{HMainSourceInterID},{HMainSourceEntryID},'{HPlanEndDate}','{HEmpID}','{HWorkQty}','{HSourceName}')"; |
| | | |
| | | //LogService.Write("sql:" + sql); |
| | | //主表 |
| | |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | |
| | | /// <summary> |
| | | /// è¿åçäº§èµæºçäº§ç¶æå·¥åå表 |
| | |
| | | //} |
| | | string sql1 = string.Format(@"select * from h_v_Sc_ICMOBillStatus_Tmp_SOP where 1 = 1 " + sWhere); |
| | | |
| | | ds = oCN.RunProcReturn(sql1, "h_v_Sc_ICMOBillStatus_Tmp_SOP"); |
| | | //è·åæ¾ç¤ºç³»ç»åæ° |
| | | string sReturn = ""; |
| | | oSystemParameter.ShowBill(ref sReturn); |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "ä¹è±") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Sc_ICMOBillStatus_Tmp_SOP where HMaterID = " + HMaterID, "h_v_Sc_ICMOBillStatus_Tmp_SOP"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn(sql1, "h_v_Sc_ICMOBillStatus_Tmp_SOP"); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å®¢æ·æ ç¾æ¡£æ¡éæ°çæ |
| | | [Route("Sc_CustomerTagBarCode/ReSave")] |
| | | [HttpGet] |
| | | public object BarCodeReSave(string HICMOInterID, string HICMOEntryID, string HSerialNum) |
| | | { |
| | | try |
| | | { |
| | | |
| | | if (HICMOInterID == null || HICMOInterID.Equals("") || HICMOEntryID == null || HICMOEntryID.Equals("") || HSerialNum == null || HSerialNum.Equals("")) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "订åä¿¡æ¯ä¸å
¨ï¼HICMOInterIDï¼" + HICMOInterID + ",HICMOEntryID:" + HICMOEntryID + ",HSerialNum:" + HSerialNum; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_CustomerTagBarCode_AutoReSave " + HICMOInterID + "," + HICMOEntryID + "," + HSerialNum, "h_p_Sc_CustomerTagBarCode_AutoReSave"); |
| | | } |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |