| | |
| | | } |
| | | |
| | | CallGoodsBill ca = JsonConvert.DeserializeObject<CallGoodsBill>(sWhere); |
| | | oCN.RunProc($"exec h_p_JIT_BackGoodsBillList_Query '{ca.HBillNo}','{ca.MaterialNumber}','{ca.MaterialName}','{ca.MaterialModel}'," + |
| | | $"'{ca.ProcMul}','{ca.HDeptName}',{ca.HOrgID},'{ca.Hmaker}','{ca.HPZStatus}','{ca.HCKStatus}','{ca.HBeginDate}','{ca.HEndDate.AddDays(1).AddSeconds(-1)}'"); |
| | | |
| | | if (ca.HPZStatus == "å
¨é¨" && ca.HCKStatus == "å
¨é¨") |
| | | { |
| | | ds = oCN.RunProcReturn("select * from ##h_p_JIT_BackGoodsBillList_Query1 where 1=1 " + ca.Arbitrarily + "", "##h_p_JIT_BackGoodsBillList_Query1"); |
| | | } |
| | | else if (ca.HPZStatus != "å
¨é¨" && ca.HCKStatus == "å
¨é¨") |
| | | { |
| | | ds = oCN.RunProcReturn("select * from ##h_p_JIT_BackGoodsBillList_Query2 where 1=1 " + ca.Arbitrarily + "", "##h_p_JIT_BackGoodsBillList_Query2"); |
| | | } |
| | | else if (ca.HPZStatus == "å
¨é¨" && ca.HCKStatus != "å
¨é¨") |
| | | { |
| | | ds = oCN.RunProcReturn("select * from ##h_p_JIT_BackGoodsBillList_Query3 where 1=1 " + ca.Arbitrarily + "", "##h_p_JIT_BackGoodsBillList_Query3"); |
| | | } |
| | | else if (ca.HPZStatus != "å
¨é¨" && ca.HCKStatus != "å
¨é¨") |
| | | { |
| | | ds = oCN.RunProcReturn("select * from ##h_p_JIT_BackGoodsBillList_Query4 where 1=1 " + ca.Arbitrarily + "", "##h_p_JIT_BackGoodsBillList_Query4"); |
| | | } |
| | | ds = oCN.RunProcReturn($"exec h_p_JIT_BackGoodsBillList_Query '{ca.HBillNo}','{ca.MaterialNumber}','{ca.MaterialName}','{ca.MaterialModel}'," + |
| | | $"'{ca.ProcMul}','{ca.HDeptName}',{ca.HOrgID},'{ca.Hmaker}','{ca.HPZStatus}','{ca.HCKStatus}','{ca.HBeginDate}','{ca.HEndDate.AddDays(1).AddSeconds(-1)}'", "h_p_JIT_BackGoodsBillList_Query"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | public string MaterialName { get; set; } |
| | | public string MaterialModel { get; set; } |
| | | public string Arbitrarily { get; set; } |
| | | public string HBillStatus { get; set; } |
| | | public int? HOrgID; |
| | | } |
| | | |
| | |
| | | //ååºååä¼ éçå¼ |
| | | JIT_SendGoodsBill com = JsonConvert.DeserializeObject<JIT_SendGoodsBill>(sWhere.ToString()); |
| | | |
| | | oCN.RunProc($"exec h_p_JIT_DeptCheckGoodsBillList_Query '{com.HBeginDate}','{com.HEndDate.AddDays(1).AddSeconds(-1)}','{com.HBillNo}','{com.HDeptName}'," + |
| | | $"'{com.MaterialCode}','{com.MaterialName}','{com.MaterialModel}','{com.HOrgID}'"); |
| | | |
| | | ds = oCN.RunProcReturn("select * from ##h_p_JIT_DeptCheckGoodsBillList_Query where 1=1 " + com.Arbitrarily + "", "##h_p_JIT_DeptCheckGoodsBillList_Query"); |
| | | ds = oCN.RunProcReturn($"exec h_p_JIT_DeptCheckGoodsBillList_Query '{com.HBeginDate}','{com.HEndDate.AddDays(1).AddSeconds(-1)}','{com.HBillNo}','{com.HDeptName}'," + |
| | | $"'{com.MaterialCode}','{com.MaterialName}','{com.MaterialModel}','{com.HOrgID}','{com.HBillStatus}'", "h_p_JIT_DeptCheckGoodsBillList_Query"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region è½¦é´æ¶æå表 æ¤éç¡®è®¤æ¶æ |
| | | [Route("Cj_SendGoodsBill/DeptCheckGoodsBillList_revoke")] |
| | | [HttpGet] |
| | | public object DeptCheckGoodsBillList_revoke(string HInterID, string User) |
| | | { |
| | | try |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("JIT_SendGoodsBill_Check", 1, false, User)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å®¡æ ¸æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.RunProc($"update JIT_SendGoodsBillMain set HChecker='' ,HCheckDate=null,HBillStatus=1 where HInterID='{HInterID}'"); |
| | | |
| | | 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 |
| | | |
| | | #region è½¦é´æ¶æå表 å é¤ |
| | | [Route("Cj_SendGoodsBill/DeleteBill")] |
| | | [HttpGet] |
| | | public object DeleteBill(string HInterID,string HEntryID, string User) |
| | | { |
| | | try |
| | | { |
| | | //è·å车é´é
éåæ®æ°æ® |
| | | ds = oCN.RunProcReturn($"select * from JIT_SendGoodsBillMain a inner join JIT_SendGoodsBillSub b on a.HInterID = b.HInterID where a.HInterID={HInterID} and HEntryID={HEntryID} ", "JIT_SendGoodsBillMain"); |
| | | |
| | | //è·åæ£æé
éåçæ°æ® |
| | | ds = oCN.RunProcReturn($"select * from JIT_ComplementGoodsBillMain a inner join JIT_ComplementGoodsBillSub b on a.HInterID = b.HInterID where a.HInterID={(ds.Tables[0].Rows[0]["HMainSourceInterID"].ToString())} and b.HMaterID={(ds.Tables[0].Rows[0]["HMaterID"].ToString())} and b.HWHID={(ds.Tables[0].Rows[0]["HWHID"].ToString())} ", "JIT_ComplementGoodsBillMain"); |
| | | |
| | | //è·åæ£æé
éå_LK表 æ°æ® |
| | | ds = oCN.RunProcReturn($"select * from from JIT_ComplementGoodsBillSub_LK where HInterID={(ds.Tables[0].Rows[0]["HInterID"].ToString())} ", "JIT_SendGoodsBillMain"); |
| | | |
| | | //oCN.RunProc($"delete from JIT_SendGoodsBillMain where HInterID='{HInterID}'"); |
| | | //oCN.RunProc($"delete from JIT_SendGoodsBillSub where HInterID='{HInterID}' and HEntryID={HEntryID} "); |
| | | |
| | | 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 |
| | | } |
| | | } |
| | |
| | | //ååºååä¼ éçå¼ |
| | | CallGoodsBackRequest com = JsonConvert.DeserializeObject<CallGoodsBackRequest>(sWhere.ToString()); |
| | | |
| | | oCN.RunProc($"exec h_p_JIT_BackGoodsRequestBillList_Query '{com.HBeginDate}','{com.HEndDate.AddDays(1).AddSeconds(-1)}','{com.HBillNo}','{com.MaterialNumber}'," + |
| | | $"'{com.MaterialName}','{com.MaterialModel}','{com.HDeptName}','{com.ProcMul}','{com.Hmaker}','{com.HOrgID}'"); |
| | | |
| | | ds = oCN.RunProcReturn("select * from ##h_p_JIT_BackGoodsRequestBillList_Query where 1=1 " + com.Arbitrarily + "", "##h_p_JIT_BackGoodsRequestBillList_Query"); |
| | | ds = oCN.RunProcReturn($"exec h_p_JIT_BackGoodsRequestBillList_Query '{com.HBeginDate}','{com.HEndDate.AddDays(1).AddSeconds(-1)}','{com.HBillNo}','{com.MaterialNumber}'," + |
| | | $"'{com.MaterialName}','{com.MaterialModel}','{com.HDeptName}','{com.ProcMul}','{com.Hmaker}','{com.HOrgID}'", "h_p_JIT_BackGoodsRequestBillList_Query"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | //ååºååä¼ éçå¼ |
| | | ComplementGoodBill com = JsonConvert.DeserializeObject<ComplementGoodBill>(sWhere.ToString()); |
| | | |
| | | oCN.RunProc($"exec h_p_JIT_CallGoodsPlatForm_Query '{com.HSeOrderBillNo}','{com.DepartmentName}','{com.MaterialNumber}','{com.MaterialName}'," + |
| | | ds = oCN.RunProcReturn($"exec h_p_JIT_CallGoodsPlatForm_Query '{com.HSeOrderBillNo}','{com.DepartmentName}','{com.MaterialNumber}','{com.MaterialName}'," + |
| | | $"'{com.MaterialModel}','{com.HICMOBillNo}','{com.CPNumber}','{com.CPName}','{com.CPModel}'," + |
| | | $"{com.ps},{com.Organization},'{com.user}' "); |
| | | $"{com.ps},{com.Organization},'{com.user}' ", "h_p_JIT_CallGoodsPlatForm_Query"); |
| | | |
| | | ds = oCN.RunProcReturn("select * from ##h_p_JIT_CallGoodsPlatForm_Query where 1=1 " + com.Arbitrarily + "", "##h_p_JIT_CallGoodsPlatForm_Query"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (listCa[i].è°åºä»åºid == listCa[i].è°å
¥ä»åºid) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è°åºä»åºåè°å
¥ä»åºä¸è½ä¸æ ·!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //if (listCa[i].è°åºä»åºå¯ç¨åºåæ°é == 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | |
| | | //ååºååä¼ éçå¼ |
| | | ComplementGoods com = JsonConvert.DeserializeObject<ComplementGoods>(sWhere.ToString()); |
| | | |
| | | oCN.RunProc($"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}'"); |
| | | |
| | | if (com.HJLStatus == "æªæ£æ") |
| | | { |
| | | ds = oCN.RunProcReturn("select * from ##ComplementGoodsBillList_Query1 where 1=1 " + com.Arbitrarily + "", "##ComplementGoodsBillList_Query1"); |
| | | } |
| | | else if (com.HJLStatus == "å·²æ£æ") |
| | | { |
| | | ds = oCN.RunProcReturn("select * from ##ComplementGoodsBillList_Query2 where 1=1 " + com.Arbitrarily + "", "##ComplementGoodsBillList_Query2"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("select * from ##ComplementGoodsBillList_Query3 where 1=1 " + com.Arbitrarily + "", "##ComplementGoodsBillList_Query3"); |
| | | } |
| | | 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"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | |
| | | DataSet dsTable = new DataSet(); |
| | | //æ¥è¯¢JIT_ComplementGoodsBillSub_LK |
| | | dsTable = oCN.RunProcReturn($"select * from JIT_ComplementGoodsBillSub_LK where HMaterID={listCa[i].HMaterID} and HInterID={SourceInterID} order by HSourceInterID ", "JIT_ComplementGoodsBillSub_LK"); |
| | | dsTable = oCN.RunProcReturn($"select * from JIT_ComplementGoodsBillSub_LK where HMaterID={listCa[i].HMaterID} and HInterID={SourceInterID} and HCallQTY<>HSendQTY order by HSourceInterID ", "JIT_ComplementGoodsBillSub_LK"); |
| | | |
| | | var HqtyCount = double.Parse(listCa[i].æ¬æ¬¡æ£ææ°é.ToString()); |
| | | for (int j = 0; j < dsTable.Tables[0].Rows.Count; j++) |
| | | { |
| | | if (double.Parse(dsTable.Tables[0].Rows[j]["HCallQTY"].ToString()) != double.Parse(dsTable.Tables[0].Rows[j]["HSendQTY"].ToString())) |
| | | { |
| | | if (double.Parse(dsTable.Tables[0].Rows[j]["HSendQTY"].ToString()) + listCa[i].æ¬æ¬¡æ£ææ°é > double.Parse(dsTable.Tables[0].Rows[j]["HCallQTY"].ToString())) |
| | | { |
| | | var HCallQTY = double.Parse(dsTable.Tables[0].Rows[j]["HCallQTY"].ToString()) - double.Parse(dsTable.Tables[0].Rows[j]["HSendQTY"].ToString()); |
| | | //ä¿®æ¹è°æ¨æ°é è¶
åºé¨åç»äºä¸ä¸åæ°æ® |
| | | oCN.RunProc($"update JIT_ComplementGoodsBillSub_LK set HSendQTY=HSendQTY+{HCallQTY} where HMaterID={listCa[i].HMaterID} " + |
| | | $" and HSourceInterID={double.Parse(dsTable.Tables[0].Rows[j]["HSourceInterID"].ToString())} and HInterID={SourceInterID} "); |
| | | var HCallQTY = double.Parse(dsTable.Tables[0].Rows[j]["HCallQTY"].ToString()) - double.Parse(dsTable.Tables[0].Rows[j]["HSendQTY"].ToString()); |
| | | |
| | | oCN.RunProc($"update JIT_ComplementGoodsBillSub_LK set HSendQTY=HSendQTY+{(listCa[i].æ¬æ¬¡æ£ææ°é - HCallQTY)} where HMaterID={listCa[i].HMaterID} " + |
| | | $" and HSourceInterID={dsTable.Tables[0].Rows[j + 1]["HSourceInterID"].ToString()} and HInterID={SourceInterID} "); |
| | | break; |
| | | } |
| | | else |
| | | { |
| | | //ä¿®æ¹è°æ¨æ°é |
| | | oCN.RunProc($"update JIT_ComplementGoodsBillSub_LK set HSendQTY=HSendQTY+{listCa[i].æ¬æ¬¡æ£ææ°é} where HMaterID={listCa[i].HMaterID} " + |
| | | $" and HSourceInterID={dsTable.Tables[0].Rows[j]["HSourceInterID"].ToString()} and HInterID={SourceInterID} "); |
| | | break; |
| | | } |
| | | //ä¿®æ¹è°æ¨æ°é |
| | | oCN.RunProc($"update JIT_ComplementGoodsBillSub_LK set HSendQTY=HSendQTY+{(HCallQTY < HqtyCount ? HCallQTY : HqtyCount)} where HMaterID={listCa[i].HMaterID} " + |
| | | $" and HSourceInterID={double.Parse(dsTable.Tables[0].Rows[j]["HSourceInterID"].ToString())} and HInterID={SourceInterID} "); |
| | | |
| | | HqtyCount -= HCallQTY; |
| | | if (HqtyCount <= 0) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | //忥éè¶ç´æ¥è°æ¨å |
| | | objJsonResult = AddSendGoodsBillSynChronizAtion(HBillNo); |
| | | ////忥éè¶ç´æ¥è°æ¨å |
| | | //objJsonResult = AddSendGoodsBillSynChronizAtion(HBillNo); |
| | | |
| | | oCN.Commit(); |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message; |
| | | objJsonResult.Message = objJsonResult.Message; |
| | | return objJsonResult; |
| | | throw (e); |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = result; |
| | |
| | | { |
| | | if (num == 1) |
| | | { |
| | | ds = oCN.RunProcReturn($"select isnull(DATEDIFF(DAY,GETDATE(),CONVERT(varchar(10),max(HMasterDate),20)),0) DayNum from Sc_WorkBillSortBillSub where HInterID in ({sWhere}) and HMasterDate>=CONVERT(varchar(10),GETDATE(),20) and HLockedSub=1", "Sc_WorkBillSortBillSub"); |
| | | ds = oCN.RunProcReturn($"select isnull(DATEDIFF(DAY,GETDATE(),CONVERT(varchar(10),max(HMasterDate),20))+1,0) DayNum from Sc_WorkBillSortBillSub where HInterID in ({sWhere}) and HMasterDate>=CONVERT(varchar(10),GETDATE(),20) and HLockedSub=1", "Sc_WorkBillSortBillSub"); |
| | | } |
| | | else if (num == 2) |
| | | { |
| | |
| | | var HMainSourceEntryID = list[i]["æºååå
ç "].ToString(); |
| | | var HPlanQty = list[i]["è®¡åæ°é"].ToString(); |
| | | |
| | | if (HSourceID == "") |
| | | if (HSourceID == ""|| HSourceID == "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn($"select * from Sc_WorkBillSortBillMain where HMainSourceEntryID={HMainSourceEntryID}" + |
| | | ds = oCN.RunProcReturn($"select * from Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" + |
| | | $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", "Sc_WorkBillSortBillMain"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | |
| | | $" 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})"); |
| | | } |
| | | else |
| | | { |
| | | var HMainSourceInterID = list[i]["æºå主å
ç "].ToString(); |
| | | var HMainSourceEntryID = list[i]["æºååå
ç "].ToString(); |
| | | var HICMOBillNo = list[i]["ç产订åå·"].ToString(); |
| | | var HICMOEntrySEQ = list[i]["ç产订åæç»è¡å·"].ToString(); |
| | | var HSourceID = list[i]["HSourceID"].ToString(); |
| | | |
| | | if (HSourceID == "" || HSourceID == "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"第{i + 1}è¡çäº§èµæºä¸è½ä¸ºç©º!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn($"select * from Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" + |
| | | $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", "Sc_WorkBillSortBillMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"第{i + 1}è¡çäº§èµæºæéå¤,请修æ¹!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.RunProc($"update Sc_WorkBillSortBillMain set HSourceID={(HSourceID == "" ? 0.ToString() : HSourceID)} where HInterID={list[i]["hmainid"].ToString()} and HBillNo='{list[i]["åæ®å·"].ToString()}'"); |
| | | } |
| | | |
| | | oCN.RunProc($"update Sc_WorkBillSortBillMain set HDayPlanSumQty={list[i]["æ¥è®¡åæ°éæ»é"].ToString()} where HInterID={(HInterID==0?int.Parse(list[i]["hmainid"].ToString()):HInterID)} and HBillNo='{(HBillNo==""?list[i]["åæ®å·"].ToString(): HBillNo)}'"); |
| | |
| | | #region ç产æ¥è®¡åå¹³å° éå® |
| | | [Route("JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBillHLockedDay")] |
| | | [HttpGet] |
| | | public object JIT_DayPlanPlatFormBillHLockedDay(string sWhere, int HLockedDay) |
| | | public object JIT_DayPlanPlatFormBillHLockedDay(int HLockedDay,int HWorkShopID) |
| | | { |
| | | try |
| | | { |
| | | if (sWhere != null && sWhere != "") |
| | | { |
| | | oCN.RunProc("update Sc_WorkBillSortBillSub set HLockedSub=1" + |
| | | $" where HInterID in ({sWhere}) and HMasterDate between DATEADD(day, -1, getdate()) and DATEADD(day,{(HLockedDay - 1)},getdate()) "); |
| | | } |
| | | oCN.RunProc("update b set HLockedSub=0 from Sc_WorkBillSortBillMain a join Sc_WorkBillSortBillSub b on a.HInterID = b.HInterID " + |
| | | $" where a.HWorkShopID={HWorkShopID}"); |
| | | |
| | | oCN.RunProc("update b set HLockedSub=1 from Sc_WorkBillSortBillMain a join Sc_WorkBillSortBillSub b on a.HInterID = b.HInterID " + |
| | | $" where HMasterDate between DATEADD(day, -1, getdate()) " + |
| | | $"and DATEADD(day,{(HLockedDay - 1)},getdate()) and a.HWorkShopID={HWorkShopID}"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | |
| | | #region ç产æ¥è®¡åå¹³å° è§£é |
| | | [Route("JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBillHUnlockDay")] |
| | | [HttpGet] |
| | | public object JIT_DayPlanPlatFormBillHUnlockDay(string sWhere, int HLockedDay) |
| | | public object JIT_DayPlanPlatFormBillHUnlockDay(int HWorkShopID) |
| | | { |
| | | try |
| | | { |
| | | if (sWhere != null && sWhere != "") |
| | | { |
| | | oCN.RunProc("update Sc_WorkBillSortBillSub set HLockedSub=0" + |
| | | $" where HInterID in ({sWhere}) and HMasterDate between DATEADD(day, -1, getdate()) and DATEADD(day,{(HLockedDay - 1)},getdate()) "); |
| | | } |
| | | oCN.RunProc("update b set HLockedSub=0 from Sc_WorkBillSortBillMain a join Sc_WorkBillSortBillSub b on a.HInterID = b.HInterID " + |
| | | $" where a.HWorkShopID={HWorkShopID}"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | |
| | | { |
| | | try |
| | | { |
| | | oCN.RunProc("exec h_p_Sc_SetICMOStatus_ReadyMater " + HSourceID.ToString() + "," + HICMOInterID.ToString() + ",'" + HDate.ToShortDateString() + "'," + HStatus.ToString() + ",'" + user + "'"); |
| | | oCN.RunProc("exec h_p_Sc_SetICMOStatus_ReadyMater " + HSourceID.ToString() + "," + HICMOInterID.ToString() + ",'" + HDate.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'," + HStatus.ToString() + ",'" + user + "'"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |