| | |
| | | oCn.RunProc("Insert into Gy_ProcPrice " + |
| | | " (HMaterID,HProcID,HSourceID" + |
| | | ",HBeginDate,HEndDate,HCostFlag,HFlowFlag,HPayFlag,HDeptID" + |
| | | ",HPrice,HStopflag,HRemark,HMaker,HMakeDate)" + |
| | | ",HPrice,HStopflag,HRemark,HMaker,HMakeDate,HWorkCenterID,HWorkQty,HStdEmp" + |
| | | ",HChangeTimes,HChangeMoney,HProcNo,HPieceTimes,HMouldQty,HChangeMouldMoney,HRushQty)" + |
| | | " values(" + oSub.HMaterID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HSourceID.ToString() + |
| | | ",'" + oSub.HBeginDate.ToShortDateString() + "','" + oSub.HEndDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCostFlag ? 1 : 0) + "," + Convert.ToString(oSub.HFlowFlag ? 1 : 0) + "," + Convert.ToString(oSub.HPayFlag ? 1 : 0) + "," + oSub.HDeptID.ToString() + |
| | | "," + oSub.HPrice.ToString() + "," + Convert.ToString(oSub.HStopflag ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') "); |
| | | "," + oSub.HPrice.ToString() + "," + Convert.ToString(oSub.HStopflag ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "'," + oSub.HWorkCenterID + "," + oSub.HWorkQty + "," + oSub.HStdEmp + "," + oSub.HChangeTimes + "," + |
| | | oSub.HChangeMoney + "," + oSub.HProcNo + "," + oSub.HPieceTimes + "," + oSub.HMouldQty + "," + oSub.HChangeMouldMoney + "," + |
| | | oSub.HRushQty + ") "); |
| | | } |
| | | oCn.Commit(); |
| | | return true; |
| | |
| | | oCn.RunProc("Insert into Gy_ProcPrice " + |
| | | " (HMaterID,HProcID,HSourceID" + |
| | | ",HBeginDate,HEndDate,HCostFlag,HFlowFlag,HPayFlag,HDeptID" + |
| | | ",HPrice,HStopflag,HRemark,HMaker,HMakeDate)" + |
| | | ",HPrice,HStopflag,HRemark,HMaker,HMakeDate,HWorkCenterID,HWorkQty,HStdEmp" + |
| | | ",HChangeTimes,HChangeMoney,HProcNo,HPieceTimes,HMouldQty,HChangeMouldMoney,HRushQty)" + |
| | | " values(" + oSub.HMaterID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HSourceID.ToString() + |
| | | ",'" + oSub.HBeginDate.ToShortDateString() + "','" + oSub.HEndDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCostFlag ? 1 : 0) + "," + Convert.ToString(oSub.HFlowFlag ? 1 : 0) + "," + Convert.ToString(oSub.HPayFlag ? 1 : 0) + "," + oSub.HDeptID.ToString() + |
| | | "," + oSub.HPrice.ToString() + "," + Convert.ToString(oSub.HStopflag ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') "); |
| | | "," + oSub.HPrice.ToString() + "," + Convert.ToString(oSub.HStopflag ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "'," + oSub.HWorkCenterID + "," + oSub.HWorkQty + "," + oSub.HStdEmp + "," + oSub.HChangeTimes + "," + |
| | | oSub.HChangeMoney + "," + oSub.HProcNo + "," + oSub.HPieceTimes + "," + oSub.HMouldQty + "," + oSub.HChangeMouldMoney + "," + |
| | | oSub.HRushQty + ") "); |
| | | } |
| | | oCn.Commit(); |
| | | return true; |
| | |
| | | public double HWasterPrice;// money //æ¥åºåä»· addnew |
| | | public bool HFlowFlag; //æµè½¬é»è®¤å·¥ä»· |
| | | public bool HPayFlag; //å·¥èµé»è®¤å·¥ä»· |
| | | |
| | | public Int64 HWorkCenterID; //å·¥ä½ä¸å¿ï¼Gy_WorkCenterï¼ |
| | | public double HWorkQty; //å°æ¶äº§è½ |
| | | public double HStdEmp; //æ å人å |
| | | public double HChangeTimes; //æ¢çº¿æ¶é´ |
| | | public double HChangeMoney; //æ¢çº¿è¡¥è´´ |
| | | public Int64 HProcNo; //å·¥èºè·¯çº¿æµæ°´å· |
| | | public double HPieceTimes; //åä»¶å å·¥æ¶é´ï¼å段å¯è½å·²ç»åå¨äºï¼ |
| | | public double HMouldQty; //模å
·æ°é |
| | | public double HChangeMouldMoney; //æ¢æ¨¡è¡¥è´´ |
| | | public double HRushQty; //å件岿¬¡æ¬¡æ° |
| | | } |
| | | } |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select ManagerFlag from gy_czygl where czymc='" + user.Trim() + "'", "gy_czygl"); |
| | | if (!(bool)ds.Tables[0].Rows[0]["ManagerFlag"]) //æ¯å¦ç®¡çå |
| | | { |
| | | //䏿¯ç®¡çå |
| | | sWhere += " and å¶å人 = '" + user + "'"; |
| | | } |
| | | |
| | | |
| | | string sql = "select * from h_v_QC_FirstPieceCheckBillMainList where 1=1 " + sWhere + " order by æ¥æ "; |
| | | |
| | | ds = oCN.RunProcReturn(sql, "h_v_QC_FirstPieceCheckBillMainList"); |
| | |
| | | long HProcExchEntryID = list[0].HProcExchEntryID;//æµè½¬å¡åID |
| | | long HMainSourceInterID = list[0].HMainSourceInterID;//æºåID |
| | | long HMainSourceEntryID = list[0].HMainSourceEntryID;//æºååID |
| | | string HMainSourceBillNo = list[0].HMainSourceBillNo;//æµè½¬å¡åID |
| | | |
| | | string HMainSourceBillNo = list[0].HMainSourceBillNo;//æºååå· |
| | | string HMainSourceBillType = list[0].HMainSourceBillType;//æºåç±»å |
| | | |
| | | //è¡¨ä½æ°æ® |
| | | List<Model.ClsQC_FirstPieceCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillSub>>(msg_entry); |
| | | for (int i = 0; i < subList.ToArray().Length; i++) |
| | |
| | | oCN.RunProc("Insert Into QC_FirstPieceCheckBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HMaterID,HSourceID,HICMOInterID,HICMOEntryID,HICMOBillNo,HProcExchBillNo" + |
| | | ",HPRDORGID,HLastResult,HProcExchInterID,HProcExchEntryID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo)" + |
| | | ",HPRDORGID,HLastResult,HProcExchInterID,HProcExchEntryID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType)" + |
| | | " values('" + BillType + "','" + HBillSubType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate()" + |
| | | "," + HYear + "," + HPeriod + ",'" + HMaterID + "','" + HSourceID + "'," + HICMOInterID + "," + HICMOEntryID + ",'" + HICMOBillNo + "','" + HProcExchBillNo + "'" + |
| | | "," + HPRDORGID + ",'" + HLastResult + "'," + HProcExchInterID + "," + HProcExchEntryID + "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "'" + ") "); |
| | | "," + HPRDORGID + ",'" + HLastResult + "'," + HProcExchInterID + "," + HProcExchEntryID + "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'" + ") "); |
| | | |
| | | //æå
¥å表 |
| | | foreach (Model.ClsQC_FirstPieceCheckBillSub oSub in BillNew.DetailColl) |
| | |
| | | ",HQCCheckItemID,HQCStd,HResult" + |
| | | ",HStatus,HUnitID,HKeyInspect,HAnalysisMethod,HInspectInstruMentID,HInspectResult" + |
| | | ") values(" |
| | | + HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + HICMOInterID.ToString() + |
| | | "," + HICMOEntryID.ToString() + ",'" + HICMOBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | + HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + HMainSourceInterID.ToString() + |
| | | "," + HMainSourceEntryID.ToString() + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HResult + "'" + |
| | | ",'" + oSub.HStatus + |
| | | "'," + oSub.HUnitID + "," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'" + |
| | |
| | | /// <returns></returns> |
| | | [Route("Web/GetEquipmentBillsList")] |
| | | [HttpGet] |
| | | public object GetEquipmentBillsList(string sWhere, string Type) |
| | | public object GetEquipmentBillsList(string sWhere, string Type,string user) |
| | | { |
| | | try |
| | | { |
| | |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | ds = oCN.RunProcReturn("select ManagerFlag from gy_czygl where czymc='" + user.Trim() + "'", "gy_czygl"); |
| | | if (!(bool)ds.Tables[0].Rows[0]["ManagerFlag"]) //æ¯å¦ç®¡çå |
| | | { |
| | | //䏿¯ç®¡çå |
| | | sWhere += " and å¶å人 = '" + user + "'"; |
| | | } |
| | | |
| | | |
| | | string sql = string.Format(@"select * from " + HView + " where 1 = 1 " + sWhere); |
| | | ds = oCN.RunProcReturn(sql, HView); |
| | | //æ·»å åå |
| | |
| | | bool HLastResult = list[0].HLastResult;//è¯æ ·ç»è®º |
| | | Int64 HProcExchInterID = list[0].HProcExchInterID;//æå¼å¡ID |
| | | Int64 HProcExchEntryID = list[0].HProcExchEntryID;//æå¼å¡åID |
| | | long HMainSourceInterID = list[0].HMainSourceInterID;//æºåID |
| | | long HMainSourceEntryID = list[0].HMainSourceEntryID;//æºååID |
| | | string HMainSourceBillNo = list[0].HMainSourceBillNo;//æºååå· |
| | | string HMainSourceBillType = list[0].HMainSourceBillType;//æºåç±»å |
| | | |
| | | //è¡¨ä½æ°æ® |
| | | List<Model.ClsQC_ProcessCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_ProcessCheckBillSub>>(msg_entry); |
| | |
| | | oCN.RunProc("Insert Into QC_ProcessCheckBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HMaterID,HSourceID,HICMOInterID,HICMOEntryID,HICMOBillNo,HProcExchBillNo" + |
| | | ",HPRDORGID,HLastResult,HProcExchInterID,HProcExchEntryID,HProcID)" + |
| | | ",HPRDORGID,HLastResult,HProcExchInterID,HProcExchEntryID,HProcID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType)" + |
| | | " values('" + BillType + "','" + HBillSubType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate()" + |
| | | "," + HYear + "," + HPeriod + ",'" + HMaterID + "','" + HSourceID + "'," + HICMOInterID + "," + HICMOEntryID + ",'" + HICMOBillNo + "','" + HProcExchBillNo + "'" + |
| | | "," + HPRDORGID + ",'" + HLastResult + "'," + HProcExchInterID + "," + HProcExchEntryID + "," + HProcID + ") "); |
| | | "," + HPRDORGID + ",'" + HLastResult + "'," + HProcExchInterID + "," + HProcExchEntryID + "," + HProcID + "," + HMainSourceInterID + |
| | | "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'" + ") "); |
| | | |
| | | //æå
¥å表 |
| | | foreach (Model.ClsQC_ProcessCheckBillSub oSub in BillNew.DetailColl) |
| | |
| | | ",HQCCheckClassID,HQCCheckItemID,HQCStd,HQCRelValue,HResult" + |
| | | ",HProcCheckEmp,HProcCheckTime,HStatus,HUnitID,HKeyInspect,HAnalysisMethod,HInspectInstruMentID,HInspectResult" + |
| | | ") values(" |
| | | + HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + HICMOInterID.ToString() + |
| | | "," + HICMOEntryID.ToString() + ",'" + HICMOBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | + HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + HMainSourceInterID.ToString() + |
| | | "," + HMainSourceEntryID.ToString() + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HQCCheckClassID.ToString() + "," + oSub.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HQCRelValue + "','" + oSub.HResult + "'" + |
| | | "," + oSub.HProcCheckEmp.ToString() + ",GETDATE()" + ",'" + oSub.HStatus + |
| | | "'," + oSub.HUnitID + "," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'" + |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select ManagerFlag from gy_czygl where czymc='" + user.Trim() + "'", "gy_czygl"); |
| | | if (!(bool)ds.Tables[0].Rows[0]["ManagerFlag"]) //æ¯å¦ç®¡çå |
| | | { |
| | | //䏿¯ç®¡çå |
| | | sWhere += " and å¶å人 = '" + user + "'"; |
| | | } |
| | | |
| | | string sql = "select * from h_v_QC_ProcessCheckBillMainList where 1=1 " + sWhere + " order by æ¥æ "; |
| | | |
| | | ds = oCN.RunProcReturn(sql, "h_v_QC_ProcessCheckBillMainList"); |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_ProcPriceList where 1 = 1 " + sWhere, "h_v_Gy_ProcPriceList"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_ProcPriceList where 1 = 1 " + sWhere + " order by å¶åæ¥æ desc", "h_v_Gy_ProcPriceList"); |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | oSub.HMaker = DBUtility.ClsPub.isStrNull(mainList[0].HMaker); |
| | | oSub.HMakeDate = DateTime.Today.ToString(); |
| | | oSub.HRemark = DBUtility.ClsPub.isStrNull(subList[i].HRemarkCol); |
| | | oSub.HWorkCenterID = DBUtility.ClsPub.isLong(subList[i].HWorkCenterID); |
| | | oSub.HWorkQty = DBUtility.ClsPub.isDoule(subList[i].HWorkQty); //å°æ¶äº§è½ |
| | | oSub.HStdEmp = DBUtility.ClsPub.isDoule(subList[i].HStdEmp); //æ å人å |
| | | oSub.HChangeTimes = DBUtility.ClsPub.isDoule(subList[i].HChangeTimes); //æ¢çº¿æ¶é´ |
| | | oSub.HChangeMoney = DBUtility.ClsPub.isDoule(subList[i].HChangeMoney); //æ¢çº¿è¡¥è´´ |
| | | oSub.HProcNo = DBUtility.ClsPub.isLong(subList[i].HProcNo); //å·¥èºè·¯çº¿æµæ°´å· |
| | | oSub.HPieceTimes = DBUtility.ClsPub.isDoule(subList[i].HPieceTimes); //åä»¶å å·¥æ¶é´ï¼å段å¯è½å·²ç»åå¨äºï¼ |
| | | oSub.HMouldQty = DBUtility.ClsPub.isDoule(subList[i].HMouldQty); //模å
·æ°é |
| | | oSub.HChangeMouldMoney = DBUtility.ClsPub.isDoule(subList[i].HChangeMouldMoney); //æ¢æ¨¡è¡¥è´´ |
| | | oSub.HRushQty = DBUtility.ClsPub.isDoule(subList[i].HRushQty); //å件岿¬¡æ¬¡æ° |
| | | |
| | | BillNew.DetailColl.Add(oSub); |
| | | } |
| | | else |
| | |
| | | public long HItemID { get; set; } |
| | | |
| | | |
| | | public Int64 HWorkCenterID{ get; set; } //å·¥ä½ä¸å¿ï¼Gy_WorkCenterï¼ |
| | | public double HWorkQty{ get; set; } //å°æ¶äº§è½ |
| | | public double HStdEmp{ get; set; } //æ å人å |
| | | public double HChangeTimes{ get; set; } //æ¢çº¿æ¶é´ |
| | | public double HChangeMoney{ get; set; } //æ¢çº¿è¡¥è´´ |
| | | public Int64 HProcNo{ get; set; } //å·¥èºè·¯çº¿æµæ°´å· |
| | | public double HPieceTimes{ get; set; } //åä»¶å å·¥æ¶é´ï¼å段å¯è½å·²ç»åå¨äºï¼ |
| | | public double HMouldQty{ get; set; } //模å
·æ°é |
| | | public double HChangeMouldMoney{ get; set; } //æ¢æ¨¡è¡¥è´´ |
| | | public double HRushQty{ get; set; } //å件岿¬¡æ¬¡æ° |
| | | |
| | | } |
| | | } |