From c62aab5f09d8393619c6a0819e1bffdc2aa29085 Mon Sep 17 00:00:00 2001 From: black-goat-me <226547893@qq.com> Date: 星期五, 19 五月 2023 09:29:08 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/生产管理/生产任务单/Sc_ICMOBillController.cs | 34 ++++++++++++++++++++++++++++------ 1 files changed, 28 insertions(+), 6 deletions(-) diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs" index 6fb9165..8fdcc66 100644 --- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs" +++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillController.cs" @@ -288,12 +288,12 @@ ,HYear,HPeriod,HRemark,HMaker,HMakeDate ,HSeOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HEmpID,HCusID ,HCenterID,HPlanQty,HDeptID,HMaterID,HUnitID,HBomID,HPlanBeginDate,HPlanEndDate,HBillStatus - ,HOWNERID) + ,HOWNERID,HOWNERTYPEID) values('3710'," + mainList[0].HInterID + ",'" + mainList[0].HBillNo + "','" + mainList[0].HDate + "'," + mainList[0].HPRDORGID + "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + mainList[0].HRemark + "','" + mainList[0].HMaker + "',getdate()" + ",'" + mainList[0].HSeOrderBillNo + "'," + mainList[0].HSeOrderInterID + "," + mainList[0].HSeOrderEntryID + "," + mainList[0].HEmpID + "," + mainList[0].HCusID + "," + mainList[0].HCenterID + "," + mainList[0].HPlanQty + ",0,0,0,0,'','',2" + - ","+ mainList[0].HOWNERID + ") "); + ","+ mainList[0].HOWNERID + ",'"+ mainList[0].HOWNERTYPEID + "') "); //淇濆瓨涓昏〃 foreach (var oSub in subList) { @@ -442,6 +442,8 @@ long HBomID = mainList[0].HBomID;//bom //double? HPlanQty = mainList[0].HPlanQty == null ? 0 : mainList[0].HPlanQty;//璁″垝鏁伴噺 string HMaker = user;//鍒跺崟浜� + string HIsStockQty = mainList[0].HIsStockQty; + string HRemark3 = mainList[0].HRemark3; ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_IF_ICMOBillList"); @@ -452,11 +454,13 @@ (HBillType,HBillStatus,HInterID,HBillNo,HDate,HPRDORGID ,HYear,HPeriod,HRemark,HMaker,HMakeDate ,HSeOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HEmpID,HCusID - ,HCenterID,HPlanQty,HDeptID,HMaterID,HUnitID,HBomID,HPlanBeginDate,HPlanEndDate) + ,HCenterID,HPlanQty,HDeptID,HMaterID,HUnitID,HBomID,HPlanBeginDate,HPlanEndDate + ,HIsStockQty,HRemark3) values('3710',1," + HInterID + ",'" + HBillNo + "','" + HDate + "'," + HPRDORGID + "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + HRemark + "','" + HMaker + "',getdate()" + ",'" + HSeOrderBillNo + "'," + HSeOrderInterID + "," + HSeOrderEntryID + "," + HEmpID + "," + HCusID + - "," + HCenterID + ",0,0,0,0," + HBomID + ",'','') "); + "," + HCenterID + ",0,0,0,0," + HBomID + ",'',''" + + ",'"+ HIsStockQty + "','"+ HRemark3 + "') "); } else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) { @@ -472,8 +476,8 @@ //淇敼 oCN.RunProc("update Sc_ICMOBillMain set " + "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" + - ", HSeOrderBillNo='" + HSeOrderBillNo + "', HSeOrderInterID=" + HSeOrderInterID + ", HSeOrderEntryID=" + HSeOrderEntryID + ", HEmpID=" + HEmpID + ", HCusID=" + HCusID + "" + - ", HCenterID=" + HCenterID + ",HBomID=" + HBomID + " where HInterID=" + HInterID); + ", HSeOrderBillNo='" + HSeOrderBillNo + "', HSeOrderInterID=" + HSeOrderInterID + ", HSeOrderEntryID=" + HSeOrderEntryID + ", HEmpID=" + HEmpID + ", HCusID=" + HCusID + + ", HCenterID=" + HCenterID + ",HBomID=" + HBomID + ",HIsStockQty='"+ HIsStockQty + "',HRemark3='" + HRemark3 + "' where HInterID=" + HInterID); //鍒犻櫎瀛愯〃 oCN.RunProc("delete from Sc_ICMOBillSub where HInterID='" + HInterID + "' and HEntryID='" + HEntryID + "'"); @@ -845,6 +849,24 @@ return objJsonResult; ; } + string sReturn = ""; + if (oSystemParameter.ShowBill(ref sReturn)) + { + if (oSystemParameter.omodel.Sc_ICMOBill_DeleterAndMakerMustSame == "Y") + { + if (ds.Tables[0].Rows[0]["HMaker"].ToString() != user && (user != "admin" && user != "Admin")) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍙兘鍒犻櫎鏈汉鐨勫崟鎹紒"; + objJsonResult.data = null; + return objJsonResult; + } + } + } + + + if (int.Parse(ds.Tables[0].Rows[0]["HBillStatus"].ToString()) > 1) { objJsonResult.code = "0"; -- Gitblit v1.9.1