| | |
| | | } |
| | | |
| | | |
| | | string sql = @"select a.FID,a.FNUMBER Employee,d.FNUMBER Dept from Gy_Employee e |
| | | join AIS20220914133941..T_HR_EMPINFO a on e.HNumber = a.FNUMBER |
| | | join AIS20220914133941..T_BD_STAFFTEMP c on c.FID = a.FID |
| | | join AIS20220914133941..T_BD_DEPARTMENT d on c.FDEPTID = d.FDEPTID |
| | | where e.HItemID ='" + HKeeperID + "' "; |
| | | //查询质检员对应质检部门 |
| | | ds = oCN.RunProcReturn(sql, "T_HR_EMPINFO"); |
| | | LogService.Write("sql" + sql); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "操作失败,质检员对应质检部门无数据。" + sql; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | JObject model = new JObject(); |
| | | model.Add("FBillTypeID", new JObject() { ["Fnumber"] = "JYD001_SYS" }); //单据类型 来料检验单JYD001_SYS |
| | | model.Add("FBusinessType", "1"); //业务类型 |
| | | 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() }); //质检部门 |
| | | 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"));// 报检日期 |
| | | model.Add("FBillNo", HBillNo); |
| | | |
| | | LogService.Write("质检部门" + ds.Tables[0].Rows[0]["Dept"].ToString()); |
| | | LogService.Write("质检员" + ds.Tables[0].Rows[0]["Employee"].ToString()); |
| | | |
| | | JArray Fentity = new JArray(); |
| | | JObject FentityModel = new JObject(); |
| | |
| | | if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | LogService.Write("来料检验单保存错误jsonRoot:" + jsonRoot); |
| | | LogService.Write("报错:" + result); |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | Ids = fID, |
| | | }; |
| | | |
| | | K3CloudApiClient client = new K3CloudApiClient("http://47.96.97.237/k3cloud"); |
| | | K3CloudApiClient client = new K3CloudApiClient("http://60.191.21.115:8808/K3Cloud"); |
| | | // K3CloudApiClient client = new K3CloudApiClient("http://192.168.80.90/k3cloud/"); |
| | | |
| | | |
| | | |
| | | result1 = InvokeHelper.Submit("QM_InspectBill", JsonConvert.SerializeObject(json));//提交 |
| | | result2 = InvokeHelper.Audit("QM_InspectBill", JsonConvert.SerializeObject(json));//提交 |
| | | //result2 = InvokeHelper.Audit("QM_InspectBill", JsonConvert.SerializeObject(json));//提交 |
| | | if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | oCN.RollBack(); |
| | |
| | | else |
| | | { |
| | | |
| | | var filenameList = new List<string> { HFilePath }; |
| | | var _params = new object[] {"LLJY", HBillNo, filenameList }; |
| | | //var filenameList = new List<string> { HFilePath }; |
| | | //var _params = new object[] {"LLJY", HBillNo, filenameList }; |
| | | |
| | | string _vlog = Form.HttpExecute("http://47.96.97.237/K3Cloud/wpl_Attachment.FileService.FileUpLoad,wpl_Attachment.common.kdsvc", _params); |
| | | //string _vlog = Form.HttpExecute("http://60.191.21.115:8808/K3Cloud/wpl_Attachment.FileService.FileUpLoad,wpl_Attachment.common.kdsvc", _params); |
| | | |
| | | if (JObject.Parse(_vlog)["issuccess"].ToString().ToUpper() != "TRUE") |
| | | //InvokeHelper.Login(); |
| | | //select * from AIS20220914133941..T_QM_INSPECTBILL where FBILLNO='"+HBillNo+"' |
| | | ds = oCN.RunProcReturn("select * from AIS20220914133941..T_QM_INSPECTBILL where FBILLNO='" + HBillNo + "'", "T_QM_INSPECTBILL"); |
| | | |
| | | HInterID = long.Parse(ds.Tables[0].Rows[0]["FID"].ToString()); |
| | | |
| | | string jsonStr = "{" + |
| | | " \"FileName\":\"" + HFileName + "\"," + |
| | | " \"FormId\":\"QM_InspectBill\"," + |
| | | " \"IsLast\":\"true\"," + |
| | | " \"InterId\":\"" + HInterID + "\"," + |
| | | " \"BillNo\":\"" + HBillNo + "\"," + |
| | | " \"AliasFileName\":\"test\"," + |
| | | " \"SendByte\":\"" + a + "\"" + |
| | | "}"; |
| | | |
| | | |
| | | string _vlog = InvokeHelper.UpLoad("QM_InspectBill", jsonStr); |
| | | LogService.Write("json:" + jsonStr); |
| | | LogService.Write("_vlog:" + _vlog); |
| | | |
| | | if (JObject.Parse(_vlog)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |