| | |
| | | } |
| | | #endregion |
| | | |
| | | #region [éè¿æ¡ç ç¼å·è·åHItemId] |
| | | [Route("Sc_BarCode/Get_HItemId")] |
| | | [HttpGet] |
| | | public object Get_HItemId(string sWhere) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_BarCodeBillList where æ¡ç ç¼å· = '" + sWhere + "'", "h_v_IF_BarCodeBillList"); |
| | | |
| | | 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 = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region [éè¿éæ©çæºåä¿¡æ¯æ¥æ¾æºåæ°æ®] |
| | | [Route("Sc_BarCode/SelectReportFromBillList")] |
| | | [HttpPost] |
| | |
| | | ordrlist.HPinfan = dt.Rows[i]["HPinfan"].ToString(); |
| | | ordrlist.HSourceName = dt.Rows[i]["ç产线"].ToString(); |
| | | ordrlist.HEndDate = dt.Rows[i]["计åå®å·¥æ¥æ"].ToString();//忥 ç产订å å¤±ææ¥æ |
| | | ordrlist.HMinQty = dt.Rows[i]["æå°å
è£
æ°"].ToString(); |
| | | if (HBarCodeType == "仪å¨å¤è´ä»¶æ¡ç 容å¨è§å") |
| | | { |
| | | ordrlist.HMinQty = dt.Rows[i]["æªçææ¡ç æ°é"].ToString(); |
| | |
| | | ordrlist.HUnitName = dt.Rows[i]["计éåä½"].ToString(); |
| | | ordrlist.HRemark = dt.Rows[i]["夿³¨"].ToString(); |
| | | ordrlist.HMTONo = dt.Rows[i]["计åè·è¸ªå·"].ToString(); |
| | | |
| | | if(HSourceBillType == "æ¶æéç¥å") |
| | | { |
| | | ordrlist.HFurnaceNO = dt.Rows[i]["çå·"].ToString(); |
| | | ordrlist.HCoilNO = dt.Rows[i]["é¢å·æå
å·"].ToString(); |
| | | ordrlist.HheatNO = dt.Rows[i]["çå¤ç"].ToString(); |
| | | } |
| | | |
| | | if (HBarCodeType == "仪å¨å¤è´ä»¶æ¡ç 容å¨è§å") |
| | | { |
| | | ordrlist.HMinQty = dt.Rows[i]["æªçææ¡ç æ°é"].ToString(); |
| | |
| | | return ordrlist; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region [åæ¥èµæ] |
| | | [Route("Sc_BarCode/Sync_data")] |
| | | [HttpGet] |
| | | public object Sync_data() |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | try |
| | | { |
| | | oCn.RunProc("exec h_p_IF_ERPDataToLocal", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "忥åºç¡èµææåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "忥åºç¡èµæå¤±è´¥ï¼" + e; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region [æ¹æ¬¡] |
| | | [Route("Sc_BarCode/Batch")] |
| | | [HttpGet] |
| | | public object Batch(int HMaterID, string HBatchNo) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | bool b = false; |
| | | if (HMaterID != 0) |
| | | { |
| | | DataSet oDs = oCn.RunProcReturn("exec h_p_Gy_BarCodeBill_GetBatchNo " + HMaterID.ToString() + ",'" + HBatchNo + "','" + "" + "','" + "" + "'", "h_p_Gy_BarCodeBill_GetBatchNo"); |
| | | // |
| | | if (oDs == null && oDs.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.Message="çææ¹æ¬¡å¤±è´¥ï¼"; |
| | | return objJsonResult; |
| | | } |
| | | else if (DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0][0]) == "1") |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.Message = "çææ¹æ¬¡æåï¼"; |
| | | objJsonResult.data = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0]["HBatchNo"]); |
| | | HBatchNo = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0]["HBatchNo"]); |
| | | b = true; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //æç»è¡¨æ¯å¦ä¸ºé¶è¡ |
| | | if (b == false) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.Message="没æéè¦çææ¹æ¬¡çæç»è¡ï¼"; |
| | | return objJsonResult; |
| | | } |
| | | else //å®å
¨å°é |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region [æ¡ç çææ¥å£] |
| | |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region[忮宿´æ§å¤æ] |
| | | private bool Sub_AllowSave(string msg2, string HSelectBarCodeType) |
| | |
| | | int k = 0; |
| | | int n = 0; //å䏿¹çææ¡ç ä¸çç¬¬å æ¡ |
| | | string sTMNumber = ""; //æ¡ç èªå®ä¹åç¼ |
| | | |
| | | string HCoilNO = ""; |
| | | string HFurnaceNO = ""; |
| | | string HFactory = ""; |
| | | decimal HAuxQty = 0; |
| | | string HheatNO = ""; |
| | | |
| | | DataSet Ds; |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | |
| | | HNumber = DBUtility.ClsPub.isStrNull(ordrlist[j].HMaterID); |
| | | HMaterNumber = DBUtility.ClsPub.isStrNull(ordrlist[j].HMaterNumber); |
| | | HBatchNo = ClsPub.isStrNull(ordrlist[j].HBatchNo); |
| | | |
| | | HCoilNO = ClsPub.isStrNull(ordrlist[j].HCoilNO); |
| | | HFurnaceNO = ClsPub.isStrNull(ordrlist[j].HFurnaceNO); |
| | | HFactory = ClsPub.isStrNull(ordrlist[j].HFactory); |
| | | HAuxQty = ClsPub.isLong(ordrlist[j].HAuxQty); |
| | | HheatNO = ClsPub.isStrNull(ordrlist[j].HheatNO); |
| | | //æ¥æè·åæ¹å¼ |
| | | sDate = DateTime.Now.ToString(); |
| | | // |
| | |
| | | barcode.HInnerBillNo2 = ordrlist[j].HInnerBillNo; |
| | | barcode.HMaker2 = ordrlist[j].HMaker; |
| | | barcode.HGiveAwayFlag2 = ordrlist[j].HGiveAwayFlag; |
| | | |
| | | barcode.HCoilNO = ordrlist[j].HCoilNO; |
| | | barcode.HFurnaceNO = ordrlist[j].HFurnaceNO; |
| | | barcode.HFactory = ordrlist[j].HFactory; |
| | | barcode.HAuxQty = ordrlist[j].HAuxQty; |
| | | barcode.HheatNO = ordrlist[j].HheatNO; |
| | | ListRows.Add(barcode); |
| | | k = k + 1; |
| | | n = n + 1; |
| | |
| | | string HInnerBillNo = ""; |
| | | bool HGiveAwayFlag = false; |
| | | Int64 HEntryID = 0; |
| | | |
| | | string HCoilNO2 = ""; |
| | | string HFurnaceNO2 = ""; |
| | | string HFactory2 = ""; |
| | | decimal HAuxQty2 = 0; |
| | | string HheatNO2 = ""; |
| | | DateTime HProduceDate; |
| | | DateTime HExpiryDate; |
| | | try |
| | | { |
| | | oCN.BeginTran(); |
| | |
| | | HSeOrderBillNo = ClsPub.isStrNull(ListRows[i].HSeOrderBillNo2); |
| | | HInnerBillNo = ClsPub.isStrNull(ListRows[i].HInnerBillNo2); |
| | | HGiveAwayFlag = ClsPub.isBool(ListRows[i].HGiveAwayFlag2); |
| | | |
| | | HCoilNO2 = ClsPub.isStrNull(ListRows[i].HCoilNO); |
| | | HFurnaceNO2 = ClsPub.isStrNull(ListRows[i].HFurnaceNO); |
| | | HFactory2 = ClsPub.isStrNull(ListRows[i].HFactory); |
| | | HAuxQty2 = ClsPub.isLong(ListRows[i].HAuxQty); |
| | | HheatNO2 = ClsPub.isStrNull(ListRows[i].HheatNO); |
| | | HProduceDate = ClsPub.isDate(ListRows[i].HProduceDate); |
| | | HExpiryDate = ClsPub.isDate(ListRows[i].HExpiryDate); |
| | | oCN.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " + |
| | |
| | | ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " + |
| | | ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " + |
| | | ",HGiveAwayFlag " + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo" + |
| | | ",HCoilNO,HFurnaceNO,HFactory,HAuxQty,HheatNO,HProduceDate,HExpiryDate " + |
| | | ") values (" |
| | | + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() |
| | | + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString() |
| | |
| | | + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + sDate + "'" |
| | | + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterID.ToString() + "," + HEntryID.ToString() + "" |
| | | + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag) |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "')"); |
| | | + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "','" + HCoilNO2 + "','" + HFurnaceNO2 + "','" + HFactory2 + "'," + HAuxQty2 + ",'" + HheatNO2 + "','" + HProduceDate + "','" + HExpiryDate + "'" + ")"); |
| | | |
| | | |
| | | //HNumber = ClsPub.isStrNull(grdSub.Rows[i].Cells[HMaterID2Col].Value); |