From 25bf838d771f7f1ab2773c58da76df51329e7dcc Mon Sep 17 00:00:00 2001 From: yxj <yxj@hz-kingdee.com> Date: 星期四, 24 八月 2023 15:00:51 +0800 Subject: [PATCH] 1 --- DAL/质检管理/ClsQC_FirstPieceCheckBill.cs | 11 PlanM/计划管理/Gy_RoutingBill.cs | 3 WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs | 87 + DAL/MES/ClsSc_ICMOBillQualityStatus_Tmp.cs | 65 + DBUtility/基础资料/ClsGy_Base_View.cs | 16 WebAPI/Models/基础资料/Gy_TemporaryArea.cs | 23 WebAPI/WebAPI.csproj.user | 2 Model/生产管理/ClsGy_SourceWorkStationSet.cs | 19 WebAPI/Controllers/SCGL/日计划管理/JIT_Cg_PODemandPlanBillController.cs | 4 DAL/车间管理/ClsSc_ProcessExchangeBill.cs | 83 + WebAPI/Controllers/SCGL/Gy_SourceWorkStationSetController.cs | 175 ++ WebAPI/Controllers/Sc_AssemblyBillController.cs | 252 +++ DAL/生产管理/ClsGy_SourceWorkStationSet.cs | 68 + WorkM/生产管理/Sc_ICMOBillList.cs | 2 DAL/车间管理/ClsSc_StationInBill.cs | 2 WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs | 42 DAL/生产管理/ClsSc_ICMOBill.cs | 80 + WebAPI/Controllers/品质管理/产线返修平台/Sc_SourceLineRepairBillController.cs | 352 +++++ Model/质检管理/ClsQC_ProcessCheckBillSub_ValueGrid.cs | 16 WebAPI/Controllers/BLL/Xt_UserController.cs | 10 WebAPI/Controllers/WebAPIController.cs | 62 WebAPI/Controllers/人事管理/职员异动单/HR_EmpChangeBillController.cs | 4 WebAPI/Controllers/生产管理/报工台工序/Sc_MESBeginStepWorkBillController.cs | 14 WebAPI/Controllers/项目管理/工作任务/PM_WorkTaskBillController.cs | 8 Model/质检管理/ClsQC_FirstPieceCheckBillSub.cs | 2 WebAPI/Controllers/项目管理/业绩指标/PM_YearEmployeeMoneyBillController.cs | 4 WebAPI/ListModels.cs | 11 WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBillController.cs | 16 DAL/DAL.csproj | 1 DAL/生产管理/ClsSc_ICMOReportBill.cs | 71 + WebAPI/WebAPI.csproj | 6 WebAPI/Controllers/仓存管理/条码生成/Sc_BarCodeController.cs | 14 WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user | 224 +- Model/质检管理/ClsQC_FirstPieceCheckBillSub_ValueGrid.cs | 2 Model/Model.csproj | 2 Model/MES/ClsSc_ICMOBillQualityStatus_Tmp.cs | 30 DAL/质检管理/ClsQC_ProcessCheckBill.cs | 50 WebAPI/Controllers/人事管理/离职申请/HR_EmpDimissionBillController.cs | 56 WebAPI/Controllers/项目管理/工程项目/PM_ProjectBillController.cs | 4 WebAPI/Controllers/品质管理/首件检验单/QC_FirstPieceCheckBillController.cs | 19 WebAPI/Controllers/基础资料/基础资料/Gy_TemporaryAreaController.cs | 585 +++++++++ Model/质检管理/ClsQC_ProcessCheckBillMain.cs | 3 Model/质检管理/ClsQC_FirstPieceCheckBillMain.cs | 1 Pub_Class/CustomerCls/ClsXt_SystemParameter.cs | 72 + WebAPI/Controllers/工资管理/Pay_ErrWorkTimesRequestBillController.cs | 4 Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs | 19 WebAPI/Models/ClsSc_AssemblyBillMain.cs | 2 Model/质检管理/ClsQC_ProcessCheckBillSub.cs | 24 WebAPI/Controllers/Sc_ProcessMangementController.cs | 9 WebAPI/Controllers/品质管理/产线质检平台/Sc_ICMOBillQualityStatus_TmpController.cs | 352 +++++ WebAPI/Controllers/项目管理/项目阶段/Gy_ProjectStageController.cs | 8 WebAPI/Controllers/工资管理/Pay_DuSubsidyItemBillController.cs | 621 +++++++++ WebAPI/Controllers/品质管理/工序检验单/QC_ProcessCheckBillController.cs | 187 ++ 53 files changed, 3,562 insertions(+), 237 deletions(-) diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj index 99a7f4d..92a994e 100644 --- a/DAL/DAL.csproj +++ b/DAL/DAL.csproj @@ -576,6 +576,7 @@ <Compile Include="婧愬崟\閲戣澏婧愬崟\Cls_S_Sc_ICMOBillList_K3.cs" /> <Compile Include="婧愬崟\閲戣澏婧愬崟\Cls_S_K3_EntrustInBillList.cs" /> <Compile Include="婧愬崟\閲戣澏婧愬崟\Cls_S_KF_ChangeBoxBillList.cs" /> + <Compile Include="鐢熶骇绠$悊\ClsGy_SourceWorkStationSet.cs" /> <Compile Include="鐢熶骇绠$悊\ClsSc_ChangeNoteBill.cs" /> <Compile Include="鐢熶骇绠$悊\ClsSc_WIPStockChangeBill.cs" /> <Compile Include="鐢熶骇绠$悊\ClsSc_WIPStockCheckBill.cs" /> diff --git a/DAL/MES/ClsSc_ICMOBillQualityStatus_Tmp.cs b/DAL/MES/ClsSc_ICMOBillQualityStatus_Tmp.cs index dfa92b6..af0bcce 100644 --- a/DAL/MES/ClsSc_ICMOBillQualityStatus_Tmp.cs +++ b/DAL/MES/ClsSc_ICMOBillQualityStatus_Tmp.cs @@ -102,6 +102,71 @@ throw (e); } } + + //新增单据 + public bool AddBill1(ref string sReturn) + { + try + { + //若MAINDI重复则重新获取 + oCn.BeginTran(); + string sql = "Insert into Sc_ICMOBillQualityStatus_Tmp"+ + "(HBarCode,HInterID,HBillNo,HCheckManID,HBadReasonID,HWasterReasonID,HResult,HAddr," + + "HRemark,HSaveType,HICMOInterID,HICMOEntryID,HICMOBillNo,HSplitNo,HMaterID,HProcID,HSourceID,HDate,HGroupID,HDeptID,HStationID," + + "HPRDORGID,HAuxPropID,HBillType,HBillSubType,HReportType,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationInterID," + + "HRelationEntryID,HRelationBillNo,HMaker,HMakeDate)" + + "values(" + + "'" + omodel.HBarCode + + "'," + omodel.HInterID + + ",'" + omodel.HBillNo + + "'," + omodel.HCheckManID + + "," + omodel.HBadReasonID + + "," + omodel.HWasterReasonID + + ",'" + omodel.HResult + + "','" + omodel.HAddr + + "','" + omodel.HRemark + + "','" + omodel.HSaveType + + "'," + omodel.HICMOInterID + + "," + omodel.HICMOEntryID + + ",'" + omodel.HICMOBillNo + + "','" + omodel.HSplitNO + + "'," + omodel.HMaterID + + "," + omodel.HProcID + + "," + omodel.HSourceID + + ",'" + omodel.HDate + + "'," + omodel.HGroupID + + "," + omodel.HDeptID + + "," + omodel.HStationID + + "," + omodel.HPRDORGID + + "," + omodel.HAuxPropID + + ",'" + BillType + + "','" + "" + + "'," + omodel.HReportType + + "," + omodel.HSourceInterID + + "," + omodel.HSourceEntryID + + ",'" + omodel.HSourceBillNo + + "','" + omodel.HSourceBillType + + "'," + omodel.HRelationInterID + + "," + omodel.HRelationEntryID + + ",'" + omodel.HRelationBillNo + + "','" + omodel.HMaker + + "','" + omodel.HMakeDate + + "')"; + + //主表 + oCn.RunProc(sql); + sReturn = "新增单据成功!"; + oCn.Commit(); + return true; + } + catch (Exception e) + { + sReturn = e.Message; + oCn.RollBack(); + throw (e); + } + } + //显示单据 public override bool ShowBill(Int64 lngBillKey, ref string sReturn) { diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/ClsGy_SourceWorkStationSet.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/ClsGy_SourceWorkStationSet.cs" new file mode 100644 index 0000000..1aa7181 --- /dev/null +++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/ClsGy_SourceWorkStationSet.cs" @@ -0,0 +1,68 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using System.Data; + +namespace DAL +{ + public class ClsGy_SourceWorkStationSet : DBUtility.ClsGy_Base_Ctl + { + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + public Model.ClsGy_SourceWorkStationSet oModel = new Model.ClsGy_SourceWorkStationSet(); + //鏋勯�犲嚱鏁� + public ClsGy_SourceWorkStationSet() + { + MvarItemKey = "Gy_SourceWorkStationSet"; + MvarReportTitle = "浜х嚎宸ヤ綅"; + oModel = new Model.ClsGy_SourceWorkStationSet(); + } + + //鏂板 + public override bool AddNew() + { + try + { + string ssql = "Insert into " + MvarItemKey + " " + + "(HMacAddr,HSourceID,HProdOrgID,HWorkStationID,HProcID," + + " HType,HVideo,HRemark,HCreateDate,HCreator)" + + " Values('" + oModel.HMacAddr + "'," + oModel.HSourceID + "," + oModel.HProdOrgID + "," + oModel.HWorkStationID + "," + + oModel.HProcID + ",'" + oModel.HType + "'," + oModel.HVideo + ",'" + oModel.HRemark + "','" + + oModel.HCreateDate + "','" + oModel.HCreator + "')"; + oCn.BeginTran(); + oCn.RunProc(ssql, ref DBUtility.ClsPub.sExeReturnInfo); + oCn.Commit(); + return true; + } + catch (Exception e) + { + oCn.RollBack(); + throw (e); + } + } + + //淇敼 + public override bool ModifyByID(Int64 sItemID) + { + try + { + string ssql = "Update " + MvarItemKey + " set " + + "HMacAddr='" + oModel.HMacAddr + "'" + + ",HSourceID='" + oModel.HSourceID + "'" + + ",HProdOrgID='" + oModel.HProdOrgID + "'" + + ",HWorkStationID= '" + oModel.HWorkStationID + "'" + + ",HProcID='" + oModel.HProcID + "'" + + ",HType='" + oModel.HType + "'" + + ",HVideo='" + oModel.HVideo +"' Where HItemID = " + sItemID; + oCn.BeginTran(); + oCn.RunProc(ssql, ref DBUtility.ClsPub.sExeReturnInfo); + oCn.Commit(); + return true; + } + catch (Exception e) + { + oCn.RollBack(); + throw (e); + } + } + } +} diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_ICMOBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_ICMOBill.cs" index b396298..2a58585 100644 --- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_ICMOBill.cs" +++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_ICMOBill.cs" @@ -34,6 +34,21 @@ { try { + //淇濆瓨鍓嶆帶鍒�========================================= + string HBillNote = ""; + DataSet ds = oCn.RunProcReturn("Exec h_p_Sc_ICMOBill_BeforeSaveCtrl " + lngBillKey.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',2 ", "h_p_Sc_ICMOBill_BeforeSaveCtrl"); + if (ds == null) + { + sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒"; + return false; + } + if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + return false; + } + //========================================================= + // oCn.BeginTran(); //鏇存柊涓昏〃 @@ -90,6 +105,25 @@ // "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + // ") "); //} + + //=========================淇濆瓨鍚庢帶鍒� + DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sc_ICMOBill_AfterSaveCtrl " + lngBillKey.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Sc_ICMOBill_AfterSaveCtrl"); + if (ds2 == null) + { + sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒"; + oCn.RollBack(); + return false; + } + if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]); + oCn.RollBack(); + return false; + } + //============================ + + + sReturn = "淇敼鍗曟嵁鎴愬姛锛�"; oCn.Commit(); return true; @@ -101,6 +135,9 @@ throw (e); } } + + + //鏂板鍗曟嵁 public override bool AddBill(ref string sReturn) { @@ -108,7 +145,22 @@ { //寰楀埌mainid omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); - //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙� + + //淇濆瓨鍓嶆帶鍒�=========================h_p_Sc_ICMOBill_BeforeDeleteCtrl + string HBillNote = ""; + DataSet ds = oCn.RunProcReturn("Exec h_p_Sc_ICMOBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '"+ omodel.HBillNo +"','" + HBillNote + "','1' ", "h_p_Sc_ICMOBill_BeforeSaveCtrl"); + if(ds==null) + { + sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒"; + return false; + } + if(DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"])!= "0") + { + sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]) ; + return false; + } + //========================================================= + oCn.BeginTran(); //涓昏〃 oCn.RunProc("Insert Into Sc_ICMOBillMain " + @@ -137,6 +189,25 @@ // "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + // ") "); //} + + + //=========================淇濆瓨鍚庢帶鍒� + DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sc_ICMOBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Sc_ICMOBill_AfterSaveCtrl"); + if (ds2 == null) + { + sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒"; + oCn.RollBack(); + return false; + } + if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]); + oCn.RollBack(); + return false; + } + //============================ + + sReturn = "鏂板鍗曟嵁鎴愬姛锛�"; oCn.Commit(); return true; @@ -148,6 +219,8 @@ throw (e); } } + + //鏄剧ず鍗曟嵁 public override bool ShowBill(Int64 lngBillKey, ref string sReturn) { @@ -256,9 +329,10 @@ //鏈夊叧鑱旀暟閲忓垯涓嶅厑璁稿垹闄� DataSet ds; ds = oCn.RunProcReturn("exec h_p_Mes_ICMODeleteCtrl " + lngBillKey.ToString(), "h_p_Mes_ICMODeleteCtrl"); - if(ds==null || ds.Tables[0].Rows.Count==0) + //ds = oCn.RunProcReturn("exec h_p_Sc_ICMOBill_BeforeDeleteCtrl " + lngBillKey.ToString(), "h_p_Sc_ICMOBill_BeforeDeleteCtrl"); + if (ds==null || ds.Tables[0].Rows.Count==0) { - sReturn = "鍒ゆ柇鍏宠仈鏁伴噺澶辫触,260琛�! "; + sReturn = "鍒ゆ柇鍏宠仈鏁伴噺澶辫触! "; return false; } if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) != 0) diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_ICMOReportBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_ICMOReportBill.cs" index 84e4beb..fd2ce4b 100644 --- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_ICMOReportBill.cs" +++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/ClsSc_ICMOReportBill.cs" @@ -38,6 +38,22 @@ { try { + //淇濆瓨鍓嶆帶鍒�========================================= + string HBillNote = ""; + DataSet ds = oCn.RunProcReturn("Exec h_p_Sc_ICMOReportBill_BeforeSaveCtrl " + lngBillKey.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',2 ", "h_p_Sc_ICMOReport_BeforeSaveCtrl"); + if (ds == null) + { + sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒"; + return false; + } + if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + return false; + } + //========================================================= + + // DataSet Ds; oCn.BeginTran(); @@ -125,6 +141,25 @@ // return false; // } //} + + + //=========================淇濆瓨鍚庢帶鍒� + DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sc_ICMOReportBill_AfterSaveCtrl " + lngBillKey.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Sc_ICMOReportBill_AfterSaveCtrl"); + if (ds2 == null) + { + sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒"; + oCn.RollBack(); + return false; + } + if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]); + oCn.RollBack(); + return false; + } + //============================ + + sReturn = "淇敼鍗曟嵁鎴愬姛锛�"; oCn.Commit(); return true; @@ -143,7 +178,21 @@ { //寰楀埌mainid omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); - //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙� + //淇濆瓨鍓嶆帶鍒�========================================= + string HBillNote = ""; + DataSet ds = oCn.RunProcReturn("Exec h_p_Sc_ICMOReportBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Sc_ICMOReport_BeforeSaveCtrl"); + if (ds == null) + { + sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒"; + return false; + } + if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + return false; + } + //========================================================= + oCn.BeginTran(); //涓昏〃 oCn.RunProc("Insert Into Sc_ICMOReportBillMain " + @@ -189,6 +238,24 @@ // } //} // + + //=========================淇濆瓨鍚庢帶鍒� + DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sc_ICMOReportBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Sc_ICMOReportBill_AfterSaveCtrl"); + if (ds2 == null) + { + sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒"; + oCn.RollBack(); + return false; + } + if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]); + oCn.RollBack(); + return false; + } + //============================ + + sReturn = "鏂板鍗曟嵁鎴愬姛锛�"; oCn.Commit(); return true; @@ -306,7 +373,7 @@ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); try { - oCn.BeginTran(); + oCn.BeginTran();//h_p_Sc_ICMOReportBill_BeforeDeleteCtrl DataSet Ds = oCn.RunProcReturn("exec h_p_Sc_ICMOReportBill_Delete " + lngBillKey + ",'" + HBillNo + "','" + BillType + "','" + HERPMode + "','" + HUpdateSourceInterID + "'", "h_p_Sc_ICMOReportBill_Delete"); if (Ds == null || Ds.Tables[0].Rows.Count == 0) { diff --git "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBill.cs" "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBill.cs" index 5636323..e35c4d6 100644 --- "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBill.cs" +++ "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBill.cs" @@ -14,7 +14,7 @@ public ClsQC_FirstPieceCheckBill() { base.MvarItemKeySub = "QC_FirstPieceCheckBillSub"; - base.MvarItemKeySub2 = ""; + base.MvarItemKeySub2 = "QC_FirstPieceCheckBillSub_ValueGrid"; base.MvarItemKeySub3 = ""; base.MvarItemKeySub4 = ""; base.MvarItemKey="QC_FirstPieceCheckBillMain"; @@ -152,13 +152,13 @@ ",HYear,HPeriod,HRemark" + ",HSourceID,HICMOInterID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" + ",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp,HLastResult" + - ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID" + + ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID" + ") " + " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",'" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" + "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" + "," + omodel.HSourceID.ToString() + "," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOBillNo + "'," + omodel.HICMOQty.ToString() + "," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() + ",'" + omodel.HProcExchBillNo + "'," + omodel.HProcExchQty.ToString() + "," + omodel.HMaterID.ToString() + "," + omodel.HFirstCheckEmp.ToString() + ", " + DBUtility.ClsPub.BoolToString(omodel.HLastResult) + - "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'," + omodel.HICMOEntryID + + "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'," + omodel.HICMOEntryID + "," + omodel.HQCSchemeID + ") "); //鎻掑叆瀛愯〃 foreach (Model.ClsQC_FirstPieceCheckBillSub oSub in DetailColl) @@ -170,7 +170,7 @@ ",HQCCheckItemID,HQCStd,HUnit,HQCNote,HResult" + ",HMax,HMin,HAvg,HSampleSchemeID,HSampleQty,HSampleDamageQty,HAcceptQty" + ",HRejectQty,HSampleUnRightQty,HStatus,HUnitID,HInspectVal,HTargetVal" + - ",HUpLimit,HDownLimit,HUpOffSet,HDownOffSet,HKeyInspect,HAnalysisMethod" + + ",HUpLimit,HDownLimit,HUpOffSet,HDownOffSet,HKeyInspect,HAnalysisMethod,HInspectInstruMentID,HInspectResult" + ") values(" + omodel.HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'" + ",getdate()," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'," + oSub.HSourceInterID.ToString() + @@ -179,8 +179,7 @@ ",'" + oSub.HMax + "','" + oSub.HMin + "','" + oSub.HAvg + "'" + "," + oSub.HSampleSchemeID + "," + oSub.HSampleQty + "," + oSub.HSampleDamageQty + "," + oSub.HAcceptQty + "," + oSub.HRejectQty + "," + oSub.HSampleUnRightQty + ",'" + oSub.HStatus + "'," + oSub.HUnitID + ",'" + oSub.HInspectVal + "','" + oSub.HTargetVal + "','" + oSub.HUpLimit + "','" + oSub.HDownLimit + - "','" + oSub.HUpOffSet + "','" + oSub.HDownOffSet + "'," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'" + - ") "); + "','" + oSub.HUpOffSet + "','" + oSub.HDownOffSet + "'," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'" + ") "); } //foreach (Model.ClsQC_FirstPieceCheckBillSub_Item oSub2 in DetailColl1) //{ diff --git "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs" "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs" index aa22d15..f5418a2 100644 --- "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs" +++ "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs" @@ -9,11 +9,11 @@ { public Model.ClsQC_ProcessCheckBillMain omodel = new Model.ClsQC_ProcessCheckBillMain(); public List<Model.ClsQC_ProcessCheckBillSub> DetailColl = new List<Model.ClsQC_ProcessCheckBillSub>(); - + public List<Model.ClsQC_ProcessCheckBillSub_ValueGrid> DetailColl_Value = new List<Model.ClsQC_ProcessCheckBillSub_ValueGrid>(); public ClsQC_ProcessCheckBill() { base.MvarItemKeySub = "QC_ProcessCheckBillSub"; - base.MvarItemKeySub2 = ""; + base.MvarItemKeySub2 = "QC_ProcessCheckBillSub_ValueGrid"; base.MvarItemKeySub3 = ""; base.MvarItemKeySub4 = ""; base.MvarItemKey="QC_ProcessCheckBillMain"; @@ -156,7 +156,7 @@ ",HBarCode,HLBatchNo,HCusID,HSortBillNo,HContrctBatchNo" + ",HProdAreaID,HProdTypeID,HProdStoveNo,HRecipeID,HDiameter1" + ",HDiameter2,HRoutingInterID,HDrawingDireID,HPackTypeID" + - ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID" + + ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID" + ") " + " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",'" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" + "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+ @@ -166,7 +166,7 @@ ",'" + omodel.HBarCode + "','" + omodel.HLBatchNo + "'," + omodel.HCusID.ToString() + ",'" + omodel.HSortBillNo + "','" + omodel.HContrctBatchNo + "'" + "," + omodel.HProdAreaID.ToString() + "," + omodel.HProdTypeID.ToString() + ",'" + omodel.HProdStoveNo + "'," + omodel.HRecipeID.ToString() + "," + omodel.HDiameter1.ToString() + "," + omodel.HDiameter2.ToString() + "," + omodel.HRoutingInterID.ToString() + ",'" + omodel.HDrawingDireID + "'," + omodel.HPackTypeID.ToString() + - "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'," + omodel.HICMOEntryID + + "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'," + omodel.HICMOEntryID + "," + omodel.HQCSchemeID + ") "); //鎻掑叆瀛愯〃 foreach (Model.ClsQC_ProcessCheckBillSub oSub in DetailColl) @@ -176,13 +176,18 @@ ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" + ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + ",HQCCheckClassID,HQCCheckItemID,HQCStd,HQCRelValue,HResult" + - ",HProcCheckEmp,HProcCheckTime" + + ",HProcCheckEmp,HProcCheckTime, HSampleSchemeID,HSampleQty,HSampleDamageQty,HAcceptQty" + + ",HRejectQty,HSampleUnRightQty,HStatus,HUnitID,HInspectVal,HTargetVal" + + ",HUpLimit,HDownLimit,HUpOffSet,HDownOffSet,HKeyInspect,HAnalysisMethod,HInspectInstruMentID,HInspectResult" + ") values(" + omodel.HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'" + ",getdate()," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + "," + oSub.HQCCheckClassID.ToString() + "," + oSub.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HQCRelValue + "','" + oSub.HResult + "'" + - "," + oSub.HProcCheckEmp.ToString() + ",'" + oSub.HProcCheckTime + "'" + + "," + oSub.HProcCheckEmp.ToString() + ",'" + oSub.HProcCheckTime + "'," + oSub.HSampleSchemeID + "," + oSub.HSampleQty + + "," + oSub.HSampleDamageQty + "," + oSub.HAcceptQty + "," + oSub.HRejectQty + "," + oSub.HSampleUnRightQty + ",'" + oSub.HStatus + + "'," + oSub.HUnitID + ",'" + oSub.HInspectVal + "','" + oSub.HTargetVal + "','" + oSub.HUpLimit + "','" + oSub.HDownLimit + + "','" + oSub.HUpOffSet + "','" + oSub.HDownOffSet + "'," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'" + ") "); } @@ -209,6 +214,39 @@ throw (e); } } + + //鏂板妫�楠屽�� + public virtual bool AddValue(ref string sReturn, ref long HInterID, ref long HEntryID) + { + try + { + oCn.BeginTran(); + + oCn.RunProc("delete from QC_ProcessCheckBillSub_ValueGrid where HInterID = " + HInterID + " and HEntryID = " + HEntryID); + + //鎻掑叆瀛愯〃 + foreach (Model.ClsQC_ProcessCheckBillSub_ValueGrid value in DetailColl_Value) + { + oCn.RunProc("Insert into QC_ProcessCheckBillSub_ValueGrid " + + " (HInterID,HEntryID,HSEQ,HInSpectResult" + + ",HInSpectValue,HInSpectValueB,HInSpectValueT" + + ") values(" + + HInterID + "," + HEntryID + "," + value.HSEQ + ",'" + value.HInSpectResult + "'," + + value.HInSpectValue + "," + value.HInSpectValueB + ",'" + value.HInSpectValueT + "'" + + ") "); + } + sReturn = "鏂板妫�楠屽�兼垚鍔燂紒"; + oCn.Commit(); + return true; + } + catch (Exception e) + { + sReturn = e.Message; + oCn.RollBack(); + throw (e); + } + } + //鏄剧ず鍗曟嵁 public override bool ShowBill(Int64 lngBillKey, ref string sReturn) { diff --git "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs" "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs" index 1963961..92e0b84 100644 --- "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs" +++ "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs" @@ -57,6 +57,22 @@ { try { + //淇濆瓨鍓嶆帶鍒�========================================= + string HBillNote = ""; + DataSet ds = oCn.RunProcReturn("Exec h_p_Sc_ProcessExchangeBill_BeforeSaveCtrl " + lngBillKey.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',2 ", "h_p_Sc_ProcessExchangeBill_BeforeSaveCtrl"); + if (ds == null) + { + sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒"; + return false; + } + if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + return false; + } + //========================================================= + + // oCn.BeginTran(); string sql = string.Format(@"UpDate Sc_ProcessExchangeBillMain set " + @@ -204,7 +220,7 @@ //oCn.RunProc("exec h_p_Sc_ProcessExchangeBill_SetDate " + omodel.HInterID.ToString()); //鍥炲~ 寮�宸ュ畬宸ユ棩鏈� //oCn.RunProc("exec h_p_Sc_ProcessExchangeBill_RelationQty " + omodel.HInterID.ToString() + ",1"); //杩斿伐娴佽浆鍗� 鍙嶅啓 鎷嗗垎鏁伴噺 鍥炲~浠诲姟鍗� 娴佽浆鍗℃暟閲� 鍥炲~浠诲姟鍗曚笂闄愭暟閲� //鎺у埗鍏宠仈鏁伴噺 - DataSet ds = new DataSet(); + //DataSet ds = new DataSet(); ds = oCn.RunProcReturn("exec h_p_Sc_ProcessExchangeBill_Checkqty " + omodel.HInterID.ToString(), "h_p_Sc_ProcessExchangeBill_Checkqty"); if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) != 0) { @@ -213,6 +229,24 @@ return false; } // + //=========================淇濆瓨鍚庢帶鍒� + DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sc_ProcessExchangeBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Sc_ProcessExchangeBill_AfterSaveCtrl"); + if (ds2 == null) + { + sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒"; + oCn.RollBack(); + return false; + } + if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]); + oCn.RollBack(); + return false; + } + //============================ + + + sReturn = "淇敼鍗曟嵁鎴愬姛锛�"; oCn.Commit(); return true; @@ -302,11 +336,22 @@ omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙� - //鏍规嵁鍐呯爜 鐢熸垚椤圭洰鍙峰苟鍐欏叆鏁版嵁搴� - //omodel.HProjectNum = ""; - //omodel.HProjectNum = GetNewCodeByNum(omodel.HInterID, 1, 3).ToString(); - // - + //淇濆瓨鍓嶆帶鍒�========================================= + string HBillNote = ""; + DataSet ds = oCn.RunProcReturn("Exec h_p_Sc_ProcessExchangeBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Sc_ProcessExchangeBill_BeforeSaveCtrl"); + if (ds == null) + { + sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒"; + return false; + } + if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + return false; + } + //========================================================= + + oCn.BeginTran(); //涓昏〃 oCn.RunProc("Insert Into Sc_ProcessExchangeBillMain " + @@ -400,7 +445,7 @@ sErr = sErr + "4;"; oCn.RunProc("exec h_p_Sc_ProcessExchangeBill_SetUpdate " + omodel.HInterID.ToString()); //璁剧疆 鏈亾 棣栭亾 杞� 绛変俊鎭� 鍣ㄥ叿娓呭崟 宸ヨ壓鍙傛暟娓呭崟锛� sErr = sErr + "5;"; - DataSet ds = new DataSet(); + //DataSet ds = new DataSet(); //璁剧疆鏉$爜鍙� 鍥炲~ 棰嗘枡鎵规 ds = oCn.RunProcReturn("exec h_p_Mes_ProcessExchangeBackBarCode " + omodel.HInterID.ToString(), "h_p_Mes_ProcessExchangeBackBarCode"); if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) != 0) @@ -424,6 +469,9 @@ oCn.RollBack(); return false; } + + + sErr = sErr + "7;"; @@ -457,6 +505,24 @@ oCn.RollBack(); return false; } + + + //=========================淇濆瓨鍚庢帶鍒� + DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sc_ProcessExchangeBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Sc_ProcessExchangeBill_AfterSaveCtrl"); + if (ds2 == null) + { + sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒"; + oCn.RollBack(); + return false; + } + if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") + { + sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]); + oCn.RollBack(); + return false; + } + //============================ + // sReturn = "鏂板鍗曟嵁鎴愬姛锛�"; @@ -672,9 +738,10 @@ //鏈夊叧鑱旀暟閲忓垯涓嶅厑璁稿垹闄� DataSet ds; ds = oCn.RunProcReturn("exec h_p_Mes_ProcExchDeleteCtrl " + lngBillKey.ToString(), "h_p_Mes_ProcExchDeleteCtrl"); + //ds = oCn.RunProcReturn("exec h_p_Sc_ProcessExchangeBill_BeforeDeleteCtrl " + lngBillKey.ToString(), "h_p_Sc_ProcessExchangeBill_BeforeDeleteCtrl"); if (ds == null || ds.Tables[0].Rows.Count == 0) { - sReturn = "鍒ゆ柇鍏宠仈鏁伴噺澶辫触,260琛�! "; + sReturn = "鍒ゆ柇鍏宠仈鏁伴噺澶辫触! "; return false; } if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) != 0) diff --git "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_StationInBill.cs" "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_StationInBill.cs" index 943a5f6..bda0d4d 100644 --- "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_StationInBill.cs" +++ "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_StationInBill.cs" @@ -329,7 +329,7 @@ { omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); } - //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙� + // oCn.BeginTran(); //涓昏〃 oCn.RunProc("Insert Into Sc_StationInBillMain " + diff --git "a/DBUtility/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_Base_View.cs" "b/DBUtility/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_Base_View.cs" index 9e8c477..552245f 100644 --- "a/DBUtility/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_Base_View.cs" +++ "b/DBUtility/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_Base_View.cs" @@ -555,7 +555,21 @@ //鏍规嵁鍚嶇О杩斿洖椤圭洰淇℃伅 public virtual bool GetInfoByName(string sName) { - return true; + DataSet DS; + try + { + DS = oCN.RunProcReturn("Select * from " + MvarItemKey + " Where HName='" + sName + "'", MvarItemKey, ref DBUtility.ClsPub.sExeReturnInfo); + if (DS.Tables[0].Rows.Count == 0) + return false; + else + { + return GetInfo(DS); + } + } + catch (Exception e) + { + throw (e); + } } //杩斿洖椤圭洰淇℃伅 public virtual bool GetInfo(DataSet DS) diff --git a/Model/MES/ClsSc_ICMOBillQualityStatus_Tmp.cs b/Model/MES/ClsSc_ICMOBillQualityStatus_Tmp.cs index 027b1de..24fbd64 100644 --- a/Model/MES/ClsSc_ICMOBillQualityStatus_Tmp.cs +++ b/Model/MES/ClsSc_ICMOBillQualityStatus_Tmp.cs @@ -31,6 +31,36 @@ public Int64 HRelationEntryID;// int //关联单子ID public string HRelationBillNo;// varchar(50) //关联单号 + public string HBillNo; //单据号 + public Int64 HCheckManID; //质检人 + public string HResult; //判断结果 + public string HRemark; //备注 + public string HSaveType; //保存类型 不良品保存,报废品保存 + + public Int64 HICMOInterID; //生产订单主内码 + public Int64 HICMOEntryID; //生产订单子内码 + public string HICMOBillNo; //生产订单号 + public Int64 HMaterID; //产品内码 + public Int64 HProcID; //工序内码 + public string HDate; //制单日期 + public Int64 HGroupID; //班组内码 + public Int64 HDeptID; //部门内码 + public Int64 HStationID; //工位内码 + public Int64 HPRDORGID; //生产组织内码 + public Int64 HAuxPropID; //辅助属性内码 + + public Int64 HBadResultID; //不良结果 + public Int64 HBadTypeID; //不良类型 + public Int64 HMTONo; //计划跟踪号 + public Int64 HOTHERORGID; //其它组织(预留) + public Int64 HOWNERID; //货主 + public Int64 HOWNERTYPEID; //货主类型 + + public Int64 HProcExchInterID; //工序流转卡内码 + public Int64 HProcExchEntryID; //工序流转卡子内码 + public string HProcExchBillNo; //工序流转卡号 + + public Int64 HQualityReportEntryID; //质量汇报单子表ID // } } diff --git a/Model/Model.csproj b/Model/Model.csproj index 4437f76..db8e158 100644 --- a/Model/Model.csproj +++ b/Model/Model.csproj @@ -449,6 +449,7 @@ <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_TechnologyParameter_Model.cs" /> <Compile Include="鎴愭湰绠$悊\ClsKf_ICBal.cs" /> <Compile Include="鎴愭湰绠$悊\ClsKf_WIPBal.cs" /> + <Compile Include="鐢熶骇绠$悊\ClsGy_SourceWorkStationSet.cs" /> <Compile Include="鐢熶骇绠$悊\ClsSc_ChangeNoteBillMain.cs" /> <Compile Include="鐢熶骇绠$悊\ClsSc_ChangeNoteBillSub.cs" /> <Compile Include="鐢熶骇绠$悊\ClsSc_MateWasterRequestBillMain.cs" /> @@ -581,6 +582,7 @@ <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipConkBookBillMain.cs" /> <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipConkBookBillSub.cs" /> <Compile Include="璐ㄦ绠$悊\ClsQC_FirstPieceCheckBillSub_ValueGrid.cs" /> + <Compile Include="璐ㄦ绠$悊\ClsQC_ProcessCheckBillSub_ValueGrid.cs" /> <Compile Include="杞﹂棿绠$悊\ClsSc_ProcExchRecordBackBillMain.cs" /> <Compile Include="杞﹂棿绠$悊\ClsSc_ProcExchRecordBackBillSub.cs" /> <Compile Include="杞﹂棿绠$悊\ClsSc_ProcExchSendWorkBillMain.cs" /> diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/ClsGy_SourceWorkStationSet.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/ClsGy_SourceWorkStationSet.cs" new file mode 100644 index 0000000..fa19ed9 --- /dev/null +++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/ClsGy_SourceWorkStationSet.cs" @@ -0,0 +1,19 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Model +{ + public class ClsGy_SourceWorkStationSet : DBUtility.ClsGy_Base_Model + { + public string HMacAddr; //MAC鍙� + public Int64 HSourceID; //鐢熶骇璧勬簮(Gy_Source) + public Int64 HProdOrgID; //鐢熶骇缁勭粐() + public Int64 HWorkStationID; //宸ヤ綅锛圙y_WorkStation锛� + public Int64 HProcID; //宸ュ簭(Gy_Process) + public string HType; //鍖归厤绫诲瀷锛堟寜宸ヤ綅鍖归厤锛屾寜宸ュ簭鍖归厤锛屾寜宸ヤ綅+宸ュ簭鍖归厤锛� + public Int64 HVideo; //鏄惁榛樿鎾斁瑙嗛 + public DateTime HCreateDate; //鍒涘缓鏃ユ湡 + public string HCreator; //鍒涘缓浜猴紙鍜孒UserName 涓�鑷达級 + } +} diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillMain.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillMain.cs" index 1f17686..ed85bf3 100644 --- "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillMain.cs" +++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillMain.cs" @@ -20,6 +20,7 @@ public String HBackRemark; public Int64 HPrintQty; public Int64 HICMOEntryID; + public Int64 HQCSchemeID; } } diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillSub.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillSub.cs" index a64aeb6..d3b9107 100644 --- "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillSub.cs" +++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillSub.cs" @@ -33,6 +33,8 @@ public String HDownOffSet; public String HAnalysisMethod; public Int64 HKeyInspect; + public Int64 HInspectInstruMentID; + public String HInspectResult; //public HSamplingType; //public HInspectionLevel; //public HStrictness; diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillSub_ValueGrid.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillSub_ValueGrid.cs" index 91d64f3..803c818 100644 --- "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillSub_ValueGrid.cs" +++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBillSub_ValueGrid.cs" @@ -9,7 +9,7 @@ public Int64 HItemID; public Int64 HSEQ; public String HInSpectResult; - public decimal HInSpectValue; + public double HInSpectValue; public Int64 HInSpectValueB; public String HInSpectValueT; } diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillMain.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillMain.cs" index 3c97d59..4d7bbe4 100644 --- "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillMain.cs" +++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillMain.cs" @@ -38,6 +38,7 @@ public String HDrawingDireID; public Int64 HPackTypeID; public Int64 HICMOEntryID; - + public Int64 HQCSchemeID; + } } diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillSub.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillSub.cs" index f78e2f4..491ffd1 100644 --- "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillSub.cs" +++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillSub.cs" @@ -15,5 +15,29 @@ public String HResult; public Int64 HProcCheckEmp; public DateTime HProcCheckTime; + + public Int64 HSampleSchemeID; + public Int64 HSampleQty; + public double HSampleDamageQty; + public Int64 HAcceptQty; + public Int64 HRejectQty; + public double HSampleUnRightQty; + public String HStatus; + public Int64 HUnitID; + public String HInspectVal; + public String HTargetVal; + public String HUpLimit; + public String HDownLimit; + public String HUpOffSet; + public String HDownOffSet; + public String HAnalysisMethod; + public Int64 HKeyInspect; + public Int64 HInspectInstruMentID; + public String HInspectResult; + //public HSamplingType; + //public HInspectionLevel; + //public HStrictness; + //public HAQL; + //public xxx; } } diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillSub_ValueGrid.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillSub_ValueGrid.cs" new file mode 100644 index 0000000..e09a626 --- /dev/null +++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBillSub_ValueGrid.cs" @@ -0,0 +1,16 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Model +{ + public class ClsQC_ProcessCheckBillSub_ValueGrid : DBUtility.ClsXt_BaseBillSub + { + public Int64 HItemID; + public Int64 HSEQ; + public String HInSpectResult; + public double HInSpectValue; + public Int64 HInSpectValueB; + public String HInSpectValueT; + } +} diff --git "a/PlanM/\350\256\241\345\210\222\347\256\241\347\220\206/Gy_RoutingBill.cs" "b/PlanM/\350\256\241\345\210\222\347\256\241\347\220\206/Gy_RoutingBill.cs" index 98307aa..0599468 100644 --- "a/PlanM/\350\256\241\345\210\222\347\256\241\347\220\206/Gy_RoutingBill.cs" +++ "b/PlanM/\350\256\241\345\210\222\347\256\241\347\220\206/Gy_RoutingBill.cs" @@ -390,6 +390,9 @@ if (BillOld.CheckBill(BillOld.omodel.HInterID, ref ClsPub.sExeReturnInfo) == true) { + + + BillChange = true; txtHChecker.Text = ClsPub.CurUserName; txtHCheckDate.Text = BillOld.omodel.HCheckDate; diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs index 02c7421..8122824 100644 --- a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs +++ b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs @@ -1646,6 +1646,78 @@ omodel.MES_StationEntrustOutBill_SaveAutoAddnew = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); } + + //=============================首件检验单 + //保存后是否自动审核 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "QC_FirstPieceCheckBill_AutoCheck") + { + omodel.QC_FirstPieceCheckBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + //保存后变为新增状态 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "QC_FirstPieceCheckBill_SaveAutoAddnew") + { + omodel.QC_FirstPieceCheckBill_SaveAutoAddnew = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + //删除人必须是制单人 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "QC_FirstPieceCheckBill_DeleterAndMakerMustSame") + { + omodel.QC_FirstPieceCheckBill_DeleterAndMakerMustSame = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + //质检方案来源 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "QC_FirstPieceCheckBill_QCSchemeSource") + { + omodel.QC_FirstPieceCheckBill_QCSchemeSource = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + + + + //=============================巡检单 + //保存后是否自动审核 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "QC_PatrolProcCheckBill_AutoCheck") + { + omodel.QC_PatrolProcCheckBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + //保存后变为新增状态 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "QC_PatrolProcCheckBill_SaveAutoAddnew") + { + omodel.QC_PatrolProcCheckBill_SaveAutoAddnew = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + //删除人必须是制单人 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "QC_PatrolProcCheckBill_DeleterAndMakerMustSame") + { + omodel.QC_PatrolProcCheckBill_DeleterAndMakerMustSame = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + //质检方案来源 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "QC_PatrolProcCheckBill_QCSchemeSource") + { + omodel.QC_PatrolProcCheckBill_QCSchemeSource = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + + + //=============================工序转序检验单 + //保存后是否自动审核 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "QC_ProcessCheckBill_AutoCheck") + { + omodel.QC_ProcessCheckBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + //保存后变为新增状态 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "QC_ProcessCheckBill_SaveAutoAddnew") + { + omodel.QC_ProcessCheckBill_SaveAutoAddnew = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + //删除人必须是制单人 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "QC_ProcessCheckBill_DeleterAndMakerMustSame") + { + omodel.QC_ProcessCheckBill_DeleterAndMakerMustSame = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + //质检方案来源 + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "QC_ProcessCheckBill_QCSchemeSource") + { + omodel.QC_ProcessCheckBill_QCSchemeSource = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + + + //报工台,工序汇报自动审核参数 if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Sc_MESProceReportWorkBill_AutoCheck") { diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs index a7d8927..330f406 100644 --- a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs +++ b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs @@ -525,6 +525,25 @@ public string QC_FirstPieceCheckBill_AutoCheck; //保存后是否自动审核 public string QC_FirstPieceCheckBill_SaveAutoAddnew; //保存后变为新增状态 public string QC_FirstPieceCheckBill_DeleterAndMakerMustSame; //删除人必须是制单人 + public string QC_FirstPieceCheckBill_QCSchemeSource; //质检方案来源 + + //巡检单 + + public string QC_PatrolProcCheckBill_AutoCheck; //保存后是否自动审核 + public string QC_PatrolProcCheckBill_SaveAutoAddnew; //保存后变为新增状态 + public string QC_PatrolProcCheckBill_DeleterAndMakerMustSame; //删除人必须是制单人 + public string QC_PatrolProcCheckBill_QCSchemeSource; //质检方案来源 + + //工序转序检验单 + + public string QC_ProcessCheckBill_AutoCheck; //保存后是否自动审核 + public string QC_ProcessCheckBill_SaveAutoAddnew; //保存后变为新增状态 + public string QC_ProcessCheckBill_DeleterAndMakerMustSame; //删除人必须是制单人 + public string QC_ProcessCheckBill_QCSchemeSource; //质检方案来源 + + + + diff --git a/WebAPI/Controllers/BLL/Xt_UserController.cs b/WebAPI/Controllers/BLL/Xt_UserController.cs index 8b674ab..853a083 100644 --- a/WebAPI/Controllers/BLL/Xt_UserController.cs +++ b/WebAPI/Controllers/BLL/Xt_UserController.cs @@ -22,10 +22,18 @@ #region[鐢ㄦ埛鍒楄〃鏌ヨ] [Route("Xt_User/list")] [HttpGet] - public object list(string sWhere) + public object list(string sWhere,string user) { try { + if (!DBUtility.ClsPub.Security_Log_second("Xt_User_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_IF_UserList " + sWhere, "h_v_IF_UserList"); diff --git a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs index f5c918e..b145631 100644 --- a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs +++ b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs @@ -121,6 +121,8 @@ public json AddBillMain(string msg1) { + string sErrMsg = ""; + oSystemParameter.ShowBill(ref sErrMsg); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); @@ -180,6 +182,50 @@ int IsProNo = mainList[0].IsProNo;//鏄惁杞伐搴� HName_LongShan = mainList[0].HName;//宸ヨ壓璺嚎鍚嶇О + + if (oSystemParameter.omodel.WMS_CampanyName == "") + { + if (HPicNumVer == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍥惧彿鐗堟湰涓嶈兘涓虹┖!"; + objJsonResult.data = null; + return objJsonResult; + } + if (HPicNumAssemble == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鎬昏鍥惧彿涓嶈兘涓虹┖!"; + objJsonResult.data = null; + return objJsonResult; + } + if (HMaterTexture == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏉愯川涓嶈兘涓虹┖!"; + objJsonResult.data = null; + return objJsonResult; + } + if (HProductNum == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鎴愬搧缂栧彿涓嶈兘涓虹┖!"; + objJsonResult.data = null; + return objJsonResult; + } + if (HVerNum == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鐗堟湰涓嶈兘涓虹┖!"; + objJsonResult.data = null; + return objJsonResult; + } + } if (OperationType == 2) { ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList where 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_Gy_RoutingBillList"); @@ -244,29 +290,9 @@ return objJsonResult; } - string sErrMsg = ""; - if (oSystemParameter.ShowBill(ref sErrMsg)) + if (oSystemParameter.omodel.WMS_CampanyName == "鐟炰笌绁�") { - if (oSystemParameter.omodel.WMS_CampanyName == "鐟炰笌绁�") - { - if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y" && OperationType == 1) - { - ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process"); - - if (ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏈缃浆宸ュ簭!"; - objJsonResult.data = null; - return objJsonResult; - } - - //璁剧疆杞伐搴� - oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID); - } - } - else if (IsProNo == 1 && OperationType == 1) + if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y" && OperationType == 1) { ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process"); @@ -283,6 +309,23 @@ oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID); } } + else if (IsProNo == 1 && OperationType == 1) + { + ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process"); + + if (ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏈缃浆宸ュ簭!"; + objJsonResult.data = null; + return objJsonResult; + } + + //璁剧疆杞伐搴� + oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID); + } + //鏄惁鍕鹃�夐粯璁ゅ伐鑹鸿矾绾� diff --git a/WebAPI/Controllers/SCGL/Gy_SourceWorkStationSetController.cs b/WebAPI/Controllers/SCGL/Gy_SourceWorkStationSetController.cs new file mode 100644 index 0000000..3374d00 --- /dev/null +++ b/WebAPI/Controllers/SCGL/Gy_SourceWorkStationSetController.cs @@ -0,0 +1,175 @@ +锘縰sing Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Pub_Class; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Web.Http; +using WebAPI.Models; + +namespace WebAPI.Controllers +{ + public class Gy_SourceWorkStationSetController : ApiController + { + public DBUtility.ClsPub.Enum_BillStatus BillStatus; + + private json objJsonResult = new json(); + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + DataSet ds; + + /// <summary> + /// 杩斿洖鐢熶骇宸ヤ綅鍒楄〃 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Gy_SourceWorkStationSet/list")] + [HttpGet] + public object list(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //缂栬緫鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("Gy_SourceWorkStationSet_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + string sql1 = string.Format(@"select * from h_v_Gy_SourceWorkStationSetList where 1 = 1"); + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn(sql1 + sWhere + " order by HItemID ", "h_v_Gy_SourceWorkStationSetList"); + } + else + { + string sql = sql1 + sWhere + " order by HItemID "; + ds = oCN.RunProcReturn(sql, "h_v_Gy_SourceWorkStationSetList"); + } + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #region 浜х嚎宸ヤ綅淇濆瓨 + [Route("Gy_SourceWorkStationSet/Save")] + [HttpPost] + public object set_SaveBill([FromBody] JObject oMain) + { + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + //淇濆瓨鍗曟嵁 + return objJsonResult = AddBillMain(msg1); + } + + public json AddBillMain(string msg1) + { + string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + string msg2 = sArray[0].ToString(); + string user = sArray[1].ToString(); //鐢ㄦ埛 + bool bResult; + try + { + //鍒ゆ柇鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Gy_SourceWorkStationSet_Edit", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犱繚瀛樻潈闄�"; + objJsonResult.data = null; + return objJsonResult; + } + + msg2 = "[" + msg2.ToString() + "]"; + List<Model.ClsGy_SourceWorkStationSet> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_SourceWorkStationSet>>(msg2); + DAL.ClsGy_SourceWorkStationSet BillNew = new DAL.ClsGy_SourceWorkStationSet(); + //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞� + string s = ""; + int sYear = 0; + int sPeriod = 0; + DateTime HDate = mainList[0].HCreateDate;//鏃ユ湡 + if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = s; + objJsonResult.data = null; + return objJsonResult; + } + //鍥哄畾璧嬪��================================= + BillNew.oModel.HMacAddr = mainList[0].HMacAddr; + BillNew.oModel.HSourceID = mainList[0].HSourceID; + BillNew.oModel.HProdOrgID = mainList[0].HProdOrgID; + BillNew.oModel.HWorkStationID = mainList[0].HWorkStationID; + BillNew.oModel.HProcID = mainList[0].HProcID; + BillNew.oModel.HType = ClsPub.isStrNull(mainList[0].HType); + BillNew.oModel.HVideo = ClsPub.isLong(mainList[0].HVideo); + BillNew.oModel.HCreateDate = ClsPub.isDate(mainList[0].HCreateDate); + BillNew.oModel.HCreator = ClsPub.isStrNull(mainList[0].HCreator); + + //淇濆瓨瀹屾瘯鍚庡鐞� + if (mainList[0].HItemID == 0) + { + bResult = BillNew.AddNew(); + } + else + { + bResult = BillNew.ModifyByID(mainList[0].HItemID); + } + //鎻愮ず + if (bResult == true) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + //objJsonResult.Message = "鍗曟嵁瀛樼洏瀹屾瘯!鍗曟嵁鍙�:" + mainList[0].HBillNo.Trim(); + objJsonResult.Message = "淇濆瓨鎴愬姛!" + ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + } +} \ No newline at end of file diff --git a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs index 501562b..1dd2ccb 100644 --- a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs +++ b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs @@ -783,32 +783,26 @@ { try { - if (sWhere == null || sWhere.Equals("")) + List<object> columnNameList = new List<object>(); + + string sql1 = "select * from h_v_Sc_AssemblyBillList where 1 = 1 "; + string sql = sql1 + sWhere; + ds = oCN.RunProcReturn(sql, "h_v_Sc_AssemblyBillList"); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) { - ds = oCN.RunProcReturn("select * from h_v_Sc_AssemblyBillList " + sWhere, "h_v_Sc_AssemblyBillList"); + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 } - else - { - string sql1 = "select * from h_v_Sc_AssemblyBillList where 1 = 1 "; - string sql = sql1 + sWhere; - ds = oCN.RunProcReturn(sql, "h_v_Sc_AssemblyBillList"); - } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "false锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; } catch (Exception e) { diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_Cg_PODemandPlanBillController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_Cg_PODemandPlanBillController.cs" index 9c8ec8e..4884c4b 100644 --- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_Cg_PODemandPlanBillController.cs" +++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_Cg_PODemandPlanBillController.cs" @@ -433,7 +433,7 @@ #region 鎻愭枡璁″垝鍗� 鎻愭枡璁″垝鎶ヨ〃 [Route("JIT_Cg_PODemandPlanBill/ReportPODemandPlanBillList_S")] [HttpGet] - public object ReportPODemandPlanBillList_S(string sWhere, string user) + public object ReportPODemandPlanBillList_S(string sWhere, string user,string HBEGINDATE,string HENDDATE) { try { @@ -447,7 +447,7 @@ return objJsonResult; } - ds = oCN.RunProcReturn($"exec h_p_JIT_PODemandPlanBill_S_ReportList '{sWhere.ToString()}' ", "h_p_JIT_PODemandPlanBill_S_ReportList"); + ds = oCN.RunProcReturn($"exec h_p_JIT_PODemandPlanBill_S_ReportList '{sWhere.ToString()}','{HBEGINDATE}','{HENDDATE}' ", "h_p_JIT_PODemandPlanBill_S_ReportList"); objJsonResult.code = "1"; objJsonResult.count = 1; diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs" index 263957f..2a7ef44 100644 --- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs" +++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs" @@ -300,12 +300,11 @@ { SumCount += 1; ////淇濆瓨瀛愯〃 - objJsonResult = AddBillSub(HInterID == 0 ? list[i]["hmainid"].ToString() : HInterID.ToString() , HBillNo == "" ? list[i]["鍗曟嵁鍙�"].ToString() : HBillNo , DateTime.Parse(DateTime.Now.AddDays(j).ToString("yyyy-MM-dd").ToString()) - , int.Parse(list[i][DateTime.Now.AddDays(j).ToString("yyyy-MM-dd")].ToString())); - + , int.Parse(list[i][DateTime.Now.AddDays(j).ToString("yyyy-MM-dd")].ToString()) + , list[i]); if (objJsonResult.count == 1) { TrueCount += 1; @@ -314,7 +313,7 @@ //涓昏〃鏈夋暟鎹� 瀛愯〃鏃犳暟鎹� if (j == 30 && SumCount == 0 && HInterID != 0 && HBillNo != "") { - objJsonResult = AddBillSub(HInterID.ToString(), HBillNo, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd").ToString()), 0); + objJsonResult = AddBillSub(HInterID.ToString(), HBillNo, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd").ToString()), 0, list[i]); } } } @@ -347,11 +346,10 @@ } } - public json AddBillSub(string HInterID, string HBillNo, DateTime date, int HQTY) + public json AddBillSub(string HInterID, string HBillNo, DateTime date, int HQTY, Dictionary<string, string> dic) { //鑾峰彇琛ㄦ牸鏁版嵁 ds = oCN.RunProcReturn($"select * from h_v_JIT_Sc_WorkBillSortBillList where 鍗曟嵁鍙�='{HBillNo}'", "h_v_JIT_Sc_WorkBillSortBillList"); - int count = 0; if (ds.Tables[0].Rows.Count > 0) { @@ -360,7 +358,7 @@ { if (DateTime.Parse(ds.Tables[0].Rows[i]["鏃ヨ鍒掔敓浜ф棩鏈�"].ToString()) == date) { - oCN.RunProc($"update Sc_WorkBillSortBillSub set HMasterDate='{date}',HQty={HQTY}" + + oCN.RunProc($"update Sc_WorkBillSortBillSub set HMasterDate='{date}',HQty={HQTY},HUseTimes={(dic["灏忔椂浜ц兘"]=="0"?0: HQTY / float.Parse(dic["灏忔椂浜ц兘"].ToString()))}" + $" where HInterID={HInterID} and HEntryID={ds.Tables[0].Rows[i]["hsubid"].ToString()}"); count += 1; } @@ -371,9 +369,9 @@ { //鎻掑叆瀛愯〃 oCN.RunProc("insert into Sc_WorkBillSortBillSub(HInterID,HSEQ," + - "HMasterDate,HQty)" + + "HMasterDate,HQty,HUseTimes)" + $"values({HInterID}, {(ds.Tables[0].Rows.Count + 1)}," + - $" '{date}', {HQTY})"); + $" '{date}', {HQTY},{(dic["灏忔椂浜ц兘"] == "0" ? 0 : HQTY / float.Parse(dic["灏忔椂浜ц兘"].ToString()))})"); } objJsonResult.code = "1"; diff --git a/WebAPI/Controllers/Sc_AssemblyBillController.cs b/WebAPI/Controllers/Sc_AssemblyBillController.cs index 6368591..c06489a 100644 --- a/WebAPI/Controllers/Sc_AssemblyBillController.cs +++ b/WebAPI/Controllers/Sc_AssemblyBillController.cs @@ -1,4 +1,6 @@ -锘縰sing System; +锘縰sing Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; using System.Collections.Generic; using System.Data; using System.Linq; @@ -24,6 +26,7 @@ Int64 sCPMaterID = 0; string sCPMaterName = ""; private json objjson = new json(); + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); //鎵弿鎴愬搧鏉$爜 [Route("Assembly/Get_Assembly_CPBarCode_Json")] @@ -174,13 +177,258 @@ } + #region 浜х嚎缁勮杩芥函鍗� + [Route("Sc_AssemblyBill/HBardCodeList")] + [HttpGet] + public object HBardCodeList(string HBarCode, string user,string HICMOBillNo) + { + try + { + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Sc_AssemblyBill_Edit", 1, false, user)) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鏃犱繚瀛樻潈闄愶紒"; + objjson.data = null; + return objjson; + } + if (HICMOBillNo == "" || HICMOBillNo == null) + { + ds = oCN.RunProcReturn(@"select bard.HSourceInterID,bard.HSourceEntryID,b.FMUSTQTY,a.FMOBILLNO,FERPCLSID,t5.FNAME HMaterName_z,t5.FSPECIFICATION HMaterModel_z ,m.HItemID,b.FMATERIALID,m.HName HMaterName,m.HNumber HMaterNumber,m.HModel HMaterModel,m1.HItemID HMaterID +from AIS20210811135644..T_PRD_PPBOM a +join AIS20210811135644..T_PRD_PPBOMENTRY b on a.FID = b.FID +join AIS20210811135644..T_BD_MATERIAL t3 on a.FMATERIALID = t3.FMATERIALID +join AIS20210811135644..T_BD_MATERIAL t31 on b.FMATERIALID = t31.FMATERIALID +join AIS20210811135644..T_BD_MATERIAL_L t5 on b.FMATERIALID = t5.FMATERIALID and FLOCALEID=2052 +join AIS20210811135644..t_BD_MaterialBase t4 on t5.FMATERIALID = t4.FMATERIALID +join Gy_BarCodeBill bard on a.FMOBILLNO=bard.HSourceBillNo +join Gy_Material m on bard.HMaterID=m.HItemID and t3.FNUMBER=m.HNumber +join Gy_Material m1 on t31.FNUMBER=m1.HNumber and t31.FUSEORGID=m1.HUSEORGID +where bard.HBarCode='" + HBarCode + "' AND t4.FERPCLSID in ('1', '3')", "Gy_BarCodeBill"); + if (ds.Tables[0].Rows.Count == 0) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "璇峰厛鎵骇鍝佹潯鐮侊紒"; + objjson.data = null; + return objjson; + } + else + { + objjson.code = "1"; + objjson.count = 1; + objjson.Message = ""; + objjson.data = ds.Tables[0]; + } + } + else + { + ds = oCN.RunProcReturn(@"select a.FMOBILLNO,FERPCLSID ,t4.FMATERIALID, a.FMATERIALID from AIS20210811135644..T_PRD_PPBOM a + join AIS20210811135644..T_PRD_PPBOMENTRY b on a.FID=b.FID + JOIN AIS20210811135644..T_BD_MATERIAL T6 ON b.FMATERIALID = T6.FMATERIALID + join AIS20210811135644..t_BD_MaterialBase t4 on b.FMATERIALID = t4.FMATERIALID + left join Gy_Material m on t6.FNUMBER=m.HNumber and m.HUSEORGID=a.FPRDORGID + where a.FMOBILLNO ='" + HICMOBillNo + "' and m.HItemID=(select HMaterID from Gy_BarCodeBill where HBarCode = '" + HBarCode + "' )", "ds2"); - + if (ds.Tables[0].Rows.Count == 0) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "閰嶄欢涓嶅睘浜庤鐢熶骇璁㈠崟锛�"; + objjson.data = null; + return objjson; + } + ds = oCN.RunProcReturn(@"select HQty,HSourceBillNo,m.HName HMaterName,m.HItemID HMaterID from Gy_BarCodeBill bard +join Gy_Material m on bard.HMaterID=m.HItemID +where HBarCode='" + HBarCode + "'", "ds3"); + objjson.code = "1"; + objjson.count = 1; + objjson.Message = ""; + objjson.data = ds.Tables[0]; + } + return objjson; + } + catch (Exception e) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objjson.data = null; + return objjson; + } + } + #endregion + #region 浜х嚎缁勮杩芥函鍗曚繚瀛� + [Route("Sc_AssemblyBill/AddBill")] + [HttpPost] + public object AddBill([FromBody] JObject sMainSub) + { + var _value = sMainSub["sMainSub"].ToString(); + string msg1 = _value.ToString(); + oCN.BeginTran(); + //淇濆瓨涓昏〃 + objjson = AddBillMain(msg1); + if (objjson.code == "0") + { + oCN.RollBack(); + objjson.code = "0"; + objjson.count = 0; + objjson.Message = objjson.Message; + objjson.data = null; + return objjson; + } + oCN.Commit(); + objjson.code = "1"; + objjson.count = 1; + objjson.Message = "鏂板鍗曟嵁鎴愬姛锛�"; + objjson.data = null; + return objjson; + } + Models.ClsSc_AssemblyBillMain omodel = new Models.ClsSc_AssemblyBillMain();//鍩烘湰璧勬枡 + public json AddBillMain(string msg1) + { + string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + string msg2 = sArray[0].ToString(); + string msg3 = sArray[1].ToString(); + int OperationType = int.Parse(sArray[2].ToString());//绫诲瀷 + string user = sArray[3].ToString();//鐢ㄦ埛鍚� + try + { + //鍒ゆ柇鏄惁鏈夌紪杈戞潈闄� + if (!DBUtility.ClsPub.Security_Log("Sc_AssemblyBill_Edit", 1, false, user)) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鏃犳潈闄愮紪杈�!"; + objjson.data = null; + return objjson; + } + omodel = Newtonsoft.Json.JsonConvert.DeserializeObject<ClsSc_AssemblyBillMain>(msg2); + //JSON搴忓垪鍖栬浆鎹㈠瓧鍏搁泦鍚� + List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); + List<object> jb = JsonConvert.DeserializeObject<List<object>>(msg3); + foreach (JObject item in jb) + { + Dictionary<string, string> dic = new Dictionary<string, string>(); + foreach (var itm in item.Properties()) + { + dic.Add(itm.Name, itm.Value.ToString()); + } + list.Add(dic); + } + + if (OperationType == 1)//鏂板涓存椂琛ㄦ簮鍗曡〃 + { + for (int i = 0; i < list.Count; i++) + { + //涓存椂閰嶄欢琛� + oCN.RunProc("Insert Into Sc_AssemblyBill_BindSourceTemp " + + "(HInterID,HEntryID,HBillNo_bak,HSourceBillNo,HSourceInterID,HMaterID" + + ",HQtyMust,HProdOrgID,HSourceEntryID,HSourceBillType,HAuxPropID,HProcID,HQty,HBatchNo,HMTONo,HPlanMode) " + + " values(" + omodel.HInterID.ToString() + "," + (i+1) + ",'" + omodel.HBillNo.ToString() + "','" + omodel.HICMOBillNo.ToString() + "',0," + list[i]["HMaterID"].ToString() + + ",'" + list[i]["HQty"].ToString() + "','" + list[i]["HPRDORGID"].ToString() + "',0,'',0,0,0,'','','') "); + } + } + else if (OperationType == 2)//鏂板閰嶄欢鎵爜琛� + { + for (int i = 0; i < list.Count; i++) + { + if (list[i]["HBarCode"].ToString() != "") + { + ds = oCN.RunProcReturn("select * from Sc_AssemblyBill_BindBarCodeTemp where HSourceBillNo='" + omodel.HICMOBillNo.ToString() + "' and HBarCode='" + list[i]["HBarCode"].ToString() + "' and HBillNo_bak='" + omodel.HBillNo.ToString() + "'", "Sc_AssemblyBill_BindBarCodeTemp"); + if (ds.Tables[0].Rows.Count > 0) { + objjson.code = "0"; + objjson.count = 0; + objjson.Message ="璇ユ潯鐮佸凡鎵叆,鏃犻』鍐嶆壂!"; + objjson.data = null; + return objjson; + } + //涓存椂璁板綍琛� + oCN.RunProc("Insert Into Sc_AssemblyBill_BindBarCodeTemp " + + "(HInterID,HEntryID,HBillNo_bak,HSourceBillNo,HSourceInterID,HMaterID" + + ",HBarCode,HQty,HProdOrgID,HSourceEntryID,HSourceBillType,HAuxPropID,HProcID,HBatchNo,HMTONo,HPlanMode) " + + " values(" + omodel.HInterID.ToString() + "," + (i + 1) + ",'" + omodel.HBillNo.ToString() + "','" + omodel.HICMOBillNo.ToString() + "',0," + list[i]["HMaterID"].ToString() + + ",'" + list[i]["HBarCode"].ToString() + "','" + list[i]["HEQty"].ToString() + "','" + list[i]["HPRDORGID"].ToString() + "',0,'',0,0,'','','') "); + } + } + } + else if (OperationType == 3)//鏂板涓诲瓙琛� + { + //淇濆瓨鐢熶骇缁勮鍗曚富琛� + string sql = $@"Insert Into Sc_AssemblyBillMain(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate +,HBillNo,HBillStatus,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo +,HICMOInterID,HICMOBillNo,HBarCode_P,HMaterID,HUnitID,HAssemblyStatus,HProdOrgID) +values('{DateTime.Now.Year}','{DateTime.Now.Month}','3727','3727',{omodel.HInterID.ToString()},getdate() +,'{omodel.HBillNo.ToString()}','1','{user}',getdate(),{omodel.HICMOInterID.ToString()},{omodel.HICMOEntryID.ToString()},'{omodel.HICMOBillNo.ToString()}' +,{omodel.HICMOInterID.ToString()},'{omodel.HICMOBillNo.ToString()}','{omodel.HBarCode_P.ToString()}',{omodel.HMaterID},0,'{omodel.HAssemblyStatus}',{omodel.HProdOrgID})"; + oCN.RunProc(sql); + + ds = oCN.RunProcReturn("select * from Sc_AssemblyBill_BindBarCodeTemp where HSourceBillNo='" + omodel.HICMOBillNo.ToString() + "' and HInterID='" + omodel.HInterID + "' and HBillNo_bak='" + omodel.HBillNo.ToString() + "'", "Sc_AssemblyBill_BindBarCodeTemp"); + + for (int i = 0; i < ds.Tables[0].Rows.Count; i++) + { + int HMaterID = int.Parse(ds.Tables[0].Rows[i]["HMaterID"].ToString()); + double HQty = double.Parse(ds.Tables[0].Rows[i]["HQty"].ToString()); + string HBarCode = ds.Tables[0].Rows[i]["HBarCode"].ToString(); + string sq2 = $@"Insert Into Sc_AssemblyBillSub(HInterID,HBillNo_bak,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo +,HSourceBillType,HMaterID,HSourceID,HEquipID,HUnitID,HQty +,HGroupID,HWorkerID,HScanDate,HBarCode,HBarCode_P,HSNNumber) +values({omodel.HInterID},'{omodel.HBillNo}',{(i + 1)},0,0,'' +,'',{HMaterID},0,0,0,{HQty} +,0,0,getdate(),'{HBarCode}','{omodel.HBarCode_P}','') "; + oCN.RunProc(sq2); + } + } + + objjson.code = "1"; + objjson.count = 1; + objjson.Message = null; + objjson.data = null; + return objjson; + } + catch (Exception e) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "Exception锛�" + e.ToString(); + objjson.data = null; + return objjson; + } + } + #endregion + + #region 浜х嚎缁勮杩芥函鍗� 鏌ヨ + [Route("Sc_AssemblyBill/Sc_AssemblyBillAddList")] + [HttpGet] + public object Sc_AssemblyBillAddList(string sWhere) + { + try + { + ds = oCN.RunProcReturn(@"select * from h_v_Sc_AssemblyBillList where 1=1 " + sWhere, "h_v_Sc_AssemblyBillList"); + + objjson.code = "1"; + objjson.count = 1; + objjson.Message = ""; + objjson.data = ds.Tables[0]; + return objjson; + } + catch (Exception e) + { + + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objjson.data = null; + return objjson; + } + } + #endregion [Route("Assembly/Delete_Json")] [HttpGet] diff --git a/WebAPI/Controllers/Sc_ProcessMangementController.cs b/WebAPI/Controllers/Sc_ProcessMangementController.cs index 26f021c..947f268 100644 --- a/WebAPI/Controllers/Sc_ProcessMangementController.cs +++ b/WebAPI/Controllers/Sc_ProcessMangementController.cs @@ -405,6 +405,10 @@ { try { + string sErr = ""; + oSystemParameter.ShowBill(ref sErr); + + //鑾峰彇鐢熶骇姹囨姤鍗曟渶澶nterID鍜屽崟鎹彿 Int64 HInterID = DBUtility.ClsPub.CreateBillID("3711", ref DBUtility.ClsPub.sExeReturnInfo); string HBillNo = DBUtility.ClsPub.CreateBillCode("3711", ref DBUtility.ClsPub.sExeReturnInfo, true); @@ -521,7 +525,10 @@ FentityModel.Add("FCostRate", dr1["FCostRate"].ToString());// 鎴愭湰鏉冮噸 FentityModel.Add("FISBACKFLUSH", dr1["FISBACKFLUSH"].ToString() == "1" ? true : false);// 鍊掑啿棰嗘枡 FentityModel.Add("FMOMAINENTRYID", dr1["FMOENTRYID"].ToString());// - //FentityModel.Add("F_bsv_Base1", new JObject() { ["Fnumber"] = dr1["FPREBDONENUMBER"].ToString() }); //鍖呰鏍囪瘑 + if (oSystemParameter.omodel.WMS_CampanyName == "鐟炰笌绁�") + { + FentityModel.Add("F_bsv_Base1", new JObject() { ["Fnumber"] = dr1["FPREBDONENUMBER"].ToString() });//鍖呰鏍囪瘑 + } FentityModel.Add("FLot", new JObject() { ["FNumber"] = dr1["FBATCHNO"].ToString() }); //鎵瑰彿 FentityModel.Add("F_bsv_Text", dr1["宸ュ簭娴佽浆鍗″彿"].ToString()); //娴佽浆鍗″彿 JArray Fentity2 = new JArray(); diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index dc2c43d..b732d40 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -2663,7 +2663,7 @@ try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - string sql = "Select a.HItemID ,HNumber 鏍哥畻鏂瑰紡缁勪唬鐮�,HName 鏍哥畻鏂瑰紡缁勫悕绉�,HDeptID,b.閮ㄩ棬鍚嶇О 閮ㄩ棬 from Gy_ClassTimePrjGroup a left join h_v_Gy_Department b on a.HDeptID=b.HItemID"; + string sql = "Select a.HItemID ,HNumber 鏍哥畻鏂瑰紡缁勪唬鐮�,HName 鏍哥畻鏂瑰紡缁勫悕绉�,HDeptID,b.閮ㄩ棬浠g爜,b.閮ㄩ棬鍚嶇О 閮ㄩ棬 from Gy_ClassTimePrjGroup a left join h_v_Gy_Department b on a.HDeptID=b.HItemID"; if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn(sql, "Gy_ClassTimePrjGroup"); @@ -3410,7 +3410,7 @@ { objjson.code = "0"; objjson.count = 0; - objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo; + objjson.Message = "鑾峰彇澶辫触" + ",娌℃湁鏌ヨ鍒版暟鎹�"; objjson.data = null; return objjson; } @@ -3466,7 +3466,63 @@ { objjson.code = "0"; objjson.count = 0; - objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo; + objjson.Message = "鑾峰彇澶辫触" + ",娌℃湁鏌ヨ鍒版暟鎹�"; + objjson.data = null; + return objjson; + } + else + { + objjson.code = "1"; + objjson.count = 1; + objjson.Message = "鑾峰彇鎴愬姛!"; + objjson.data = ds.Tables[0]; + objjson.list = columnNameList; + return objjson; + } + } + catch (Exception ex) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + ex.ToString(); + objjson.data = null; + return objjson; + } + } + + /// <summary> + /// 鑾峰彇妫�浠櫒鍒楄〃 + /// </summary> + /// <returns></returns> + [Route("Web/GetGy_InspectInstruMent")] + [HttpGet] + public object GetGy_InspectInstruMent(string InspectInstruMent, int OrganizationID) + { + if (InspectInstruMent != "") + { + sWhere = " and ( 妫�楠屼华鍣ㄤ唬鐮� like '%" + InspectInstruMent + "%' or 妫�楠屼华鍣ㄥ悕绉� like '%" + InspectInstruMent + "%' ) "; + } + try + { + List<object> columnNameList = new List<object>(); + + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + string sql = "Select * from h_v_Gy_InspectInstruMent where 1 = 1 " + sWhere + "Order by HItemID "; + ds = oCN.RunProcReturn(sql, "h_v_Gy_InspectInstruMent"); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + ",娌℃湁鏌ヨ鍒版暟鎹�"; objjson.data = null; return objjson; } diff --git "a/WebAPI/Controllers/\344\272\272\344\272\213\347\256\241\347\220\206/\347\246\273\350\201\214\347\224\263\350\257\267/HR_EmpDimissionBillController.cs" "b/WebAPI/Controllers/\344\272\272\344\272\213\347\256\241\347\220\206/\347\246\273\350\201\214\347\224\263\350\257\267/HR_EmpDimissionBillController.cs" index 59d88ce..ae40e7f 100644 --- "a/WebAPI/Controllers/\344\272\272\344\272\213\347\256\241\347\220\206/\347\246\273\350\201\214\347\224\263\350\257\267/HR_EmpDimissionBillController.cs" +++ "b/WebAPI/Controllers/\344\272\272\344\272\213\347\256\241\347\220\206/\347\246\273\350\201\214\347\224\263\350\257\267/HR_EmpDimissionBillController.cs" @@ -11,7 +11,7 @@ using System.Windows.Forms; using WebAPI.Models; -namespace WebAPI.Controllers.椤圭洰绠$悊.宸ヤ綔浠诲姟 +namespace WebAPI.Controllers.浜轰簨绠$悊.绂昏亴鐢宠 { public class HR_EmpDimissionBillController : ApiController { @@ -19,7 +19,7 @@ private json objJsonResult = new json(); public DataSet ds = new DataSet(); public SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - public DAL.ClsSc_ICMOBill BillOld = new DAL.ClsSc_ICMOBill(); + public DAL.ClsHR_EmpDimissionBill BillOld = new DAL.ClsHR_EmpDimissionBill(); string user_LongShan = ""; string HName_LongShan = ""; @@ -788,5 +788,57 @@ } } #endregion + + #region 绂昏亴鐢宠鍗曞垪琛� 鏍规嵁鑱屽憳鍐呯爜鑾峰彇閮ㄩ棬涓庡矖浣� + /// <summary> + /// 杩斿洖椤圭洰闃舵鍒楄〃 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("HR_EmpDimissionBill/getInfoByHEmpID")] + [HttpGet] + public object getInfoByHEmpID(Int64 HEmpID) + { + try + { + string sql = @"select + b.HItemID HDeptID, b.HNumber HDeptNumber, b.HName HDeptName + , c.HItemID HPostID, c.HNumber HPostNumber, c.HName HPostName + , d.HItemID HWorkTypeID, d.HNumber HWorkTypeNumber, d.HName HWorkTypeName, d.HPayMoney + , e.HItemID HGroupID, e.HNumber HGroupNumber, e.HName HGroupName + from Gy_Employee AS a + LEFT OUTER JOIN Gy_Department AS b on a.HDeptID = b.HItemID + LEFT OUTER JOIN Gy_Post AS c on a.HPostID = c.HItemID + LEFT OUTER JOIN Gy_WorkType AS d on a.HWorkTypeID = d.HItemID + LEFT OUTER JOIN Gy_Group AS e on a.HGroupID = e.HItemID + where a.HItemID = " + HEmpID; + + ds = oCN.RunProcReturn(sql, "Gy_EmployeeInfo"); + + if(ds==null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏈壘鍒拌鑱屽憳璁板綍"; + objJsonResult.data = null; + return objJsonResult; + } + + 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 } } \ No newline at end of file diff --git "a/WebAPI/Controllers/\344\272\272\344\272\213\347\256\241\347\220\206/\350\201\214\345\221\230\345\274\202\345\212\250\345\215\225/HR_EmpChangeBillController.cs" "b/WebAPI/Controllers/\344\272\272\344\272\213\347\256\241\347\220\206/\350\201\214\345\221\230\345\274\202\345\212\250\345\215\225/HR_EmpChangeBillController.cs" index dbd028e..303c940 100644 --- "a/WebAPI/Controllers/\344\272\272\344\272\213\347\256\241\347\220\206/\350\201\214\345\221\230\345\274\202\345\212\250\345\215\225/HR_EmpChangeBillController.cs" +++ "b/WebAPI/Controllers/\344\272\272\344\272\213\347\256\241\347\220\206/\350\201\214\345\221\230\345\274\202\345\212\250\345\215\225/HR_EmpChangeBillController.cs" @@ -11,7 +11,7 @@ using System.Windows.Forms; using WebAPI.Models; -namespace WebAPI.Controllers.椤圭洰绠$悊.宸ヤ綔浠诲姟 +namespace WebAPI.Controllers.浜轰簨绠$悊.鑱屽憳寮傚姩鍗� { public class HR_EmpChangeBillController : ApiController { @@ -19,7 +19,7 @@ private json objJsonResult = new json(); public DataSet ds = new DataSet(); public SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - public DAL.ClsSc_ICMOBill BillOld = new DAL.ClsSc_ICMOBill(); + public DAL.ClsHR_EmpChangeBill BillOld = new DAL.ClsHR_EmpChangeBill(); string user_LongShan = ""; string HName_LongShan = ""; diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs" index 49a8420..7416774 100644 --- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs" +++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs" @@ -887,7 +887,10 @@ //鐗╂枡浠g爜-鍖呰鏍囪瘑-鏃ユ湡-渚涘簲鍟嗕唬鐮�-鍏綅娴佹按鍙� LSHlen = 8;//娴佹按鍙锋槸8浣� - DataSet dataDs = oCN.RunProcReturn($"select b.F_TEZV_BASE from AIS20220308151944..T_PUR_Receive a inner join AIS20220308151944..T_PUR_RECEIVEENTRY b on a.FID = b.FID where a.FID={ordrlist[j].HMainID} and b.FENTRYID={ordrlist[j].HSubID}", "T_PUR_Receive"); + DataSet dataDs = oCN.RunProcReturn($@"select isnull(pr.FNUMBER,'') F_TEZV_BASE from AIS20220308151944..T_PUR_Receive a +inner join AIS20220308151944..T_PUR_RECEIVEENTRY b on a.FID = b.FID +left join AIS20220308151944..T_BAS_PREBDONE pr on b.F_TEZV_BASE=pr.FID +where a.FID={ordrlist[j].HMainID} and b.FENTRYID={ordrlist[j].HSubID}", "T_PUR_Receive"); if (dataDs.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -906,8 +909,13 @@ { //鐗╂枡浠g爜-鍖呰鏍囪瘑-鏃ユ湡-缁勭粐浠g爜-鍏綅娴佹按鍙� LSHlen = 8;//娴佹按鍙锋槸8浣� - - DataSet dataDs = oCN.RunProcReturn($"select b.F_bsv_Base1,a.FPRDORGID from AIS20220308151944..T_PRD_INSTOCK a inner join AIS20220308151944..T_PRD_INSTOCKENTRY b on a.FID = b.FID where a.FID={ordrlist[j].HMainID} and b.FENTRYID={ordrlist[j].HSubID}", "T_PRD_INSTOCK"); + DataSet dataDs = oCN.RunProcReturn($@"select isnull(pr.FNUMBER,'') F_bsv_Base1,a.FPRDORGID from AIS20220308151944..T_PRD_INSTOCK a +inner join AIS20220308151944..T_PRD_INSTOCKENTRY b on a.FID = b.FID +join( +select HERPInterID, HERPEntryID, HInterID, HEntryID from Kf_ICStockBillSub +)kf on b.FID = kf.HERPInterID and b.FENTRYID = kf.HERPEntryID +left join AIS20220308151944..T_BAS_PREBDONE pr on b.F_bsv_Base1=pr.FID +where kf.HInterID = {ordrlist[j].HMainID} and kf.HEntryID = {ordrlist[j].HSubID}", "T_PRD_INSTOCK"); if (dataDs.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\344\272\247\347\272\277\350\264\250\346\243\200\345\271\263\345\217\260/Sc_ICMOBillQualityStatus_TmpController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\344\272\247\347\272\277\350\264\250\346\243\200\345\271\263\345\217\260/Sc_ICMOBillQualityStatus_TmpController.cs" new file mode 100644 index 0000000..e29e57d --- /dev/null +++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\344\272\247\347\272\277\350\264\250\346\243\200\345\271\263\345\217\260/Sc_ICMOBillQualityStatus_TmpController.cs" @@ -0,0 +1,352 @@ +锘縰sing DBUtility; +using Model; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Web; +using System.Web.Http; +using System.Windows.Forms; +using WebAPI.Models; + +namespace WebAPI.Controllers.鍝佽川绠$悊.浜х嚎璐ㄦ骞冲彴 +{ + public class Sc_ICMOBillQualityStatus_TmpController : ApiController + { + public DBUtility.ClsPub.Enum_BillStatus BillStatus;//鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛� + private json objJsonResult = new json(); + public DataSet ds = new DataSet(); + public SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + public DAL.ClsSc_ICMOBillQualityStatus_Tmp BillOld = new DAL.ClsSc_ICMOBillQualityStatus_Tmp(); + string user_LongShan = ""; + string HName_LongShan = ""; + + #region 浜х嚎璐ㄦ骞冲彴 淇濆瓨 + /// <summary> + /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Sc_ICMOBillQualityStatus_Tmp/AddICMOBillQualityStatus_Tmp")] + [HttpPost] + public object AddICMOBillQualityStatus_Tmp([FromBody] JObject sMainSub) + { + try + { + //鑾峰彇鍙傛暟 + var _value = sMainSub["sMainSub"].ToString(); + string msg1 = _value.ToString(); + string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + string msg2 = sArray[0].ToString(); //琛ㄥご鏁版嵁 + int HSaveType = int.Parse(sArray[1].ToString()); //淇濆瓨绫诲瀷 1:涓嶈壇鍝佷繚瀛� 2:鎶ュ簾淇濆瓨 + string user = sArray[2].ToString(); //鎿嶄綔鐢ㄦ埛鐨勭敤鎴峰悕 + string HComputerName = SystemInformation.ComputerName; //璁惧鍚嶇О + + ////鍒ゆ柇鏄惁鏈夋柊澧炴潈闄� + //if (!DBUtility.ClsPub.Security_Log("Sc_ICMOBillQualityStatus_Tmp_Edit", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳柊澧炴潈闄�!"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + msg2 = "[" + msg2.ToString() + "]"; + List<Model.ClsSc_ICMOBillQualityStatus_Tmp> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_ICMOBillQualityStatus_Tmp>>(msg2); + BillOld.omodel = mainList[0]; + if (HSaveType == 1) + { + BillOld.omodel.HSaveType = "涓嶈壇鍝佷繚瀛�"; + } + else if (HSaveType == 2) + { + BillOld.omodel.HSaveType = "鎶ュ簾鍝佷繚瀛�"; + } + + if (!BillOld.AddBill1(ref DBUtility.ClsPub.sExeReturnInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 浜х嚎璐ㄦ骞冲彴 鑾峰彇琛ㄥご淇℃伅 + [Route("Sc_ICMOBillQualityStatus_Tmp/getMainInfo")] + [HttpGet] + public object getMainInfo(string Czybm, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //鏌ョ湅鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + string sql = "exec h_p_Sc_ICMOBillQualityStatus_Tmp_Init '" + Czybm + "'"; + ds = oCN.RunProcReturn(sql, "h_p_Sc_ICMOBillQualityStatus_Tmp_Init"); + + if(ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏈壘鍒扮浉鍏虫暟鎹紒"; + objJsonResult.data = null; + return objJsonResult; + } + + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 浜х嚎璐ㄦ骞冲彴 鑾峰彇瀛愯〃淇℃伅 + [Route("Sc_ICMOBillQualityStatus_Tmp/getSubInfo")] + [HttpGet] + public object getSubInfo(string HSplitNo, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //鏌ョ湅鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + string sql = @"select + a.HInterID, a.HDate 鏃ユ湡, a.HMaterID, b.HName 浜у搧鍚嶇О, a.HBarCode 鏉″舰鐮�, a.HBadReasonID, c.HName 涓嶈壇鍘熷洜, a.HResult 鍒ゆ柇缁撴灉 + from Sc_ICMOBillQualityStatus_Tmp AS a + LEFT OUTER JOIN Gy_Material AS b on a.HMaterID = b.HItemID + LEFT OUTER JOIN Gy_BadReason AS c on a.HBadReasonID = c.HItemID + where a.HSplitNo = '" + HSplitNo + "' order by a.HDate desc, a.HInterID desc" ; + ds = oCN.RunProcReturn(sql, "h_p_Sc_ICMOBillQualityStatus_Tmp_Init"); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 浜х嚎璐ㄦ骞冲彴 瀛愯〃鍒犻櫎 + [Route("Sc_ICMOBillQualityStatus_Tmp/deleteSubInfo")] + [HttpGet] + public object deleteSubInfo(int HInterID, string user) + { + try + { + //鏌ョ湅鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + string sql = @"delete from Sc_ICMOBillQualityStatus_Tmp where HInterID = " + HInterID ; + oCN.RunProc(sql); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 浜х嚎璐ㄦ骞冲彴 鑾峰彇涓嶈壇鐜囧崰姣斿垎鏋愬浘鏁版嵁 + [Route("Sc_ICMOBillQualityStatus_Tmp/getBadReasonRateInfo")] + [HttpGet] + public object getBadReasonRateInfo(int HICMOInterID, int HICMOEntryID) + { + try + { + List<object> columnNameList = new List<object>(); + //鏌ョ湅鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + string sql = @"select + a.HBadReasonID + ,b.HName HBadReasonName + , COUNT(a.HBadReasonID) HBadReasonQty + from Sc_ICMOBillQualityStatus_Tmp AS a + LEFT OUTER JOIN Gy_BadReason as b on a.HBadReasonID = b.HItemID " + + "where a.HICMOInterID = " + HICMOInterID + " and a.HICMOEntryID = " + HICMOEntryID + + " and ISNULL(a.HBadReasonID,0)<> 0" + + " group by a.HBadReasonID,b.HName order by COUNT(a.HBadReasonID) desc"; + + ds = oCN.RunProcReturn(sql, "getBadReasonRateInfo"); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 浜х嚎璐ㄦ骞冲彴 鏍规嵁鏉″舰鐮佽幏鍙栦俊鎭� + [Route("Sc_ICMOBillQualityStatus_Tmp/getBarCodeInfo")] + [HttpGet] + public object getBarCodeInfo(string HBarCode) + { + try + { + //鏌ョ湅鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + if(HBarCode == null || HBarCode == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏉″舰鐮佷笉鍙负绌猴紒"; + objJsonResult.data = null; + return objJsonResult; + } + + string sql = "select * from Gy_BarCodeBill where HBarCode = '" + HBarCode + "'"; + ds = oCN.RunProcReturn(sql, "Gy_BarCodeBill"); + + if(ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "璇ユ潯鐮佷笉瀛樺湪锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + 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 + } +} \ No newline at end of file diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\344\272\247\347\272\277\350\277\224\344\277\256\345\271\263\345\217\260/Sc_SourceLineRepairBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\344\272\247\347\272\277\350\277\224\344\277\256\345\271\263\345\217\260/Sc_SourceLineRepairBillController.cs" new file mode 100644 index 0000000..4e7fe36 --- /dev/null +++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\344\272\247\347\272\277\350\277\224\344\277\256\345\271\263\345\217\260/Sc_SourceLineRepairBillController.cs" @@ -0,0 +1,352 @@ +锘縰sing DBUtility; +using Model; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Web; +using System.Web.Http; +using System.Windows.Forms; +using WebAPI.Models; + +namespace WebAPI.Controllers.鍝佽川绠$悊.浜х嚎杩斾慨骞冲彴 +{ + public class Sc_SourceLineRepairBillController : ApiController + { + public DBUtility.ClsPub.Enum_BillStatus BillStatus;//鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛� + private json objJsonResult = new json(); + public DataSet ds = new DataSet(); + public SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + public DAL.ClsSc_ICMOBillQualityStatus_Tmp BillOld = new DAL.ClsSc_ICMOBillQualityStatus_Tmp(); + string user_LongShan = ""; + string HName_LongShan = ""; + + #region 浜х嚎璐ㄦ骞冲彴 淇濆瓨 + /// <summary> + /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Sc_ICMOBillQualityStatus_Tmp/AddICMOBillQualityStatus_Tmp")] + [HttpPost] + public object AddICMOBillQualityStatus_Tmp([FromBody] JObject sMainSub) + { + try + { + //鑾峰彇鍙傛暟 + var _value = sMainSub["sMainSub"].ToString(); + string msg1 = _value.ToString(); + string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + string msg2 = sArray[0].ToString(); //琛ㄥご鏁版嵁 + int HSaveType = int.Parse(sArray[1].ToString()); //淇濆瓨绫诲瀷 1:涓嶈壇鍝佷繚瀛� 2:鎶ュ簾淇濆瓨 + string user = sArray[2].ToString(); //鎿嶄綔鐢ㄦ埛鐨勭敤鎴峰悕 + string HComputerName = SystemInformation.ComputerName; //璁惧鍚嶇О + + ////鍒ゆ柇鏄惁鏈夋柊澧炴潈闄� + //if (!DBUtility.ClsPub.Security_Log("Sc_ICMOBillQualityStatus_Tmp_Edit", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳柊澧炴潈闄�!"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + msg2 = "[" + msg2.ToString() + "]"; + List<Model.ClsSc_ICMOBillQualityStatus_Tmp> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_ICMOBillQualityStatus_Tmp>>(msg2); + BillOld.omodel = mainList[0]; + if (HSaveType == 1) + { + BillOld.omodel.HSaveType = "涓嶈壇鍝佷繚瀛�"; + } + else if (HSaveType == 2) + { + BillOld.omodel.HSaveType = "鎶ュ簾鍝佷繚瀛�"; + } + + if (!BillOld.AddBill1(ref DBUtility.ClsPub.sExeReturnInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 浜х嚎璐ㄦ骞冲彴 鑾峰彇琛ㄥご淇℃伅 + [Route("Sc_ICMOBillQualityStatus_Tmp/getMainInfo")] + [HttpGet] + public object getMainInfo(string Czybm, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //鏌ョ湅鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + string sql = "exec h_p_Sc_ICMOBillQualityStatus_Tmp_Init '" + Czybm + "'"; + ds = oCN.RunProcReturn(sql, "h_p_Sc_ICMOBillQualityStatus_Tmp_Init"); + + if(ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏈壘鍒扮浉鍏虫暟鎹紒"; + objJsonResult.data = null; + return objJsonResult; + } + + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 浜х嚎璐ㄦ骞冲彴 鑾峰彇瀛愯〃淇℃伅 + [Route("Sc_ICMOBillQualityStatus_Tmp/getSubInfo")] + [HttpGet] + public object getSubInfo(string HSplitNo, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //鏌ョ湅鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + string sql = @"select + a.HInterID, a.HDate 鏃ユ湡, a.HMaterID, b.HName 浜у搧鍚嶇О, a.HBarCode 鏉″舰鐮�, a.HBadReasonID, c.HName 涓嶈壇鍘熷洜, a.HResult 鍒ゆ柇缁撴灉 + from Sc_ICMOBillQualityStatus_Tmp AS a + LEFT OUTER JOIN Gy_Material AS b on a.HMaterID = b.HItemID + LEFT OUTER JOIN Gy_BadReason AS c on a.HBadReasonID = c.HItemID + where a.HSplitNo = '" + HSplitNo + "' order by a.HDate desc, a.HInterID desc" ; + ds = oCN.RunProcReturn(sql, "h_p_Sc_ICMOBillQualityStatus_Tmp_Init"); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 浜х嚎璐ㄦ骞冲彴 瀛愯〃鍒犻櫎 + [Route("Sc_ICMOBillQualityStatus_Tmp/deleteSubInfo")] + [HttpGet] + public object deleteSubInfo(int HInterID, string user) + { + try + { + //鏌ョ湅鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + string sql = @"delete from Sc_ICMOBillQualityStatus_Tmp where HInterID = " + HInterID ; + oCN.RunProc(sql); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 浜х嚎璐ㄦ骞冲彴 鑾峰彇涓嶈壇鐜囧崰姣斿垎鏋愬浘鏁版嵁 + [Route("Sc_ICMOBillQualityStatus_Tmp/getBadReasonRateInfo")] + [HttpGet] + public object getBadReasonRateInfo(int HICMOInterID, int HICMOEntryID) + { + try + { + List<object> columnNameList = new List<object>(); + //鏌ョ湅鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + string sql = @"select + a.HBadReasonID + ,b.HName HBadReasonName + , COUNT(a.HBadReasonID) HBadReasonQty + from Sc_ICMOBillQualityStatus_Tmp AS a + LEFT OUTER JOIN Gy_BadReason as b on a.HBadReasonID = b.HItemID " + + "where a.HICMOInterID = " + HICMOInterID + " and a.HICMOEntryID = " + HICMOEntryID + + " and ISNULL(a.HBadReasonID,0)<> 0" + + " group by a.HBadReasonID,b.HName order by COUNT(a.HBadReasonID) desc"; + + ds = oCN.RunProcReturn(sql, "getBadReasonRateInfo"); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 浜х嚎璐ㄦ骞冲彴 鏍规嵁鏉″舰鐮佽幏鍙栦俊鎭� + [Route("Sc_ICMOBillQualityStatus_Tmp/getBarCodeInfo")] + [HttpGet] + public object getBarCodeInfo(string HBarCode) + { + try + { + //鏌ョ湅鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + if(HBarCode == null || HBarCode == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏉″舰鐮佷笉鍙负绌猴紒"; + objJsonResult.data = null; + return objJsonResult; + } + + string sql = "select * from Gy_BarCodeBill where HBarCode = '" + HBarCode + "'"; + ds = oCN.RunProcReturn(sql, "Gy_BarCodeBill"); + + if(ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "璇ユ潯鐮佷笉瀛樺湪锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + 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 + } +} \ No newline at end of file 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/QC_ProcessCheckBillController.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/QC_ProcessCheckBillController.cs" index 14414ac..992044e 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/QC_ProcessCheckBillController.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/QC_ProcessCheckBillController.cs" @@ -1,4 +1,5 @@ -锘縰sing Newtonsoft.Json.Linq; +锘縰sing Newtonsoft.Json; +using Newtonsoft.Json.Linq; using Pub_Class; using System; using System.Collections; @@ -95,6 +96,7 @@ 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.HQCSchemeID = ClsPub.isLong(mainList[0].HQCSchemeID); BillNew.omodel.HBillStatus = 1; BillNew.omodel.HProcID = ClsPub.isLong(mainList[0].HProcID); List<Model.ClsQC_ProcessCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_ProcessCheckBillSub>>(msg3); @@ -121,6 +123,25 @@ oSub.HProcCheckTime = HDate; oSub.HBillNo_bak = DBUtility.ClsPub.isStrNull(mainList[0].HBillNo); oSub.HProcCheckEmp = ClsPub.isLong(mainList[0].HFirstCheckEmp); + + oSub.HSampleSchemeID = DBUtility.ClsPub.isLong(subList[i].HSampleSchemeID); + oSub.HSampleQty = DBUtility.ClsPub.isLong(subList[i].HSampleQty); + oSub.HSampleDamageQty = DBUtility.ClsPub.isDoule(subList[i].HSampleDamageQty); + oSub.HAcceptQty = DBUtility.ClsPub.isLong(subList[i].HAcceptQty); + oSub.HRejectQty = DBUtility.ClsPub.isLong(subList[i].HRejectQty); + oSub.HSampleUnRightQty = DBUtility.ClsPub.isDoule(subList[i].HSampleUnRightQty); + oSub.HStatus = DBUtility.ClsPub.isStrNull(subList[i].HStatus); + oSub.HUnitID = DBUtility.ClsPub.isLong(subList[i].HUnitID); + oSub.HInspectVal = DBUtility.ClsPub.isStrNull(subList[i].HInspectVal); + oSub.HTargetVal = DBUtility.ClsPub.isStrNull(subList[i].HTargetVal); + oSub.HUpLimit = DBUtility.ClsPub.isStrNull(subList[i].HUpLimit); + oSub.HDownLimit = DBUtility.ClsPub.isStrNull(subList[i].HDownLimit); + oSub.HUpOffSet = DBUtility.ClsPub.isStrNull(subList[i].HUpOffSet); + oSub.HDownOffSet = DBUtility.ClsPub.isStrNull(subList[i].HDownOffSet); + oSub.HAnalysisMethod = DBUtility.ClsPub.isStrNull(subList[i].HAnalysisMethod); + oSub.HKeyInspect = DBUtility.ClsPub.isLong(subList[i].HKeyInspect); + oSub.HInspectInstruMentID = DBUtility.ClsPub.isLong(subList[i].HInspectInstruMentID); + oSub.HInspectResult = DBUtility.ClsPub.isStrNull(subList[i].HResult); BillNew.DetailColl.Add(oSub); } @@ -171,6 +192,85 @@ } } #endregion + + #region 妫�楠屽�间繚瀛� + [Route("QC_ProcessCheckBill/set_SaveValue")] + [HttpPost] + public object set_SaveValue([FromBody] JObject msg) + { + ListModels oListModels = new ListModels(); + try + { + var _value = msg["msg"].ToString(); + string msg1 = _value.ToString(); + string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + + string Value = sArray[0].ToString(); //妫�楠屽�艰〃鏍� + Int64 HInterID = Convert.ToInt64(sArray[1]); //涓籌D + Int64 HEntryID = Convert.ToInt64(sArray[2]); //瀛怚D + bool bResult; + + + List<Model.ClsQC_ProcessCheckBillSub_ValueGrid> valueList = new List<Model.ClsQC_ProcessCheckBillSub_ValueGrid>(); + valueList = oListModels.getObjectByJson_ClsQC_ProcessCheckBillSub_ValueGrid(Value); + + DAL.ClsQC_ProcessCheckBill BillNew = new DAL.ClsQC_ProcessCheckBill(); + + for (int i = 0; i < valueList.ToArray().Length; i++) + { + if (i >= 0)//HQty + { + Model.ClsQC_ProcessCheckBillSub_ValueGrid oSub_Value = new Model.ClsQC_ProcessCheckBillSub_ValueGrid(); + oSub_Value.HInterID = HInterID; + oSub_Value.HEntryID = HEntryID; + oSub_Value.HSEQ = i + 1; + oSub_Value.HInSpectResult = ClsPub.isStrNull(valueList[i].HInSpectResult); + oSub_Value.HInSpectValue = ClsPub.isDoule(valueList[i].HInSpectValue); + oSub_Value.HInSpectValueB = ClsPub.isLong(valueList[i].HInSpectValueB); + oSub_Value.HInSpectValueT = ClsPub.isStrNull(valueList[i].HInSpectValueT); + + BillNew.DetailColl_Value.Add(oSub_Value); + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳槑缁嗚淇℃伅!"; + objJsonResult.data = null; + return objJsonResult; + } + } + + bResult = BillNew.AddValue(ref ClsPub.sExeReturnInfo, ref HInterID, ref HEntryID); + + if (bResult == true) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨妫�楠屽�兼垚鍔�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + #region 宸ュ簭妫�楠屽崟鏍规嵁婧愬崟绫诲瀷鑾峰彇淇℃伅-婧愬崟涓虹敓浜х姸鎬佷复鏃惰〃锛�3722锛� @@ -482,6 +582,89 @@ } } #endregion - // + + #region 宸ュ簭妫�楠屽崟鍒楄〃 + [Route("QC_ProcessCheckBill/QC_ProcessCheckBillList")] + [HttpGet] + public object QC_ProcessCheckBillList(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + + string sql1 = "select * from h_v_QC_ProcessCheckBill where 1 = 1 "; + string sql = sql1 + sWhere + " order by hmainid desc"; + ds = oCN.RunProcReturn(sql, "h_v_QC_ProcessCheckBill"); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.list = columnNameList; + 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 + + /// <summary> + ///杩斿洖妫�楠屽�煎垪琛� + /// </summary> + /// <param name="sWhere"></param> + /// <returns></returns> + [Route("QC_ValueTable_ProcessCheck/getValueList")] + [HttpGet] + public object getValueList(Int64 HInterID, Int64 HEntryID, string user) + { + DataSet ds; + try + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + + ds = oCN.RunProcReturn("select * from QC_ProcessCheckBillSub_ValueGrid where HInterID=" + HInterID + " and HEntryID=" + HEntryID, "QC_ProcessCheckBillSub_ValueGrid"); + + if (ds.Tables[0].Rows.Count > 0) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁鏌ヨ鍒版暟鎹紒"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + + + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } } } \ No newline at end of file diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs" index e393046..4c7b4ce 100644 --- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs" +++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs" @@ -93,6 +93,7 @@ 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.HQCSchemeID = ClsPub.isLong(mainList[0].HQCSchemeID); 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>(); @@ -138,6 +139,8 @@ oSub.HDownOffSet= DBUtility.ClsPub.isStrNull(subList[i].HDownOffSet); oSub.HAnalysisMethod = DBUtility.ClsPub.isStrNull(subList[i].HAnalysisMethod); oSub.HKeyInspect = DBUtility.ClsPub.isLong(subList[i].HKeyInspect); + oSub.HInspectInstruMentID = DBUtility.ClsPub.isLong(subList[i].HInspectInstruMentID); + oSub.HInspectResult = DBUtility.ClsPub.isStrNull(subList[i].HResult); BillNew.DetailColl.Add(oSub); } else @@ -259,7 +262,7 @@ List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid> valueList = new List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid>(); - valueList = oListModels.getObjectByJson_ClsClsQC_FirstPieceCheckBillSub_ValueGrid(Value); + valueList = oListModels.getObjectByJson_ClsQC_FirstPieceCheckBillSub_ValueGrid(Value); DAL.ClsQC_FirstPieceCheckBill BillNew = new DAL.ClsQC_FirstPieceCheckBill(); @@ -272,7 +275,7 @@ oSub_Value.HEntryID = HEntryID; oSub_Value.HSEQ = i + 1; oSub_Value.HInSpectResult = ClsPub.isStrNull(valueList[i].HInSpectResult); - oSub_Value.HInSpectValue = ClsPub.isLong(valueList[i].HInSpectValue); + oSub_Value.HInSpectValue = ClsPub.isDoule(valueList[i].HInSpectValue); oSub_Value.HInSpectValueB = ClsPub.isLong(valueList[i].HInSpectValueB); oSub_Value.HInSpectValueT = ClsPub.isStrNull(valueList[i].HInSpectValueT); @@ -331,8 +334,17 @@ try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + List<object> columnNameList = new List<object>(); ds = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillSub_ValueGrid where HInterID="+ HInterID + " and HEntryID="+ HEntryID, "h_v_QC_FirstPieceCheckBillList"); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } if (ds.Tables[0].Rows.Count > 0) { @@ -340,13 +352,14 @@ objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁鏌ヨ鍒版暟鎹紒"; + objJsonResult.Message = "鏃犳娴嬪�兼暟鎹紒"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_TemporaryAreaController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_TemporaryAreaController.cs" new file mode 100644 index 0000000..8d06a51 --- /dev/null +++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_TemporaryAreaController.cs" @@ -0,0 +1,585 @@ +锘縰sing Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Pub_Class; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Web.Http; +using WebAPI.Models; +namespace WebAPI.Controllers +{ + public class Gy_TemporaryAreaController : ApiController + { + public DBUtility.ClsPub.Enum_BillStatus BillStatus; + + private json objJsonResult = new json(); + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + DataSet ds; + + + #region 鏆傛斁鍖� 淇濆瓨 + [Route("Gy_TemporaryAreaBill/ModifyByID")] + [HttpPost] + public object ModifyByID([FromBody] JObject oMain) + { + try + { + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + string msg2 = sArray[0].ToString(); + string user = sArray[1].ToString(); + + //鍙嶅簭鍒楀寲 + msg2 = "[" + msg2.ToString() + "]"; + List<Gy_TemporaryArea> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_TemporaryArea>>(msg2); + + + string HNumber = list[0].HNumber; + string HName = list[0].HName; + string HHelpCode = list[0].HHelpCode; + + int HStopFlag = list[0].HStopFlag?1:0; + long HCREATEORGID = list[0].HCREATEORGID; + long HUSEORGID = list[0].HUSEORGID; + string HBarCode = list[0].HBarCode; + + string HRemark = list[0].HRemark; + long HItemID = list[0].HItemID; + string HShortNumber = list[0].HShortNumber; + long HParentID = list[0].HParentID; + + long HLevel = ClsPub.GetLevel(list[0].HNumber.Trim()); + int HEndFlag = 1; + + string Emp = user; + string Time = DateTime.Now.ToString("yyyy-MM-dd"); + + #region [娉ㄩ噴浠g爜] + //鍒ゆ柇鏉冮檺 + if (!ClsPub.Security_Log("Gy_TemporaryArea_Edit", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳潈闄愶紒锛侊紒"; + objJsonResult.data = null; + return objJsonResult; + } + + if (!DBUtility.ClsPub.AllowNumber(HNumber)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒"; + objJsonResult.data = null; + return objJsonResult; + } + #endregion + + //淇濆瓨 + //淇濆瓨瀹屾瘯鍚庡鐞� + if (HItemID == 0) //鏂板淇濆瓨 + { + oCN.BeginTran(); + string sql = "Insert into Gy_TemporaryArea" + + "(HNumber,HName,HHelpCode,HStopFlag,HCREATEORGID,HUSEORGID,HBarCode,HRemark,HShortNumber,HParentID,HEndFlag,HLevel,HMakeEmp,HMakeTime)" + + " values(" + + "'" + HNumber + + "','" + HName + + "','" + HHelpCode + + "'," + HStopFlag + + "," + HCREATEORGID + + "," + HUSEORGID + + ",'" + HBarCode + + "','" + HRemark + + "','" + HShortNumber + + "'," + HParentID + + "," + HEndFlag + + "," + HLevel + + ",'" + Emp + + "','" + Time + + "')"; + oCN.RunProc(sql, ref DBUtility.ClsPub.sExeReturnInfo); + //鏂板鍚庝笂绾т负闈炴湯绾т唬鐮� + oCN.RunProc("Update Gy_TemporaryArea set HEndFlag=0 where HItemID = " + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); + oCN.Commit(); + }else{ //缂栬緫淇濆瓨 + oCN.BeginTran(); + + //鍒ゆ柇璇ヨ褰曟洿鏀瑰悗锛岃璁板綍鐨勪笂绾ц褰曟槸鍚︿负鏈骇锛屽苟鏇存敼鏈骇鏍囪 + string sql = @"select * from Gy_TemporaryArea AS a where a.HParentID in (select b.HParentID from Gy_TemporaryArea AS b where b.HItemID = " + HItemID + ")"; + ds = oCN.RunProcReturn(sql, "Gy_TemporaryArea"); + if (ds != null && ds.Tables[0].Rows.Count == 1) + { + sql = "update Gy_TemporaryArea set HEndFlag = 1 where HItemID = " + ds.Tables[0].Rows[0]["HParentID"].ToString(); + oCN.RunProc(sql); + } + + if (HStopFlag == 1) + { + //鏇存柊璁板綍 + sql = "Update Gy_TemporaryArea set " + + " HNumber = '" + HNumber + + "', HName = '" + HName + + "', HHelpCode = '" + HHelpCode + + "', HStopFlag = " + HStopFlag + + ", HCREATEORGID = " + HCREATEORGID + + ", HUSEORGID = " + HUSEORGID + + ", HBarCode = '" + HBarCode + + "', HRemark = '" + HRemark + + "', HShortNumber = '" + HShortNumber + + "', HParentID = " + HParentID + + ", HEndFlag = " + HEndFlag + + ", HLevel = " + HLevel + + ", HModifyEmp = '" + Emp + + "', HModifyTime = '" + Time + + "', HStopEmp = '" + Emp + + "', HStopTime = '" + Time + + "' Where HItemID=" + HItemID; + } + else + { + //鏇存柊璁板綍 + sql = "Update Gy_TemporaryArea set " + + " HNumber = '" + HNumber + + "', HName = '" + HName + + "', HHelpCode = '" + HHelpCode + + "', HStopFlag = " + HStopFlag + + ", HCREATEORGID = " + HCREATEORGID + + ", HUSEORGID = " + HUSEORGID + + ", HBarCode = '" + HBarCode + + "', HRemark = '" + HRemark + + "', HShortNumber = '" + HShortNumber + + "', HParentID = " + HParentID + + ", HEndFlag = " + HEndFlag + + ", HLevel = " + HLevel + + ", HModifyEmp = '" + Emp + + "', HModifyTime = '" + Time + + "', HStopEmp = '" + "" + + "', HStopTime = " + "null" + + " Where HItemID=" + HItemID; + } + oCN.RunProc(sql, ref DBUtility.ClsPub.sExeReturnInfo); + + //淇敼鍚庯紝灏嗘柊涓婄骇鏇存柊涓洪潪鏈骇 + oCN.RunProc("Update Gy_TemporaryArea set HEndFlag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); + + oCN.Commit(); + } + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.Message; + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 鏆傚瓨鍖�-鏌ヨ + /// <summary> + /// 杩斿洖椤圭洰闃舵鍒楄〃 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Gy_TemporaryArea/list")] + [HttpGet] + public object getTemporaryArea(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + if (!DBUtility.ClsPub.Security_Log("Gy_TemporaryAreaList", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("select * from h_v_Gy_TemporaryAreaList order by HItemID desc", "h_v_Gy_TemporaryAreaList"); + } + else + { + string sql1 = "select * from h_v_Gy_TemporaryAreaList where 1 = 1 "; + string sql = sql1 + sWhere + " order by HItemID desc"; + ds = oCN.RunProcReturn(sql, "h_v_Gy_TemporaryAreaList"); + } + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 鏆傛斁鍖� 缂栬緫-椤甸潰璧嬪�� + /// <summary> + ///鍙傛暟锛歴tring HInterID銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Gy_TemporaryArea/editInit")] + [HttpGet] + public object getTemporaryAreaeditInit(string HInterID, string user) + { + try + { + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Gy_TemporaryArea_Edit", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犵紪杈戞潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + if (HInterID == null || HInterID.Equals("")) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "HInterID涓嶈兘涓虹┖锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + string sql = "select * from Gy_TemporaryArea where HItemID = " + HInterID; + ds = oCN.RunProcReturn(sql, "Gy_TemporaryArea"); + + if(ds==null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏈煡璇㈠埌璁板綍锛�"; + objJsonResult.data = null; + return objJsonResult; + }else if(ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "璇ユ殏瀛樺尯宸插鏍革紝涓嶅彲缂栬緫锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + + 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 + + #region 鏆傛斁鍖� 鍒犻櫎 + /// <summary> + ///鍙傛暟锛歴tring HInterID銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Gy_TemporaryArea/delete")] + [HttpGet] + public object deleteTemporaryArea(string HInterID, string user) + { + try + { + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Gy_TemporaryArea_Drop", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + if (HInterID == null || HInterID.Equals("")) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "HInterID涓嶈兘涓虹┖锛�"; + objJsonResult.data = null; + return objJsonResult; + } + //鏍规嵁璁板綍鐘舵�佸垽鏂槸鍚﹀彲浠ュ垹闄� + string sql = "select * from Gy_TemporaryArea where HItemID = " + HInterID; + ds = oCN.RunProcReturn(sql, "Gy_TemporaryArea"); + if(ds!=null && ds.Tables[0].Rows.Count>0 && ds.Tables[0].Rows[0]["HCheckEmp"].ToString()!="" && ds.Tables[0].Rows[0]["HStopEmp"].ToString()=="") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "璇ユ殏瀛樺尯涓嶅彲鍒犻櫎锛岃妫�鏌ヨ鏆傚瓨鍖虹殑鐘舵�侊紒"; + objJsonResult.data = null; + return objJsonResult; + } + + oCN.BeginTran(); + + //鍒ゆ柇璇ヨ褰曞垹闄ゅ悗锛岃璁板綍鐨勪笂绾ц褰曟槸鍚︿负鏈骇锛屽苟鏇存敼鏈骇鏍囪 + sql = @"select * from Gy_TemporaryArea AS a where a.HParentID in (select b.HParentID from Gy_TemporaryArea AS b where b.HItemID = " + HInterID + ")"; + ds = oCN.RunProcReturn(sql, "Gy_TemporaryArea"); + if(ds!=null && ds.Tables[0].Rows.Count == 1) + { + sql = "update Gy_TemporaryArea set HEndFlag = 1 where HItemID = " + ds.Tables[0].Rows[0]["HParentID"].ToString(); + oCN.RunProc(sql); + } + + //鍒犻櫎璇ヨ褰� + oCN.RunProc("delete from Gy_TemporaryArea where HItemID = " + HInterID); + + oCN.Commit(); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 鏆傛斁鍖� 瀹℃牳/鍙嶅鏍� + /// <summary> + /// + /// </summary> + /// <param name="HInterID">鍗曟嵁ID</param> + /// <param name="Type">瀹℃牳(1),鍙嶅鏍�(2)</param> + /// <param name="CurUserName">瀹℃牳浜�</param> + /// <returns></returns> + [Route("Gy_TemporaryArea/AuditGy_TemporaryArea")] + [HttpGet] + public object AuditGy_TemporaryArea(int HInterID, int IsAudit, string CurUserName) + { + try + { + //瀹℃牳鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("Gy_TemporaryArea_Check", 1, false, CurUserName)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + ds = oCN.RunProcReturn("select * from Gy_TemporaryArea where HItemID=" + HInterID, "Gy_TemporaryArea"); + if (ds.Tables[0].Rows.Count > 0) + { + //if (bool.Parse(ds.Tables[0].Rows[0]["HStopFlag"].ToString())){ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏆傛斁鍖哄凡绂佺敤!涓嶈兘鍐嶈繘琛屽鏍告垨鍙嶅鏍革紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + if (IsAudit == 0) //瀹℃牳鍒ゆ柇 + { + if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�"; + objJsonResult.data = null; + return objJsonResult; + } + } + if (IsAudit == 1) //鍙嶅鏍稿垽鏂� + { + if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!"; + objJsonResult.data = null; + return objJsonResult; + } + } + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!"; + objJsonResult.data = null; + return objJsonResult; + } + + oCN.BeginTran(); + + if (IsAudit == 0) //瀹℃牳鍒ゆ柇 + { + oCN.RunProc("update Gy_TemporaryArea set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "瀹℃牳鎴愬姛"; + objJsonResult.data = null; + } + if (IsAudit == 1) //鍙嶅鏍稿垽鏂� + { + oCN.RunProc("update Gy_TemporaryArea set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍙嶅鏍告垚鍔�"; + objJsonResult.data = null; + } + oCN.Commit(); + + return objJsonResult; + } + catch (Exception e) + { + oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 鏆傛斁鍖� 绂佺敤銆佸弽绂佺敤 + /// <summary> + /// + /// </summary> + /// <param name="HInterID">鍗曟嵁ID</param> + /// <param name="IsStop">绂佺敤(0),鍙嶇鐢�(1)</param> + /// <param name="CurUserName">瀹℃牳浜�</param> + /// <returns></returns> + [Route("Gy_TemporaryArea/StopGy_TemporaryArea")] + [HttpGet] + public object StopGy_TemporaryArea(int HInterID, int IsStop, string CurUserName) + { + try + { + //瀹℃牳鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("Gy_TemporaryArea_Stop", 1, false, CurUserName)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "绂佺敤澶辫触锛佹棤鏉冮檺锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + var ds = oCN.RunProcReturn("select * from Gy_TemporaryArea where HItemID=" + HInterID, "Gy_TemporaryArea"); + if (ds.Tables[0].Rows.Count > 0) + { + if (IsStop == 0) //绂佺敤鍒ゆ柇 + { + if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸茬鐢�!涓嶈兘鍐嶆绂佺敤锛�"; + objJsonResult.data = null; + return objJsonResult; + } + } + if (IsStop == 1) //鍙嶇鐢ㄥ垽鏂� + { + if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鏈鐢�!涓嶉渶瑕佸弽绂佺敤!"; + objJsonResult.data = null; + return objJsonResult; + } + } + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!"; + objJsonResult.data = null; + return objJsonResult; + } + + oCN.BeginTran(); + + if (IsStop == 0) //绂佺敤鍒ゆ柇 + { + oCN.RunProc("update Gy_TemporaryArea set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopFlag=1 where HItemID=" + HInterID); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "绂佺敤鎴愬姛"; + objJsonResult.data = null; + } + if (IsStop == 1) //鍙嶇鐢ㄥ垽鏂� + { + oCN.RunProc("update Gy_TemporaryArea set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍙嶇鐢ㄦ垚鍔�"; + objJsonResult.data = null; + } + oCN.Commit(); + + return objJsonResult; + } + catch (Exception e) + { + oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "绂佺敤澶辫触鎴栬�呭弽绂佺敤澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + } +} \ No newline at end of file diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_DuSubsidyItemBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_DuSubsidyItemBillController.cs" index 9f45657..c4b7cf1 100644 --- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_DuSubsidyItemBillController.cs" +++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_DuSubsidyItemBillController.cs" @@ -6,12 +6,15 @@ using System.Collections.Generic; using System.Data; using System.Linq; +using System.IO; using System.Web; using System.Web.Http; using System.Windows.Forms; using WebAPI.Models; +using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�; +using System.Text.RegularExpressions; -namespace WebAPI.Controllers.椤圭洰绠$悊.宸ヤ綔浠诲姟 +namespace WebAPI.Controllers.宸ヨ祫绠$悊.鎵hˉ椤圭洰璐圭敤鍗� { public class Pay_DuSubsidyItemBillController : ApiController { @@ -19,7 +22,13 @@ private json objJsonResult = new json(); public DataSet ds = new DataSet(); public SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - public DAL.ClsSc_ICMOBill BillOld = new DAL.ClsSc_ICMOBill(); + DAL.ClsGy_Employee_View oEmp = new DAL.ClsGy_Employee_View(); + DAL.ClsGy_Department_View oDept = new DAL.ClsGy_Department_View(); + DAL.ClsGy_Group_View oGroup = new DAL.ClsGy_Group_View(); + DAL.ClsGy_ORGANIZATIONS_View oOrg = new DAL.ClsGy_ORGANIZATIONS_View(); + DAL.ClsGy_DuSubsidyItem_View oDuSItem = new DAL.ClsGy_DuSubsidyItem_View(); + public DAL.ClsPay_DuSubsidyItemBill BillOld = new DAL.ClsPay_DuSubsidyItemBill(); + Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); string user_LongShan = ""; string HName_LongShan = ""; @@ -798,5 +807,613 @@ } } #endregion + + + #region 鎵hˉ椤圭洰璐圭敤鍗� 鏁版嵁瀵煎叆 + #region 鑾峰彇瀵煎叆鏂囦欢鐨勬暟鎹� + [Route("Pay_DuSubsidyItemBill/Pay_DuSubsidyItemBillimport")] + [HttpPost] + public object Pay_DuSubsidyItemBillimport() + { + try + { + var WorkBookName = HttpContext.Current.Request["WorkBookName"]; + DBUtility.ClsPub.HOrgID = long.Parse(HttpContext.Current.Request["HOrgID"]); + //鑾峰彇鏂囦欢鍚嶇О + var file = HttpContext.Current.Request.Files[0]; + //鑾峰彇鏂囦欢鐗╃悊璺緞 + string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); + //淇濆瓨鏂囦欢 + file.SaveAs(ExcelPath); + + NpoiHelper np = new NpoiHelper(); + DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 2, WorkBookName); + + //鍒犻櫎鏂囦欢 + File.Delete(ExcelPath); + + //鍒涘缓涓存椂琛� + DataTable tb2 = new DataTable("dt2"); + DataTable tb3 = new DataTable("dt3"); + + //娣诲姞鍒楀悕 + for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) + { + tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); + } + + //娣诲姞鏁版嵁 + for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) + { + DataRow row = tb2.NewRow(); + for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) + { + row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); + } + tb2.Rows.Add(row); + } + //鑾峰彇瀵煎叆鏂囦欢鍒楀悕闆嗗悎锛岀敤浜庡墠绔姩鎬佸垪 + List<object> columnNameList = new List<object>(); + //娣诲姞鍒楀悕 + foreach (DataColumn col in tb2.Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + var error = ""; + + //鏌ヨ鎵hˉ椤圭洰璐圭敤鍗曟病鏈夌殑鍒� + if (!tb2.Columns.Contains("鏃ユ湡")) + error += "娌℃湁鎵惧埌銆愭棩鏈熴�戠殑鏍囬,"; + if (!tb2.Columns.Contains("骞�")) + error += "娌℃湁鎵惧埌銆愬勾銆戠殑鏍囬,"; + if (!tb2.Columns.Contains("鏈�")) + error += "娌℃湁鎵惧埌銆愭湀銆戠殑鏍囬,"; + if (!tb2.Columns.Contains("缁勭粐浠g爜")) + error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,"; + if (!tb2.Columns.Contains("缁勭粐")) + error += "娌℃湁鎵惧埌銆愮粍缁囥�戠殑鏍囬,"; + if (!tb2.Columns.Contains("閮ㄩ棬浠g爜")) + error += "娌℃湁鎵惧埌銆愰儴闂ㄤ唬鐮併�戠殑鏍囬,"; + if (!tb2.Columns.Contains("閮ㄩ棬鍚嶇О")) + error += "娌℃湁鎵惧埌銆愰儴闂ㄥ悕绉般�戠殑鏍囬,"; + if (!tb2.Columns.Contains("鐝粍浠g爜")) + error += "娌℃湁鎵惧埌銆愮彮缁勪唬鐮併�戠殑鏍囬,"; + if (!tb2.Columns.Contains("鐝粍")) + error += "娌℃湁鎵惧埌銆愮彮缁勩�戠殑鏍囬,"; + if (!tb2.Columns.Contains("琛ㄥご澶囨敞")) + error += "娌℃湁鎵惧埌銆愯〃澶村娉ㄣ�戠殑鏍囬,"; + if (!tb2.Columns.Contains("鑱屽憳浠g爜")) + error += "娌℃湁鎵惧埌銆愯亴鍛樹唬鐮併�戠殑鏍囬,"; + if (!tb2.Columns.Contains("鑱屽憳鍚嶇О")) + error += "娌℃湁鎵惧埌銆愯亴鍛樺悕绉般�戠殑鏍囬,"; + ////鑾峰彇鎵�鏈夌殑鎵hˉ椤圭洰锛屽垽瀹氬鍏ユ枃浠朵腑鏈寘鍚殑鎵hˉ椤圭洰 + //DataSet ds_DuSubsidyItem; + //ds_DuSubsidyItem = oCN.RunProcReturn("select * from Gy_DuSubsidyItem", "Gy_DuSubsidyItem"); + //if (ds_DuSubsidyItem.Tables[0] != null) + //{ + // for (int i = 0; i < ds_DuSubsidyItem.Tables[0].Rows.Count; i++) + // { + // string DuSubsidyItem = ds_DuSubsidyItem.Tables[0].Rows[i]["HName"] == null ? "" : ds_DuSubsidyItem.Tables[0].Rows[i]["HName"].ToString(); + // if (!tb2.Columns.Contains(DuSubsidyItem)) + // error += "娌℃湁鎵惧埌銆�" + DuSubsidyItem + "銆戠殑鏍囬,"; + // } + //} + + if (error.Length > 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n"; + objJsonResult.data = null; + return objJsonResult; + } + + objJsonResult = (json)Checkdata(tb2); + if (objJsonResult.code == "0") + { + return objJsonResult; + } + + oCN.BeginTran(); + //鍒犻櫎涓存椂琛ㄦ暟鎹� + oCN.RunProc("delete from diyipi_Pay_DuSubsidyItemBill"); + + //涓存椂琛ㄦ坊鍔犳暟鎹� + for (int i = 0; i < tb2.Rows.Count; i++) + { + if (tb2.Rows[i]["鑱屽憳浠g爜"].ToString() != "") + { + //鏍规嵁浠g爜鑾峰彇琛ㄦ暟鎹� + oOrg.GetInfoByNumber(tb2.Rows[i]["缁勭粐浠g爜"].ToString()); + oDept.GetInfoByNumber(tb2.Rows[i]["閮ㄩ棬浠g爜"].ToString()); + oGroup.GetInfoByNumber(tb2.Rows[i]["鐝粍浠g爜"].ToString()); + oEmp.GetInfoByNumber(tb2.Rows[i]["鑱屽憳浠g爜"].ToString()); + + //鑾峰彇鍐呯爜 + Int64 HOrgID = oOrg.omodel.HItemID; + Int64 HDeptID = oDept.omodel.HItemID; + Int64 HGroupID = oGroup.omodel.HItemID; + Int64 HEmpID = oEmp.omodel.HItemID; + + for (int j = 12; j < tb2.Columns.Count - 1; j++) + { + oDuSItem.GetInfoByName(tb2.Columns[j].ColumnName); + Int64 HDuSID = oDuSItem.omodel.HItemID; + string HDuSNumber = oDuSItem.omodel.HNumber; + string HDuSName = oDuSItem.omodel.HName; + double HMoney = double.Parse(tb2.Rows[i][tb2.Columns[j].ColumnName].ToString()); + + string sql = "insert into diyipi_Pay_DuSubsidyItemBill(HDate,HYear,HPeriod,HOrgID,HOrgNumber,HOrgName,HDeptID,HDeptNumber,HDeptName" + + ",HGroupID,HGroupNumber,HGroupName,HRemarkMain,HEmpID,HEmpNumber,HEmpName,HDuSubsidyItemID,HDuSubsidyItemNumber,HDuSubsidyItemName,HMoney,HRemarkSub) " + + "values(" + + "'" + tb2.Rows[i]["鏃ユ湡"].ToString() + + "'," + int.Parse(tb2.Rows[i]["骞�"].ToString()) + + "," + int.Parse(tb2.Rows[i]["鏈�"].ToString()) + + "," + HOrgID + + ",'" + tb2.Rows[i]["缁勭粐浠g爜"].ToString() + + "','" + tb2.Rows[i]["缁勭粐"].ToString() + + "'," + HDeptID + + ",'" + tb2.Rows[i]["閮ㄩ棬浠g爜"].ToString() + + "','" + tb2.Rows[i]["閮ㄩ棬鍚嶇О"].ToString() + + "'," + HGroupID + + ",'" + tb2.Rows[i]["鐝粍浠g爜"].ToString() + + "','" + tb2.Rows[i]["鐝粍"].ToString() + + "','" + tb2.Rows[i]["琛ㄥご澶囨敞"].ToString() + + "'," + HEmpID + + ",'" + tb2.Rows[i]["鑱屽憳浠g爜"].ToString() + + "','" + tb2.Rows[i]["鑱屽憳鍚嶇О"].ToString() + + "'," + HDuSID + + ",'" + HDuSNumber + + "','" + HDuSName + + "'," + HMoney + + ",'" + tb2.Rows[i]["琛ㄤ綋澶囨敞"] + + "')"; + oCN.RunProc(sql); + } + } + + } + oCN.Commit(); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = error; + objJsonResult.data = tb2; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 妫�鏌ュ鍏ユ枃浠剁殑鏁版嵁 + private object Checkdata(DataTable dt) + { + bool b = false; + string sErrMsg = ""; + string sMsg = ""; + for (int i = 0; i <= dt.Rows.Count - 1; i++) + { + string HDeptNumber = ""; + string HGroupNumber = ""; + string HEmpNumber = ""; + double HMoney = 0; + + HDeptNumber = DBUtility.ClsPub.isStrNull(dt.Rows[i]["閮ㄩ棬浠g爜"].ToString()); + HGroupNumber = DBUtility.ClsPub.isStrNull(dt.Rows[i]["鐝粍浠g爜"].ToString()); + HEmpNumber = DBUtility.ClsPub.isStrNull(dt.Rows[i]["鑱屽憳浠g爜"].ToString()); + if (HEmpNumber != "") + { + int index = i + 1; //璁板綍褰撳墠妫�楠屾暟鎹綅浜庡鍏ユ枃浠剁殑绗嚑琛� + + //瀹℃牳浠g爜鏄惁鍚堢悊 + if (!DBUtility.ClsPub.AllowNumber(HDeptNumber)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "閮ㄩ棬浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒"; + objJsonResult.data = null; + return objJsonResult; + } + if (!DBUtility.ClsPub.AllowNumber(HGroupNumber)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鐝粍浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒"; + objJsonResult.data = null; + return objJsonResult; + } + if (!DBUtility.ClsPub.AllowNumber(HEmpNumber)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鑱屽憳浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒"; + objJsonResult.data = null; + return objJsonResult; + } + + //寰楀埌閮ㄩ棬鍐呯爜 + if (!oDept.GetInfoByNumber(HDeptNumber)) + { + sMsg = "[" + HDeptNumber + "]閮ㄩ棬涓嶅瓨鍦�"; + if (sErrMsg.Contains(sMsg) == false) + { + sErrMsg = sErrMsg + "[" + HDeptNumber + "]閮ㄩ棬涓嶅瓨鍦╘r\n"; + } + b = true; + } + //寰楀埌鐝粍鍐呯爜 + if (!oGroup.GetInfoByNumber(HGroupNumber)) + { + sMsg = "[" + HGroupNumber + "]鐝粍涓嶅瓨鍦�"; + if (sErrMsg.Contains(sMsg) == false) + { + sErrMsg = sErrMsg + "[" + HGroupNumber + "]鐝粍涓嶅瓨鍦╘r\n"; + } + b = true; + } + + //寰楀埌鑱屽憳鍐呯爜 + if (!oEmp.GetInfoByNumber(HEmpNumber)) + { + sMsg = "[" + HEmpNumber + "]鑱屽憳涓嶅瓨鍦�"; + if (sErrMsg.Contains(sMsg) == false) + { + sErrMsg = sErrMsg + "[" + HEmpNumber + "]鑱屽憳涓嶅瓨鍦╘r\n"; + } + b = true; + } + //妫�楠屽鍏ユ枃浠朵腑鐨勬墸琛ラ」鐩槸鍚﹀瓨鍦ㄣ�佸�兼槸鍚﹀悎娉� + for(int j=12; j < dt.Columns.Count-1; j++) + { + //妫�楠屽鍏ユ枃浠朵腑鐨勬墸琛ラ」鐩槸鍚﹀瓨鍦� + if (!oDuSItem.GetInfoByName(dt.Columns[j].ColumnName)) + { + sMsg = "[" + dt.Columns[j].ColumnName + "]鎵hˉ椤圭洰涓嶅瓨鍦�"; + if (sErrMsg.Contains(sMsg) == false) + { + sErrMsg = sErrMsg + "[" + dt.Columns[j].ColumnName + "]鎵hˉ椤圭洰涓嶅瓨鍦╘r\n"; + } + b = true; + } + //妫�楠屽鍏ユ枃浠朵腑鐨勬墸琛ラ」鐩�兼槸鍚﹀悎娉� + if ( !Regex.IsMatch( dt.Rows[i][dt.Columns[j].ColumnName].ToString(), @"^\d+(\.\d+)?$")) + { + sMsg = "[" + dt.Columns[j].ColumnName + "]鏁版嵁鏍煎紡閿欒锛岃杈撳叆闈炶礋鏁�"; + if (sErrMsg.Contains(sMsg) == false) + { + sErrMsg = sErrMsg + "[" + dt.Columns[j].ColumnName + "]鏁版嵁鏍煎紡閿欒锛岃杈撳叆闈炶礋鏁癨r\n"; + } + b = true; + } + } + } + } + if (b == true) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = sErrMsg; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = sErrMsg; + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 鎵hˉ椤圭洰璐圭敤鍗� 淇濆瓨瀵煎叆鏁版嵁 + [Route("Pay_DuSubsidyItemBill/Pay_DuSubsidyItemBillSaveImport")] + [HttpGet] + public object Pay_DuSubsidyItemBillSaveImport(string user) + { + try + { + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Pay_DuSubsidyItemBill_Edit", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳柊澧炴潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + //鑾峰彇涓存椂琛ㄦ暟鎹� + ds = oCN.RunProcReturn("select * from diyipi_Pay_DuSubsidyItemBill order by HDate desc,HYear desc,HPeriod desc,HOrgID desc,HDeptID desc,HGroupID desc,HRemarkMain desc,HEmpID desc", "diyipi_Pay_DuSubsidyItemBill"); + if (ds==null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛氭暟鎹湭瀵煎叆鎴愬姛锛岃閲嶆柊瀵煎叆鏁版嵁锛侊紒"; + objJsonResult.data = null; + return objJsonResult; + } + //淇濆瓨鏁版嵁 + oCN.BeginTran(); + DataTable dt = ds.Tables[0]; + Pay_DuSubsidyItemBillMain mainTable = new Pay_DuSubsidyItemBillMain(); + List<Pay_DuSubsidyItemBillSub> subTable = new List<Pay_DuSubsidyItemBillSub>(); + int HOrgID = 0; + int HYear = 0; + int HPeriod = 0; + string compareText = ""; + + for (int i = 0; i < dt.Rows.Count; i++) + { + string compareText1 = dt.Rows[i]["HDate"].ToString() + + "" + dt.Rows[i]["HYear"].ToString() + + "" + dt.Rows[i]["HPeriod"].ToString() + + "" + dt.Rows[i]["HOrgID"].ToString() + + "" + dt.Rows[i]["HDeptID"].ToString() + + "" + dt.Rows[i]["HGroupID"].ToString() + + "" + dt.Rows[i]["HRemarkMain"].ToString() + + "" + dt.Rows[i]["HEmpID"].ToString(); + if(compareText != compareText1) + { + if (subTable.Count>0) + { + objJsonResult = SaveImport_AddBillMain(mainTable, subTable, HOrgID, HYear, HPeriod, user); + if (objJsonResult.code == "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = objJsonResult.Message; + objJsonResult.data = null; + return objJsonResult; + } + mainTable = new Pay_DuSubsidyItemBillMain(); + subTable.Clear(); + } + compareText = compareText1; + mainTable.HDate = dt.Rows[i]["HDate"].ToString(); + mainTable.HDeptID = int.Parse(dt.Rows[i]["HDeptID"].ToString()); + mainTable.HGroupID = int.Parse(dt.Rows[i]["HGroupID"].ToString()); + mainTable.HRemark = dt.Rows[i]["HRemarkMain"].ToString(); + mainTable.HMaker = user; + mainTable.HMakerDate = DateTime.Now.ToString("yyyy-MM-dd"); + HOrgID = int.Parse(dt.Rows[i]["HOrgID"].ToString()); + HYear = int.Parse(dt.Rows[i]["HYear"].ToString()); + HPeriod = int.Parse(dt.Rows[i]["HPeriod"].ToString()); + } + + Pay_DuSubsidyItemBillSub oSub = new Pay_DuSubsidyItemBillSub(); + oSub.HEmpID = int.Parse(dt.Rows[i]["HEmpID"].ToString()); + oSub.HDuSubsidyItemID = int.Parse(dt.Rows[i]["HDuSubsidyItemID"].ToString()); + oSub.HQty = 0; + oSub.HPrice = 0; + oSub.HMoney = double.Parse(dt.Rows[i]["HMoney"].ToString()); + oSub.HRemark = dt.Rows[i]["HRemarkSub"].ToString(); + subTable.Add(oSub); + } + + //娣诲姞鏈�鍚庝竴娆¤褰� + if (subTable.Count > 0) + { + objJsonResult = SaveImport_AddBillMain(mainTable, subTable, HOrgID, HYear, HPeriod, user); + if (objJsonResult.code == "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = objJsonResult.Message; + objJsonResult.data = null; + return objJsonResult; + } + mainTable = new Pay_DuSubsidyItemBillMain(); + subTable.Clear(); + } + + + oCN.Commit(); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 娣诲姞 鎵hˉ椤圭洰璐圭敤鍗� 涓昏〃 + public json SaveImport_AddBillMain(Pay_DuSubsidyItemBillMain mainTable, List<Pay_DuSubsidyItemBillSub> subTable, int HOrgID, int Year, int Period, string user) + { + string HComputerName = SystemInformation.ComputerName; //璁惧鍚嶇О + + try + { + List<Pay_DuSubsidyItemBillMain> mainList = new List<Pay_DuSubsidyItemBillMain>(); + mainList.Add(mainTable); + + + int HYear = Year; + int HPeriod = Period; + string HBillType = "2233"; + string HBillSubType = ""; + int HBillStatus = 1; + + int HAutoSaveFlag = 0; + + + Int64 HInterID = DBUtility.ClsPub.CreateBillID_Prod(HBillType, ref DBUtility.ClsPub.sExeReturnInfo); + string HBillNo = DBUtility.ClsPub.CreateBillCode(HBillType, ref DBUtility.ClsPub.sExeReturnInfo, true); + string HDate = mainList[0].HDate; + string HInnerBillNo = ""; + int HGroupID = mainList[0].HGroupID; + int HDeptID = mainList[0].HDeptID; + string HExplanation = ""; + string HRemark = mainList[0].HRemark; + + + string HMaker = mainList[0].HMaker; + string HMakerDate = mainList[0].HMakerDate; + + ds = oCN.RunProcReturn("select * from Pay_DuSubsidyItemBillMain where HInterID = " + HInterID + " and HBillNo = '" + HBillNo + "'", "Pay_DuSubsidyItemBillMain"); + + //涓昏〃娣诲姞鏁版嵁 + string sql = "insert into Pay_DuSubsidyItemBillMain" + + "(HYear,HPeriod,HBillType,HBillSubType,HBillStatus,HInterID,HBillNo,HDate,HInnerBillNo,HGroupID,HDeptID,HExplanation,HAutoSaveFlag,HRemark,HMaker,HMakeDate) " + + "values(" + + "" + HYear + + "," + HPeriod + + ",'" + HBillType + + "','" + HBillSubType + + "'," + HBillStatus + + "," + HInterID + + ",'" + HBillNo + + "','" + HDate + + "','" + HInnerBillNo + + "'," + HGroupID + + "," + HDeptID + + ",'" + HExplanation + + "'," + HAutoSaveFlag + + ",'" + HRemark + + "','" + HMaker + + "','" + HMakerDate + + "')"; + + //涓昏〃 + oCN.RunProc(sql); + LogService.Write("鐢ㄦ埛:" + user + ",鏃ユ湡:" + DateTime.Now + ",鏂板鎵hˉ椤圭洰璐圭敤鍗�:" + HBillNo); + oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "鏂板鎵hˉ椤圭洰璐圭敤鍗曪細" + HBillNo + "','LMES-鎵hˉ椤圭洰璐圭敤鍗曟ā鍧�','" + DBUtility.ClsPub.IPAddress + "','鏂板鍗曟嵁'", ref DBUtility.ClsPub.sExeReturnInfo); + + + //淇濆瓨瀛愯〃 + objJsonResult = SaveImport_AddBillSub(subTable, HInterID,HBillNo); + + if (objJsonResult.code == "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = objJsonResult.Message; + objJsonResult.data = null; + return objJsonResult; + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = null; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + #region 娣诲姞 鎵hˉ椤圭洰璐圭敤鍗� 瀛愯〃 + public json SaveImport_AddBillSub(List<Pay_DuSubsidyItemBillSub> DetailColl, Int64 HInterID, string HBillNo) + { + int i = 0; //浣滀负瀛愯〃鍐呯爜 + foreach (Pay_DuSubsidyItemBillSub oSub in DetailColl) + { + i++; //鍚屼竴涓富琛ㄤ笅鐨勫瓙琛ㄧ殑鍐呯爜鑷 + + int HEntryID = i; + + int HEmpID = oSub.HEmpID; + int HDuSubsidyItemID = oSub.HDuSubsidyItemID; + double HQty = oSub.HQty; + double HPrice = oSub.HPrice; + double HMoney = oSub.HMoney; + string HRemark = oSub.HRemark; + + string sql = "insert into Pay_DuSubsidyItemBillSub" + + "(HInterID,HEntryID,HEmpID,HDuSubsidyItemID,HQty,HPrice,HMoney,HRemark) " + + "values(" + + "" + HInterID + + "," + HEntryID + + "," + HEmpID + + "," + HDuSubsidyItemID + + "," + HQty + + "," + HPrice + + "," + HMoney + + ",'" + HRemark + + "')"; + + oCN.RunProc(sql); + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = null; + objJsonResult.data = null; + return objJsonResult; + } + #endregion + #endregion + + #region 鎵hˉ椤圭洰璐圭敤鍗昣璐圭敤妯悜鏄剧ず 鑾峰彇鎵hˉ椤圭洰 + [Route("Pay_DuSubsidyItemBill_KS/getInitGrid_KS")] + [HttpGet] + public object getInitGrid_KS() + { + try + { + //鑾峰彇鏈鐢ㄧ殑鎵hˉ椤圭洰 + string sql = "select * from Gy_DuSubsidyItem where HStopFlag = 0"; + ds = oCN.RunProcReturn(sql, "Gy_DuSubsidyItem"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏈壘鍒扮浉鍏虫墸琛ラ」鐩紒"; + objJsonResult.data = null; + return objJsonResult; + } + //澶勭悊鎵hˉ椤圭洰 + List<object> columnNameList = new List<object>(); + for(int i = 0; i < ds.Tables[0].Rows.Count; i++) + { + string field = ds.Tables[0].Rows[i]["HItemID"].ToString(); + string title = ds.Tables[0].Rows[i]["HName"].ToString(); + string dataType = "decimal(18,2)"; + string ColmString = "{\"field\":\"" + field + "\",\"title\":\"" + title + "\",\"dataType\":\"" + dataType + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion } } \ No newline at end of file diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_ErrWorkTimesRequestBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_ErrWorkTimesRequestBillController.cs" index c883bff..87789e0 100644 --- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_ErrWorkTimesRequestBillController.cs" +++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_ErrWorkTimesRequestBillController.cs" @@ -11,7 +11,7 @@ using System.Windows.Forms; using WebAPI.Models; -namespace WebAPI.Controllers.椤圭洰绠$悊.宸ヤ綔浠诲姟 +namespace WebAPI.Controllers.宸ヨ祫绠$悊.寮傚父宸ユ椂鐢宠 { public class Pay_ErrWorkTimesRequestBillController : ApiController { @@ -19,7 +19,7 @@ private json objJsonResult = new json(); public DataSet ds = new DataSet(); public SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - public DAL.ClsSc_ICMOBill BillOld = new DAL.ClsSc_ICMOBill(); + public DAL.ClsPay_ErrWorkTimesRequestBill BillOld = new DAL.ClsPay_ErrWorkTimesRequestBill(); string user_LongShan = ""; string HName_LongShan = ""; diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs" index f97b1f1..301b23d 100644 --- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs" +++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs" @@ -1026,11 +1026,23 @@ return objJsonResult; } - oCN.BeginTran(); + ds = oCN.RunProcReturn("select * from Sc_ICMOBillWorkQtyStatus_Tmp where HInterID=" + HInterID + " and HSourceInterID=" + HICMOInterID + " and HSourceEntryID=" + HICMOEntryID, "Sc_ICMOBillWorkQtyStatus_Tmp"); + if (ds.Tables[0].Rows.Count == 0) { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏌ユ棤鏁版嵁!"; + objJsonResult.data = null; + return objJsonResult; + } + oCN.BeginTran(); //鍒犻櫎浜ч噺姹囨姤琛� string sql = string.Format(@"delete Sc_ICMOBillWorkQtyStatus_Tmp where HInterID='" + HInterID + "'"); oCN.RunProc(sql); + double sumqty = double.Parse(ds.Tables[0].Rows[0]["HQty"].ToString()) + double.Parse(ds.Tables[0].Rows[0]["HBadQty"].ToString()) + double.Parse(ds.Tables[0].Rows[0]["HWasterQty"].ToString()); //姹囨姤鏁伴噺+涓嶈壇+鎶ュ簾 + //鍥炲啓鐢熶骇鐘舵�佷复鏃惰〃Sc_ICMOBillStatus_Tmp鎷嗗垎姹囨姤鏁伴噺 HSplitRelationQty + oCN.RunProc("update Sc_ICMOBillStatus_Tmp set HSplitRelationQty=HSplitRelationQty-" + sumqty + " where HICMOBillNo='" + ds.Tables[0].Rows[0]["HICMOBillNo"].ToString() + "' and HSourceID='" + ds.Tables[0].Rows[0]["HSourceID"].ToString() + "' and HICMOInterID='" + ds.Tables[0].Rows[0]["HICMOInterID"].ToString() + "' and HICMOEntryID='" + ds.Tables[0].Rows[0]["HICMOEntryID"].ToString() + "' and HInterID=" + ds.Tables[0].Rows[0]["HSourceInterID"].ToString()); + oCN.Commit(); objJsonResult.code = "1"; diff --git "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\344\270\232\347\273\251\346\214\207\346\240\207/PM_YearEmployeeMoneyBillController.cs" "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\344\270\232\347\273\251\346\214\207\346\240\207/PM_YearEmployeeMoneyBillController.cs" index b0e141c..275f0f4 100644 --- "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\344\270\232\347\273\251\346\214\207\346\240\207/PM_YearEmployeeMoneyBillController.cs" +++ "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\344\270\232\347\273\251\346\214\207\346\240\207/PM_YearEmployeeMoneyBillController.cs" @@ -288,12 +288,12 @@ if (sWhere == null || sWhere.Equals("")) { - ds = oCN.RunProcReturn("select * from h_v_PM_YearEmployeeMoneyBillList order by 鍗曟嵁鍙� ", "h_v_PM_YearEmployeeMoneyBillList"); + ds = oCN.RunProcReturn("select * from h_v_PM_YearEmployeeMoneyBillList order by 鍗曟嵁鍙� desc ", "h_v_PM_YearEmployeeMoneyBillList"); } else { string sql1 = "select * from h_v_PM_YearEmployeeMoneyBillList where 1 = 1 "; - string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� "; + string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc "; ds = oCN.RunProcReturn(sql, "h_v_PM_YearEmployeeMoneyBillList"); } diff --git "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillController.cs" "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillController.cs" index 041f22e..8d5d9f4 100644 --- "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillController.cs" +++ "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillController.cs" @@ -333,12 +333,12 @@ if (sWhere == null || sWhere.Equals("")) { - ds = oCN.RunProcReturn("select * from h_v_PM_WorkTaskBillList order by 鍗曟嵁鍙� ", "h_v_PM_WorkTaskBillList"); + ds = oCN.RunProcReturn("select * from h_v_PM_WorkTaskBillList order by 鍗曟嵁鍙� desc", "h_v_PM_WorkTaskBillList"); } else { string sql1 = "select * from h_v_PM_WorkTaskBillList where 1 = 1 "; - string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� "; + string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc"; ds = oCN.RunProcReturn(sql, "h_v_PM_WorkTaskBillList"); } @@ -1179,12 +1179,12 @@ if (sWhere == null || sWhere.Equals("")) { - ds = oCN.RunProcReturn("select * from h_v_PM_WorkTaskReportBillList order by 鍗曟嵁鍙�", "h_v_PM_ProjectStageBillList"); + ds = oCN.RunProcReturn("select * from h_v_PM_WorkTaskReportBillList order by 鍗曟嵁鍙� desc", "h_v_PM_ProjectStageBillList"); } else { string sql1 = "select * from h_v_PM_WorkTaskReportBillList where 1 = 1 "; - string sql = sql1 + sWhere + " order by 鍗曟嵁鍙�"; + string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc"; ds = oCN.RunProcReturn(sql, "h_v_PM_WorkTaskReportBillList"); } diff --git "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs" "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs" index 2aadcfc..fac1483 100644 --- "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs" +++ "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs" @@ -470,12 +470,12 @@ if (sWhere == null || sWhere.Equals("")) { - ds = oCN.RunProcReturn("select * from h_v_PM_ProjectBillList order by 鍗曟嵁鍙� ", "h_v_PM_ProjectBillList"); + ds = oCN.RunProcReturn("select * from h_v_PM_ProjectBillList order by 鍗曟嵁鍙� desc", "h_v_PM_ProjectBillList"); } else { string sql1 = "select * from h_v_PM_ProjectBillList where 1 = 1 "; - string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� "; + string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc"; ds = oCN.RunProcReturn(sql, "h_v_PM_ProjectBillList"); } diff --git "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\351\241\271\347\233\256\351\230\266\346\256\265/Gy_ProjectStageController.cs" "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\351\241\271\347\233\256\351\230\266\346\256\265/Gy_ProjectStageController.cs" index cf3e5c9..f7e15ea 100644 --- "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\351\241\271\347\233\256\351\230\266\346\256\265/Gy_ProjectStageController.cs" +++ "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\351\241\271\347\233\256\351\230\266\346\256\265/Gy_ProjectStageController.cs" @@ -203,12 +203,12 @@ if (sWhere == null || sWhere.Equals("")) { - ds = oCN.RunProcReturn("select * from h_v_Gy_ProjectStage order by 闃舵缂栫爜 ", "h_v_Gy_ProjectStage"); + ds = oCN.RunProcReturn("select * from h_v_Gy_ProjectStage order by 闃舵缂栫爜 desc", "h_v_Gy_ProjectStage"); } else { string sql1 = "select * from h_v_Gy_ProjectStage where 1 = 1 "; - string sql = sql1 + sWhere + " order by 闃舵缂栫爜 "; + string sql = sql1 + sWhere + " order by 闃舵缂栫爜 desc"; ds = oCN.RunProcReturn(sql, "h_v_Gy_ProjectStage"); } @@ -1732,12 +1732,12 @@ if (sWhere == null || sWhere.Equals("")) { - ds = oCN.RunProcReturn("select * from h_v_PM_ProjectReportBillList order by 鍗曟嵁鍙� ", "h_v_PM_ProjectReportBillList"); + ds = oCN.RunProcReturn("select * from h_v_PM_ProjectReportBillList order by 鍗曟嵁鍙� desc ", "h_v_PM_ProjectReportBillList"); } else { string sql1 = "select * from h_v_PM_ProjectReportBillList where 1 = 1 "; - string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� "; + string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc "; ds = oCN.RunProcReturn(sql, "h_v_PM_ProjectReportBillList"); } diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs index 87e0d21..8e3d79a 100644 --- a/WebAPI/ListModels.cs +++ b/WebAPI/ListModels.cs @@ -2680,12 +2680,21 @@ ///棣栦欢妫�楠屽崟 瀛欒〃 ///ClsQC_FirstPieceCheckBillSub_ValueGrid - public List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid> getObjectByJson_ClsClsQC_FirstPieceCheckBillSub_ValueGrid(string jsonString) + public List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid> getObjectByJson_ClsQC_FirstPieceCheckBillSub_ValueGrid(string jsonString) { //jsonString = "[" + jsonString.ToString() + "]"; List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid>>(jsonString); return list; } + ///宸ュ簭妫�楠屽崟 瀛欒〃 + ///ClsQC_ProcessCheckBillSub_ValueGrid + public List<Model.ClsQC_ProcessCheckBillSub_ValueGrid> getObjectByJson_ClsQC_ProcessCheckBillSub_ValueGrid(string jsonString) + { + //jsonString = "[" + jsonString.ToString() + "]"; + List<Model.ClsQC_ProcessCheckBillSub_ValueGrid> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_ProcessCheckBillSub_ValueGrid>>(jsonString); + return list; + } + } } \ No newline at end of file diff --git a/WebAPI/Models/ClsSc_AssemblyBillMain.cs b/WebAPI/Models/ClsSc_AssemblyBillMain.cs index bf9758c..d9d6640 100644 --- a/WebAPI/Models/ClsSc_AssemblyBillMain.cs +++ b/WebAPI/Models/ClsSc_AssemblyBillMain.cs @@ -24,5 +24,7 @@ public string HPCrux; public string HSCZY; public int HSCZYID; + public int HProdOrgID; //缁勭粐 + public int HICMOEntryID; //浠诲姟鍗曞瓙ID } } \ No newline at end of file diff --git "a/WebAPI/Models/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_TemporaryArea.cs" "b/WebAPI/Models/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_TemporaryArea.cs" new file mode 100644 index 0000000..308abc3 --- /dev/null +++ "b/WebAPI/Models/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_TemporaryArea.cs" @@ -0,0 +1,23 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +namespace WebAPI.Models +{ + public class Gy_TemporaryArea + { + public long HItemID { get; set; } + public string HNumber { get; set; } // 浠g爜 + public string HName { get; set; } // 鍚嶇О + public string HShortNumber { get; set; } //鐭唬鐮� + public long HParentID { get; set; } //鐖剁骇ID + public bool HEndFlag { get; set; } //鏈骇鏍囧織 + public bool HStopFlag { get; set; } //绂佺敤鏍囧織 + public string HRemark { get; set; } //澶囨敞 + public string HHelpCode { get; set; } //鍔╄鐮� + public int HUSEORGID { get; set; } //浣跨敤缁勭粐 + public int HCREATEORGID { get; set; } //鍒涘缓缁勭粐 + public string HBarCode { get; set; } //鏉″舰鐮� + } +} \ No newline at end of file diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user index 106ae7d..a8e9452 100644 --- a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -9,13 +9,13 @@ </PropertyGroup> <ItemGroup> <File Include="apiapp.json"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="bin/Antlr3.Runtime.dll"> - <publishTime>02/22/2013 08:43:40</publishTime> + <publishTime>02/22/2013 16:43:40</publishTime> </File> <File Include="bin/Antlr3.Runtime.pdb"> - <publishTime>02/22/2013 08:43:40</publishTime> + <publishTime>02/22/2013 16:43:40</publishTime> </File> <File Include="bin/BLL.dll"> <publishTime>11/09/2022 16:02:08</publishTime> @@ -28,7 +28,7 @@ <publishTime>08/18/2023 13:23:22</publishTime> </File> <File Include="bin/BouncyCastle.Crypto.dll"> - <publishTime>12/17/2020 21:32:28</publishTime> + <publishTime>12/18/2020 05:32:28</publishTime> </File> <File Include="bin/DAL.dll"> <publishTime>11/09/2022 16:02:06</publishTime> @@ -41,7 +41,7 @@ <publishTime>08/18/2023 13:23:20</publishTime> </File> <File Include="bin/Dapper.dll"> - <publishTime>07/22/2016 14:52:40</publishTime> + <publishTime>07/22/2016 22:52:40</publishTime> </File> <File Include="bin/DBUtility.dll"> <publishTime>11/02/2022 22:02:56</publishTime> @@ -54,34 +54,34 @@ <publishTime>08/18/2023 13:23:18</publishTime> </File> <File Include="bin/Grpc.Core.Api.dll"> - <publishTime>03/22/2022 05:17:26</publishTime> + <publishTime>03/22/2022 13:17:26</publishTime> </File> <File Include="bin/Grpc.Core.Api.pdb"> - <publishTime>03/18/2022 23:39:42</publishTime> + <publishTime>03/19/2022 07:39:42</publishTime> </File> <File Include="bin/Grpc.Core.dll"> - <publishTime>03/22/2022 05:17:20</publishTime> + <publishTime>03/22/2022 13:17:20</publishTime> </File> <File Include="bin/Grpc.Core.pdb"> - <publishTime>03/18/2022 23:39:48</publishTime> + <publishTime>03/19/2022 07:39:48</publishTime> </File> <File Include="bin/grpc_csharp_ext.x64.dll"> - <publishTime>03/22/2022 05:17:22</publishTime> + <publishTime>03/22/2022 13:17:22</publishTime> </File> <File Include="bin/grpc_csharp_ext.x86.dll"> - <publishTime>03/22/2022 05:17:22</publishTime> + <publishTime>03/22/2022 13:17:22</publishTime> </File> <File Include="bin/ICSharpCode.SharpZipLib.dll"> - <publishTime>05/08/2021 17:08:30</publishTime> + <publishTime>05/09/2021 01:08:30</publishTime> </File> <File Include="bin/ICSharpCode.SharpZipLib.pdb"> - <publishTime>05/08/2021 17:08:30</publishTime> + <publishTime>05/09/2021 01:08:30</publishTime> </File> <File Include="bin/Interop.gregn6Lib.dll"> <publishTime>08/25/2021 10:28:25</publishTime> </File> <File Include="bin/Kingdee.BOS.WebApi.Client.dll"> - <publishTime>02/09/2023 20:21:24</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="bin/Kingdee.BOS.WebApi.FormService.dll"> <publishTime>09/20/2018 19:23:20</publishTime> @@ -90,19 +90,19 @@ <publishTime>09/20/2018 19:28:34</publishTime> </File> <File Include="bin/libgrpc_csharp_ext.x64.dylib"> - <publishTime>03/18/2022 23:38:44</publishTime> + <publishTime>03/19/2022 07:38:44</publishTime> </File> <File Include="bin/libgrpc_csharp_ext.x64.so"> - <publishTime>03/18/2022 23:38:42</publishTime> + <publishTime>03/19/2022 07:38:42</publishTime> </File> <File Include="bin/Microsoft.Azure.AppService.ApiApps.Service.dll"> - <publishTime>03/18/2015 17:02:50</publishTime> + <publishTime>03/19/2015 01:02:50</publishTime> </File> <File Include="bin/Microsoft.CSharp.dll"> <publishTime>09/26/2012 03:16:08</publishTime> </File> <File Include="bin/Microsoft.Web.Infrastructure.dll"> - <publishTime>07/25/2012 11:48:56</publishTime> + <publishTime>07/25/2012 19:48:56</publishTime> </File> <File Include="bin/Model.dll"> <publishTime>11/09/2022 16:02:01</publishTime> @@ -115,34 +115,34 @@ <publishTime>08/18/2023 13:23:18</publishTime> </File> <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="bin/Newtonsoft.Json.dll"> - <publishTime>08/03/2014 20:33:56</publishTime> + <publishTime>08/04/2014 04:33:56</publishTime> </File> <File Include="bin/NPOI.dll"> - <publishTime>10/23/2021 01:07:54</publishTime> + <publishTime>10/23/2021 09:07:54</publishTime> </File> <File Include="bin/NPOI.OOXML.dll"> - <publishTime>10/23/2021 01:07:56</publishTime> - </File> - <File Include="bin/NPOI.OOXML.pdb"> <publishTime>10/23/2021 09:07:56</publishTime> </File> + <File Include="bin/NPOI.OOXML.pdb"> + <publishTime>10/23/2021 17:07:56</publishTime> + </File> <File Include="bin/NPOI.OpenXml4Net.dll"> - <publishTime>10/23/2021 01:07:54</publishTime> + <publishTime>10/23/2021 09:07:54</publishTime> </File> <File Include="bin/NPOI.OpenXml4Net.pdb"> - <publishTime>10/23/2021 09:07:54</publishTime> + <publishTime>10/23/2021 17:07:54</publishTime> </File> <File Include="bin/NPOI.OpenXmlFormats.dll"> - <publishTime>10/23/2021 01:07:54</publishTime> + <publishTime>10/23/2021 09:07:54</publishTime> </File> <File Include="bin/NPOI.OpenXmlFormats.pdb"> - <publishTime>10/23/2021 09:07:54</publishTime> + <publishTime>10/23/2021 17:07:54</publishTime> </File> <File Include="bin/NPOI.pdb"> - <publishTime>10/23/2021 09:07:54</publishTime> + <publishTime>10/23/2021 17:07:54</publishTime> </File> <File Include="bin/Pub_Class.dll"> <publishTime>11/09/2022 16:01:56</publishTime> @@ -165,7 +165,7 @@ <publishTime>08/18/2023 13:23:17</publishTime> </File> <File Include="bin/RestSharp.dll"> - <publishTime>08/30/2012 22:22:50</publishTime> + <publishTime>08/31/2012 06:22:50</publishTime> </File> <File Include="bin/SQLHelper.dll"> <publishTime>08/18/2023 13:23:17</publishTime> @@ -179,10 +179,10 @@ <publishTime>05/09/2021 13:35:37</publishTime> </File> <File Include="bin/Swashbuckle.Core.dll"> - <publishTime>02/15/2015 17:57:08</publishTime> + <publishTime>02/16/2015 01:57:08</publishTime> </File> <File Include="bin/System.Buffers.dll"> - <publishTime>07/19/2017 10:01:28</publishTime> + <publishTime>07/19/2017 18:01:28</publishTime> </File> <File Include="bin/System.ComponentModel.DataAnnotations.dll"> <publishTime>09/26/2012 03:16:08</publishTime> @@ -206,19 +206,19 @@ <publishTime>09/26/2012 03:16:08</publishTime> </File> <File Include="bin/System.IdentityModel.Tokens.Jwt.dll"> - <publishTime>08/19/2014 10:03:34</publishTime> + <publishTime>08/19/2014 18:03:34</publishTime> </File> <File Include="bin/System.Memory.dll"> - <publishTime>04/17/2019 16:24:34</publishTime> + <publishTime>04/18/2019 00:24:34</publishTime> </File> <File Include="bin/System.Net.Http.dll"> <publishTime>09/26/2012 03:16:08</publishTime> </File> <File Include="bin/System.Net.Http.Formatting.dll"> - <publishTime>11/28/2018 13:00:36</publishTime> + <publishTime>11/28/2018 21:00:36</publishTime> </File> <File Include="bin/System.Runtime.CompilerServices.Unsafe.dll"> - <publishTime>09/18/2018 19:38:10</publishTime> + <publishTime>09/19/2018 03:38:10</publishTime> </File> <File Include="bin/System.Runtime.Serialization.dll"> <publishTime>09/26/2012 03:16:08</publishTime> @@ -227,7 +227,7 @@ <publishTime>09/26/2012 03:16:08</publishTime> </File> <File Include="bin/System.Web.Cors.dll"> - <publishTime>11/28/2018 12:58:44</publishTime> + <publishTime>11/28/2018 20:58:44</publishTime> </File> <File Include="bin/System.Web.dll"> <publishTime>09/26/2012 03:16:08</publishTime> @@ -242,37 +242,37 @@ <publishTime>09/26/2012 03:16:08</publishTime> </File> <File Include="bin/System.Web.Helpers.dll"> - <publishTime>01/28/2015 04:04:30</publishTime> + <publishTime>01/28/2015 12:04:30</publishTime> </File> <File Include="bin/System.Web.Http.Cors.dll"> - <publishTime>11/28/2018 13:01:26</publishTime> + <publishTime>11/28/2018 21:01:26</publishTime> </File> <File Include="bin/System.Web.Http.dll"> - <publishTime>11/28/2018 13:01:00</publishTime> + <publishTime>11/28/2018 21:01:00</publishTime> </File> <File Include="bin/System.Web.Http.WebHost.dll"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="bin/System.Web.Mvc.dll"> - <publishTime>01/28/2015 04:02:18</publishTime> + <publishTime>01/28/2015 12:02:18</publishTime> </File> <File Include="bin/System.Web.Optimization.dll"> - <publishTime>02/11/2014 15:26:04</publishTime> + <publishTime>02/11/2014 23:26:04</publishTime> </File> <File Include="bin/System.Web.Razor.dll"> - <publishTime>01/28/2015 04:02:32</publishTime> + <publishTime>01/28/2015 12:02:32</publishTime> </File> <File Include="bin/System.Web.Services.dll"> <publishTime>09/26/2012 03:16:08</publishTime> </File> <File Include="bin/System.Web.WebPages.Deployment.dll"> - <publishTime>01/28/2015 04:04:30</publishTime> + <publishTime>01/28/2015 12:04:30</publishTime> </File> <File Include="bin/System.Web.WebPages.dll"> - <publishTime>01/28/2015 04:04:30</publishTime> + <publishTime>01/28/2015 12:04:30</publishTime> </File> <File Include="bin/System.Web.WebPages.Razor.dll"> - <publishTime>01/28/2015 04:04:30</publishTime> + <publishTime>01/28/2015 12:04:30</publishTime> </File> <File Include="bin/System.Xml.dll"> <publishTime>09/26/2012 03:16:08</publishTime> @@ -281,7 +281,7 @@ <publishTime>09/26/2012 03:16:08</publishTime> </File> <File Include="bin/WebActivatorEx.dll"> - <publishTime>11/24/2014 11:18:48</publishTime> + <publishTime>11/24/2014 19:18:48</publishTime> </File> <File Include="bin/WebAPI.dll"> <publishTime>11/14/2022 11:23:59</publishTime> @@ -297,199 +297,199 @@ <publishTime>08/18/2023 13:23:25</publishTime> </File> <File Include="bin/WebGrease.dll"> - <publishTime>07/17/2013 17:03:52</publishTime> + <publishTime>07/18/2013 01:03:52</publishTime> </File> <File Include="bin/zh-Hans/System.Net.Http.Formatting.resources.dll"> - <publishTime>11/29/2018 13:26:02</publishTime> + <publishTime>11/29/2018 21:26:02</publishTime> </File> <File Include="bin/zh-Hans/System.Web.Http.resources.dll"> - <publishTime>11/29/2018 13:26:30</publishTime> + <publishTime>11/29/2018 21:26:30</publishTime> </File> <File Include="Config/kdapi.config"> - <publishTime>08/19/2022 08:17:39</publishTime> + <publishTime>04/06/2023 15:57:01</publishTime> </File> <File Include="Content/bootstrap.css"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:01</publishTime> </File> <File Include="Content/bootstrap.min.css"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:01</publishTime> </File> <File Include="Content/Site.css"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:01</publishTime> </File> <File Include="DLL/BLL.dll"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="DLL/DAL.dll"> - <publishTime>11/01/2021 09:26:33</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="DLL/DBUtility.dll"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="DLL/Kingdee.BOS.WebApi.Client.dll"> - <publishTime>02/09/2023 20:21:24</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="DLL/Model.dll"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="DLL/Newtonsoft.Json.Net35.dll"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="DLL/Pub_Class.dll"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="DLL/Pub_Control.dll"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="DLL/SQLHelper.dll"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="fonts/glyphicons-halflings-regular.eot"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="fonts/glyphicons-halflings-regular.svg"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="fonts/glyphicons-halflings-regular.ttf"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="fonts/glyphicons-halflings-regular.woff"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Global.asax"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="grpc_csharp_ext.x64.dll"> - <publishTime>03/22/2022 05:17:22</publishTime> + <publishTime>03/22/2022 13:17:22</publishTime> </File> <File Include="grpc_csharp_ext.x86.dll"> - <publishTime>03/22/2022 05:17:22</publishTime> + <publishTime>03/22/2022 13:17:22</publishTime> </File> <File Include="Index.html"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="libgrpc_csharp_ext.x64.dylib"> - <publishTime>03/18/2022 23:38:44</publishTime> + <publishTime>03/19/2022 07:38:44</publishTime> </File> <File Include="libgrpc_csharp_ext.x64.so"> - <publishTime>03/18/2022 23:38:42</publishTime> + <publishTime>03/19/2022 07:38:42</publishTime> </File> <File Include="libman.json"> - <publishTime>07/17/2023 13:22:30</publishTime> + <publishTime>07/12/2023 08:14:21</publishTime> </File> <File Include="Metadata/deploymentTemplates/apiappconfig.azureresource.json"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="packages.config"> - <publishTime>11/29/2022 10:36:46</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/bootstrap.js"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/bootstrap.min.js"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/jquery-1.10.2.js"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/jquery-1.10.2.min.js"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/jquery-1.10.2.min.map"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/jquery.validate.js"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/jquery.validate.min.js"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/jquery.validate.unobtrusive.js"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/jquery.validate.unobtrusive.min.js"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Scripts/modernizr-2.6.2.js"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Shared/Error.cshtml"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/Shared/_Layout.cshtml"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/web.config"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Views/_ViewStart.cshtml"> - <publishTime>08/19/2021 09:44:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Customer_Model.datasource"> - <publishTime>06/21/2023 11:15:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Department_Model.datasource"> - <publishTime>06/21/2023 11:15:00</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Employee_Model.datasource"> - <publishTime>06/21/2023 11:15:02</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_StockPlace_Model.datasource"> - <publishTime>06/21/2023 11:15:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Supplier_Model.datasource"> - <publishTime>06/21/2023 11:15:01</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Warehouse_Model.datasource"> - <publishTime>06/21/2023 11:15:00</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_BadReason_Model.datasource"> - <publishTime>06/21/2023 11:15:02</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model.datasource"> - <publishTime>06/21/2023 11:15:06</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model_View.datasource"> - <publishTime>06/21/2023 11:15:06</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Customer_Model.datasource"> - <publishTime>06/21/2023 11:15:04</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Department_Model.datasource"> - <publishTime>06/21/2023 11:15:03</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Employee_Model.datasource"> - <publishTime>06/21/2023 11:15:05</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Group_Model.datasource"> - <publishTime>06/21/2023 11:15:03</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Item30JiTai_Model.datasource"> - <publishTime>06/21/2023 11:15:02</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Source_Model.datasource"> - <publishTime>06/21/2023 11:15:05</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_StockPlace_Model.datasource"> - <publishTime>06/21/2023 11:15:04</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Supplier_Model.datasource"> - <publishTime>06/21/2023 11:15:04</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsGy_Warehouse_Model.datasource"> - <publishTime>06/21/2023 11:15:03</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsKf_ICStockBill_Mould.datasource"> - <publishTime>06/21/2023 11:15:05</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/ClsKf_ICStockBill_WMS.datasource"> - <publishTime>06/21/2023 11:15:00</publishTime> + <publishTime>04/06/2023 15:57:02</publishTime> </File> <File Include="Web References/WebS/Reference.cs"> <publishTime>12/20/2021 13:19:56</publishTime> </File> <File Include="Web References/WebS/Reference.map"> - <publishTime>06/21/2023 11:14:55</publishTime> + <publishTime>04/26/2023 13:39:12</publishTime> </File> <File Include="Web References/WebS/WebService1.disco"> <publishTime>12/20/2021 13:19:56</publishTime> diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj index 9fad71c..ed6fd35 100644 --- a/WebAPI/WebAPI.csproj +++ b/WebAPI/WebAPI.csproj @@ -420,6 +420,7 @@ <Compile Include="Controllers\SBGL\SBTC\Sb_EquipWorkBeforeCheckBillController.cs" /> <Compile Include="Controllers\SBGL\Sb_EquipWorkBeforeCheckSBillController.cs" /> <Compile Include="Controllers\SBGL\Sb_EquipStockInCheckBillSController.cs" /> + <Compile Include="Controllers\SCGL\Gy_SourceWorkStationSetController.cs" /> <Compile Include="Controllers\SCGL\Sc_ComplementGoodBill_ZXBZController.cs" /> <Compile Include="Controllers\SCGL\鏃ヨ鍒掔鐞哱DataHelper.cs" /> <Compile Include="Controllers\SCGL\鏃ヨ鍒掔鐞哱JIT_Cg_PODemandPlanBillController.cs" /> @@ -478,6 +479,8 @@ <Compile Include="Controllers\浠撳瓨绠$悊\棰嗘枡鍙戣揣\Kf_StockOutRequestBillController.cs" /> <Compile Include="Controllers\浠撳瓨绠$悊\楠屾敹鍏ュ簱\Kf_StepFoldinBillController.cs" /> <Compile Include="Controllers\鍗氭棩鑷姩鎵爜绾縗ScanlineAPIController.cs" /> + <Compile Include="Controllers\鍝佽川绠$悊\浜х嚎璐ㄦ骞冲彴\Sc_ICMOBillQualityStatus_TmpController.cs" /> + <Compile Include="Controllers\鍝佽川绠$悊\浜х嚎杩斾慨骞冲彴\Sc_SourceLineRepairBillController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_COMMONCONTACTBillController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_CustLocationController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DutyBillController.cs" /> @@ -487,6 +490,7 @@ <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_MouldStatusController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_OperatorController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_PaymentConditionListBillController.cs" /> + <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_TemporaryAreaController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_RateTypeController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_RecConditionBillController.cs" /> <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_SettleStyleController.cs" /> @@ -688,6 +692,7 @@ <Compile Include="Models\鍩虹璧勬枡\ConkType.cs" /> <Compile Include="Models\鍩虹璧勬枡\Gy_ClassTimePrj.cs" /> <Compile Include="Models\鍩虹璧勬枡\Gy_Duty.cs" /> + <Compile Include="Models\鍩虹璧勬枡\Gy_TemporaryArea.cs" /> <Compile Include="Models\鍩虹璧勬枡\Gy_StockPlace.cs" /> <Compile Include="Models\鍩虹璧勬枡\WorkDay.cs" /> <Compile Include="Models\鍩虹璧勬枡\PackType.cs" /> @@ -966,6 +971,7 @@ <Folder Include="Views\Gy_RoutingGroup\" /> <Folder Include="Views\Gy_SettleStyle\" /> <Folder Include="Views\Gy_SOPBill\" /> + <Folder Include="Views\Gy_SourceWorkStationSet\" /> <Folder Include="Views\Gy_SplitBarCode\" /> <Folder Include="Views\Gy_Staff\" /> <Folder Include="Views\Gy_StdMinPickQty\" /> diff --git a/WebAPI/WebAPI.csproj.user b/WebAPI/WebAPI.csproj.user index e951c6c..6a6fc2c 100644 --- a/WebAPI/WebAPI.csproj.user +++ b/WebAPI/WebAPI.csproj.user @@ -9,7 +9,7 @@ <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected> <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>D:\Git\houduan\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> - <NameOfLastUsedPublishProfile>D:\GIT浠撳簱\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> + <NameOfLastUsedPublishProfile>D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> <UseIISExpress>false</UseIISExpress> <Use64BitIISExpress /> diff --git "a/WorkM/\347\224\237\344\272\247\347\256\241\347\220\206/Sc_ICMOBillList.cs" "b/WorkM/\347\224\237\344\272\247\347\256\241\347\220\206/Sc_ICMOBillList.cs" index 1096f70..b4e527a 100644 --- "a/WorkM/\347\224\237\344\272\247\347\256\241\347\220\206/Sc_ICMOBillList.cs" +++ "b/WorkM/\347\224\237\344\272\247\347\256\241\347\220\206/Sc_ICMOBillList.cs" @@ -699,7 +699,7 @@ oSc_ProcessExchangeBill.BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew; oSc_ProcessExchangeBill.ModCaption = "宸ュ簭娴佽浆鍗�"; - oSc_ProcessExchangeBill.oXT = Ds; + oSc_ProcessExchangeBill.oXT = Ds; //--h_v_S_Sc_ICMOBillList 杩欎釜瑙嗗浘鏉ヨ幏鍙� 宸ヨ壓璺嚎 oSc_ProcessExchangeBill.ShowDialog(); } ///////////////////////////// -- Gitblit v1.9.1