| | |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using System.Web.Http; |
| | | using WebAPI.Controllers.SCGL; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers |
| | |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | //ä¿ååæ® |
| | | return objJsonResult = AddBillMain(msg1); |
| | | objJsonResult = AddBillMain(msg1); |
| | | JObject resultJObj = JObject.FromObject(objJsonResult); |
| | | if (oSystemParameter.ShowBill(ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "åè") |
| | | { |
| | | resultJObj["NotShowTips"] = true; |
| | | } |
| | | else |
| | | { |
| | | resultJObj["NotShowTips"] = false; |
| | | } |
| | | } |
| | | |
| | | return resultJObj; |
| | | } |
| | | |
| | | public json AddBillMain(string msg1) |
| | |
| | | BillNew.omodel.HTakeSampleCheckBillID = ClsPub.isLong(mainList[0].HTakeSampleCheckBillID); |
| | | BillNew.omodel.HTakeSampleCheckBillNo = ClsPub.isStrNull(mainList[0].HTakeSampleCheckBillNo); |
| | | BillNew.omodel.HCheckQty = ClsPub.isLong(mainList[0].HCheckQty); |
| | | |
| | | |
| | | List<Model.ClsQC_PatrolProcCheckOtherBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_PatrolProcCheckOtherBillSub>>(msg3); |
| | | BillNew.DetailColl = new List<Model.ClsQC_PatrolProcCheckOtherBillSub>(); |
| | | |
| | | |
| | | |
| | | for (int i = 0; i < subList.ToArray().Length; i++) |
| | | { |
| | | if (i >= 0)//HQty |
| | |
| | | { |
| | | string sAutoCheck = oSystemParameter.GetSingleSystemParameter("QC_ProcessCheckBill_AutoCheck", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.Verify = sAutoCheck; |
| | | bResult = BillNew.AddBill(ref ClsPub.sExeReturnInfo); |
| | | bResult = BillNew.AddBill(ref ClsPub.sExeReturnInfo); |
| | | } |
| | | else |
| | | { |
| | |
| | | //æç¤º |
| | | if (bResult == true) |
| | | { |
| | | string sReturn = ""; |
| | | // åè ä¿åæåå䏿¨å·¥ä½èç³»å |
| | | if (oSystemParameter.ShowBill(ref sReturn) == true) |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "åè") |
| | | { |
| | | LogService.Write("æ§è¡æ¶æ¯æ¨é..." + BillNew.omodel.HInterID); |
| | | |
| | | //èªå¨çæå·¥ä½èç³»å |
| | | var ds2 = oCN.RunProcReturn("exec h_p_OA_WorkLinkBill_Create " + BillNew.omodel.HInterID + "," + 7507, "h_p_OA_WorkLinkBill_Create"); |
| | | |
| | | if (ds2 != null && ds2.Tables[0].Rows.Count > 0) |
| | | { |
| | | int HInterID = int.Parse(ds2.Tables[0].Rows[0]["NewHInterID"].ToString()); |
| | | LogService.Write("æ§è¡æ¶æ¯æ¨é..." + HInterID); |
| | | |
| | | // è§¦åæ¶æ¯æ¨é |
| | | Service.GeTuiService.PubishSingle(HInterID); |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = ClsPub.sExeReturnInfo+"åæ®å·:" + mainList[0].HBillNo.Trim(); |