Model/生产管理/设备管理/ClsSb_EquipDotCheckBillMain.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Model/生产管理/设备管理/ClsSb_EquipMaintainBillMain.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/MJJY/Mj_PDA_MoudlCheckController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/POStockInBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/SCGL/QC_LastPieceCheckBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/Sc_MouldController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/SellOutBackController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Model/Éú²ú¹ÜÀí/É豸¹ÜÀí/ClsSb_EquipDotCheckBillMain.cs
@@ -12,7 +12,7 @@ public string HPlanNo; public string HExplanation; public string HInnerBillNo; public Int64 HDeptID; } } Model/Éú²ú¹ÜÀí/É豸¹ÜÀí/ClsSb_EquipMaintainBillMain.cs
@@ -12,6 +12,7 @@ public string HPlanNo; public string HExplanation; public string HInnerBillNo; public Int64 HDeptID; } WebAPI/Controllers/MJJY/Mj_PDA_MoudlCheckController.cs
@@ -154,7 +154,7 @@ return objJsonResult; } //å¾å°ä¿¡æ¯ ds = oCN.RunProcReturn("select top 1 * from h_v_Gy_EquipFileMainList where HBarCode = '" + HBarCode + "'", "h_v_Gy_EquipFileMainList"); ds = oCN.RunProcReturn("select top 1 * from h_v_Gy_EquipFileMainList where æ¡å½¢ç = '" + HBarCode + "'", "h_v_Gy_EquipFileMainList"); //ds = oWebs.get_InfoByBarCode(HBarCode, ref DBUtility.ClsPub.sErrInfo); //åå ¥ä¿¡æ¯ if (ds == null) WebAPI/Controllers/POStockInBillController.cs
@@ -26,14 +26,14 @@ public Int64 HWhID;//ä»åºID public Int64 HSPID;//ä»ä½ID public string HSupName=string.Empty; public string HDeptName=string.Empty; public string HWhName=string.Empty; public string HSPName=string.Empty; public string HSupName = string.Empty; public string HDeptName = string.Empty; public string HWhName = string.Empty; public string HSPName = string.Empty; public Int64 HInterID;//æ¬åID public string HBillNo; public string HSourceBillNo=string.Empty; public string HSourceBillNo = string.Empty; public string HBillType = "1201";//åæ®ç±»å public string sBillCode = "ICStockBill"; public string sTranType = "1"; @@ -43,16 +43,17 @@ public string sSourceTypeName = "éè´è®¢å"; public string sRedBlue2 = "èå"; //public bool sRedBlue = false; public WebServer webserver =new WebServer(); public DataSet ds =new DataSet(); public ClsGy_BarCodeBill_WMS_Model_View oView =new ClsGy_BarCodeBill_WMS_Model_View(); public ClsKF_PonderationBillMain_Temp model =new ClsKF_PonderationBillMain_Temp(); public WebServer webserver = new WebServer(); public DataSet ds = new DataSet(); public ClsGy_BarCodeBill_WMS_Model_View oView = new ClsGy_BarCodeBill_WMS_Model_View(); public ClsKF_PonderationBillMain_Temp model = new ClsKF_PonderationBillMain_Temp(); public ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS(); public double sRelQty = 0; // private DataBaseServices objDataBaseServices = new DataBaseServices(); SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); // private DataBaseServices objDataBaseServices = new DataBaseServices(); private JsonResult objJsonResult = new JsonResult(); // private string msgModel = "{{\"count\":{0},\"code\":{0},\"message\":\"{1}\",\"result\":{2}}}"; // private string msgModel = "{{\"count\":{0},\"code\":{0},\"message\":\"{1}\",\"result\":{2}}}"; public static string GetSession(string sMsg) { @@ -113,7 +114,7 @@ { HBillType = "1239"; } oBar = webserver.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID,sExpressNumber, ref DBUtility.ClsPub.sErrInfo); oBar = webserver.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo); if (oBar == null) { objJsonResult.code = "0"; @@ -168,16 +169,16 @@ objJsonResult.count = 0; objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + HSourceBillType; objJsonResult.data = null; return objJsonResult; return objJsonResult; } else { { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "è¿åè®°å½æåï¼"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } } catch (Exception ex) @@ -199,12 +200,12 @@ /// <returns></returns> [Route("POStockInBill/set_SavePonderationBillMain_Temp_Source_Fast_Json")] [HttpGet] public object set_SavePonderationBillMain_Temp_Source_Fast_Json(string HSourceBillType,string HSourceBillNo, Int64 sInterID, string sBillNo) public object set_SavePonderationBillMain_Temp_Source_Fast_Json(string HSourceBillType, string HSourceBillNo, Int64 sInterID, string sBillNo) { try { // DataSet ds = new DataSet(); // WebServer webserver = new WebServer(); // DataSet ds = new DataSet(); // WebServer webserver = new WebServer(); string sWhere = " Where åæ®å· like '%" + HSourceBillNo.Trim() + "'"; //æ ¹æ®æºåç±»åæ¥è°ç¨ä¸åçWEBSæ¹æ³ new if (HSourceBillType == "1102") @@ -259,10 +260,10 @@ } catch (Exception ex) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼"+ex.ToString(); objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + ex.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -299,12 +300,12 @@ } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼"+e.ToString(); objJsonResult.data = null; return objJsonResult; objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } /// <summary> @@ -327,7 +328,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message =""; objJsonResult.Message = ""; objJsonResult.data = null; return objJsonResult; } @@ -335,7 +336,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "失败ï¼"+DBUtility.ClsPub.sErrInfo; objJsonResult.Message = "失败ï¼" + DBUtility.ClsPub.sErrInfo; objJsonResult.data = null; return objJsonResult; } @@ -363,7 +364,7 @@ else { if (webserver.set_SavePonderationBillMain_Temp_Source_SourceBillType(sInterID, sBillNo, HBillType, sBarCode, sRedBlue2, ref HSourceBillNo, ref sSourceTypeName, ref HSupID, ref HSupName, ref HDeptID, ref HDeptName, ref DBUtility.ClsPub.sErrInfo)) if (webserver.set_SavePonderationBillMain_Temp_Source_SourceBillType(sInterID, sBillNo, HBillType, sBarCode, sRedBlue2, ref HSourceBillNo, ref sSourceTypeName, ref HSupID, ref HSupName, ref HDeptID, ref HDeptName, ref DBUtility.ClsPub.sErrInfo)) { //----------å建è表------------------------ DataTable dt_Main = new DataTable("Json"); @@ -424,7 +425,7 @@ [HttpGet] public object get_InfoByBarCode_Source_Json(string sBarCode, Int64 sInterID, string sBillNo, Double sQty, Int64 HWHID, Int64 HSPID) { // string sRedBlue = "èå"; // string sRedBlue = "èå"; try { string sErrMsg = ""; @@ -473,12 +474,12 @@ } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ«ç 失败,æ¤æ¡ç ä¸åå¨ï¼"+e.ToString(); objJsonResult.data = null; return objJsonResult; objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ«ç 失败,æ¤æ¡ç ä¸åå¨ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } /// <summary> @@ -487,7 +488,7 @@ /// <returns></returns> [Route("POStockInBill/set_SavePOStockInBackBill_Json")] [HttpPost] public object set_SavePOStockInBackBill_Json([FromBody]JObject oMain) public object set_SavePOStockInBackBill_Json([FromBody] JObject oMain) { var _value = oMain["oMain"].ToString(); string msg1 = _value.ToString(); @@ -543,7 +544,7 @@ /// <returns></returns> [Route("POStockInBill/set_SavePOStockInBill_Json")] [HttpPost] public object set_SavePOStockInBill_Json([FromBody]JObject oMain) public object set_SavePOStockInBill_Json([FromBody] JObject oMain) { var _value = oMain["oMain"].ToString(); string msg1 = _value.ToString(); @@ -607,7 +608,7 @@ [Route("POStockInBill/GetSpName_Json")] [HttpGet] public object GetSpName_Json(long HSpID, long HWHID,long HStockOrgID, ref string sErrMsg) public object GetSpName_Json(long HSpID, long HWHID, long HStockOrgID, ref string sErrMsg) { try { @@ -650,7 +651,7 @@ string sErrMsg = string.Empty; try { if (webserver.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID,HAuxPropID,HMTONo,HSourceInterID,HSourceEntryID,sHBillType,ref sErrMsg)) if (webserver.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID, HAuxPropID, HMTONo, HSourceInterID, HSourceEntryID, sHBillType, ref sErrMsg)) { objJsonResult.code = "0"; objJsonResult.count = 1; @@ -719,7 +720,7 @@ [Route("POStockInBillList/DisBillEntryList_Mate_Webs_Json")] [HttpGet] public object DisBillEntryList_Webs_Json(string HBillType,string sWhere) public object DisBillEntryList_Webs_Json(string HBillType, string sWhere) { try { @@ -789,5 +790,125 @@ } #region å°è´§ç¹æ° [Route("POStockInBillList/get_InfoByBillNo")] [HttpGet] public object get_InfoByBillNo(string HBillno) { try { string sqlwhere = " where 1=1 "; if (!String.IsNullOrEmpty(HBillno)) sqlwhere += "and åæ®å·='" + HBillno + "'"; string sql = $"select * from h_v_Cg_POInStockBillList {sqlwhere} "; ds = oCn.RunProcReturn(sql, "h_v_Cg_POInStockBillList"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "Sucessï¼"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } } catch (Exception) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "失败 ï¼"; objJsonResult.data = null; return objJsonResult; } } //[Route("POStockInBillList/confirm")] //public object confirm(string hmainid) //{ // try // { // JObject model = new JObject(); // model.Add("FBILLTYPEID", new JObject() { ["Fnumber"] = "SLD01_SYS" }); //åæ®ç±»å // model.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); //éç¥æ¥æ // model.Add("FStockOrgId", new JObject() { ["Fnumber"] = (this.Model.GetValue("FHPURCHASEORGID") as DynamicObject)?["Number"].ToString() ?? "" }); // æ¶æç»ç» // model.Add("FPurOrgId", new JObject() { ["Fnumber"] = (this.Model.GetValue("FHPURCHASEORGID") as DynamicObject)?["Number"].ToString() ?? "" }); //éè´ç»ç» // model.Add("FSupplierId", new JObject() { ["Fnumber"] = (this.Model.GetValue("FSupplierID") as DynamicObject)?["Number"].ToString() ?? "" }); //ä¾åºå // model.Add("FOwnerTypeIdHead", "BD_OwnerOrg");// 货主类å // model.Add("FOwnerIdHead", new JObject() { ["Fnumber"] = (this.Model.GetValue("FHPURCHASEORGID") as DynamicObject)?["Number"].ToString() ?? "" });//货主 // //å表 æ°æ®æ¨¡å // JArray Fentity = new JArray(); // foreach (var item in entityRows) // { // if (Convert.ToBoolean(item["FCloseStatus"])) // continue; // JObject FentityModel = new JObject(); // FentityModel.Add("FMaterialId", new JObject() { ["Fnumber"] = (item["FHMaterID"] as DynamicObject)?["Number"].ToString() ?? "" }); // ç©æç¼ç // FentityModel.Add("FUnitID", new JObject() { ["Fnumber"] = (item["FUnitID"] as DynamicObject)?["Number"].ToString() ?? "" }); // åä½ // FentityModel.Add("FPreDeliveryDate", this.Model.GetValue("FHDate").ToString()); //é¢è®¡å°è´§æ¥æ // FentityModel.Add("FPriceUnitId", new JObject() { ["Fnumber"] = (item["FUnitID"] as DynamicObject)?["Number"].ToString() ?? "" }); // 计价åä½ // FentityModel.Add("FStockUnitID", new JObject() { ["Fnumber"] = (item["FUnitID"] as DynamicObject)?["Number"].ToString() ?? "" }); // åºååä½ // FentityModel.Add("FActReceiveQty", Convert.ToDecimal(item["FHQty"]) - Convert.ToDecimal(item["FReciveCount"])); // ä¾åºåéè´§æ°éï¼ææè®¡åæ°é - å·²çæéè´§åæ°éï¼ // FentityModel.Add("FOwnerTypeId", "BD_OwnerOrg");//货主类å // FentityModel.Add("FOwnerID", new JObject() { ["Fnumber"] = (this.Model.GetValue("FHPURCHASEORGID") as DynamicObject)?["Number"].ToString() ?? "" });//货主 // FentityModel.Add("FSrcId", item["FHPOOrderInterID"].ToString());//æºåå ç // FentityModel.Add("FSRCFORMID", "PUR_PurchaseOrder");//æºåç±»å // FentityModel.Add("FSrcBillNo", item["FHPOOrderBillNo"].ToString());//æºååå· // FentityModel.Add("FSRCENTRYID", item["FHPOOrderEntryID"].ToString());//æºååå½å ç // FentityModel.Add("FORDERBILLNO", item["FHPOOrderBillNo"].ToString());//æºååå· // FentityModel.Add("FPOORDERENTRYID", item["FHPOOrderEntryID"].ToString());//æºååå½å ç // JArray Fentity2 = new JArray(); // JObject FentityModel2 = new JObject(); // FentityModel2.Add("FDetailEntity_Link_FRULEID", "a8c6b6e5-a8c0-4fc1-8592-6b76c2136cf9"); // FentityModel2.Add("FDetailEntity_Link_FSTableName", "t_PUR_POOrderEntry"); // FentityModel2.Add("FDetailEntity_Link_FSBillId", item["FHPOOrderInterID"].ToString()); // FentityModel2.Add("FDetailEntity_Link_FSId", item["FHPOOrderEntryID"].ToString()); // Fentity2.Add(FentityModel2); // FentityModel.Add("FDetailEntity_Link", Fentity2); // Fentity.Add(FentityModel); // } // model.Add("FDetailEntity", Fentity); //æç»ä¿¡æ¯ // JObject _FentityModel = new JObject(); // _FentityModel.Add("FSettleOrgId", new JObject() { ["Fnumber"] = (this.Model.GetValue("FHPURCHASEORGID") as DynamicObject)?["Number"].ToString() ?? "" }); // ç»ç®ç»ç» // _FentityModel.Add("FSettleCurrId", new JObject() { ["Fnumber"] = (this.Model.GetValue("FSettleCurrId") as DynamicObject)?["Number"].ToString() ?? "" }); // ç»ç®å¸å« // _FentityModel.Add("FPricePoint", 0); // å®ä»·æ¶ç¹ // model.Add("FinanceEntity ", _FentityModel);//è´¢å¡ä¿¡æ¯ // JObject jsonRoot = new JObject() // { // ["Creator"] = "", // ["NeedUpDateFields"] = new JArray(), // ["NeedReturnFields"] = new JArray(), // ["IsDeleteEntry"] = "false", // ["SubSystemId"] = "", // ["IsVerifyBaseDataField"] = "false", // //["IsAutoSubmitAndAudit"] = true,//èªå¨è°ç¨æäº¤åå®¡æ ¸åè½ // ["Model"] = model // }; // var result = cloudClient.Save("PUR_ReceiveBill", jsonRoot.ToString()); // JObject saveObj = JObject.Parse(result); // string saveIsSuc = saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper(); // } // catch (Exception) // { // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "失败 ï¼"; // objJsonResult.data = null; // return objJsonResult; // } //} #endregion } } WebAPI/Controllers/SCGL/QC_LastPieceCheckBillController.cs
@@ -22,7 +22,52 @@ DataSet ds1; #region[ç¼è¾æ¶è·åè¡¨å¤´æ°æ®] [Route("QC_LastPieceCheckBill/QC_LastPieceCheckBillListCheckDetail")] [HttpGet] public ApiResult<DataSet> QC_LastPieceCheckBillListCheckDetail(string HID) { if (string.IsNullOrEmpty(HID)) return new ApiResult<DataSet> { code = -1, msg = "IDä¸è½ä¸ºç©º" }; SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); var dataSet = oCN.RunProcReturn("select top 1 * from h_v_QC_LastPieceCheckBillListDetail where hmainid= " + HID + " ", "h_v_QC_LastPieceCheckBillListDetail"); if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) return new ApiResult<DataSet> { code = -1, msg = "ä¸åå¨ç»ç®åå·" }; return new ApiResult<DataSet> { code = 1, msg = "æ¥è¯¢æå", data = dataSet }; } #endregion #region[ç¼è¾æ¶è·åè¡¨ä½æ°æ®] [Route("QC_LastPieceCheckBill/QC_LastPieceCheckBillListProjectDetai")] [HttpGet] public object QC_LastPieceCheckBillListProjectDetai(string sqlWhere) { DataSet ds; try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); string sql1 = "SELECT æ¥æ,åæ®å·,夿³¨,产åå ç , 产ååç§°" + ", 产ååå·, æ£éªå代ç , æ£éªååç§°, å¶å人, å¶åæ¥æ" + ", å®¡æ ¸äºº, å®¡æ ¸æ¥æ, ä¿®æ¹äºº, ä¿®æ¹æ¥æ, å ³é人, å ³éæ¥æ FROM h_v_QC_LastPieceCheckBillListDetail where 1 = 1 "; string sql = sql1 + sqlWhere; ds = oCN.RunProcReturn(sql, "h_v_QC_LastPieceCheckBillListDetail"); objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; objJsonResult.data = ds.Tables[0]; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + e.ToString(); objJsonResult.data = null; } return objJsonResult; } #endregion /// <summary> /// æ°å¢åæ®-ä¿åæé® @@ -196,7 +241,36 @@ objJsonResult.data = null; return objJsonResult; } /// <summary> ///å é¤åè½ /// </summary> /// <returns></returns> [Route("QC_LastPieceCheckBill/DeltetLastPieceCheckBill")] [HttpGet] public object DeltetLastPieceCheckBill(string HInterID) { try { oCN.BeginTran(); oCN.RunProc("Delete From QC_LastPieceCheckBillMain where HInterID = " + HInterID); oCN.RunProc("Delete From QC_LastPieceCheckBillSub where HInterID = " + HInterID); oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "å 餿åï¼"; objJsonResult.data = null; return objJsonResult; } catch (Exception e) { oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exceptionï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } /// <summary> /// è¿å产åå ¥åºæ£éªåå表 ///åæ°ï¼string sqlã WebAPI/Controllers/Sc_MouldController.cs
@@ -1480,7 +1480,7 @@ #endregion #region 设å¤ç»´ä¿®è®°å½åä¿å #region 设å¤ä¿å »è®°å½åä¿å [Route("Sb_EquipMaintainBill/EquipMaintainBill_Save")] [HttpPost] @@ -1497,15 +1497,15 @@ try { msg1 = "[" + msg1.ToString() + "]"; DAL.ClsSb_MouldRepairWorkBill BillNew = new DAL.ClsSb_MouldRepairWorkBill(); List<Model.ClsSb_MouldRepairWorkBillMain> mainList = Newtonsoft DAL.ClsSb_EquipMaintainBill BillNew = new DAL.ClsSb_EquipMaintainBill(); List<Model.ClsSb_EquipMaintainBillMain> mainList = Newtonsoft .Json .JsonConvert .DeserializeObject<List<Model.ClsSb_MouldRepairWorkBillMain>>(msg1); List<Model.ClsSb_MouldRepairWorkBillSub> subList = Newtonsoft .DeserializeObject<List<Model.ClsSb_EquipMaintainBillMain>>(msg1); List<Model.ClsSb_EquipMaintainBillSub> subList = Newtonsoft .Json .JsonConvert .DeserializeObject<List<Model.ClsSb_MouldRepairWorkBillSub>>(msg1); .DeserializeObject<List<Model.ClsSb_EquipMaintainBillSub>>(msg1); string s = ""; int sYear = 0; int sPeriod = 0; @@ -1523,27 +1523,23 @@ BillNew.omodel.HBillNo = mainList[0].HBillNo.Trim(); BillNew.omodel.HMaker = mainList[0].HMaker; BillNew.omodel.HDate = HDate; BillNew.omodel.HMouldID = mainList[0].HMouldID; BillNew.omodel.HEquipID = mainList[0].HEquipID; BillNew.omodel.HDeptID = mainList[0].HDeptID; BillNew.omodel.HEmpID = mainList[0].HEmpID; BillNew.omodel.HRepairID = mainList[0].HRepairID; BillNew.omodel.HManagerID = mainList[0].HManagerID; BillNew.omodel.HRepairBeginDate = mainList[0].HRepairBeginDate; BillNew.omodel.HRepairEndDate = mainList[0].HRepairEndDate; BillNew.omodel.HRepairContent = mainList[0].HRepairContent; BillNew.omodel.HCycleUnit = mainList[0].HCycleUnit; BillNew.omodel.HPlanTimes = mainList[0].HPlanTimes; BillNew.omodel.HTimes = mainList[0].HTimes; BillNew.omodel.HBeginDate = mainList[0].HBeginDate; BillNew.omodel.HEndDate = mainList[0].HEndDate; //BillNew.omodel.HCycleUnit = mainList[0].HCycleUnit; //BillNew.omodel.HPlanTimes = mainList[0].HPlanTimes; //BillNew.omodel.HTimes = mainList[0].HTimes; BillNew.omodel.HExplanation = mainList[0].HExplanation; BillNew.omodel.HInnerBillNo = mainList[0].HInnerBillNo; BillNew.omodel.HMouldID = mainList[0].HMouldID; BillNew.omodel.HSupID = mainList[0].HSupID; BillNew.omodel.HRepairType = mainList[0].HRepairType; BillNew.omodel.HNewModel = mainList[0].HNewModel; BillNew.omodel.HNewDesignLife = mainList[0].HNewDesignLife; BillNew.omodel.HEquipID = mainList[0].HEquipID; BillNew.DetailColl = new List<Model.ClsSb_MouldRepairWorkBillSub>(); Model.ClsSb_MouldRepairWorkBillSub oSub = new Model.ClsSb_MouldRepairWorkBillSub(); //BillNew.omodel.HMouldID = mainList[0].HMouldID; //BillNew.omodel.HSupID = mainList[0].HSupID; //BillNew.omodel.HRepairType = mainList[0].HRepairType; //BillNew.omodel.HNewModel = mainList[0].HNewModel; //BillNew.omodel.HNewDesignLife = mainList[0].HNewDesignLife; //BillNew.omodel.HEquipID = mainList[0].HEquipID; BillNew.DetailColl = new List<Model.ClsSb_EquipMaintainBillSub>(); Model.ClsSb_EquipMaintainBillSub oSub = new Model.ClsSb_EquipMaintainBillSub(); oSub.HEntryID = 1; oSub.HRemark = DBUtility.ClsPub.isStrNull(subList[0].HRemark); oSub.HSourceInterID = DBUtility.ClsPub.isLong(subList[0].HSourceInterID); @@ -1555,10 +1551,215 @@ oSub.HCloseMan = DBUtility.ClsPub.isStrNull(subList[0].HCloseMan); oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(subList[0].HEntryCloseDate); oSub.HCloseType = DBUtility.ClsPub.isBool(subList[0].HCloseType); oSub.HRepairID = DBUtility.ClsPub.isLong(subList[0].HRepairID); oSub.HManagerID = DBUtility.ClsPub.isLong(subList[0].HManagerID); oSub.HMoney = DBUtility.ClsPub.isDoule(subList[0].HMoney); oSub.HRepairExplanation = DBUtility.ClsPub.isStrNull(subList[0].HRepairExplanation); BillNew.DetailColl.Add(oSub); bResult = BillNew.AddBill(ref ClsPub.sExeReturnInfo); if (bResult == true) { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = ClsPub.sExeReturnInfo + "åæ®å·:" + mainList[0].HBillNo.Trim(); objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "ä¿å失败!åå :" + ClsPub.sExeReturnInfo; 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("Sb_EquipRepairWorkBill/EquipRepairWorkBill_Save")] [HttpPost] public object EquipRepairWorkBill_Save([FromBody] JObject sMainSub) { var _value = sMainSub["sMainSub"].ToString(); string msg1 = _value.ToString(); return objJsonResult = EquipRepairWorkAddBill(msg1); } public json EquipRepairWorkAddBill(string msg1) { bool bResult; try { msg1 = "[" + msg1.ToString() + "]"; DAL.ClsSb_EquipRepairWorkBill BillNew = new DAL.ClsSb_EquipRepairWorkBill(); List<Model.ClsSb_EquipRepairWorkBillMain> mainList = Newtonsoft .Json .JsonConvert .DeserializeObject<List<Model.ClsSb_EquipRepairWorkBillMain>>(msg1); List<Model.ClsSb_EquipRepairWorkBillSub> subList = Newtonsoft .Json .JsonConvert .DeserializeObject<List<Model.ClsSb_EquipRepairWorkBillSub>>(msg1); string s = ""; int sYear = 0; int sPeriod = 0; DateTime HDate = mainList[0].HDate; if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = s; objJsonResult.data = null; return objJsonResult; } BillNew.omodel.HYear = sYear; BillNew.omodel.HPeriod = sPeriod; BillNew.omodel.HBillNo = mainList[0].HBillNo.Trim(); BillNew.omodel.HMaker = mainList[0].HMaker; BillNew.omodel.HDate = HDate; BillNew.omodel.HEquipID = mainList[0].HEquipID; BillNew.omodel.HDeptID = mainList[0].HDeptID; BillNew.omodel.HRepairBeginDate = mainList[0].HRepairBeginDate; BillNew.omodel.HRepairEndDate = mainList[0].HRepairEndDate; //BillNew.omodel.HCycleUnit = mainList[0].HCycleUnit; //BillNew.omodel.HPlanTimes = mainList[0].HPlanTimes; //BillNew.omodel.HTimes = mainList[0].HTimes; BillNew.omodel.HExplanation = mainList[0].HExplanation; BillNew.omodel.HInnerBillNo = mainList[0].HInnerBillNo; //BillNew.omodel.HMouldID = mainList[0].HMouldID; //BillNew.omodel.HSupID = mainList[0].HSupID; //BillNew.omodel.HRepairType = mainList[0].HRepairType; //BillNew.omodel.HNewModel = mainList[0].HNewModel; //BillNew.omodel.HNewDesignLife = mainList[0].HNewDesignLife; //BillNew.omodel.HEquipID = mainList[0].HEquipID; BillNew.DetailColl = new List<Model.ClsSb_EquipRepairWorkBillSub>(); Model.ClsSb_EquipRepairWorkBillSub oSub = new Model.ClsSb_EquipRepairWorkBillSub(); oSub.HEntryID = 1; oSub.HRemark = DBUtility.ClsPub.isStrNull(subList[0].HRemark); oSub.HSourceInterID = DBUtility.ClsPub.isLong(subList[0].HSourceInterID); oSub.HSourceEntryID = DBUtility.ClsPub.isLong(subList[0].HSourceEntryID); oSub.HSourceBillType = DBUtility.ClsPub.isStrNull(subList[0].HSourceBillType); oSub.HSourceBillNo = DBUtility.ClsPub.isStrNull(subList[0].HSourceBillNo); oSub.HRelationQty = DBUtility.ClsPub.isDoule(subList[0].HRelationQty); oSub.HRelationMoney = DBUtility.ClsPub.isDoule(subList[0].HRelationMoney); oSub.HCloseMan = DBUtility.ClsPub.isStrNull(subList[0].HCloseMan); oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(subList[0].HEntryCloseDate); oSub.HCloseType = DBUtility.ClsPub.isBool(subList[0].HCloseType); oSub.HRepairID = mainList[0].HRepairID; BillNew.DetailColl.Add(oSub); bResult = BillNew.AddBill(ref ClsPub.sExeReturnInfo); if (bResult == true) { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = ClsPub.sExeReturnInfo + "åæ®å·:" + mainList[0].HBillNo.Trim(); objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "ä¿å失败!åå :" + ClsPub.sExeReturnInfo; 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("Sb_EquipDotCheckBill/EquipDotCheckBill_Save")] [HttpPost] public object EquipDotCheckBill_Save([FromBody] JObject sMainSub) { var _value = sMainSub["sMainSub"].ToString(); string msg1 = _value.ToString(); return objJsonResult = EquipDotCheckAddBill(msg1); } public json EquipDotCheckAddBill(string msg1) { bool bResult; try { msg1 = "[" + msg1.ToString() + "]"; DAL.ClsSb_EquipDotCheckBill BillNew = new DAL.ClsSb_EquipDotCheckBill(); List<Model.ClsSb_EquipDotCheckBillMain> mainList = Newtonsoft .Json .JsonConvert .DeserializeObject<List<Model.ClsSb_EquipDotCheckBillMain>>(msg1); List<Model.ClsSb_EquipDotCheckBillSub> subList = Newtonsoft .Json .JsonConvert .DeserializeObject<List<Model.ClsSb_EquipDotCheckBillSub>>(msg1); string s = ""; int sYear = 0; int sPeriod = 0; DateTime HDate = mainList[0].HDate; if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = s; objJsonResult.data = null; return objJsonResult; } BillNew.omodel.HYear = sYear; BillNew.omodel.HPeriod = sPeriod; BillNew.omodel.HBillNo = mainList[0].HBillNo.Trim(); BillNew.omodel.HMaker = mainList[0].HMaker; BillNew.omodel.HDate = HDate; BillNew.omodel.HEquipID = mainList[0].HEquipID; BillNew.omodel.HDeptID = mainList[0].HDeptID; BillNew.omodel.HBeginDate = mainList[0].HBeginDate; BillNew.omodel.HEndDate = mainList[0].HEndDate; //BillNew.omodel.HCycleUnit = mainList[0].HCycleUnit; //BillNew.omodel.HPlanTimes = mainList[0].HPlanTimes; //BillNew.omodel.HTimes = mainList[0].HTimes; BillNew.omodel.HExplanation = mainList[0].HExplanation; BillNew.omodel.HInnerBillNo = mainList[0].HInnerBillNo; //BillNew.omodel.HMouldID = mainList[0].HMouldID; //BillNew.omodel.HSupID = mainList[0].HSupID; //BillNew.omodel.HRepairType = mainList[0].HRepairType; //BillNew.omodel.HNewModel = mainList[0].HNewModel; //BillNew.omodel.HNewDesignLife = mainList[0].HNewDesignLife; //BillNew.omodel.HEquipID = mainList[0].HEquipID; BillNew.DetailColl = new List<Model.ClsSb_EquipDotCheckBillSub>(); Model.ClsSb_EquipDotCheckBillSub oSub = new Model.ClsSb_EquipDotCheckBillSub(); oSub.HEntryID = 1; oSub.HRemark = DBUtility.ClsPub.isStrNull(subList[0].HRemark); oSub.HSourceInterID = DBUtility.ClsPub.isLong(subList[0].HSourceInterID); oSub.HSourceEntryID = DBUtility.ClsPub.isLong(subList[0].HSourceEntryID); oSub.HSourceBillType = DBUtility.ClsPub.isStrNull(subList[0].HSourceBillType); oSub.HSourceBillNo = DBUtility.ClsPub.isStrNull(subList[0].HSourceBillNo); oSub.HRelationQty = DBUtility.ClsPub.isDoule(subList[0].HRelationQty); oSub.HRelationMoney = DBUtility.ClsPub.isDoule(subList[0].HRelationMoney); oSub.HCloseMan = DBUtility.ClsPub.isStrNull(subList[0].HCloseMan); oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(subList[0].HEntryCloseDate); oSub.HCloseType = DBUtility.ClsPub.isBool(subList[0].HCloseType); BillNew.DetailColl.Add(oSub); bResult = BillNew.AddBill(ref ClsPub.sExeReturnInfo); if (bResult == true) WebAPI/Controllers/SellOutBackController.cs
@@ -246,6 +246,8 @@ { try { if (String.IsNullOrEmpty(sWhere)) sWhere = "and 1 = 1 "; ds = webserver.GetKf_PonderationBillMain_Temp(HBillID, HBillType, sWhere); if (ds == null || ds.Tables[0].Rows.Count <= 0) {