| | |
| | | string HSupNumber = ""; // ä¾åºåç¼ç |
| | | string HPOInStockBillNo = ""; // æ¶æéç¥åå· |
| | | |
| | | string HPOOrderBillNo = ""; // éè´è®¢åå· |
| | | |
| | | DataSet Ds; |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | |
| | | |
| | | HPOInStockBillNo = DBUtility.ClsPub.isStrNull(ordrlist[j].HBillNo); // æ¶æéç¥åå· å
´è¾¾æ¡ç |
| | | HSupNumber = DBUtility.ClsPub.isStrNull(ordrlist[j].HSupNumber);// ä¾åºåç¼å· å
´è¾¾æ¡ç |
| | | |
| | | HPOOrderBillNo = DBUtility.ClsPub.isStrNull(ordrlist[j].HBillNo); // éè´è®¢åå· å°å«çµå¨ |
| | | // |
| | | sYear = ClsPub.isDate(sDate).Year.ToString().Substring(2, 2); |
| | | sPeriod = "0" + ClsPub.isDate(sDate).Month.ToString(); |
| | |
| | | Ds = oCN.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); |
| | | LSHlen = 3; // ä¸ä½æµæ°´å· |
| | | } |
| | | else if (CampanyName.Contains("å°å«")) |
| | | { |
| | | // å°å«çµå¨ |
| | | // æ¡ç åç¼ = åæ®å· + ç©æç¼ç + æ¹æ¬¡å· |
| | | sTMNumber = HPOOrderBillNo + "@" + HMaterNumber + "@" + HBatchNo; |
| | | Ds = oCN.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); |
| | | } |
| | | else //éç¨æ¹æ³ |
| | | { |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region æ´æ°æ¡ç 对åºåæ® åå· æ¬¡æ° æ¶é´ |
| | | #region æ´æ°æ¡ç 对åºåºåºç³è¯·åå· å
´è¾¾ |
| | | public class BarCodeMeta |
| | | { |
| | | public string HBarCode { get; set; } |
| | |
| | | string msg2 = sArray[0].ToString(); |
| | | string HBillType = sArray[1].ToString(); |
| | | string HBillNo = sArray[2].ToString(); |
| | | string HOrgName = sArray[3].ToString(); |
| | | |
| | | List<BarCodeMeta> BarCodeMetaList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<BarCodeMeta>>(msg2); |
| | | oCN.BeginTran(); |
| | | try |
| | | { |
| | | oCN.BeginTran(); |
| | | |
| | | for(int i = 0; i < BarCodeMetaList.Count; i++) |
| | | { |
| | | if (HBillType == "1205") // éå®åºåº |
| | | { |
| | | oCN.RunProcReturn("Update Gy_BarCodeBill set HOutStockDate = getdate(), HOutStockCounts=isnull(HOutStockCounts,0)+1," + |
| | | "HOutStockBillNo='" + HBillNo + " 'where HBarCode = '" + BarCodeMetaList[i].HBarCode + "'", "Gy_BarCodeBill"); |
| | | } |
| | | if (HBillType == "1201") // éè´å
¥åº |
| | | { |
| | | oCN.RunProcReturn("Update Gy_BarCodeBill set HInStockDate = getdate(), HInStockCounts=isnull(HOutStockCounts,0)+1," + |
| | | "HInStockBillNo='" + HBillNo + " 'where HBarCode = '" + BarCodeMetaList[i].HBarCode + "'", "Gy_BarCodeBill"); |
| | | |
| | | if (HOrgName.Contains("å
´è¾¾") && !string.IsNullOrEmpty(HBillNo)) |
| | | { |
| | | // å
´è¾¾ éå®åºåºæ´æ° åè´§éç¥å |
| | | oCN.RunProcReturn("Update Gy_BarCodeBill set " + |
| | | "HSeOutStockBillNo='" + HBillNo + "' where HBarCode = '" + BarCodeMetaList[i].HBarCode + "'", "Gy_BarCodeBill"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿®æ¹å¤±è´¥!" + e.Message; |
| | |
| | | #region [è·åæ ç¾æå°æä»¤ CPCLæä»¤] |
| | | [Route("Sc_BarCode/Get_BarCodePrintCode_CPCL")] |
| | | [HttpGet] |
| | | public object Get_BarCodePrintCode_CPCL(string HOrginationName, string HViewName, string HBillSubType, int HInterID, int HItemID) |
| | | public object Get_BarCodePrintCode_CPCL(string HOrginationName, string HBillSubType, int HInterID, int HItemID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_getHBarCodePrintCode_CPCL N'" + HOrginationName + "'" + |
| | | ",N'" + HViewName + "',N'" + HBillSubType + "'," + HInterID + "," + HItemID, "h_p_getHBarCodePrintCode_CPCL"); |
| | | ",N'" + HBillSubType + "'," + HInterID + "," + HItemID, "h_p_getHBarCodePrintCode_CPCL"); |
| | | if((int)ds.Tables[0].Rows[0]["resultType"] == 1) |
| | | { |
| | | string resultMesg = ds.Tables[0].Rows[0]["payload"].ToString().Replace("\\r\\n", "\r\n"); |