From c5a629655949aa14868b66e8517e6c5505b2ad8a Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期四, 07 三月 2024 10:26:41 +0800 Subject: [PATCH] 工序工价新增字段;PDA 设备,质量模块查询列表 --- DAL/基础资料/其他基础资料/ClsGy_ProcPrice_Ctl.cs | 14 +++++-- WebAPI/Models/ClsGy_ProcPrice.cs | 10 +++++ Model/基础资料/其他基础资料/ClsGy_ProcPrice_Model.cs | 11 +++++ WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs | 21 +++++++--- WebAPI/Controllers/WebAPIController.cs | 11 +++++ WebAPI/Controllers/基础资料/工资基础资料/Gy_ProcPriceController.cs | 13 ++++++ WebAPI/Controllers/品质管理/工序检验单/MES_ProcessCheckBill_PDAController.cs | 20 ++++++++-- 7 files changed, 84 insertions(+), 16 deletions(-) diff --git "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_ProcPrice_Ctl.cs" "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_ProcPrice_Ctl.cs" index 2b3789e..3ff0485 100644 --- "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_ProcPrice_Ctl.cs" +++ "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_ProcPrice_Ctl.cs" @@ -64,10 +64,13 @@ 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; @@ -92,10 +95,13 @@ 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; diff --git "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_ProcPrice_Model.cs" "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_ProcPrice_Model.cs" index 2e8573c..5bc4b65 100644 --- "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_ProcPrice_Model.cs" +++ "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_ProcPrice_Model.cs" @@ -27,5 +27,16 @@ 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; //单件冲次次数 } } diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs index 702f2bb..2a8402b 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs @@ -1016,6 +1016,14 @@ 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"); @@ -1101,8 +1109,9 @@ long HProcExchEntryID = list[0].HProcExchEntryID;//娴佽浆鍗″瓙ID long HMainSourceInterID = list[0].HMainSourceInterID;//婧愬崟ID long HMainSourceEntryID = list[0].HMainSourceEntryID;//婧愬崟瀛怚D - 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++) @@ -1187,10 +1196,10 @@ 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) @@ -1202,8 +1211,8 @@ ",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 + "'" + diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index abc503b..1a48a70 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -10050,7 +10050,7 @@ /// <returns></returns> [Route("Web/GetEquipmentBillsList")] [HttpGet] - public object GetEquipmentBillsList(string sWhere, string Type) + public object GetEquipmentBillsList(string sWhere, string Type,string user) { try { @@ -10082,6 +10082,15 @@ } 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); //娣诲姞鍒楀悕 diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/MES_ProcessCheckBill_PDAController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/MES_ProcessCheckBill_PDAController.cs" index 75b3772..8422d60 100644 --- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/MES_ProcessCheckBill_PDAController.cs" +++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/MES_ProcessCheckBill_PDAController.cs" @@ -68,6 +68,10 @@ bool HLastResult = list[0].HLastResult;//璇曟牱缁撹 Int64 HProcExchInterID = list[0].HProcExchInterID;//鎸囧紩鍗D Int64 HProcExchEntryID = list[0].HProcExchEntryID;//鎸囧紩鍗″瓙ID + long HMainSourceInterID = list[0].HMainSourceInterID;//婧愬崟ID + long HMainSourceEntryID = list[0].HMainSourceEntryID;//婧愬崟瀛怚D + 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); @@ -154,10 +158,11 @@ 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) @@ -169,8 +174,8 @@ ",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 + "'" + @@ -225,6 +230,13 @@ 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"); diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcPriceController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcPriceController.cs" index 3997316..34f38d1 100644 --- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcPriceController.cs" +++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcPriceController.cs" @@ -37,7 +37,7 @@ 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) @@ -131,6 +131,17 @@ 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 diff --git a/WebAPI/Models/ClsGy_ProcPrice.cs b/WebAPI/Models/ClsGy_ProcPrice.cs index c45aa5c..ed275eb 100644 --- a/WebAPI/Models/ClsGy_ProcPrice.cs +++ b/WebAPI/Models/ClsGy_ProcPrice.cs @@ -30,6 +30,16 @@ public long HItemID { get; set; } + public Int64 HWorkCenterID{ get; set; } //宸ヤ綔涓績锛圙y_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; } //鍗曚欢鍐叉娆℃暟 } } \ No newline at end of file -- Gitblit v1.9.1