Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
| | |
| | | { |
| | | omodel.Kf_MateOutBillCheck_WHSPCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MateOutBillCheck_MultilineCtl") //æ ¡éª-å¤è¡ç¸åç©æèªå¨æåæ¢è¡å¹é
|
| | | { |
| | | omodel.Kf_MateOutBillCheck_MultilineCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | //ç产éæå |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MateOutBackBill_AutoCheck") |
| | | { |
| | |
| | | { |
| | | omodel.Kf_MoveStockBillCheck_WHSPCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MoveStockBillCheck_MultilineCtl") //æ ¡éª-å¤è¡ç¸åç©æèªå¨æåæ¢è¡å¹é
|
| | | { |
| | | omodel.Kf_MoveStockBillCheck_MultilineCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | //è¡¥æå |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MateReplenishOutBill_AutoCheck") |
| | | { |
| | |
| | | public string Kf_MateOutBill_BillTypeOneScan;//æ¬åæ®ç±»åå
åªå
è®¸ä¸æ¬¡æ«ç ï¼å¯ä¸ç ï¼å«ç¼ååè¡¨ï¼ |
| | | public string Kf_MateOutBillCheck_MustQtyCtl; //æ ¡éªæ°éæ§å¶ |
| | | public string Kf_MateOutBillCheck_WHSPCtl; //æ ¡éª-æ¯å¦æ ¡å¯¹ä»åºä»ä½ |
| | | public string Kf_MateOutBillCheck_MultilineCtl; //æ ¡éª-å¤è¡ç¸åç©æèªå¨æåæ¢è¡å¹é
|
| | | //çäº§éæ |
| | | public string Kf_MateOutBackBill_AutoCheck; |
| | | public string Kf_MateOutBackBill_ERPMode; |
| | |
| | | public string Kf_MoveStockBill_BillTypeOneScan;//æ¬åæ®ç±»åå
åªå
è®¸ä¸æ¬¡æ«ç ï¼å¯ä¸ç ï¼å«ç¼ååè¡¨ï¼ |
| | | public string Kf_MoveStockBillCheck_MustQtyCtl; //æ ¡éªæ°éæ§å¶ |
| | | public string Kf_MoveStockBillCheck_WHSPCtl; //æ ¡éª-æ¯å¦æ ¡å¯¹ä»åºä»ä½ |
| | | public string Kf_MoveStockBillCheck_MultilineCtl; //æ ¡éª-å¤è¡ç¸åç©æèªå¨æåæ¢è¡å¹é
|
| | | //è¡¥æå |
| | | public string Kf_MateReplenishOutBill_AutoCheck; |
| | | public string Kf_MateReplenishOutBill_ERPMode; |
| | |
| | | grdMain.Rows[row + r].Cells[HMTONoCol].Value = grdMain.Rows[row].Cells[HMTONoCol].Value; |
| | | grdMain.Rows[row + r].Cells[HInnerBillNoCol].Value = grdMain.Rows[row].Cells[HInnerBillNoCol].Value; |
| | | grdMain.Rows[row + r].Cells[HMakerCol].Value = grdMain.Rows[row].Cells[HMakerCol].Value; |
| | | //ç½æ ¼æå¾ |
| | | DataGridViewCheckBoxCell oCell = new DataGridViewCheckBoxCell(); |
| | | oCell.ThreeState = false; |
| | | oCell.Value = grdMain.Rows[row].Cells[HGiveAwayFlagCol].Value; |
| | | oCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; |
| | | grdMain.Rows[row + r].Cells[HGiveAwayFlagCol] = oCell; |
| | | |
| | | } |
| | | DBUtility.Xt_BaseBillFun.SetSumGrid(oSumGrid); |
| | |
| | | this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); |
| | | this.AddRow = new System.Windows.Forms.ToolStripButton(); |
| | | this.spRow = new System.Windows.Forms.ToolStripButton(); |
| | | this.bc = new System.Windows.Forms.ToolStripButton(); |
| | | this.DelRow = new System.Windows.Forms.ToolStripButton(); |
| | | this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); |
| | | this.bc = new System.Windows.Forms.ToolStripButton(); |
| | | this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); |
| | | this.wxm = new System.Windows.Forms.ToolStripButton(); |
| | | this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); |
| | |
| | | this.spRow.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; |
| | | this.spRow.Click += new System.EventHandler(this.spRow_Click); |
| | | // |
| | | // bc |
| | | // |
| | | this.bc.AutoSize = false; |
| | | this.bc.Image = ((System.Drawing.Image)(resources.GetObject("bc.Image"))); |
| | | this.bc.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.bc.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; |
| | | this.bc.ImageTransparentColor = System.Drawing.Color.Magenta; |
| | | this.bc.Name = "bc"; |
| | | this.bc.Size = new System.Drawing.Size(35, 47); |
| | | this.bc.Text = "çæ"; |
| | | this.bc.TextAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.bc.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; |
| | | this.bc.Click += new System.EventHandler(this.bc_Click); |
| | | // |
| | | // DelRow |
| | | // |
| | | this.DelRow.AutoSize = false; |
| | |
| | | // |
| | | this.toolStripSeparator4.Name = "toolStripSeparator4"; |
| | | this.toolStripSeparator4.Size = new System.Drawing.Size(6, 50); |
| | | // |
| | | // bc |
| | | // |
| | | this.bc.AutoSize = false; |
| | | this.bc.Image = ((System.Drawing.Image)(resources.GetObject("bc.Image"))); |
| | | this.bc.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.bc.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; |
| | | this.bc.ImageTransparentColor = System.Drawing.Color.Magenta; |
| | | this.bc.Name = "bc"; |
| | | this.bc.Size = new System.Drawing.Size(35, 47); |
| | | this.bc.Text = "çæ"; |
| | | this.bc.TextAlign = System.Drawing.ContentAlignment.BottomCenter; |
| | | this.bc.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; |
| | | this.bc.Click += new System.EventHandler(this.bc_Click); |
| | | this.toolStripSeparator4.Visible = false; |
| | | // |
| | | // toolStripSeparator8 |
| | | // |
| | |
| | | } |
| | | } |
| | | |
| | | [Route("Cg_POOrderBill/list3")] |
| | | [HttpGet] |
| | | public object list3(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<string> optionList = new List<string>(); |
| | | string sql = "select top 1 * from h_v_IF_POOrderBillList where 1 = 1 "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList"); |
| | | if (ds != null) |
| | | { |
| | | foreach (DataColumn item in ds.Tables[0].Columns) |
| | | { |
| | | optionList.Add(@"{ field: 'hmainid', title: '"+ item.ToString() + "', sort: true, hide: false }"); |
| | | } |
| | | string option = string.Join(",",optionList); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = optionList.ToArray(); |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åå§åè¡¨æ ¼å¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | [Route("Cg_POOrderBill/list2")] |
| | | [HttpGet] |
| | | public object list2(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<OptionListModel> optionList = new List<OptionListModel>(); |
| | | string sql = "select top 1 * from h_v_IF_POOrderBillList where 1 = 1 "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList"); |
| | | if (ds != null) |
| | | { |
| | | foreach (DataColumn item in ds.Tables[0].Columns) |
| | | { |
| | | optionList.Add(new OptionListModel |
| | | { |
| | | field = item.ToString(), |
| | | title = item.ToString(), |
| | | sort = true, |
| | | hide = false, |
| | | }); |
| | | } |
| | | string option = string.Join(",", optionList); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = optionList; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åå§åè¡¨æ ¼å¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éè´è®¢å åé
|
| | | ///åæ°ï¼string sqlã |
| | |
| | | /// </summary> |
| | | [Route("Cg_POOrderBill/Resynchronize")] |
| | | [HttpGet] |
| | | public object Resynchronize(string HBillNo,string HBillType) |
| | | public object Resynchronize(string HBillNo, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | oCN.BeginTran(); |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | DataSet DS = oCn.RunProcReturn("exec h_p_WMS_ERPSourceBillToLocal '" + HBillNo + "','"+ HBillType + "'", "h_p_WMS_ERPSourceBillToLocal"); |
| | | DataSet DS = oCn.RunProcReturn("exec h_p_WMS_ERPSourceBillToLocal '" + HBillNo + "','" + HBillType + "'", "h_p_WMS_ERPSourceBillToLocal"); |
| | | if (DS == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | else |
| | | fidList.Add(dr["FID"].ToString() + dr["HINTERID"].ToString()); |
| | | |
| | | DataRow[] drs = dt.Select("FID = " + dr["FID"].ToString() + " and HINTERID = "+dr["HINTERID"].ToString()); |
| | | DataRow[] drs = dt.Select("FID = " + dr["FID"].ToString() + " and HINTERID = " + dr["HINTERID"].ToString()); |
| | | |
| | | JObject model = new JObject(); |
| | | model.Add("FBILLTYPEID", new JObject() { ["Fnumber"] = "SLD01_SYS" }); //åæ®ç±»å |
| | |
| | | |
| | | // |
| | | } |
| | | |
| | | } |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HSourceID == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "çäº§èµæºæ²¡æéæ©ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //if (HSourceID == 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "çäº§èµæºæ²¡æéæ©ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (HCenterID == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HWorkTimes <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å·¥æ¶å¿
须大äº0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //if (HWorkTimes <= 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "å·¥æ¶å¿
须大äº0ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | //if (HEmpID2 == 0 ) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | |
| | | } |
| | | } |
| | | |
| | | //å é¤ä¸´æ¶è¡¨æ°æ® |
| | | oCN.RunProc("delete from diyipi"); |
| | | |
| | | //临æ¶è¡¨æ·»å æ°æ® |
| | | for (int i = 0; i < tb2.Rows.Count; i++) |
| | | { |
| | | oCN.RunProc(@"insert into diyipi(产å代ç ,产ååç§°,å·¥åºåºå·,å·¥åºä»£ç ,å·¥åº,å·¥ä½ä¸å¿,å å·¥æ°é |
| | | , è¯ç, å·¥åºå·¥ä»·, ä¸åæ ¼åä»·, æ¥åºåä»·, æ¬éåºå®å¼å·¥å¤©æ°, æ¬éå¼å·¥ä½é, ä¸éçå¾
å¤©æ° |
| | | , ä¸é循ç¯å¨æ, èªå¨è½¬ç§», å¤åæ è®°, ä¾åºå代ç , ä¾åºå, å·¥èºåæ°, å¾çº¸ç¼å· |
| | | , æ¬å·¥åºç¡®è®¤è®°å½, 夿³¨, å¾å·çæ¬, æ»è£
å¾å·, æè´¨, æåç¼å·, çæ¬ |
| | | , 模å
·ç¼å·, ç¨åºå·, ç产å®é¢, å·¥èºè·¯çº¿åç§°, æ¶é´åä½)values |
| | | ('" + tb2.Rows[i]["产å代ç "].ToString() + "','" + tb2.Rows[i]["产ååç§°"].ToString() + "','" + tb2.Rows[i]["å·¥åºåºå·"].ToString() + "','" + tb2.Rows[i]["å·¥åºä»£ç "].ToString() + "','" + tb2.Rows[i]["å·¥åº"].ToString() + "','" + tb2.Rows[i]["å·¥ä½ä¸å¿"].ToString() + "','" + tb2.Rows[i]["å å·¥æ°é"].ToString() + "'" + |
| | | ",'" + tb2.Rows[i]["è¯ç"].ToString() + "','" + (tb2.Rows[i]["å·¥åºå·¥ä»·"].ToString()==""?"0": tb2.Rows[i]["å·¥åºå·¥ä»·"].ToString()) + "','" + tb2.Rows[i]["ä¸åæ ¼åä»·"].ToString() + "','" + tb2.Rows[i]["æ¥åºåä»·"].ToString() + "','" + tb2.Rows[i]["æ¬éåºå®å¼å·¥å¤©æ°"].ToString() + "','" + tb2.Rows[i]["æ¬éå¼å·¥ä½é"].ToString() + "','" + tb2.Rows[i]["ä¸éçå¾
天æ°"].ToString() + "'" + |
| | | ",'" + tb2.Rows[i]["ä¸é循ç¯å¨æ"].ToString() + "','" + tb2.Rows[i]["èªå¨è½¬ç§»"].ToString() + "','" + tb2.Rows[i]["å¤åæ è®°"].ToString() + "','" + tb2.Rows[i]["ä¾åºå代ç "].ToString() + "','" + tb2.Rows[i]["ä¾åºå"].ToString() + "','" + tb2.Rows[i]["å·¥èºåæ°"].ToString() + "','" + tb2.Rows[i]["å¾çº¸ç¼å·"].ToString() + "'" + |
| | | ",'" + tb2.Rows[i]["æ¬å·¥åºç¡®è®¤è®°å½"].ToString() + "','" + tb2.Rows[i]["夿³¨"].ToString() + "','" + tb2.Rows[i]["å¾å·çæ¬"].ToString() + "','" + tb2.Rows[i]["æ»è£
å¾å·"].ToString() + "','" + tb2.Rows[i]["æè´¨"].ToString() + "','" + tb2.Rows[i]["æåç¼å·"].ToString() + "','" + tb2.Rows[i]["çæ¬"].ToString() + "'" + |
| | | ",'" + tb2.Rows[i]["模å
·ç¼å·"].ToString() + "','" + tb2.Rows[i]["ç¨åºå·"].ToString() + "','" + tb2.Rows[i]["ç产å®é¢"].ToString() + "','" + tb2.Rows[i]["å·¥èºè·¯çº¿åç§°"].ToString() + "','" + tb2.Rows[i]["æ¶é´åä½"].ToString() + "')"); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = error; |
| | |
| | | //è¡¨å¤´åæ®µ |
| | | omdelMian = Newtonsoft.Json.JsonConvert.DeserializeObject<Gy_RoutingBill_temporary>(msg2); |
| | | |
| | | //JSONåºåå转æ¢åå
¸éå |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | List<object> jb = JsonConvert.DeserializeObject<List<object>>(msg3); |
| | | foreach (JObject item in jb) |
| | | |
| | | ds = oCN.RunProcReturn("select distinct 产å代ç from diyipi ", "diyipi"); |
| | | |
| | | for (int i = 0; i < ds.Tables[0].Rows.Count; i++) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | var hnumber = ""; |
| | | var HBillNo = ""; |
| | | long HInterID = 0; |
| | | int[] num = new int[2] { 1, 0 }; |
| | | |
| | | for (int i = 0; i < list.Count; i++) |
| | | { |
| | | //è·åç©ææ°æ® |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_Material Where HNumber='" + list[i]["产å代ç "].ToString() + "' and HUSEORGID=" + omdelMian.HOrgID, "h_v_IF_Material"); |
| | | var HMaterNumber = list[i]["产å代ç "].ToString(); |
| | | var HMaterID = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | var Hunitid = ds.Tables[0].Rows[0]["Hunitid"].ToString(); |
| | | var HUnitNumber = ds.Tables[0].Rows[0]["HUnitNumber"].ToString(); |
| | | |
| | | var HName = list[i]["å·¥èºè·¯çº¿åç§°"].ToString(); |
| | | var HPicNumVer = list[i]["å¾å·çæ¬"].ToString(); |
| | | var HPicNumAssemble = list[i]["æ»è£
å¾å·"].ToString(); |
| | | var HMaterTexture = list[i]["æè´¨"].ToString(); |
| | | var HProductNum = list[i]["æåç¼å·"].ToString(); |
| | | var HVerNum = list[i]["çæ¬"].ToString(); |
| | | var HMainPrice = list[i]["å·¥åºå·¥ä»·"].ToString(); |
| | | |
| | | if (hnumber != list[i]["产å代ç "].ToString()) |
| | | { |
| | | //è·åç¸å主表çåè¡¨çæ·»å æ¬¡æ° HEntryID |
| | | num[0] = 1; |
| | | hnumber = list[i]["产å代ç "].ToString(); |
| | | HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);//è·å¾ä¸ä¸ªæ°çåæ®å· |
| | | HInterID = DBUtility.ClsPub.CreateBillID_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo);//è·å¾ä¸ä¸ªæ°çid |
| | | |
| | | //æ·»å ä¸»è¡¨æ°æ® |
| | | oCN.RunProc("insert into Gy_RoutingBillMain(HInterID, HBillNo, HYear, HPeriod, HBillType, HDate, HBillStatus, " + |
| | | "HMaker, HMakeDate,HMaterNumber, HMaterID, Hunitid, HUnitNumber, HName," + |
| | | "HPicNumVer, HPicNumAssemble, HMaterTexture, HProductNum, HVerNum, HRoutingGroupID, HStandard, HRemark,HMainPrice" + |
| | | ",HOrgID)values" + |
| | | $"({HInterID}, '{HBillNo}', {omdelMian.HYear}, {omdelMian.HPeriod}, '{BillType}', GETDATE(), 1" + |
| | | $", '{user}', GETDATE(), '{HMaterNumber}', {HMaterID}, {Hunitid}, '{HUnitNumber}', '{HName}'," + |
| | | $" '{HPicNumVer}', '{HPicNumAssemble}', '{HMaterTexture}', '{HProductNum}', '{HVerNum}', 0, 1, '',{(HMainPrice==""?"0":HMainPrice)}" + |
| | | $",{omdelMian.HOrgID})"); |
| | | //è·å主表添å çæ¬¡æ° |
| | | num[1]++; |
| | | } |
| | | |
| | | //è·åä¾åºå |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_SupplierList Where ä¾åºå代ç ='" + list[i]["ä¾åºå代ç "].ToString()+"'", "h_v_Gy_SupplierList"); |
| | | var HSupID = "0"; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | HSupID = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | |
| | | //è·åå·¥åº |
| | | ds = oCN.RunProcReturn("select * from Gy_Process Where HNumber='" + list[i]["å·¥åºä»£ç "].ToString() + "'", "Gy_Process"); |
| | | var HProcID = "0"; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | HProcID = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | |
| | | //è·åå·¥ä½ä¸å¿ |
| | | ds = oCN.RunProcReturn("select * from Gy_WorkCenter Where HName='" + list[i]["å·¥ä½ä¸å¿"].ToString() + "'", "Gy_WorkCenter"); |
| | | var HCenterID = "0"; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | HCenterID = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | |
| | | var HProcNo = list[i]["å·¥åºåºå·"].ToString(); |
| | | var HTimeUnit = list[i]["æ¶é´åä½"].ToString(); |
| | | var hworkqty = list[i]["å å·¥æ°é"].ToString(); |
| | | var HFixPrice = list[i]["ç产å®é¢"].ToString(); |
| | | var HBadPrice = list[i]["ä¸åæ ¼åä»·"].ToString(); |
| | | var HWasterPrice = list[i]["æ¥åºåä»·"].ToString(); |
| | | var HBeginFixQty = list[i]["æ¬éåºå®å¼å·¥å¤©æ°"].ToString(); |
| | | var HBeginDayQty = list[i]["æ¬éå¼å·¥ä½é"].ToString(); |
| | | var HFixWorkDays = list[i]["ä¸éçå¾
天æ°"].ToString(); |
| | | var HTrunWorkDays = list[i]["ä¸é循ç¯å¨æ"].ToString(); |
| | | var HAutoTrunFlag = list[i]["èªå¨è½¬ç§»"].ToString(); |
| | | var HSupFlag = list[i]["å¤åæ è®°"].ToString(); |
| | | var HTechnologyParameter = list[i]["å·¥èºåæ°"].ToString(); |
| | | var HPicNum = list[i]["å¾çº¸ç¼å·"].ToString(); |
| | | var HProcCheckNote = list[i]["æ¬å·¥åºç¡®è®¤è®°å½"].ToString(); |
| | | var hpassrate = list[i]["è¯ç"].ToString(); |
| | | var hremark = list[i]["夿³¨"].ToString(); |
| | | var HMouldNo = list[i]["模å
·ç¼å·"].ToString(); |
| | | var HProcWorkNum = list[i]["ç¨åºå·"].ToString(); |
| | | //ç©æåç±» |
| | | |
| | | |
| | | |
| | | oCN.RunProc("Insert into Gy_RoutingBillSub (HInterID,HEntryID,HSupID,HProcID,HCenterID,HProcNO,HTimeUnit" + |
| | | ", hworkqty, HFixPrice, HBadPrice, HWasterPrice, HBeginFixQty, HBeginDayQty, HFixWorkDays" + |
| | | ", HTrunWorkDays, HAutoTrunFlag, HSupFlag, HTechnologyParameter, HPicNum, HProcCheckNote" + |
| | | ", hpassrate, hremark, HMouldNo, HProcWorkNum, HReadyTime, HQueueTime, HMoveTime, HUnitTime)values" + |
| | | $"({HInterID}, {num[0]}, {HSupID}, {HProcID},{HCenterID}, '{HProcNo}', '{HTimeUnit}'" + |
| | | $", {hworkqty}, {(HFixPrice == "" ? "0" : HFixPrice)}, {(HBadPrice == "" ? "0" : HBadPrice)}, {(HWasterPrice == "" ? "0" : HWasterPrice)}, {(HBeginFixQty == "" ? "0" : HBeginFixQty)}, {(HBeginDayQty == "" ? "0" : HBeginDayQty)}, {(HFixWorkDays == "" ? "0" : HFixWorkDays)}" + |
| | | $", {(HTrunWorkDays == "" ? "0" : HTrunWorkDays)},{(HAutoTrunFlag == "True" ? "1" : "0")},{(HSupFlag == "True" ? "1" : "0")}, '{HTechnologyParameter}', '{HPicNum}', '{HProcCheckNote}'" + |
| | | $", {hpassrate}, '{hremark}', '{HMouldNo}', '{HProcWorkNum}', 0, 0, 0, 0)"); |
| | | //èªå¢æ¬¡æ° |
| | | num[0]++; |
| | | if(omdelMian.HTProcessFlag == 1 ) |
| | | { |
| | | if ((i == list.Count - 1) || (list[i]["产å代ç "].ToString() != list[i + 1]["产å代ç "].ToString())) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1", "Gy_Process"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | HProcID = ds.Tables[0].Rows[0]["HItemID"].ToString(); |
| | | HProcNo = ds.Tables[0].Rows[0]["HSno"].ToString(); |
| | | oCN.RunProc("Insert into Gy_RoutingBillSub (HInterID,HEntryID,HSupID,HProcID,HCenterID,HProcNO,HTimeUnit" + |
| | | ", hworkqty, HFixPrice, HBadPrice, HWasterPrice, HBeginFixQty, HBeginDayQty, HFixWorkDays" + |
| | | ", HTrunWorkDays, HAutoTrunFlag, HSupFlag, HTechnologyParameter, HPicNum, HProcCheckNote" + |
| | | ", hpassrate, hremark, HMouldNo, HProcWorkNum, HReadyTime, HQueueTime, HMoveTime, HUnitTime)values" + |
| | | $"({HInterID}, {num[0]}, {HSupID}, {HProcID},{HCenterID}, '{HProcNo}', '{HTimeUnit}'" + |
| | | $", {hworkqty}, {(HFixPrice == "" ? "0" : HFixPrice)}, {(HBadPrice == "" ? "0" : HBadPrice)}, {(HWasterPrice == "" ? "0" : HWasterPrice)}, {(HBeginFixQty == "" ? "0" : HBeginFixQty)}, {(HBeginDayQty == "" ? "0" : HBeginDayQty)}, {(HFixWorkDays == "" ? "0" : HFixWorkDays)}" + |
| | | $", {(HTrunWorkDays == "" ? "0" : HTrunWorkDays)},{(HAutoTrunFlag == "True" ? "1" : "0")},{(HSupFlag == "True" ? "1" : "0")}, '{HTechnologyParameter}', '{HPicNum}', '{HProcCheckNote}'" + |
| | | $", {hpassrate}, '{hremark}', '{HMouldNo}', '{HProcWorkNum}', 0, 0, 0, 0)"); |
| | | } |
| | | num[0]++; |
| | | } |
| | | |
| | | var HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);//è·å¾ä¸ä¸ªæ°çåæ®å· |
| | | var HInterID = DBUtility.ClsPub.CreateBillID_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo);//è·å¾ä¸ä¸ªæ°çid |
| | | oCN.RunProc($"exec Gy_RoutingBill_Excel '{ds.Tables[0].Rows[i]["产å代ç "].ToString()}',{HInterID},'{HBillNo}','{user}',{omdelMian.HOrgID},{omdelMian.HTProcessFlag} "); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "导å
¥å®æ,å
±" + num[1] + "个工èºè·¯çº¿"; |
| | | objJsonResult.Message = "导å
¥å®æ,å
±" + ds.Tables[0].Rows.Count + "个工èºè·¯çº¿"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | /// <returns></returns> |
| | | [Route("JIT_Complete/JIT_CompleteDetailList")] |
| | | [HttpGet] |
| | | public object JIT_CompleteDetailList(string sWhere, string HMainICMOEntryID) |
| | | public object JIT_CompleteDetailList(string sWhere, string HMainICMOEntryID,string HMainICMOInterID,string HICMOInterID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_JIT_MOMaterReadysBill where 主ç产订ååå
ç = '" + HMainICMOEntryID + "' " + sWhere + " order by æ¥è®¡åæ¥æ,ç©æID desc ", "h_v_JIT_MOMaterReadysBill"); |
| | | string sql = ""; |
| | | if (HMainICMOEntryID != "-1" && HMainICMOInterID != "-1" && HICMOInterID != "-1") |
| | | { |
| | | sql = "and 主ç产订ååå
ç = '" + HMainICMOEntryID + "' and 主ç产订å主å
ç ='" + HMainICMOInterID + "' and æ¥è®¡å订å主å
ç ='" + HICMOInterID + "'"; |
| | | } |
| | | ds = oCN.RunProcReturn("select * from h_v_JIT_MOMaterReadysBill where 1=1 " +sql + sWhere + " order by æ¥è®¡åæ¥æ,ç©æID desc ", "h_v_JIT_MOMaterReadysBill"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | { |
| | | try |
| | | { |
| | | oCN.BeginTran(); |
| | | Stopwatch sw = new Stopwatch(); |
| | | omdelMian = JsonConvert.DeserializeObject<Sc_WorkBillSortBillMain>(sWhere); |
| | | string sql = $"exec JIT_qtfx {omdelMian.HProdORGID},{omdelMian.HWorkShopID},'{user}' "; |
| | |
| | | DataTable resulTable = ds.Tables[0]; |
| | | if (resulTable.Rows[0][0].ToString().Contains("失败")) |
| | | { |
| | | return resulTable.Rows[0][0].ToString(); |
| | | //éæ¾é½å¥æä½ é¿å
å¤äººåæ¶è¿è¡é½å¥åæ |
| | | oCN.RunProc($"update T_PRD_QTFX set FSTATUS = 0 where FPRDORGID ={omdelMian.HProdORGID} and FSTATUS = 1 "); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = resulTable.Rows[0][0].ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | |
| | | string fDayPlanFEntryids = string.Empty; |
| | | if (BomList.Count == 0) |
| | | { |
| | | return "没æéè¦è¿è¡é½å¥åæçæ°æ®"; |
| | | //éæ¾é½å¥æä½ é¿å
å¤äººåæ¶è¿è¡é½å¥åæ |
| | | oCN.RunProc($"update T_PRD_QTFX set FSTATUS = 0 where FPRDORGID ={omdelMian.HProdORGID} and FSTATUS = 1 "); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "没æéè¦è¿è¡é½å¥åæçæ°æ®"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | |
| | | sw.Stop();//ç»æè®¡æ¶ |
| | | LogService.Write("é½å¥åæè¿è¡æ»æ¶é¿ï¼" + sw.Elapsed); |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æä½æå"; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | LogService.Write("æä½å¤±è´¥ï¼" + e.Message.ToString()); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | } |
| | | |
| | | #region çäº§é¢ææç å表 |
| | | |
| | | [Route("Sc_PckSplit/Get_PPickingBillList")] |
| | | [HttpGet] |
| | | public Object Get_PPickingBillList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | string sql1 = string.Format(@"select * from h_v_Kf_ICStockBillList where HBillType='1204' " + sWhere); |
| | | DataSet ds=oCn.RunProcReturn(sql1, "h_v_Kf_ICStockBillList"); |
| | | if (ds.Tables[0].Rows.Count == 0 || ds == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢å¤±è´¥ï¼" + DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ææ æ°æ®"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¸ä¼ 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 产线å
³é®ä»¶ç»å®SNå·æ¥è¯¢ |
| | | [Route("Sc_PckSplit/Get_PHPCruxBillList")] |
| | | [HttpGet] |
| | | public Object Get_PHPCruxBillList(string HBarCode) |
| | | { |
| | | try |
| | | { |
| | | string sql1 = string.Format(@"select a.HMaterID,m.HName HMaterName,m.HModel HMaterSpec,a.HQtyMust,0 HQty,'"+ HBarCode + "' as HCPM from Sc_PPBomBillSub a left join Gy_Material m on a.HMaterID=m.HItemID where HICMOEntryID=(select HSourceEntryID from Gy_BarCodeBill where HBarCode='"+HBarCode+"')"); |
| | | DataSet ds = oCn.RunProcReturn(sql1, "Sc_PPBomBillSub"); |
| | | if (ds.Tables[0].Rows.Count == 0 || ds == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢å¤±è´¥ï¼" + DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | //å
åè¿ä¸´æ¶è¡¨åè¿åæ°æ® |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ææ æ°æ®"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¸ä¼ 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | foreach (DataRow item in ds.Tables[0].Rows) |
| | | { |
| | | JObject FentityModel = new JObject(); |
| | | FentityModel.Add("FReportType", new JObject() { ["Fnumber"] = "1" });//çäº§æ±æ¥ç±»å |
| | | FentityModel.Add("FIsNew", false);// æºåç±»å |
| | | FentityModel.Add("FReportType", new JObject() { ["Fnumber"] = dr1["FREPORTTYPENUMBER"].ToString() });//çäº§æ±æ¥ç±»å |
| | | FentityModel.Add("FSrcBillType", "PRD_MO");// æºåç±»å |
| | | FentityModel.Add("FProductType", "1");// 产åç±»å |
| | | FentityModel.Add("FSrcBillNo", item["ä»»å¡å"].ToString());// æºåç¼å· |
| | |
| | | FentityModel.Add("FBomId", new JObject() { ["Fnumber"] = dr1["FBOMNUM"].ToString() }); //BOMçæ¬ï¼FBomId(å¿
填项) |
| | | FentityModel.Add("FCostRate", dr1["FCostRate"].ToString());// ææ¬æé |
| | | FentityModel.Add("FISBACKFLUSH", dr1["FISBACKFLUSH"].ToString() == "1" ? true : false);// åå²é¢æ |
| | | FentityModel.Add("F_bsv_Base1", new JObject() { ["Fnumber"] = dr1["FPREBDONENUMBER"].ToString() }); //å
è£
æ è¯ |
| | | FentityModel.Add("FLot", new JObject() { ["FNumber"] = dr1["FBATCHNO"].ToString() }); //å
è£
æ è¯ |
| | | //æ¹å· |
| | | //FFLOWID FFLOWLINEID FRULEID FSTABLENAME |
| | | //f6e6eec3 - 5267 - 4f02 - 8593 - b633da508a72 3 PRD_MO2MORPT T_PRD_MOENTRY |
| | | //ä¸å¡æµç¨å¾ï¼FEntity_Link_FFlowId |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_SeOrderBillList"); |
| | | } |
| | | |
| | | //if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | | //{ |
| | | //objJsonResult.code = "0"; |
| | | //objJsonResult.count = 0; |
| | | //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; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è¿åéå®è®¢å卿å表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <param name="user"></param> |
| | | /// <returns></returns> |
| | | [Route("Xs_SeOrderBill/DyColList")] |
| | | [HttpGet] |
| | | public object DyColList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | //夿æ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Xs_SeOrderBillQuery", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æéæ¥è¯¢!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_SeOrderBillList where 1 = 1 " + sWhere + " order by hmainid desc ", "h_v_IF_SeOrderBillList"); |
| | | List<object> listCol = new List<object>(); |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string str = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | listCol.Add(JsonConvert.DeserializeObject(str)); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = listCol; |
| | | return objJsonResult; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | ")", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCn.RunProc("Update Gy_StockCheckItem set HEndflag=0 where HItemID=" + oBill.HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | #region çç¹åæå表 |
| | | [Route("Gy_StockCheckItemBill/Get_InventoryAnalysisList")] |
| | |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | //夿æ¯å¦éæ©çç¹æ¹æ¡ï¼æ¯=>ï¼ç¨çç¹æ¹æ¡å表å对æ¯ï¼ï¼å¦=>ï¼ç¨å¨å
·æ¡£æ¡å对æ¯ï¼ |
| | | if (sID==null|| sID == "") |
| | | if (sID == null || sID == "") |
| | | { |
| | | if (sWhere=="pk") |
| | | if (sWhere == "pk") |
| | | { |
| | | sql = string.Format(@"select * from h_v_Sc_MouldInventoryAnalysisPK"); |
| | | } |
| | |
| | | { |
| | | if (sWhere == "pk") |
| | | { |
| | | sql = string.Format(@"select * from h_v_Sc_MouldInventoryAnalysisPK2 WHERE HInterID="+ sID); |
| | | sql = string.Format($"exec h_p_Sc_MouldInventoryAnalysisPK '{sID}'"); |
| | | } |
| | | else |
| | | { |
| | |
| | | string msg2 = sArray[0].ToString();//è¡¨æ ¼æ°æ® |
| | | string user = sArray[1].ToString();//user |
| | | string userID = sArray[2].ToString();//userID |
| | | string sName = sArray[3].ToString();//çç¹æ¹æ¡ |
| | | //æ¥è¯¢çç¹æ¹æ¡åå»ºæ¥æ |
| | | DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName=" + sName, "Gy_StockCheckItem"); |
| | | string HDate = dd.Tables[0].Rows[0]["HMakeTime"].ToString(); |
| | | |
| | | //è½¬åæ ¼å¼ |
| | | ListModels oListModels = new ListModels(); |
| | |
| | | { |
| | | var HBarCode = item.HBarCode; |
| | | var HItemID = item.HItemID; |
| | | string HDate = item.HMakeDate; |
| | | string HBillNo = ""; |
| | | Int64 HInterID = 0;//æ¾ç¤ºçåæ®µ |
| | | DataSet ds1 = new DataSet(); |
| | |
| | | ",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('3814','3814'," + HInterID + ",'" + HBillNo + "','" + HDate+"'"+ |
| | | ", '" + user + "',getdate()" + |
| | | ", " + dr["HSupID"].ToString() + ", 1," + dr["HNowSupID"].ToString() + ",0,0,0,0" + |
| | | " values('3814','3814'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | ", '" + user + "','" + HDate+ |
| | | "', " + dr["HSupID"].ToString() + ", 1," + dr["HNowSupID"].ToString() + ",0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",' ',0" + |
| | | ") "; |
| | | string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID, |
| | |
| | | oCn.RunProc("update Sc_MouldStockBillMain_Temp set HCheckStatus=1 where HitemID=" + HItemID); |
| | | oCn.Commit(); |
| | | } |
| | | |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸æåï¼"; |
| | |
| | | string msg2 = sArray[0].ToString();//è¡¨æ ¼æ°æ® |
| | | string user = sArray[1].ToString();//user |
| | | string userID = sArray[2].ToString();//userID |
| | | string sName = sArray[3].ToString();//çç¹æ¹æ¡ |
| | | //æ¥è¯¢çç¹æ¹æ¡åå»ºæ¥æ |
| | | DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName=" + sName, "Gy_StockCheckItem"); |
| | | string HDate = dd.Tables[0].Rows[0]["HMakeTime"].ToString(); |
| | | |
| | | //è½¬åæ ¼å¼ |
| | | ListModels oListModels = new ListModels(); |
| | |
| | | var HBarCode = item.HBarCode; |
| | | var HItemID = item.HItemID; |
| | | string HBillNo = ""; |
| | | string HDate = item.HMakeDate; |
| | | Int64 HInterID = 0;//æ¾ç¤ºçåæ®µ |
| | | DataSet ds1 = new DataSet(); |
| | | ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain"); |
| | |
| | | ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('3827','3827'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | ", '" + user + "',getdate()" + |
| | | ", " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + ",isnull('" + dr["HNowSupID"].ToString() + "',0),0,0,0,0" + |
| | | ", '" + user + "','" +HDate+ |
| | | "', " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + ",isnull('" + dr["HNowSupID"].ToString() + "',0),0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",'',0" + |
| | | ") "; |
| | | |
| | | |
| | | string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID, |
| | | HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID, |
| | | HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID, |
| | |
| | | "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr1["HQty"].ToString() + ",0," + |
| | | "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0" |
| | | + ",0,0,0," + userID + ",0,100005,'')"); |
| | | |
| | | |
| | | //主表 |
| | | oCn.BeginTran(); |
| | | oCn.RunProc(sql); |
| | |
| | | oCn.RunProc("update Sc_MouldStockBillMain_Temp set HCheckStatus=1 where HitemID=" + HItemID); |
| | | oCn.Commit(); |
| | | } |
| | | |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸æåï¼"; |
| | |
| | | string msg2 = sArray[0].ToString();//è¡¨æ ¼æ°æ® |
| | | string user = sArray[1].ToString();//user |
| | | string userID = sArray[2].ToString();//userID |
| | | string sName = sArray[3].ToString();//çç¹æ¹æ¡ |
| | | //æ¥è¯¢çç¹æ¹æ¡åå»ºæ¥æ |
| | | DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName=" + sName, "Gy_StockCheckItem"); |
| | | string HDate = dd.Tables[0].Rows[0]["HMakeTime"].ToString(); |
| | | |
| | | |
| | | //è½¬åæ ¼å¼ |
| | | ListModels oListModels = new ListModels(); |
| | |
| | | var HBarCode = item.HBarCode; |
| | | var HItemID = item.HItemID; |
| | | string HBillNo = ""; |
| | | string HDate = item.HMakeDate; |
| | | string sql, sql1; |
| | | Int64 HInterID = 0;//æ¾ç¤ºçåæ®µ |
| | | HInterID = DBUtility.ClsPub.CreateBillID("3828", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | HBillNo = DBUtility.ClsPub.CreateBillCode("3828", ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | DataSet ds1 = new DataSet(); |
| | | ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain"); |
| | | ds1 = oCn.RunProcReturn("select top 1 * from Sc_MouldStockBillMain_Temp where HBarCode='" + HBarCode + "' and HItemID='" + HItemID + "'", "Sc_MouldStockBillMain_Temp"); |
| | | DataRow dr = ds.Tables[0].Rows[0]; |
| | | DataRow dr1 = ds1.Tables[0].Rows[0]; |
| | | HInterID = DBUtility.ClsPub.CreateBillID("3832", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | HBillNo = DBUtility.ClsPub.CreateBillCode("3832", ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | |
| | | string sql = "Insert Into Sc_MouldStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HMaker,HMakeDate" + |
| | | ",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('3832','3832'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | ", '" + user + "',getdate()" + |
| | | ", " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",' ',0" + |
| | | ") "; |
| | | string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID, |
| | | if (HItemID == 0) |
| | | { |
| | | sql = "Insert Into Sc_MouldStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HMaker,HMakeDate,HRemark" + |
| | | ",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('3828','3828'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | ", '" + user + "','"+ HDate + "','" + sName + "'" + |
| | | ",0,0," + dr["HNowSupID"].ToString() + ",0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",' ',0" + |
| | | ") "; |
| | | sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID, |
| | | HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID, |
| | | HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID, |
| | | HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'',0,0,'',''," + |
| | | "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr1["HQty"].ToString() + ",0," + |
| | | "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0" |
| | | + ",0,0,0," + userID + ",0,100005,'')"); |
| | | HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'" + sName.ToString() + "',0,0,'',''," + |
| | | "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + ",0,0," + |
| | | "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + ",0,0,0,0" |
| | | + ",0,0,0," + userID + ",0,100005,'')"); |
| | | } |
| | | else |
| | | { |
| | | ds1 = oCn.RunProcReturn("select top 1 * from Sc_MouldStockBillMain_Temp where HBarCode='" + HBarCode + "' and HItemID='" + HItemID + "'", "Sc_MouldStockBillMain_Temp"); |
| | | DataRow dr1 = ds1.Tables[0].Rows[0]; |
| | | sql = "Insert Into Sc_MouldStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HMaker,HMakeDate,HRemark" + |
| | | ",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('3832','3832'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | ", '" + user + "',getdate()" + ",'" + sName + "'" + |
| | | ", " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",' ',0" + |
| | | ") "; |
| | | sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID, |
| | | HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HPropertyID,HSecUnitRate,HSecUnitID,HUnitID, |
| | | HBatchNo,HQtyMust,HQty,HPrice,HMoney,HDesignLife,HLeaveLife,HUseLife,HWHID,HSCWHID,HSPID,HSCSPID,HSPGroupID,HCorrespondentTypeID,HCorrespondentID, |
| | | HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID) values(" + HInterID + ",1,'',getdate(),0,'" + sName.ToString() + "',0,0,'',''," + |
| | | "0,0," + dr["HInterID"].ToString() + ",0," + dr["HSecUnitRate"].ToString() + ",0," + dr["HUnitID"].ToString() + ",0," + dr["HProdQty"].ToString() + "," + dr1["HQty"].ToString() + ",0," + |
| | | "0," + dr["HDesignLife"].ToString() + "," + dr["HLeaveLife"].ToString() + "," + dr["HUseLife"].ToString() + "," + dr1["HCorrespondentID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0" |
| | | + ",0,0,0," + userID + ",0,100005,'')"); |
| | | } |
| | | |
| | | |
| | | //主表 |
| | | oCn.BeginTran(); |
| | |
| | | string msg2 = sArray[0].ToString();//è¡¨æ ¼æ°æ® |
| | | string user = sArray[1].ToString();//user |
| | | string userID = sArray[2].ToString();//userID |
| | | string sName = sArray[3].ToString();//çç¹æ¹æ¡ |
| | | //æ¥è¯¢çç¹æ¹æ¡åå»ºæ¥æ |
| | | DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName=" + sName, "Gy_StockCheckItem"); |
| | | string HDate = dd.Tables[0].Rows[0]["HMakeTime"].ToString(); |
| | | |
| | | //è½¬åæ ¼å¼ |
| | | ListModels oListModels = new ListModels(); |
| | |
| | | var HBarCode = item.HBarCode; |
| | | var HItemID = item.HItemID; |
| | | string HBillNo = ""; |
| | | string HDate = item.HMakeDate; |
| | | Int64 HInterID = 0;//æ¾ç¤ºçåæ®µ |
| | | DataSet ds1 = new DataSet(); |
| | | ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain"); |
| | |
| | | ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('3802','3802'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | ", '" + user + "',getdate()" + |
| | | ", " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" + |
| | | ", '" + user + "','" +HDate+ |
| | | "', " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",' ',0" + |
| | | ") "; |
| | | string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID, |
| | |
| | | oCn.RunProc("update Sc_MouldStockBillMain_Temp set HCheckStatus=1 where HitemID=" + HItemID); |
| | | oCn.Commit(); |
| | | } |
| | | |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸æåï¼"; |
| | |
| | | public object MakeProdBack([FromBody] JObject msg) |
| | | { |
| | | try |
| | | { var _value = msg["msg"].ToString(); |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString();//è¡¨æ ¼æ°æ® |
| | | string user = sArray[1].ToString();//user |
| | | string userID = sArray[2].ToString();//userID |
| | | string sName = sArray[3].ToString();//çç¹æ¹æ¡ |
| | | //æ¥è¯¢çç¹æ¹æ¡åå»ºæ¥æ |
| | | DataSet dd = oCn.RunProcReturn("select * from Gy_StockCheckItem where HName=" + sName, "Gy_StockCheckItem"); |
| | | string HDate = dd.Tables[0].Rows[0]["HMakeTime"].ToString(); |
| | | |
| | | //è½¬åæ ¼å¼ |
| | | ListModels oListModels = new ListModels(); |
| | |
| | | var HBarCode = item.HBarCode; |
| | | var HItemID = item.HItemID; |
| | | string HBillNo = ""; |
| | | string HDate = item.HMakeDate; |
| | | Int64 HInterID = 0;//æ¾ç¤ºçåæ®µ |
| | | DataSet ds1 = new DataSet(); |
| | | ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain"); |
| | |
| | | ",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('3803','3803'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | ", '" + user + "',getdate()" + |
| | | ", " + dr["HNowSupID"].ToString() + "," + dr["HNowSupTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" + |
| | | ", '" + user + "','" +HDate+ |
| | | "', " + dr["HNowSupID"].ToString() + "," + dr["HNowSupTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" + |
| | | ", 0," + dr["HDeptID"].ToString() + ",' ',0" + |
| | | ") "; |
| | | string sql1 = string.Format(@"Insert Into Sc_MouldStockBillSub (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark,HSourceInterID, |
| | |
| | | oCn.RunProc("update Sc_MouldStockBillMain_Temp set HCheckStatus=1 where HitemID=" + HItemID); |
| | | oCn.Commit(); |
| | | } |
| | | |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸æåï¼"; |
| New file |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class Pay_MonthlySalaryReportController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | /// <summary> |
| | | /// è¿åéè´è®¢åå表 |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Pay_MonthlySalaryReport/list")] |
| | | [HttpGet] |
| | | public object list(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | string sql = $"exec [h_p_MonthlySalaryReport] '{sWhere}'"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList"); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | [Route("Pay_MonthlySalaryReport/list2")] |
| | | [HttpGet] |
| | | public object list2(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | List<OptionListModel> optionList = new List<OptionListModel>(); |
| | | string sql = $"exec [h_p_MonthlySalaryReport] '{sWhere}'"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList"); |
| | | if (ds != null) |
| | | { |
| | | foreach (DataColumn item in ds.Tables[0].Columns) |
| | | { |
| | | optionList.Add(new OptionListModel |
| | | { |
| | | field = item.ToString(), |
| | | title = item.ToString(), |
| | | sort = true, |
| | | hide = false, |
| | | }); |
| | | } |
| | | string option = string.Join(",", optionList); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = optionList; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åå§åè¡¨æ ¼å¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class Pay_PieceRateWageReportController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | |
| | | /// <summary> |
| | | /// è¿åéè´è®¢åå表 |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Pay_PieceRateWageReport/list")] |
| | | [HttpGet] |
| | | public object list(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | string sql = $"exec [h_p_PieceRateWageReport] '{sWhere}'"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList"); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | [Route("Pay_PieceRateWageReport/list2")] |
| | | [HttpGet] |
| | | public object list2(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | List<OptionListModel> optionList = new List<OptionListModel>(); |
| | | string sql = $"exec [h_p_PieceRateWageReport] '{sWhere}'"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList"); |
| | | if (ds != null) |
| | | { |
| | | foreach (DataColumn item in ds.Tables[0].Columns) |
| | | { |
| | | optionList.Add(new OptionListModel |
| | | { |
| | | field = item.ToString(), |
| | | title = item.ToString(), |
| | | sort = true, |
| | | hide = false, |
| | | }); |
| | | } |
| | | string option = string.Join(",", optionList); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = optionList; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åå§åè¡¨æ ¼å¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class OptionListModel |
| | | { |
| | | public string field { get; set; } |
| | | public string title { get; set; } |
| | | public bool sort { get; set; } |
| | | public bool hide { get; set; } |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | ------------------------2022/7/14 10:30:34------------------------------ |
| | | æåï¼ |
| | | |
| New file |
| | |
| | | ------------------------2022/7/14 10:30:35------------------------------ |
| | | ææé |
| | | |
| New file |
| | |
| | | ------------------------2022/7/14 10:30:35------------------------------ |
| | | select * from h_v_Sc_MouldProdInHouseBillList where åºåç»ç»='ææºäºä¸é¨' and CONVERT(varchar(100),æ¥æ, 23) >= '2022-06-14' and CONVERT(varchar(100),æ¥æ, 23) <= '2022-07-14'order by hmainid desc |
| | | |
| New file |
| | |
| | | ------------------------2022/7/14 10:41:44------------------------------ |
| | | æåï¼ |
| | | |
| New file |
| | |
| | | ------------------------2022/7/14 10:41:44------------------------------ |
| | | ææé |
| | | |
| New file |
| | |
| | | ------------------------2022/7/14 10:41:44------------------------------ |
| | | select * from h_v_Sc_MouldProdInHouseBillList where åºåç»ç»='ææºäºä¸é¨' and CONVERT(varchar(100),æ¥æ, 23) >= '2022-06-14' and CONVERT(varchar(100),æ¥æ, 23) <= '2022-07-14'order by hmainid desc |
| | | |
| New file |
| | |
| | | ------------------------2022/7/14 10:41:45------------------------------ |
| | | æåï¼ |
| | | |
| New file |
| | |
| | | ------------------------2022/7/14 10:41:45------------------------------ |
| | | ææé |
| | | |
| New file |
| | |
| | | ------------------------2022/7/14 10:41:45------------------------------ |
| | | select * from h_v_Sc_MouldProdInHouseBillList where åºåç»ç»='ææºäºä¸é¨' and CONVERT(varchar(100),æ¥æ, 23) >= '2022-06-14' and CONVERT(varchar(100),æ¥æ, 23) <= '2022-07-14'order by hmainid desc |
| | | |
| New file |
| | |
| | | ------------------------2022/7/14 10:30:36------------------------------ |
| | | select * from h_v_Sc_MouldProdOutHouseBillList where åºåç»ç»='ææºäºä¸é¨' |
| | | |
| New file |
| | |
| | | 2022/7/14 10:30:35 and CONVERT(varchar(100),æ¥æ, 23) >= '2022-06-14' and CONVERT(varchar(100),æ¥æ, 23) <= '2022-07-14';ææºäºä¸é¨ |
| | | |
| | | 2022/7/14 10:41:44 and CONVERT(varchar(100),æ¥æ, 23) >= '2022-06-14' and CONVERT(varchar(100),æ¥æ, 23) <= '2022-07-14';ææºäºä¸é¨ |
| | | |
| | | 2022/7/14 10:41:45 and CONVERT(varchar(100),æ¥æ, 23) >= '2022-06-14' and CONVERT(varchar(100),æ¥æ, 23) <= '2022-07-14';ææºäºä¸é¨ |
| | |
| | | <Compile Include="Controllers\ä»å管ç\éªæ¶å
¥åº\Kf_StepFoldinBillController.cs" /> |
| | | <Compile Include="Controllers\忥èªå¨æ«ç 线\ScanlineAPIController.cs" /> |
| | | <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_StockCheckItemBillController.cs" /> |
| | | <Compile Include="Controllers\å·¥èµç®¡ç\Pay_MonthlySalaryReportController.cs" /> |
| | | <Compile Include="Controllers\å·¥èµç®¡ç\Pay_PieceRateWageReportController.cs" /> |
| | | <Compile Include="Controllers\å·¥èµç®¡ç\Gy_ClassTimePrjBillController.cs" /> |
| | | <Compile Include="Controllers\å·¥èµç®¡ç\Gy_ClassTimePrjSubController.cs" /> |
| | | <Compile Include="Controllers\å·¥èµç®¡ç\Pay_OtherBalBillController.cs" /> |
| | |
| | | <Compile Include="Models\Sc_WorkBillSortBillSub.cs" /> |
| | | <Compile Include="Models\Sc_WorkDemandPlanBillMain.cs" /> |
| | | <Compile Include="Models\Sc_WorkDemandPlanBillSub.cs" /> |
| | | <Compile Include="Models\卿å\OptionListModel.cs" /> |
| | | <Compile Include="Models\å·¥èµç®¡ç\ClsGy_ClassTimePrj_Model.cs" /> |
| | | <Compile Include="Models\å·¥èµç®¡ç\ClsPay_GroupBalBillEmp.cs" /> |
| | | <Compile Include="Models\å·¥èµç®¡ç\ClsPay_GroupBalBillMain.cs" /> |