From d8de78b09da94b54f105bb4a74cf4701128e7bf8 Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期一, 22 四月 2024 17:26:23 +0800 Subject: [PATCH] 1.工程项目的编辑页面,增加 工程信息 页签; 页签里 增加字段 项目类别HProjectClassID,状态,建设单位HBuildComp,地点HBuildAddress,任务编号HWorkNo,受理日期HReDate,图纸编号HPicNo,任务下达HWorkTask,项目内容HProjectNote ; 2.仓储流程的测试并完善功能; 分步式调出单-》分布式调入单 直接调拨单 (注意: 源单类型的下拉框 需要 根据数据库 表动态加载, 关联数量 要准确 , 审核 且 未关闭 未行关闭的行 才能下推 ,关联数量超额后,要 反写 关闭 源单 ) --- WebAPI/Controllers/仓存管理/领料发货/Kf_StepFoldOutBillController.cs | 82 ++++++++++++++++++-- DAL/仓库管理/ClsKf_MoveStockBill.cs | 4 + WebAPI/Controllers/项目管理/工程项目/PM_ProjectBillController.cs | 39 ++++++++- WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 13 ++- WebAPI/Controllers/仓存管理/验收入库/Kf_StepFoldinBillController.cs | 90 ++++++++++++++++++++-- 5 files changed, 203 insertions(+), 25 deletions(-) diff --git "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBill.cs" "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBill.cs" index 7f03b2f..026cf4f 100644 --- "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBill.cs" +++ "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBill.cs" @@ -140,6 +140,8 @@ } //============================ + //鐩存帴璋冩嫧鍗� 淇敼 鍥炲~ 璋冩嫧鐢宠鍗� 鍏宠仈鏁伴噺 + oCn.RunProc("exec h_p_Kf_UpDateRelation_MoveStockRequestToPOStockIn_Add " + omodel.HInterID.ToString()); sReturn = "淇敼鍗曟嵁鎴愬姛锛�"; oCn.Commit(); @@ -254,6 +256,8 @@ } //============================ + //鐩存帴璋冩嫧鍗� 淇敼 鍥炲~ 璋冩嫧鐢宠鍗� 鍏宠仈鏁伴噺 + oCn.RunProc("exec h_p_Kf_UpDateRelation_MoveStockRequestToPOStockIn_Add " + omodel.HInterID.ToString()); sReturn = "鏂板鍗曟嵁鎴愬姛锛�"; oCn.Commit(); diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs index ef3378b..205b36f 100644 --- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs +++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs @@ -1013,8 +1013,8 @@ oItemSub.HCloseType = false; //鍏抽棴绫诲瀷 - oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮� - oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮� + //oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮� + //oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮� oBill.DetailColl.Add(oItemSub); @@ -1539,8 +1539,7 @@ } #endregion - - #region 璋冩嫧鍗曞垪琛� + #region 鐩存帴璋冩嫧鍗曞垪琛� /// <summary> /// 璋冩嫧鍗曞垪琛� /// </summary> @@ -1589,7 +1588,7 @@ } #endregion - #region 璋冩嫧鍗� 鍒犻櫎 + #region 鐩存帴璋冩嫧鍗� 鍒犻櫎 [Route("Kf_MoveStockBill/DelteteGetMoveStockBill")] [HttpGet] public object DelteteGetMoveStockBill(string HInterID, string user) @@ -1632,6 +1631,10 @@ //================================================================================== oCN.BeginTran(); + + //鍒嗗竷寮忚皟鍏ュ崟鏂板鍥炲~鍒嗗竷寮忚皟鍑哄崟鍏宠仈鏁伴噺 + oCN.RunProc("exec h_p_Kf_UpDateRelation_MoveStockRequestToPOStockIn_Del " + HInterID); + oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID); oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID); diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_StepFoldOutBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_StepFoldOutBillController.cs" index e71f4bc..c9bffe1 100644 --- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_StepFoldOutBillController.cs" +++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_StepFoldOutBillController.cs" @@ -251,7 +251,7 @@ ,HDeleteMan,HCloseMan ,HRemark,HExplanation,HInnerBillNo,HCurID) values(" + HInterID + ",'" + HBillNo + "','" + HDate + "','" + 1250 + "','" + - HBillSubType + "'," + HBillStatus + "," + DateTime.Now.Year + "," + DateTime.Now.Month + "," + HSupID + + 1250 + "'," + HBillStatus + "," + DateTime.Now.Year + "," + DateTime.Now.Month + "," + HSupID + "," + HWHID + "," + HSCWHID + "," + HEmpID + "," + HManagerID + "," + HSecManagerID + "," + HKeeperID + "," + HDeptID + ",'" + HMaker + "','" + HMakeDate + "','" + HChecker + "','" + HUpDater + "','" + HDeleteMan + "','" + HCloseMan + "','" + HRemark + "','" + HExplanation + "','" + HInnerBillNo + "'," + HCurID + "" + ")"); @@ -259,7 +259,9 @@ else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) { //淇敼 String sql="update Kf_ICStockBillMain set " + - "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" + " where HInterID=" + "HInterID"; + "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" + + ",HSupID=" + HSupID + ",HWHID=" + HWHID + ",HSCWHID=" + HSCWHID + ", HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HSecManagerID = " + HSecManagerID + + ",HKeeperID=" + HKeeperID + ",HDeptID=" + HDeptID + " where HInterID=" + HInterID; oCn.RunProc(sql); //鍒犻櫎瀛愯〃 @@ -719,25 +721,89 @@ //Type 1 浣滃簾 2 鍙嶄綔搴� if (Type == 1) { - if (!BillOld.Cancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo)) + DataSet ds; + string sql = "select * from Kf_ICStockBillMain where HinterID = " + HInterID; + ds = oCn.RunProcReturn(sql, "Kf_ICStockBillMain"); + if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒"; objJsonResult.data = null; return objJsonResult; } + if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜浣滃簾!"; + objJsonResult.data = null; + return objJsonResult; + } + if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶉渶瑕佸啀浣滃簾!"; + objJsonResult.data = null; + return objJsonResult; + } + //浣滃簾鍗曟嵁 + if (!BillOld.Cancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + } else { - if (!BillOld.AbandonCancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo)) + DataSet ds; + string sql = "select * from Kf_ICStockBillMain where HinterID = " + HInterID; + ds = oCn.RunProcReturn(sql, "Kf_ICStockBillMain"); + if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鍙嶄綔搴熷け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒"; objJsonResult.data = null; return objJsonResult; } + if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜浣滃簾!"; + objJsonResult.data = null; + return objJsonResult; + } + if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶉渶瑕佸啀浣滃簾!"; + objJsonResult.data = null; + return objJsonResult; + } + //浣滃簾鍗曟嵁 + if (!BillOld.AbandonCancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍙嶄綔搴熷け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + } oCn.Commit();//鎻愪氦浜嬪姟 diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_StepFoldinBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_StepFoldinBillController.cs" index e8c9713..2b72194 100644 --- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_StepFoldinBillController.cs" +++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_StepFoldinBillController.cs" @@ -255,7 +255,7 @@ ,HDeleteMan,HCloseMan ,HRemark,HExplanation,HInnerBillNo,HCurID) values(" + HInterID + ",'" + HBillNo + "','" + HDate + "','" + 1251 + "','" + - HBillSubType + "'," + HBillStatus + "," + DateTime.Now.Year + "," + DateTime.Now.Month + "," + HSupID + + 1251 + "'," + HBillStatus + "," + DateTime.Now.Year + "," + DateTime.Now.Month + "," + HSupID + "," + HWHID + "," + HSCWHID + "," + HEmpID + "," + HManagerID + "," + HSecManagerID + "," + HKeeperID + "," + HDeptID + ",'" + HMaker + "','" + HMakeDate + "','" + HChecker + "','" + HUpDater + "','" + HDeleteMan + "','" + HCloseMan + "','" + HRemark + "','" + HExplanation + "','" + HInnerBillNo + "'," + HCurID + "" + ")"); @@ -263,7 +263,9 @@ else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) { //淇敼 String sql = "update Kf_ICStockBillMain set " + - "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" + " where HInterID=" + "HInterID"; + "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" + + ",HSupID=" + HSupID + ",HWHID=" + HWHID + ",HSCWHID=" + HSCWHID + ", HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HSecManagerID = " + HSecManagerID + + ",HKeeperID=" + HKeeperID + ",HDeptID=" + HDeptID + " where HInterID=" + HInterID; oCN.RunProc(sql); //鍒犻櫎瀛愯〃 @@ -271,6 +273,9 @@ } //淇濆瓨瀛愯〃 objJsonResult = AddBillSub(msg3, HInterID, OperationType); + + //鍒嗗竷寮忚皟鍏ュ崟鏂板鍥炲~鍒嗗竷寮忚皟鍑哄崟鍏宠仈鏁伴噺 + oCN.RunProc("exec h_p_Kf_UpDateRelation_ICStockToPOStockIn_Add " + HInterID); if (objJsonResult.code == "0") { @@ -374,8 +379,13 @@ try { oCN.BeginTran(); + + //鍒嗗竷寮忚皟鍏ュ崟鏂板鍥炲~鍒嗗竷寮忚皟鍑哄崟鍏宠仈鏁伴噺 + oCN.RunProc("exec h_p_Kf_UpDateRelation_ICStockToPOStockIn_Del " + HInterID); + oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID); oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID); + oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; @@ -724,25 +734,89 @@ //Type 1 浣滃簾 2 鍙嶄綔搴� if (Type == 1) { - if (!BillOld.Cancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo)) + DataSet ds; + string sql = "select * from Kf_ICStockBillMain where HinterID = " + HInterID; + ds = oCN.RunProcReturn(sql, "Kf_ICStockBillMain"); + if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒"; objJsonResult.data = null; return objJsonResult; } + if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜浣滃簾!"; + objJsonResult.data = null; + return objJsonResult; + } + if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶉渶瑕佸啀浣滃簾!"; + objJsonResult.data = null; + return objJsonResult; + } + //浣滃簾鍗曟嵁 + if (!BillOld.Cancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + } else { - if (!BillOld.AbandonCancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo)) + DataSet ds; + string sql = "select * from Kf_ICStockBillMain where HinterID = " + HInterID; + ds = oCN.RunProcReturn(sql, "Kf_ICStockBillMain"); + if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鍙嶄綔搴熷け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒"; objJsonResult.data = null; return objJsonResult; } + if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜浣滃簾!"; + objJsonResult.data = null; + return objJsonResult; + } + if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶉渶瑕佸啀浣滃簾!"; + objJsonResult.data = null; + return objJsonResult; + } + //浣滃簾鍗曟嵁 + if (!BillOld.AbandonCancelltion(int.Parse(HInterID), ref ClsPub.sExeReturnInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍙嶄綔搴熷け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + } oCN.Commit();//鎻愪氦浜嬪姟 diff --git "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs" "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs" index bceb379..82f7912 100644 --- "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs" +++ "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs" @@ -81,6 +81,14 @@ public int HConWorkDays; public int HDepDays; public double HLastMoney; + public int HProjectClassID; + public string HBuildComp; + public string HBuildAddress; + public string HWorkNo; + public string HReDate; + public string HPicNo; + public string HWorkTask; + public string HProjectNote; } #endregion @@ -225,7 +233,14 @@ int HMaterID = mainList[0].HMaterID; string HUpdater = mainList[0].HUpdater; string HUpdaterDate = mainList[0].HUpdaterDate; - + int HProjectClassID = mainList[0].HProjectClassID; + string HBuildComp = mainList[0].HBuildComp; + string HBuildAddress = mainList[0].HBuildAddress; + string HWorkNo = mainList[0].HWorkNo; + string HReDate = mainList[0].HReDate; + string HPicNo = mainList[0].HPicNo; + string HWorkTask = mainList[0].HWorkTask; + string HProjectNote = mainList[0].HProjectNote; if (OperationType == 2) { ds = oCN.RunProcReturn("select * from PM_ProjectBillMain where HBillNo ='" + HBillNo + "'", "PM_ProjectBillMain"); @@ -245,7 +260,7 @@ { string sql = "insert into PM_ProjectBillMain" + "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate,HBillNo,HBillStatus,HRemark,HMaker,HMakeDate,HProNumber,HProName,HCusID,HBeginDate,HEndDate,HSumMoney," + - "HProMoney,HWorkMoney,HOtherMoney,HProType,HPMEmpID,HWorkEmpID,HDepEmpID,HConWorkDays,HDepDays,HLastMoney,HPayCusID,HOrgID,HMaterID) " + + "HProMoney,HWorkMoney,HOtherMoney,HProType,HPMEmpID,HWorkEmpID,HDepEmpID,HConWorkDays,HDepDays,HLastMoney,HPayCusID,HOrgID,HMaterID,HProjectClassID,HBuildComp,HBuildAddress,HWorkNo,HReDate,HPicNo,HWorkTask,HProjectNote) " + "values(" + "" + HYear + "," + HPeriod + @@ -277,7 +292,15 @@ "," + HPayCusID + "," + HOrgID + "," + HMaterID + - ")"; + "," + HProjectClassID + + ",'" + HBuildComp + + "','" + HBuildAddress + + "','" + HWorkNo + + "','" + HReDate + + "','" + HPicNo + + "','" + HWorkTask + + "','" + HProjectNote + + "')"; //涓昏〃 oCN.RunProc(sql); @@ -316,7 +339,15 @@ ",HPayCusID = " + HPayCusID + ",HOrgID = " + HOrgID + ",HMaterID = " + HMaterID + - " where HInterID = " + HInterID; + ",HProjectClassID = " + HProjectClassID + + ",HBuildComp = '" + HBuildComp + + "',HBuildAddress = '" + HBuildAddress + + "',HWorkNo = '" + HWorkNo + + "',HReDate = '" + HReDate + + "',HPicNo = '" + HPicNo + + "',HWorkTask = '" + HWorkTask + + "',HProjectNote ='" + HProjectNote + + "' where HInterID = " + HInterID; oCN.RunProc(sql); -- Gitblit v1.9.1