From 62d9db64adb0ae095c0e7e6afdde4bcbb7b2a481 Mon Sep 17 00:00:00 2001 From: ch <37327@LLOOCCY> Date: 星期四, 03 十一月 2022 12:33:24 +0800 Subject: [PATCH] 修改了出站汇报单生成生产汇报单API --- WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user | 34 +++++----- Model/车间管理/ClsSc_ProcessExchangeBillMain.cs | 2 WebAPI/Controllers/Sc_ProcessMangementController.cs | 45 ++++++++++---- WorkM/流转卡管理/MES_StationOutBill.cs | 84 ++++++++++++++++++++++++++++ DAL/车间管理/ClsSc_ProcessExchangeBill.cs | 4 5 files changed, 137 insertions(+), 32 deletions(-) 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 a875d61..eab9620 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" @@ -294,7 +294,7 @@ ",HProdMaterName,HCusName,HWorkRemark,HImportNote,HMaterNumber_A" + ",HMaterNumber_B,HMaterNumber_C,HMaterNumber_D,HProdType,HMaterShortName" + ",HMaterIDA,HMaterIDB,HMaterIDC,HMaterIDD,HICMOEntryID" + - ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HPRDORGID,HBLFlag,HCusNumber,HPickLabel,HPickLabelNumber,HWorkBillSortNo" + + ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HPRDORGID,HBLFlag,HCusNumber,HPickLabel,HPickLabelNumber,HXTNumber,HXTModel,HWorkBillSortNo" + ") " + " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()," + "" + (omodel.HPrevMainSourceInterID == 0 ? omodel.HInterID : omodel.HPrevMainSourceInterID) + "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HBatchNo + "'," + omodel.HMainMaterID.ToString() + "," + omodel.HKeyMaterID.ToString() + "," + omodel.HNo.ToString() + ",'" + omodel.HOrderProcNO + "'" + @@ -306,7 +306,7 @@ ",'" + omodel.HProdMaterName + "','" + omodel.HCusName + "','" + omodel.HWorkRemark + "','" + omodel.HImportNote + "','" + omodel.HMaterNumber_A + "'" + ",'" + omodel.HMaterNumber_B + "','" + omodel.HMaterNumber_C + "','" + omodel.HMaterNumber_D + "','" + omodel.HProdType + "','" + omodel.HMaterShortName + "'" + ",'" + omodel.HMaterIDA + "','" + omodel.HMaterIDB + "','" + omodel.HMaterIDC + "','" + omodel.HMaterIDD + "'," + omodel.HICMOEntryID + - ",'" + omodel.HPicNumVer + "','" + omodel.HPicNumAssemble + "','" + omodel.HMaterTexture + "','" + omodel.HProductNum + "','" + omodel.HVerNum + "','"+ omodel.HPRDORGID+ "','"+omodel.HBLFlag+ "','" + omodel.HCusNumber + "','" + omodel.HPickLabel + "','" + omodel.HPickLabelNumber + "','" + omodel.HWorkBillSortNo + + ",'" + omodel.HPicNumVer + "','" + omodel.HPicNumAssemble + "','" + omodel.HMaterTexture + "','" + omodel.HProductNum + "','" + omodel.HVerNum + "','"+ omodel.HPRDORGID+ "','"+omodel.HBLFlag+ "','" + omodel.HCusNumber + "','" + omodel.HPickLabel + "','" + omodel.HPickLabelNumber + "','" + omodel.HXTNumber + "','" + omodel.HXTModel + "','" + omodel.HWorkBillSortNo + "') "); sErr = sErr + "1;"; //鎻掑叆瀛愯〃 diff --git "a/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillMain.cs" "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillMain.cs" index ffc552f..8811c67 100644 --- "a/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillMain.cs" +++ "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillMain.cs" @@ -70,5 +70,7 @@ public string HCusNumber; public string HPickLabel; public string HPickLabelNumber; + public string HXTNumber; + public string HXTModel; } } diff --git a/WebAPI/Controllers/Sc_ProcessMangementController.cs b/WebAPI/Controllers/Sc_ProcessMangementController.cs index 13389e1..9226e60 100644 --- a/WebAPI/Controllers/Sc_ProcessMangementController.cs +++ b/WebAPI/Controllers/Sc_ProcessMangementController.cs @@ -256,6 +256,7 @@ FentityModel.Add("FBomId", new JObject() { ["Fnumber"] = dr1["FBOMNUM"].ToString() }); //BOM鐗堟湰锛欶BomId(蹇呭~椤�) 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() }); //鍖呰鏍囪瘑 FentityModel.Add("FLot", new JObject() { ["FNumber"] = dr1["FBATCHNO"].ToString() }); //鎵瑰彿 FentityModel.Add("F_bsv_Text", dr1["宸ュ簭娴佽浆鍗″彿"].ToString()); //娴佽浆鍗″彿 @@ -472,20 +473,38 @@ FentityModel.Add("FKeeperTypeId", "BD_KeeperOrg"); FentityModel.Add("FKeeperId", new JObject() { ["FNumber"] = item["HPrdOrgNumber"].ToString() });// FentityModel.Add("FIsOverLegalOrg", "false");// - //鎵瑰彿 - //FFLOWID FFLOWLINEID FRULEID FSTABLENAME - //f6e6eec3 - 5267 - 4f02 - 8593 - b633da508a72 3 PRD_MO2MORPT T_PRD_MOENTRY - //涓氬姟娴佺▼鍥撅細FEntity_Link_FFlowId - //鎺ㄨ繘璺嚎锛欶Entity_Link_FFlowLineId - //杞崲瑙勫垯锛欶Entity_Link_FRuleId - //婧愬崟琛ㄥ唴鐮侊細FEntity_Link_FSTableId - //婧愬崟琛細FEntity_Link_FSTableName - //婧愬崟鍐呯爜锛欶Entity_Link_FSBillId - //婧愬崟鍒嗗綍鍐呯爜锛欶Entity_Link_FSId - //鍘熷鎼哄甫閲忥細FEntity_Link_FBaseQuaQtyOld - //淇敼鎼哄甫閲忥細FEntity_Link_FBaseQuaQty + //鎵瑰彿 + //FFLOWID FFLOWLINEID FRULEID FSTABLENAME + //f6e6eec3 - 5267 - 4f02 - 8593 - b633da508a72 3 PRD_MO2MORPT T_PRD_MOENTRY + //涓氬姟娴佺▼鍥撅細FEntity_Link_FFlowId + //鎺ㄨ繘璺嚎锛欶Entity_Link_FFlowLineId + //杞崲瑙勫垯锛欶Entity_Link_FRuleId + //婧愬崟琛ㄥ唴鐮侊細FEntity_Link_FSTableId + //婧愬崟琛細FEntity_Link_FSTableName + //婧愬崟鍐呯爜锛欶Entity_Link_FSBillId + //婧愬崟鍒嗗綍鍐呯爜锛欶Entity_Link_FSId + //鍘熷鎼哄甫閲忥細FEntity_Link_FBaseQuaQtyOld + //淇敼鎼哄甫閲忥細FEntity_Link_FBaseQuaQty - + + + JArray Fentity2 = new JArray(); + JObject FentityModel2 = new JObject(); + FentityModel2.Add("FEntity_Link_FFlowId", "f6e6eec3-5267-4f02-8593-b633da508a72"); + FentityModel2.Add("FEntity_Link_FFlowLineId", "5"); + FentityModel2.Add("FEntity_Link_FRuleId", "PRD_MORPT2INSTOCK"); + FentityModel2.Add("FEntity_Link_FSTableName", "T_PRD_MORPTENTRY"); + FentityModel2.Add("FEntity_Link_FSTableId", "0"); + FentityModel2.Add("FEntity_Link_FSBillId", item["HSourceInterID"].ToString()); + FentityModel2.Add("FEntity_Link_FSId", item["HSourceEntryID"].ToString()); + FentityModel2.Add("FEntity_Link_FBasePrdRealQtyOld", item["鍏宠仈鏁伴噺"].ToString()); + FentityModel2.Add("FEntity_Link_FBasePrdRealQty", item["鏁伴噺"].ToString()); + Fentity2.Add(FentityModel2); + FentityModel.Add("FEntity_Link", Fentity2); + FentityModel.Add("FBFLowId", new JObject() { ["FID"] = "f6e6eec3-5267-4f02-8593-b633da508a72" }); // + Fentity.Add(FentityModel); + + Fentity.Add(FentityModel); } model.Add("FEntity", Fentity); //鏄庣粏淇℃伅 diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user index 33378cc..273cd73 100644 --- a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -18,28 +18,28 @@ <publishTime>02/22/2013 16:43:40</publishTime> </File> <File Include="bin/BLL.dll"> - <publishTime>10/26/2022 15:47:08</publishTime> + <publishTime>11/02/2022 22:03:01</publishTime> </File> <File Include="bin/BLL.pdb"> - <publishTime>10/26/2022 15:47:08</publishTime> + <publishTime>11/02/2022 22:03:01</publishTime> </File> <File Include="bin/BouncyCastle.Crypto.dll"> <publishTime>12/18/2020 05:32:28</publishTime> </File> <File Include="bin/DAL.dll"> - <publishTime>10/26/2022 15:47:06</publishTime> + <publishTime>11/02/2022 22:02:58</publishTime> </File> <File Include="bin/DAL.pdb"> - <publishTime>10/26/2022 15:47:06</publishTime> + <publishTime>11/02/2022 22:02:58</publishTime> </File> <File Include="bin/Dapper.dll"> <publishTime>07/22/2016 22:52:40</publishTime> </File> <File Include="bin/DBUtility.dll"> - <publishTime>10/26/2022 15:47:04</publishTime> + <publishTime>11/02/2022 22:02:56</publishTime> </File> <File Include="bin/DBUtility.pdb"> - <publishTime>10/26/2022 15:47:04</publishTime> + <publishTime>11/02/2022 22:02:56</publishTime> </File> <File Include="bin/Grpc.Core.Api.dll"> <publishTime>03/22/2022 13:17:26</publishTime> @@ -93,10 +93,10 @@ <publishTime>07/25/2012 19:48:56</publishTime> </File> <File Include="bin/Model.dll"> - <publishTime>10/26/2022 15:47:05</publishTime> + <publishTime>11/02/2022 22:02:56</publishTime> </File> <File Include="bin/Model.pdb"> - <publishTime>10/26/2022 15:47:05</publishTime> + <publishTime>11/02/2022 22:02:56</publishTime> </File> <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs"> <publishTime>03/15/2022 10:06:42</publishTime> @@ -129,22 +129,22 @@ <publishTime>10/23/2021 17:07:54</publishTime> </File> <File Include="bin/Pub_Class.dll"> - <publishTime>10/26/2022 15:47:03</publishTime> + <publishTime>11/02/2022 22:02:54</publishTime> </File> <File Include="bin/Pub_Class.pdb"> - <publishTime>10/26/2022 15:47:03</publishTime> + <publishTime>11/02/2022 22:02:54</publishTime> </File> <File Include="bin/Pub_Control.dll"> - <publishTime>10/26/2022 15:47:04</publishTime> + <publishTime>11/02/2022 22:02:55</publishTime> </File> <File Include="bin/Pub_Control.pdb"> - <publishTime>10/26/2022 15:47:04</publishTime> + <publishTime>11/02/2022 22:02:55</publishTime> </File> <File Include="bin/SQLHelper.dll"> - <publishTime>10/26/2022 15:47:04</publishTime> + <publishTime>11/02/2022 22:02:55</publishTime> </File> <File Include="bin/SQLHelper.pdb"> - <publishTime>10/26/2022 15:47:04</publishTime> + <publishTime>11/02/2022 22:02:55</publishTime> </File> <File Include="bin/stdole.dll"> <publishTime>05/09/2021 13:35:37</publishTime> @@ -255,13 +255,13 @@ <publishTime>11/24/2014 19:18:48</publishTime> </File> <File Include="bin/WebAPI.dll"> - <publishTime>10/26/2022 15:47:11</publishTime> + <publishTime>11/02/2022 22:03:04</publishTime> </File> <File Include="bin/WebAPI.dll.config"> <publishTime>12/15/2021 17:59:43</publishTime> </File> <File Include="bin/WebAPI.pdb"> - <publishTime>10/26/2022 15:47:11</publishTime> + <publishTime>11/02/2022 22:03:04</publishTime> </File> <File Include="bin/WebGrease.dll"> <publishTime>07/18/2013 01:03:52</publishTime> @@ -459,7 +459,7 @@ <publishTime>12/20/2021 13:19:56</publishTime> </File> <File Include="Web.config"> - <publishTime>10/26/2022 15:47:24</publishTime> + <publishTime>11/02/2022 22:03:20</publishTime> </File> </ItemGroup> </Project> \ No newline at end of file diff --git "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationOutBill.cs" "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationOutBill.cs" index 1a351f6..53f7bc5 100644 --- "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationOutBill.cs" +++ "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/MES_StationOutBill.cs" @@ -566,6 +566,90 @@ } + + if (DBUtility.ClsPub.isStrNull(txtHMaterID.Text) == "3.01.0211" && DBUtility.ClsPub.isStrNull(txtHProcID.Text) == "鎴愬搧妫�楠�") + { + string HMXH = ""; + string HZM = ""; + string HZM2 = ""; + string HZM3 = ""; + HMXH = DBUtility.ClsPub.isStrNull(txtHMouldNum.Text); + HZM = HMXH.Substring(0, 1); + HZM2 = HMXH.Substring(2, 1); + HZM3 = HMXH.Substring(3, 1); + if (HZM != "0") + { + MessageBox.Show("妯$┐鍙烽敊璇涓�浣嶈閲嶆柊杈撳叆0"); + return false; + } + if (HZM2 != "0") + { + MessageBox.Show("妯$┐鍙烽敊璇涓変綅璇烽噸鏂拌緭鍏�0"); + return false; + } + if (HZM3 != "0") + { + MessageBox.Show("妯$┐鍙烽敊璇鍥涗綅璇烽噸鏂拌緭鍏�0"); + return false; + } + } + + if (DBUtility.ClsPub.isStrNull(txtHMaterID.Text) == "3.01.0266" && DBUtility.ClsPub.isStrNull(txtHProcID.Text) == "鎴愬搧妫�楠�") + { + string HMXH = ""; + string HZM = ""; + string HZM2 = ""; + string HZM3 = ""; + HMXH = DBUtility.ClsPub.isStrNull(txtHMouldNum.Text); + HZM = HMXH.Substring(0, 1); + HZM2 = HMXH.Substring(2, 1); + HZM3 = HMXH.Substring(3, 1); + if (HZM != "0") + { + MessageBox.Show("妯$┐鍙烽敊璇涓�浣嶈閲嶆柊杈撳叆0"); + return false; + } + if (HZM2 != "0") + { + MessageBox.Show("妯$┐鍙烽敊璇涓変綅璇烽噸鏂拌緭鍏�0"); + return false; + } + if (HZM3 != "0") + { + MessageBox.Show("妯$┐鍙烽敊璇鍥涗綅璇烽噸鏂拌緭鍏�0"); + return false; + } + } + + + if (DBUtility.ClsPub.isStrNull(txtHMaterID.Text) == "3.01.0267" && DBUtility.ClsPub.isStrNull(txtHProcID.Text) == "鎴愬搧妫�楠�") + { + string HMXH = ""; + string HZM = ""; + string HZM2 = ""; + string HZM3 = ""; + HMXH = DBUtility.ClsPub.isStrNull(txtHMouldNum.Text); + HZM = HMXH.Substring(0, 1); + HZM2 = HMXH.Substring(2, 1); + HZM3 = HMXH.Substring(3, 1); + if (HZM != "0") + { + MessageBox.Show("妯$┐鍙烽敊璇涓�浣嶈閲嶆柊杈撳叆0"); + return false; + } + if (HZM2 != "0") + { + MessageBox.Show("妯$┐鍙烽敊璇涓変綅璇烽噸鏂拌緭鍏�0"); + return false; + } + if (HZM3 != "0") + { + MessageBox.Show("妯$┐鍙烽敊璇鍥涗綅璇烽噸鏂拌緭鍏�0"); + return false; + } + } + + //蹇呰緭椤圭洰鏄惁涓虹┖ if (DBUtility.ClsPub.isLong(lngBillKey) <= 0) -- Gitblit v1.9.1