| | |
| | | ds = oCN.RunProcReturn($"exec h_p_JIT_ComplementGoodsBillList_Query '{com.MaterialNumber}','{com.MaterialName}','{com.MaterialModel}','{com.HGD}'," + |
| | | $"'{com.HWHName}','{com.HDeptName}','{com.Organization}','{com.user}','{com.HJLStatus}','{com.HBeginDate}','{com.HEndDate}'", "h_p_JIT_ComplementGoodsBillList_Query"); |
| | | |
| | | //bool a = AddSendGoodsBillSynChronizAtion("PLD00000114", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è°æ¨åçæå¤±è´¥"; |
| | | objJsonResult.Message = objJsonResult.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | oCN.BeginTran(); |
| | | |
| | | ds = oCN.RunProcReturn($"select a.HMainSourceEntryID,b.HMaterID from JIT_SendGoodsBillMain a with(nolock) inner join JIT_SendGoodsBillSub b with(nolock) on a.HInterID = b.HInterID where a.HMainSourceInterID={SourceInterID} and a.HBillStatus=1", "JIT_SendGoodsBillMain"); |
| | | |
| | | long InterID = 0; |
| | | string HBillNo = ""; |
| | | for (int i = 0; i < listCa.Count; i++) |
| | | { |
| | | // å代表é
éåæ²¡ææ°æ® éè¦æ·»å æ°æ® |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | |
| | | if (i == 0) |
| | | { |
| | | InterID = DBUtility.ClsPub.CreateBillID_Prod("460201", ref DBUtility.ClsPub.sExeReturnInfo); |
| | |
| | | ",HMaterID,HQty,HWHID,HSPID,HISCheck,HCheckSubMan,HCheckSubDate,HStockOutOrgID,HStockInOrgID,HSCWHID)" + |
| | | $"values({InterID},'{HBillNo}',{i + 1}, {listCa[i].HMaterID},{listCa[i].æ¬æ¬¡æ£ææ°é}," + |
| | | $" {listCa[i].HWHID},{listCa[i].HSPID},0,'{user}', GETDATE(),{listCa[i].HStockOutOrgID},{listCa[i].HStockInOrgID},{listCa[i].HSCWHID})"); |
| | | } |
| | | else |
| | | { |
| | | //ä¿®æ¹é
éåçé
éæ°é |
| | | oCN.RunProc($"update b set b.HQty=b.HQty+{listCa[i].æ¬æ¬¡æ£ææ°é} from JIT_SendGoodsBillMain a with(nolock) inner join JIT_SendGoodsBillSub b with(nolock) on a.HInterID = b.HInterID " + |
| | | $"where HMainSourceInterID ={SourceInterID} and b.HMaterID ={listCa[i].HMaterID} and a.HBillStatus =1 "); |
| | | } |
| | | |
| | | |
| | | DataSet dsTable = new DataSet(); |
| | | //æ¥è¯¢JIT_ComplementGoodsBillSub_LK |
| | |
| | | } |
| | | } |
| | | |
| | | //忥éè¶ç´æ¥è°æ¨å |
| | | objJsonResult = AddSendGoodsBillSynChronizAtion(HBillNo); |
| | | |
| | | oCN.Commit(); |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = null; |
| | | objJsonResult.Message = objJsonResult.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | public json AddSendGoodsBillSynChronizAtion(string HBillNo) |
| | | { |
| | | ds = oCN.RunProcReturn("exec JIT_SendGoodsBillSynChronizAtion '" + HBillNo + "'", "JIT_SendGoodsBillSynChronizAtion"); |
| | | if (ds.Tables[0].Rows.Count != 0) |
| | | { |
| | | |
| | | |
| | | foreach (DataRow dr in ds.Tables[0].Rows) |
| | | { |
| | |
| | | model.Add("FBillTypeID", new JObject() { ["Fnumber"] = dr["FBillTypeID"].ToString() }); //åæ®ç±»å |
| | | model.Add("FDate", dr["FDate"].ToString()); |
| | | model.Add("FBILLNO", dr["FBILLNO"].ToString()); |
| | | model.Add("FStockOrgId", new JObject() { ["Fnumber"] = dr["FStockOrgId"].ToString() }); |
| | | model.Add("FStockOrgId", new JObject() { ["Fnumber"] = ds.Tables[1].Rows[0]["FStockOrgId"].ToString() }); |
| | | model.Add("FOwnerTypeIdHead", dr["FOwnerTypeIdHead"].ToString()); |
| | | model.Add("FTransferBizType", dr["FTransferBizType"].ToString()); |
| | | model.Add("FTransferBizType", ds.Tables[1].Rows[0]["FTransferBizType"].ToString()); |
| | | model.Add("FOwnerTypeOutIdHead", dr["FOwnerTypeOutIdHead"].ToString()); |
| | | model.Add("FTransferDirect", dr["FTransferDirect"].ToString()); |
| | | model.Add("FStockOutOrgId", new JObject() { ["Fnumber"] = dr["FStockOutOrgId"].ToString() }); |
| | | model.Add("FStockOutOrgId", new JObject() { ["Fnumber"] = ds.Tables[1].Rows[0]["FStockOutOrgId"].ToString() }); |
| | | |
| | | JArray Fentity = new JArray(); |
| | | foreach (DataRow item in ds.Tables[1].Rows) |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è°æ¨åå·²ç»åå¨,æ æ³çæ!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = null; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç产æ¥è®¡å 齿 ç¼ºæ æ¤é |
| | | [Route("JIT_ICMOSortBill/JIT_ICMOSortBillCheck")] |
| | | [HttpGet] |
| | | public object JIT_ICMOSortBillCheck(string HSourceID, string HICMOInterID, DateTime HDate, int HStatus,string user) |
| | | { |
| | | try |
| | | { |
| | | oCN.RunProc("exec h_p_Sc_SetICMOStatus_ReadyMater " + HSourceID.ToString() + "," + HICMOInterID.ToString() + ",'" + HDate.ToShortDateString() + "'," + HStatus.ToString() + ",'" + user + "'"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æ§è¡æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | " (HNumber,HName,HHelpCode,HShortNumber" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HParentID) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + |
| | | +HLevel + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',0)", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | +HLevel + ",1," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',0)", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | //oCN.RunProc("Update Gy_MouldType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCN.Commit(); |
| | |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID.ToString()+"," |
| | | + HLevel + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | + HLevel + ",1," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | //oCN.RunProc("Update Gy_MouldType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCN.Commit(); |
| | |
| | | " (HNumber,HName,HHelpCode,HShortNumber" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HParentID) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + |
| | | +HLevel + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',0)", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | +HLevel + ",1," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',0)", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | //oCN.RunProc("Update Gy_MouldType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCN.Commit(); |
| | |
| | | " (HNumber,HName,HHelpCode,HShortNumber" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + |
| | | +HLevel + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',getdate())", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | +HLevel + ",1," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',getdate())", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | //oCN.RunProc("Update Gy_MouldType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCN.Commit(); |