File was renamed from WebAPI/Controllers/Æ·ÖʹÜÀí/Ê×¼ì¼ìÑéµ¥/QC_FirstPieceCheckBillController.cs |
| | |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | | //馿£æ£éªåController |
| | | //é¦ä»¶æ£éªåController |
| | | //æ°æ®åºä¸»è¡¨QC_FirstPieceCheckBillMain |
| | | //æ°æ®åºå表QC_FirstPieceCheckBillSub |
| | | public class QC_FirstPieceCheckBillController : ApiController |
| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | #region é¦ä»¶æ£éªåä¿å |
| | | /// <summary> |
| | | /// æ°å¢åæ®-ä¿åæé® |
| | | ///åæ°ï¼string sqlã |
| | |
| | | BillNew.omodel.HMainSourceEntryID = ClsPub.isLong(mainList[0].HMainSourceEntryID); |
| | | BillNew.omodel.HMainSourceBillNo = ClsPub.isStrNull(mainList[0].HMainSourceBillNo); |
| | | BillNew.omodel.HMainSourceBillType = ClsPub.isStrNull(mainList[0].HMainSourceBillType); |
| | | BillNew.omodel.HBillStatus = 1; |
| | | List<Model.ClsQC_FirstPieceCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillSub>>(msg3); |
| | | BillNew.DetailColl = new List<Model.ClsQC_FirstPieceCheckBillSub>(); |
| | | for (int i = 0; i < subList.ToArray().Length; i++) |
| | |
| | | oSub.HMax = DBUtility.ClsPub.isStrNull(subList[i].HMax); |
| | | oSub.HMin = DBUtility.ClsPub.isStrNull(subList[i].HMin); |
| | | oSub.HAvg = DBUtility.ClsPub.isStrNull(subList[i].HAvg); |
| | | oSub.HBillNo_bak = DBUtility.ClsPub.isStrNull(mainList[0].HBillNo); |
| | | BillNew.DetailColl.Add(oSub); |
| | | } |
| | | else |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region é¦ä»¶æ£éªåæ ¹æ®æºåç±»åè·åä¿¡æ¯-æºå为çäº§ç¶æä¸´æ¶è¡¨ï¼3722ï¼ |
| | | /// <summary> |
| | | /// è¿åç产任å¡åæç»è¡ |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | /// <param name="hmainid">ç产任å¡åID</param> |
| | | /// <returns>object</returns> |
| | | [Route("Sc_ProcessExchangeBill/GetICMOBillList")] |
| | | [Route("QC_FirstPieceCheckBill/get_ICMOBillStatus_Tmp")] |
| | | [HttpGet] |
| | | public object GetICMOBillList(int hmainid,int OrganizationID) |
| | | public object get_ICMOBillStatus_Tmp(int HInterID,int HEntryID,string HBillType) |
| | | { |
| | | try |
| | | { |
| | | if (hmainid == 0) |
| | | if (HInterID == 0 || HBillType.Equals("")) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ç产任å¡åID为0ï¼"; |
| | | objJsonResult.Message = "åæ°ä¸å
¨ï¼è·åæºåä¿¡æ¯å¤±è´¥ï¼HInterIDï¼"+ HInterID+ "ï¼HEntryIDï¼"+ HEntryID + "ï¼HBillTypeï¼"+ HBillType+"ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | ds = oCN.RunProcReturn("select * from h_v_Sc_ICMOBillListDetail where hmainid=" + hmainid, "h_v_Sc_ICMOBillListDetail"); |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_QC_GetInfoByICMOStatusBill " + HInterID + "," + HEntryID + "," + HBillType, "h_p_QC_GetInfoByICMOStatusBill"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤ç产任å¡åæ æç»è¡ï¼"; |
| | | objJsonResult.Message = "æ¥è¯¢æ°æ®å¼å¸¸ï¼è¯·ä¸ç®¡çåèç³»ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.Message = "è¿åè®°å½æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.Message = "æ¥è¯¢æ°æ®å¼å¸¸ï¼è¯·ä¸ç®¡çåèç³»ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è¿åç产任å¡åæç»è¡ |
| | | /// </summary> |
| | | /// <param name="hmainid">ç产任å¡åID</param> |
| | | /// <returns>object</returns> |
| | | [Route("Sc_ProcessExchangeBill/GetICMOBillDetail")] |
| | | [HttpGet] |
| | | public object GetICMOBillDetail(int hmainid, int OrganizationID) |
| | | { |
| | | try |
| | | { |
| | | if (hmainid == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ç产任å¡åID为0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | ds = oCN.RunProcReturn("select * from h_v_S_Sc_ICMOBillList where hmainid=" + hmainid, "h_v_S_Sc_ICMOBillList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤ç产任å¡åæ æç»è¡ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | // |
| | | } |
| | | } |