| | |
| | | { |
| | | var kdTbaleName = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "DataBaseName"); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql = string.Format("select HinterID,HERPBillNO,HERPInterID from Cg_POInStockBillMain where HERPInterID>0 and hinterid in (" + hinterid + ")"); |
| | | string FCusName = oSystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (FCusName == "夏宝电器") |
| | | sql = $"select HinterID,HERPBillNO,HERPInterID from Cg_POInStockBillMain t1 join {kdTbaleName}..T_PUR_RECEIVE t2 on t1.HERPInterID = t2.FID where HERPInterID>0 and hinterid in (" + hinterid + ")"; |
| | | else if (FCusName.Contains("瑞与祺") || FCusName == "") |
| | | sql = $"select HinterID,HERPBillNO,HERPInterID from Cg_POInStockBillMain t1 join {kdTbaleName}..T_PUR_RECEIVE t2 on t1.HERPInterID = t2.FID where HERPInterID>0 and hinterid in (" + hinterid + ")"; |
| | | //string sql = string.Format("select HinterID,HERPBillNO,HERPInterID from Cg_POInStockBillMain where HERPInterID>0 and hinterid in (" + hinterid + ")"); |
| | | //string FCusName = oSystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | var sql = $"select HinterID,HERPBillNO,HERPInterID from Cg_POInStockBillMain t1 join {kdTbaleName}..T_PUR_RECEIVE t2 on t1.HERPInterID = t2.FID where HERPInterID>0 and hinterid in (" + hinterid + ")"; |
| | | DataTable dt = oCN.RunProcReturn(sql, "deleteDt").Tables[0]; |
| | | if (dt.Rows.Count == 0) |
| | | { |
| | |
| | | //LogService.Write("api结果删除:" + result); |
| | | if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | //var errorsList = JObject.Parse(result)["Result"]["ResponseStatus"]["Errors"]; |
| | | //List<string> errList = new List<string>(); |
| | | //foreach (var item in errorsList) |
| | | //{ |
| | | // errList.Add(item["Message"].ToString()+ "\r\n"); |
| | | //} |
| | | //string err = string.Join(",", errList); |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "对应金蝶收料通知单删除失败 !\r\n" + result; |