| | |
| | | ") "); |
| | | //同步金蝶 |
| | | //访问金蝶 |
| | | string sErr = ""; |
| | | var loginRet = InvokeHelper.Login(); |
| | | var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>(); |
| | | if (isSuccess == 0) |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oSystemParameter.ShowBill(ref sErr)) |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "锦隆") |
| | | { |
| | | string sql = @"select a.FID,a.FNUMBER Employee,d.FNUMBER Dept from Gy_Employee e |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | model.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); //单据日期 |
| | | model.Add("FInspectOrgId", new JObject() { ["Fnumber"] = HZJOrgNumber.ToString() }); //质检组织 |
| | | model.Add("FSourceOrgId", new JObject() { ["Fnumber"] = HZJOrgNumber.ToString() }); //来源组织 |
| | | |
| | | //model.Add("FInspectDepId", new JObject() { ["Fnumber"] = ds.Tables[0].Rows[0]["Dept"].ToString() }); //质检部门 |
| | | if (oSystemParameter.ShowBill(ref sErr)) |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "锦隆") |
| | | { |
| | | model.Add("FInspectorId", new JObject() { ["Fnumber"] = ds.Tables[0].Rows[0]["Employee"].ToString() }); //质检员 |
| | | } |
| | | } |
| | | model.Add("FISSYNCED", "false");// 是否已同步 |
| | | model.Add("F_PGKJ_Date", DateTime.Now.ToString("yyyy-MM-dd"));// 报检日期 |
| | |
| | | FentityModel2.Add("FUsePolicy", HUseResult.ToString()); //使用决策 |
| | | FentityModel2.Add("FIsCheck", false); //是否抽检 |
| | | // 锦隆启用不良处理 |
| | | if (oSystemParameter.ShowBill(ref sErr)) |
| | | { |
| | | if (string.Equals(oSystemParameter.omodel.WMS_CampanyName, "锦隆")) |
| | | { |
| | | // 判断单据是否合格 |
| | | if (HCheckResult.ToString() == "2") |
| | | { |
| | | FentityModel2.Add("FIsDefectProcess", true); //不良处理 |
| | | }else |
| | | } |
| | | else |
| | | { |
| | | FentityModel2.Add("FIsDefectProcess", false); |
| | | } |
| | | }else |
| | | } |
| | | else |
| | | { |
| | | FentityModel2.Add("FIsDefectProcess", false); //不良处理 |
| | | } |
| | | } |
| | | FentityModel2.Add("FCanSale", false); //可销售 |
| | | FentityModel2.Add("FIsMRBReview", false); //MRP评审 |
| | |
| | | return objJsonResult; |
| | | } |
| | | //提交审核 |
| | | string result0 = string.Empty; |
| | | string result1 = string.Empty; |
| | | string result2 = string.Empty; |
| | | var fID = JObject.Parse(result)["Result"]["Id"].ToString(); |
| | |
| | | K3CloudApiClient client = new K3CloudApiClient("http://47.96.97.237/k3cloud"); |
| | | // K3CloudApiClient client = new K3CloudApiClient("http://192.168.80.90/k3cloud/"); |
| | | |
| | | |
| | | if (oSystemParameter.ShowBill(ref sErr)) |
| | | { |
| | | if (string.Equals(oSystemParameter.omodel.WMS_CampanyName, "锦隆")) |
| | | { |
| | | result0 = InvokeHelper.Save("QM_InspectBill", JsonConvert.SerializeObject(json));//保存 |
| | | } |
| | | } |
| | | result1 = InvokeHelper.Submit("QM_InspectBill", JsonConvert.SerializeObject(json));//提交 |
| | | result2 = InvokeHelper.Audit("QM_InspectBill", JsonConvert.SerializeObject(json));//审核 |
| | | if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | |
| | | fs.Read(buffer, 0, (int)len); |
| | | //文件IO流 |
| | | string a = Convert.ToBase64String(buffer); |
| | | |
| | | if (oSystemParameter.ShowBill(ref sErr)) { |
| | | if(oSystemParameter.omodel.WMS_CampanyName == "锦隆") |
| | | { |
| | | ds = oCN.RunProcReturn("select * from JL20250716203240..T_QM_INSPECTBILL where FBILLNO='" + HBillNo + "'", "T_QM_INSPECTBILL"); |
| | |
| | | { |
| | | ds = oCN.RunProcReturn("select * from AIS20210811135644..T_QM_INSPECTBILL where FBILLNO='" + HBillNo + "'", "T_QM_INSPECTBILL"); |
| | | } |
| | | } |
| | | |
| | | |
| | | HInterID = long.Parse(ds.Tables[0].Rows[0]["FID"].ToString()); |