| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有返回任何记录!"; |
| | | objJsonResult.Message = "[0000-1-045]没有返回任何记录!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "获取信息成功!"; |
| | | objJsonResult.Message = "[0000-1-037]获取信息成功!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有返回任何记录!" + e.ToString(); |
| | | objJsonResult.Message = "[0000-1-010]没有返回任何记录!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有返回任何记录!"; |
| | | objJsonResult.Message = "[0000-1-045]没有返回任何记录!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "获取信息成功!"; |
| | | objJsonResult.Message = "[0000-1-050]获取信息成功!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | |
| | | ds1 = oCN.RunProcReturn("select * from KF_PonderationBillMain_Temp where HSourceBillNo = '" + SubBarcode + "' and HBillType = '" + HBillType + "'", "KF_PonderationBillMain_Temp"); |
| | | if (ds1.Tables[0].Rows.Count > 0) |
| | | { |
| | | return CustomError("该子件条码已存在"); |
| | | return CustomError("[0000-2-039]该子件条码已存在"); |
| | | } |
| | | if (HBarCode == null || HBarCode.Equals("")) |
| | | { |
| | | HBarCode = " "; |
| | | } |
| | | ds = oCN.RunProcReturn("exec h_p_Save_SubBarcodeToTmp '" + HBillNo + "','" + SubBarcode + "','" + HInterID + "','" + HBillNo2 + "','" + HBillType + "','" + sMaker + "','" + HBarCode + "','" + HNumber + "','" + HName + "','" + HModel + "'", "h_p_Save_SubBarcodeToTmp"); |
| | | LogService.Write("ID:" + HInterID + ",流转卡号:" + HBillNo + ",单据号:" + HBillNo2 + ",条码:" + SubBarcode + ",托条码:" + HBarCode); |
| | | } |
| | | |
| | | } |
| | |
| | | string HSNum2 = GetNewCodeByNum(HSNum,1,2); |
| | | if (HBillNo == null || HBillNo.Equals("")) |
| | | { |
| | | return CustomError("流转卡号不能为空!"); |
| | | return CustomError("[0000-1-057]流转卡号不能为空!"); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "异常!"+e.ToString(); |
| | | objJsonResult.Message = "[0000-1-051]异常!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | } |
| | | return CustomCorrect(ds); |
| | | //return ds.Tables[0].Rows; |
| | | } |
| | | |
| | | //更新没有反写的数据 |
| | | [Route("LEMS/SaveToSc_PackUnionBillSub_Back")] |
| | | [HttpGet] |
| | | public object SaveToSc_PackUnionBillSub_Back(string HInterID, string HRemark) |
| | | { |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (HInterID == null || HInterID.Equals("")) |
| | | { |
| | | return CustomError("[0000-2-058]更新失败HitemID为空!"); |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("exec h_p_Save_KF_PonderationBillMain_TempToSc_PackUnionBillSub_Back '" + HInterID + "','" + HRemark + "'"); |
| | | } |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "[0000-2-059]更新成功!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "[0000-2-058]" + e.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | oCN.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID = " + HInterID); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除成功!"; |
| | | objJsonResult.Message = "[0000-1-008]删除成功!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "删除失败!"; |
| | | objJsonResult.Message = "[0000-1-007]删除失败!"; |
| | | objJsonResult.data = e.ToString(); |
| | | return objJsonResult; |
| | | } |
| | |
| | | oCn.RunProc("Delete TOP(1) from KF_PonderationBillMain_Temp where HInterID = " + sHInterID + " and HSourceBillNo = '" + HSourceBillNo + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除成功!"; |
| | | objJsonResult.Message = "[0000-1-008]删除成功!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "删除失败!"; |
| | | objJsonResult.Message = "[0000-1-007]删除失败!"; |
| | | objJsonResult.data = e.ToString(); |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "当前条码的状态为:"+ ds.Tables[0].Rows[0]["HReasult"].ToString() + "!"; |
| | | objJsonResult.Message = "[0000-2-037]当前条码的状态为:" + ds.Tables[0].Rows[0]["HReasult"].ToString() + "!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "异常!"; |
| | | objJsonResult.Message = "[0000-1-010]异常!"; |
| | | objJsonResult.data = e.ToString(); |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "查无数据!"; |
| | | objJsonResult.Message = "[0000-1-045]查无数据!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = ds.Tables[0].Rows[0]["HBackRemark"].ToString() + "!"; |
| | | objJsonResult.Message = "[0000-1-051]"+ ds.Tables[0].Rows[0]["HBackRemark"].ToString() + "!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "查无数据!"; |
| | | objJsonResult.Message = "[0000-1-045]查无数据!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = ds.Tables[0].Rows[0]["HBackRemark"].ToString(); |
| | | objJsonResult.Message = "[0000-1-051]" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); |
| | | return objJsonResult; |
| | | } |
| | | else { |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "异常!"; |
| | | objJsonResult.Message = "[0000-1-010]异常!"; |
| | | objJsonResult.data = e.ToString(); |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "查无数据!"; |
| | | objJsonResult.Message = "[0000-1-045]查无数据!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = ds.Tables[0].Rows[0]["HBackRemark"].ToString(); |
| | | objJsonResult.Message = "[0000-1-051]" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); |
| | | return objJsonResult; |
| | | } |
| | | else |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "异常!"; |
| | | objJsonResult.Message = "[0000-1-010]异常!"; |
| | | objJsonResult.data = e.ToString(); |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = Convert.ToString(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.Message = "[0000-1-051]" + Convert.ToString(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "异常!"; |
| | | objJsonResult.Message = "[0000-1-010]异常!"; |
| | | objJsonResult.data = e.ToString(); |
| | | return objJsonResult; |
| | | } |