From 1f08ee8a30b5b1db536150fb5f9ccb815e64719e Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 11 十二月 2025 16:48:48 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
Model/基础资料/基础资料/ClsCg_ContractTransportBillMain.cs | 22
WebAPI/Properties/PublishProfiles/FolderProfile8.pubxml.user | 18
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 267 ++++++++++-
WebAPI/WebAPI.csproj.user | 6
Model/Model.csproj | 6
Model/基础资料/基础资料/ClsCg_ContractTransportBillSub.cs | 27 +
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 227 ++++++++-
WebAPI/Controllers/WebAPIController.cs | 2
WebAPI/ListModels.cs | 25 +
WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs | 2
WebAPI/Models/Gy_Mould.cs | 11
DAL/基础资料/公用基础资料/ClsCg_ContractTransportBillList.cs | 332 ++++++++++++++
DAL/DAL.csproj | 3
WebAPI/WebAPI.csproj | 2
WebAPI/Controllers/Cg_ContractTransportBillListController.cs | 386 ++++++++++++++++
15 files changed, 1,239 insertions(+), 97 deletions(-)
diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj
index 8dc9de5..425a405 100644
--- a/DAL/DAL.csproj
+++ b/DAL/DAL.csproj
@@ -85,6 +85,7 @@
<Compile Include="浠撳簱绠$悊\灏忚溅閿佸畾\ClsKf_TrolleyPositionBill.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_Driver_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_Car_Ctl_2.cs" />
+ <Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsCg_ContractTransportBillList.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_PatrolCheckItemMethod_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_PatrolCheckItemClass_Ctl.cs" />
<Compile Include="鍩虹璧勬枡\鍏敤鍩虹璧勬枡\ClsGy_MaintainClass_Ctl.cs" />
@@ -113,7 +114,7 @@
<Compile Include="鐢熶骇绠$悊\鎺掍骇閿佸畾鐢宠鍗昞ClsJIT_LockRequestBill.cs" />
<Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldOutRequestBill.cs" />
<Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldInRequestBill.cs" />
- <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsGy_QCVerificationBillMain.cs" />
+ <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsGy_QCVerificationBillMain.cs" />
<Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldMoveStockRequestBill.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipPatrolCheckPlanBill.cs" />
<Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipPatrolCheckBill.cs" />
diff --git "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsCg_ContractTransportBillList.cs" "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsCg_ContractTransportBillList.cs"
new file mode 100644
index 0000000..4e2de6c
--- /dev/null
+++ "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/ClsCg_ContractTransportBillList.cs"
@@ -0,0 +1,332 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+ public class ClsCg_ContractTransportBillList : DBUtility.ClsXt_BaseBill
+ {
+ public Model.ClsCg_ContractTransportBillMain omodel = new Model.ClsCg_ContractTransportBillMain();
+ public List<Model.ClsCg_ContractTransportBillSub> DetailColl = new List<Model.ClsCg_ContractTransportBillSub>();
+
+ public ClsCg_ContractTransportBillList()
+ {
+ base.MvarItemKeySub = "Cg_ContractTransportBillSub";
+ base.MvarItemKeySub2 = "";
+ base.MvarItemKeySub3 = "";
+ base.MvarItemKeySub4 = "";
+ base.MvarItemKey= "Cg_ContractTransportBillMain";
+ base.MvarReportTitle="鎵胯繍鍚堝悓";
+ base.BillType = "1117";
+ base.HBillSubType = "1117";
+
+ }
+
+ #region 鍥哄畾浠g爜
+
+ ~ClsCg_ContractTransportBillList()
+ {
+ DetailColl = null;
+ }
+
+ #endregion 鑷畾涔夋柟娉�
+ //淇敼鍗曟嵁
+ public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+
+ oCn.BeginTran();
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ DataSet ds = oCn.RunProcReturn("Exec h_p_Cg_ContractTransportBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',2 ", "h_p_Cg_ContractTransportBill_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.RunProc("UpDate Cg_ContractTransportBillMain set " +
+ " HBillNo='" + omodel.HBillNo + "'" +
+ ",HYear='" + omodel.HYear.ToString() + "'" +
+ ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+ //",HRemark='" + omodel.HRemark + "'" +
+ ",HUpDater='" + omodel.HMaker + "'" +
+ ",HUpDateDate=getdate()" +
+ //========================================
+
+ ",HContractDate ='" + omodel.HContractDate.ToString() +"',"+ "HSupID = "+ omodel.HSupID.ToString()+","+ "HContractNumber='"+ omodel.HContractNumber.ToString()+"',"+ "HContractName='"+ omodel.HContractName.ToString() + "',"+
+ "HAddress='"+ omodel.HAddress.ToString() + "',"+ "HSSID="+ omodel.HSSID.ToString() + "," + "HCurID=" + omodel.HCurID.ToString() + "," + "HEmpID=" + omodel.HEmpID.ToString() + "," + "HDeptID=" + omodel.HDeptID.ToString() + ""+
+ // ",HExplanation ='" + omodel.HExplanation.ToString() +"'"+ ",HInnerBillNo ='" + omodel.HInnerBillNo.ToString() + "'"+
+
+ " where HInterID=" + lngBillKey.ToString());
+ //鍒犻櫎鍏宠仈
+ DeleteRelation(ref sReturn, lngBillKey);
+ //鍒犻櫎瀛愯〃
+ DeleteBillSub(lngBillKey);
+ //鎻掑叆瀛愯〃
+ omodel.HInterID = lngBillKey;
+ foreach (Model.ClsCg_ContractTransportBillSub oSub in DetailColl)
+ {
+ string subSql = "insert into Cg_ContractTransportBillSub " +
+ "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
+ ",HTransportLineName,HBeginAddr,HEndAddr,HTransportCar,HDistance,HTransportTimes ,HTransportTyep ,HMoney ,HMoney_His) " +
+ " values(" +
+ "" + omodel.HInterID.ToString() +
+ "," + oSub.HEntryID.ToString() +
+ "," + oSub.HSourceInterID +
+ "," + oSub.HSourceEntryID +
+ ",'" + (oSub.HSourceBillNo??"a") +
+ "','" + (oSub.HSourceBillType??"a") +
+ "','" + (oSub.HTransportLineName ?? "") +
+ "','" + (oSub.HBeginAddr ) +
+ "','" + (oSub.HEndAddr ) +
+ "','" + (oSub.HTransportCar) +
+ "','" + (oSub.HDistance ?? "") +
+ "','" + (oSub.HTransportTimes ?? "") +
+ "','" + (oSub.HTransportTyep ?? "") +
+ "','" + (oSub.HMoney??"") +
+ "','" + (oSub.HMoney_His??"") +
+ "')";
+ oCn.RunProc(subSql);
+ }
+ //=========================淇濆瓨鍚庢帶鍒�
+ DataSet ds2 = oCn.RunProcReturn("Exec h_p_Cg_ContractTransportBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Cg_ContractTransportBill_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;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+ //鏂板鍗曟嵁
+ public override bool AddBill(ref string sReturn)
+ {
+ try
+ {
+
+ DataSet ds;
+
+ oCn.BeginTran();
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ ds = oCn.RunProcReturn("Exec h_p_Cg_ContractTransportBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Cg_ContractTransportBill_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;
+ }
+ //=========================================================
+
+
+ //妫�鏌ヤ富琛ㄥ唴鐮佹槸鍚﹂噸澶嶏紝鑻ラ噸澶嶅垯閲嶆柊鐢熸垚骞剁户缁鏌ワ紝鐩村埌涓嶅啀閲嶅
+ while (true)
+ {
+ ds = oCn.RunProcReturn("select * from Cg_ContractTransportBillMain where HInterID = " + omodel.HInterID, "Cg_ContractTransportBillMain");
+ if (ds != null && ds.Tables[0].Rows.Count > 0)
+ {
+ omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ //涓昏〃
+ string mainSql = "insert into Cg_ContractTransportBillMain" +
+ "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate,HBillNo,HRemark,HMaker,HMakeDate" +
+ ",HContractDate,HSupID,HContractNumber,HContractName,HAddress,HSSID,HCurID,HEmpID,HDeptID,HExplanation,HInnerBillNo) " +
+ "values(" +
+ "" + (omodel.HYear.ToString() != "0" ? omodel.HYear.ToString() : DateTime.Now.Year.ToString()) +
+ "," + omodel.HPeriod.ToString() +
+ ",'" + this.BillType +
+ "','" + this.HBillSubType +
+ "'," + omodel.HInterID +
+ ",'" + omodel.HDate +
+ "','" + omodel.HBillNo +
+ "','" + omodel.HRemark +
+ "','" + omodel.HMaker +
+ "','" + omodel.HMakeDate +
+ "','" + omodel.HContractDate +
+ "','" + omodel.HSupID +
+ "','" + omodel.HContractNumber +
+ "','" + omodel.HContractName +
+ "','" + omodel.HAddress +
+ "','" + omodel.HSSID +
+ "','" + omodel.HCurID +
+ "','" + omodel.HEmpID +
+ "','" + omodel.HDeptID +
+ "','" + omodel.HExplanation +
+ "','" + omodel.HInnerBillNo +
+ "')";
+
+ oCn.RunProc(mainSql);
+
+ //鎻掑叆瀛愯〃
+ foreach (Model.ClsCg_ContractTransportBillSub oSub in DetailColl)
+ {
+ string subSql = "insert into Cg_ContractTransportBillSub " +
+ "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRemark" +
+ ",HTransportLineName,HBeginAddr,HEndAddr,HTransportCar,HDistance,HTransportTimes,HTransportTyep,HMoney,HMoney_His) " +
+ " values(" +
+ "" + omodel.HInterID.ToString() +
+ "," + oSub.HEntryID.ToString() +
+ "," + oSub.HSourceInterID +
+ "," + oSub.HSourceEntryID +
+ ",'" + oSub.HSourceBillNo +
+ "','" + oSub.HSourceBillType +
+ "','" + oSub.HRemark +
+ "','" + oSub.HTransportLineName +
+ "','" + oSub.HBeginAddr +
+ "','" + oSub.HEndAddr +
+ "','" + oSub.HTransportCar +
+ "','" + oSub.HDistance +
+ "','" + oSub.HTransportTimes +
+ "','" + oSub.HTransportTyep +
+ "','" + oSub.HMoney +
+ "','" + oSub.HMoney_His +
+ "')";
+ oCn.RunProc(subSql);
+ }
+
+ //=========================淇濆瓨鍚庢帶鍒�
+ DataSet ds2 = oCn.RunProcReturn("Exec h_p_Cg_ContractTransportBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Cg_ContractTransportBill_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;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+ ////鏄剧ず鍗曟嵁
+ //public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
+ //{
+ // try
+ // {
+ // //鏌ヨ涓昏〃
+ // DataSet Ds ;
+ // Ds = oCn.RunProcReturn("Select * from Gy_MaterPreventErrMouldBillMain Where HInterID=" + lngBillKey.ToString(), "Gy_MaterPreventErrMouldBillMain");
+ // if(Ds.Tables[0].Rows.Count==0)
+ // {
+ // sReturn = "鍗曟嵁鏈壘鍒帮紒";
+ // return false;
+ // }
+ // //鍥哄畾璧嬪��===========================================
+ // omodel.HInterID =DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+ // omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+ // omodel.HDate =DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+ // omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+ // omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+ // omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
+ // omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
+ // omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
+ // omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
+ // omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+ // omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+ // omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+ // omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
+ // omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
+ // omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
+ // omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
+ // omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
+ // omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
+ // omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
+ // omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
+ // omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+ // omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+ // omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+ // omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+ // //========================================================
+
+ // //
+
+ // //寰幆
+ // DataSet DsSub ;
+ // DsSub = oCn.RunProcReturn("Select * from Gy_MaterPreventErrMouldBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "Sc_WorkBeginDotCheckBillSub");
+ // DetailColl.Clear();//娓呯┖
+ // for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+ // {
+ // Model.ClsGy_MaterPreventErrMouldBillSub oSub = new Model.ClsGy_MaterPreventErrMouldBillSub();
+ // // 鍥哄畾璧嬪��===============================================
+ // oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
+ // oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
+ // oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
+ // oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
+ // oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
+ // oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
+ // oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
+ // oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
+ // oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
+ // oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
+ // oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
+ // oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+ // //===================================================
+
+ // DetailColl.Add(oSub);
+ // }
+ // sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ // return true;
+ // }
+ // catch (Exception e)
+ // {
+ // sReturn = e.Message;
+ // throw (e);
+ // }
+ //}
+
+
+ }
+
+}
diff --git a/Model/Model.csproj b/Model/Model.csproj
index dce765d..7521616 100644
--- a/Model/Model.csproj
+++ b/Model/Model.csproj
@@ -103,11 +103,13 @@
<Compile Include="浠撳簱绠$悊\ClsKf_TrolleyPositionBillSub.cs" />
<Compile Include="鍩虹璧勬枡\鍏朵粬鍩虹璧勬枡\ClsGy_PurPrice_Model.cs" />
<Compile Include="鍩虹璧勬枡\鍏朵粬鍩虹璧勬枡\ClsGy_MatePrice_Model.cs" />
+ <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsCg_ContractTransportBillSub.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_AssistantData.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_AssistantDataEntry.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_Car_Model_2.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_Driver_Model.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_DiscountList.cs" />
+ <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsCg_ContractTransportBillMain.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_OperatorGroup.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsSc_PackUnionBillBarCode_temp_Model.cs" />
<Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_PatrolCheckItemClass_Model.cs" />
@@ -184,8 +186,8 @@
<Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldOutRequestBillSub.cs" />
<Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldOutRequestBillMain.cs" />
<Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldMaintainPlanBillSub_Plan.cs" />
- <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsGy_QCVerificationBillMain.cs" />
- <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsGy_QCVerificationBillSub.cs" />
+ <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsGy_QCVerificationBillMain.cs" />
+ <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsGy_QCVerificationBillSub.cs" />
<Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldInRequestBillMain.cs" />
<Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldMoveStockRequestBillMain.cs" />
<Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldInRequestBillSub.cs" />
diff --git "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsCg_ContractTransportBillMain.cs" "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsCg_ContractTransportBillMain.cs"
new file mode 100644
index 0000000..21fce2a
--- /dev/null
+++ "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsCg_ContractTransportBillMain.cs"
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsCg_ContractTransportBillMain : DBUtility.ClsXt_BaseBillMain
+ {
+
+ public string HContractDate;
+ public int HSupID;
+ public string HContractNumber;
+ public string HContractName;
+ public string HAddress;
+ public int HSSID;
+ public int HCurID;
+ public int HEmpID;
+ public int HDeptID;
+ public string HExplanation;
+ public string HInnerBillNo;
+ }
+}
diff --git "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsCg_ContractTransportBillSub.cs" "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsCg_ContractTransportBillSub.cs"
new file mode 100644
index 0000000..79af6d8
--- /dev/null
+++ "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsCg_ContractTransportBillSub.cs"
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsCg_ContractTransportBillSub : DBUtility.ClsXt_BaseBillMain
+ {
+
+ public string HTransportLineName;
+ public int HEntryID;
+ public int HSourceInterID;
+ public int HSourceEntryID;
+ public string HSourceBillNo;
+ public string HSourceBillType;
+ public long HBeginAddr;
+ public long HEndAddr;
+ public long HTransportCar;
+ public string HDistance;
+ public string HTransportTimes;
+ public string HTransportTyep;
+ public string HMoney;
+ public string HMoney_His;
+
+
+ }
+}
diff --git a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
index 2843114..a5177dd 100644
--- a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
@@ -14614,7 +14614,7 @@
try
{
//瀹℃牳鏉冮檺
- if (!DBUtility.ClsPub.Security_Log_second("Gy_ProjectMoney_Close", 1, false, CurUserName))
+ if (!DBUtility.ClsPub.Security_Log_second("Gy_ItemMoney_Close", 1, false, CurUserName))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index 6461537..f6d5708 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -2584,11 +2584,8 @@
}
}
#endregion
- /// <summary>
- /// 鏂板妯″叿妗f-淇濆瓨鎸夐挳
- ///鍙傛暟锛歴tring sql銆�
- ///杩斿洖鍊硷細object銆�
- /// </summary>
+
+ #region[鍣ㄥ叿妗f淇濆瓨涓庝慨鏀逛繚瀛樻柟娉昡
[Route("Gy_Mould_Edit/AddBill")]
[HttpPost]
public object AddBill([FromBody] JObject oMain)
@@ -2702,6 +2699,16 @@
int HMouldHeight = mainList[0].HMouldHeight; //楂�
int HMouldFoldHeight = mainList[0].HMouldFoldHeight; //鎶樺彔楂樺害
+ int HUserID = mainList[0].HUserID; // 浣跨敤浜猴紙Gy_Employee锛�
+ string HBrand = mainList[0].HBrand; // 鍝佺墝
+ string HCalibrationType = mainList[0].HCalibrationType; // 鏍″噯绫诲瀷 (鍐�/澶栨牎)
+ string HLocation = mainList[0].HLocation; // 浣嶇疆
+ DateTime HCalibrationDate = mainList[0].HCalibrationDate; // 鏍″噯鏃ユ湡
+ string HCalibrationCycle = mainList[0].HCalibrationCycle; // 鏍″噯鍛ㄦ湡
+ string HProductDesignSize = mainList[0].HProductDesignSize; // 浜у搧璁捐灏哄
+ string HGaugeDesignSize = mainList[0].HGaugeDesignSize; // 妫�鍏疯璁″昂瀵�
+ int HProductQTY = mainList[0].HProductQTY; // 浜у搧鏁伴噺
+
//淇濆瓨鍓嶆帶鍒�=========================================
string HBillNote = "";
ds = oCN.RunProcReturn("Exec h_p_Gy_MouldFileMain_BeforeSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "','" + HBillNote + "',1 ", "h_p_Gy_MouldFileMain_BeforeSaveCtrl");
@@ -2737,19 +2744,21 @@
",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife,HNowSupID,HNowSupTypeID" +
",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID,HBarCode,HMadeSupID" +
",HMouldClass,HNowWHID,HNowSPID,HInitLife,HMouldUseStatus,HCREATEORGID,HUSEORGID " +
- ",HMouldLength,HMouldWidth,HMouldHeight,HMouldFoldHeight,HTransPackFlag,HSendPackFlag ) " +
+ ",HMouldLength,HMouldWidth,HMouldHeight,HMouldFoldHeight,HTransPackFlag,HSendPackFlag," +
+ "HUserID,HBrand,HCalibrationType,HLocation,HCalibrationDate,HCalibrationCycle,HProductDesignSize,HGaugeDesignSize,HProductQTY ) " +
" values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
- "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" +
- ",'" + HMouldNo + "','" + HName + "','" + HModel + "','" + HModel2 + "','" + HDiameter + "'" +
- ",'" + HSubjoin + "','" + HSubjoin2 + "','" + HPICNo + "','" + HWorkMaterModel + "'" +
- "," + HMaterID + ",'" + HMaterNumber + "'," + HMouleTypeID + "," + HUnitID +
- ",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" +
- "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID + "," + HCaveQty +
- "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID + "','" + HNowSupTypeID + "'" +
- ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID + "','" + HMouldMaintainRuleInterID + "','" + HBarCode + "'," + HMadeSupID +
- ",'" + HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + "','" + HMouldUseStatus + "'," + HCREATEORGID + "," + HUSEORGID +
- "," + HMouldLength + "," + HMouldWidth + "," + HMouldHeight + "," + HMouldFoldHeight + "," + Convert.ToString(HTransPackFlag ? 1 : 0) + "," + Convert.ToString(HSendPackFlag ? 1 : 0) + ") ");
+ "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" +
+ ",'" + HMouldNo + "','" + HName + "','" + HModel + "','" + HModel2 + "','" + HDiameter + "'" +
+ ",'" + HSubjoin + "','" + HSubjoin2 + "','" + HPICNo + "','" + HWorkMaterModel + "'" +
+ "," + HMaterID + ",'" + HMaterNumber + "'," + HMouleTypeID + "," + HUnitID +
+ ",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" +
+ "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID + "," + HCaveQty +
+ "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID + "','" + HNowSupTypeID + "'" +
+ ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID + "','" + HMouldMaintainRuleInterID + "','" + HBarCode + "'," + HMadeSupID +
+ ",'" + HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + "','" + HMouldUseStatus + "'," + HCREATEORGID + "," + HUSEORGID +
+ "," + HMouldLength + "," + HMouldWidth + "," + HMouldHeight + "," + HMouldFoldHeight + "," + Convert.ToString(HTransPackFlag ? 1 : 0) + "," + Convert.ToString(HSendPackFlag ? 1 : 0) + "," +
+ "'" + HUserID + "','" + HBrand + "','" + HCalibrationType + "','" + HLocation + "','" + HCalibrationDate + "','" + HCalibrationCycle + "','" + HProductDesignSize + "','" + HGaugeDesignSize + "','" + HProductQTY + "') ");
//瀛愯〃
oCN.RunProc("Insert into Gy_MouldFileSub " +
@@ -2796,6 +2805,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
+ objJsonResult.HInterID = HInterID.ToString();
objJsonResult.Message = null;
objJsonResult.data = null;
return objJsonResult;
@@ -2811,12 +2821,6 @@
}
}
-
- /// <summary>
- /// 淇敼鍗曟嵁-淇濆瓨鎸夐挳
- ///鍙傛暟锛歴tring sql銆�
- ///杩斿洖鍊硷細object銆�
- /// </summary>
[Route("Gy_Mould_Edit/AddBill1")]
[HttpPost]
public object AddBill1([FromBody] JObject oMain)
@@ -2908,6 +2912,18 @@
int HMouldWidth = mainList[0].HMouldWidth; //瀹�
int HMouldHeight = mainList[0].HMouldHeight; //楂�
int HMouldFoldHeight = mainList[0].HMouldFoldHeight; //鎶樺彔楂樺害
+
+
+ int HUserID = mainList[0].HUserID; // 浣跨敤浜猴紙Gy_Employee锛�
+ string HBrand = mainList[0].HBrand; // 鍝佺墝
+ string HCalibrationType = mainList[0].HCalibrationType; // 鏍″噯绫诲瀷 (鍐�/澶栨牎)
+ string HLocation = mainList[0].HLocation; // 浣嶇疆
+ DateTime HCalibrationDate = mainList[0].HCalibrationDate; // 鏍″噯鏃ユ湡
+ string HCalibrationCycle = mainList[0].HCalibrationCycle; // 鏍″噯鍛ㄦ湡
+ string HProductDesignSize = mainList[0].HProductDesignSize; // 浜у搧璁捐灏哄
+ string HGaugeDesignSize = mainList[0].HGaugeDesignSize; // 妫�鍏疯璁″昂瀵�
+ int HProductQTY = mainList[0].HProductQTY; // 浜у搧鏁伴噺
+
//鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
oCN.BeginTran();
@@ -2996,12 +3012,16 @@
",HInitLife='" + HInitLife +
"',HNextMainDate='" + HNextMainDate +
"',HMouldUseStatus='" + HMouldUseStatus +
- "' where HInterID=" + HInterID.ToString());
-
- //淇敼瀛愰」鐩唬鐮�
- //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Department,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
- //灏嗕笂绾� 涓洪潪鏈骇
- // oCN.RunProc("Update Gy_Department set HEndflag=0 where HItemID=" + HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ "',HUserID='" + HUserID +
+ "',HBrand='" + HBrand +
+ "',HCalibrationType='" + HCalibrationType +
+ "',HLocation='" + HLocation +
+ "',HCalibrationDate='" + HCalibrationDate +
+ "',HCalibrationCycle='" + HCalibrationCycle +
+ "',HProductDesignSize='" + HProductDesignSize +
+ "',HGaugeDesignSize='" + HGaugeDesignSize +
+ "',HProductQTY='" + HProductQTY +
+ "' where HInterID=" + HInterID.ToString());
oCN.RunProc("delete from Gy_MouldFileSub_SubMater where HInterID='" + HInterID + "'");
oCN.RunProc("delete from Gy_MouldFileSub_MaintainRule where HInterID='" + HInterID + "'");
@@ -3035,7 +3055,7 @@
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "淇敼鍗曟嵁鎴愬姛锛�";
- //objJsonResult.data = null;
+ objJsonResult.HInterID = HInterID.ToString();
return objJsonResult;
}
catch (Exception e)
@@ -3130,11 +3150,9 @@
return objJsonResult;
}
- /// <summary>
- /// 纾ㄥ叿妗f淇敼鎸夐挳鏂规硶-璁$畻涓嬫淇濆吇/鏍℃鏃ユ湡-鑾峰彇妗f鏈�杩戜竴娆$殑淇濆吇璁板綍
- ///鍙傛暟锛歴tring sql銆�
- ///杩斿洖鍊硷細object銆�
- /// </summary>
+ #endregion
+
+ #region [妯″叿妗f淇敼鎸夐挳鏂规硶-璁$畻涓嬫淇濆吇/鏍℃鏃ユ湡-鑾峰彇妗f鏈�杩戜竴娆$殑淇濆吇璁板綍]
[Route("Gy_Mould_Edit/calculateHNextMainDate")]
[HttpGet]
public object calculateHNextMainDate(long HInterID)
@@ -3164,6 +3182,8 @@
return objJsonResult;
}
}
+ #endregion
+
/// <summary>
/// 纾ㄥ叿妗f淇敼鎸夐挳鏂规硶
@@ -4896,6 +4916,185 @@
#endregion
#endregion
+ #region 鍣ㄥ叿妗f 鏂囦欢涓婁紶
+ [Route("Gy_MouldFileBIllMain/UploadFile_Gy_MouldFilen")]
+ [HttpPost]
+ public object UploadFile_Gy_MouldFilen()
+ {
+
+ string HBillNo = HttpContext.Current.Request.Params["HBillNo"]; //鍗曟嵁鍙�
+ string HRemark = HttpContext.Current.Request.Params["HRemark"]; //澶囨敞
+ string HUserName = HttpContext.Current.Request.Params["HUserName"]; //鍒涘缓浜�
+ HttpPostedFile files = HttpContext.Current.Request.Files["file"];
+ string path = HttpContext.Current.Server.MapPath("~/../Files/Gy_MouldFilen/" + HBillNo);
+ dynamic dyResult = UploadFile_Gy_MouldFilen(files, path, HBillNo, HRemark, HUserName);
+ if (dyResult != null && dyResult.result == 1)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "涓婁紶鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = dyResult.returnval;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+
+ public dynamic UploadFile_Gy_MouldFilen(HttpPostedFile files, string path, string HBillNo, string HRemark, string HUserName)
+ {
+ dynamic Result_Ob = new { result = 1, returnval = "涓婁紶鎴愬姛锛�" };
+ string filePath = Path.GetFullPath(files.FileName);//鏂囦欢涓婁紶璺緞
+ string fileExtension = Path.GetExtension(files.FileName);// 鏂囦欢鎵╁睍鍚�
+ string filename = files.FileName;//鏂囦欢鍚�
+ string fileSavePath = path;// 涓婁紶淇濆瓨璺緞
+ int filesize = files.ContentLength;//鑾峰彇涓婁紶鏂囦欢鐨勫ぇ灏忓崟浣嶄负瀛楄妭byte
+ int Maxsize = 40000 * 1024;//瀹氫箟涓婁紶鏂囦欢鐨勬渶澶х┖闂村ぇ灏忎负40M
+ try
+ {
+ if (files == null || files.ContentLength <= 0)
+ {
+ Result_Ob = new { result = 0, returnval = "鏂囦欢涓嶈兘涓虹┖!" };
+ return Result_Ob;
+ }
+ if (filesize >= Maxsize)
+ {
+ Result_Ob = new { result = 0, returnval = "涓婁紶鏂囦欢瓒呰繃40M锛屼笉鑳戒笂浼狅紒" };
+ return Result_Ob;
+ }
+
+ string fileurl = Path.Combine(fileSavePath, filename);
+ if (Directory.Exists(fileurl) == true) //濡傛灉瀛樺湪閲嶅悕鏂囦欢灏辨彁绀�
+ {
+ Result_Ob = new { result = 0, returnval = "瀛樺湪鍚屽悕鏂囦欢锛�" };
+ return Result_Ob;
+ }
+ //鍒犻櫎鏁版嵁琛ㄦ暟鎹�
+ ds = oCN.RunProcReturn("delete from MES_AccessoriesList where HSourceBillNo ='" + HBillNo + "' and HFileName='" + filename + "'", "MES_AccessoriesList");
+ if (Directory.Exists(path))
+ {
+ File.Delete(fileurl); //鍒犻櫎鎸囧畾鏂囦欢
+ files.SaveAs(fileurl);
+ string StrPath = "/files/Gy_MouldFilen/" + HBillNo + "/" + filename;
+ if (File.Exists(fileurl))
+ {
+ //杩欓噷鍙互鎵ц涓�浜涘叾瀹冪殑鎿嶄綔锛屾瘮濡傛洿鏂版暟鎹簱
+ //鍐欏叆鏁版嵁琛�
+ oCN.RunProc("Insert into MES_AccessoriesList (HFileName,HFilePath,HFilePath_Cus,HFileType" +
+ ",HLoadMan,HLoadDate,HRemark,HVerNum,HFileSize" +
+ ",HFileClsID,HSourceBillNo" +
+ ") values('"
+ + filename.ToString() + "','" + StrPath.ToString() + "','" + filePath.ToString() + "','" + fileExtension.ToString() + "'" +
+ ",'" + HUserName + "',getdate(),'" + HRemark + "','V1','" + filesize +
+ "','" + 0 + "','" + HBillNo +
+ "') ");
+ }
+ else
+ {
+ Result_Ob = new { result = 0, returnval = "涓婁紶澶辫触锛佹鏂囦欢涓烘伓鎰忔枃浠�" };
+ }
+ }
+ else
+ {
+ Directory.CreateDirectory(fileSavePath); //娣诲姞鏂囦欢澶�
+ files.SaveAs(fileurl);
+ string StrPath = "/files/Gy_MouldFilen/" + HBillNo + "/" + filename;
+ if (File.Exists(fileurl))
+ {
+ //杩欓噷鍙互鎵ц涓�浜涘叾瀹冪殑鎿嶄綔锛屾瘮濡傛洿鏂版暟鎹簱
+ //鍐欏叆鏁版嵁琛�
+ oCN.RunProc("Insert into MES_AccessoriesList (HFileName,HFilePath,HFilePath_Cus,HFileType" +
+ ",HLoadMan,HLoadDate,HRemark,HVerNum,HFileSize" +
+ ",HFileClsID,HSourceBillNo" +
+ ") values('"
+ + filename.ToString() + "','" + StrPath.ToString() + "','" + filePath.ToString() + "','" + fileExtension.ToString() + "'" +
+ ",'" + HUserName + "',getdate(),'" + HRemark + "','V1','" + filesize +
+ "','" + 0 + "','" + HBillNo +
+ "') ");
+ }
+ else
+ {
+ Result_Ob = new { result = 0, returnval = "涓婁紶澶辫触锛佹鏂囦欢涓烘伓鎰忔枃浠�" };
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ Result_Ob = new { result = 0, returnval = e.Message };
+ }
+ return Result_Ob;
+ }
+
+ /// <summary>
+ /// 鏍规嵁鍗曟嵁鍙锋煡鎵句笂浼犳枃浠跺垪琛�
+ /// </summary>
+ /// <param name="sWhere"></param>
+ /// <returns></returns>
+ [Route("Gy_MouldFileBIllMain/Gy_MouldFilen_Filelist")]
+ [HttpGet]
+ public object Gy_MouldFilen_Filelist(string HBillNo)
+ {
+ var url = fileip + "/Files/Gy_MouldFilen/" + HBillNo + "/";
+
+ try
+ {
+ ds = oCN.RunProcReturn("select *,'" + url + "'+CAST(HFileName as varchar(200))as url from MES_AccessoriesList where HSourceBillNo='" + HBillNo + "'", "MES_AccessoriesList");
+ 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;
+ }
+ }
+
+ /// <summary>
+ /// 鏍规嵁ID,鍗曟嵁鍙�,鏂囦欢鍚� 鍒犻櫎鏂囦欢
+ /// </summary>
+ /// <param name="sWhere"></param>
+ /// <returns></returns>
+ [Route("Gy_MouldFileBIllMain/Gy_MouldFilen_DeleteFilelist")]
+ [HttpGet]
+ public object Gy_MouldFilen_DeleteFilelist(string HItemID, string HSourceBillNo, string HFileName)
+ {
+ try
+ {
+
+ oCN.RunProc("delete from MES_AccessoriesList where HItemID =" + HItemID);
+ string fileurl = Path.Combine(HttpContext.Current.Server.MapPath("~/../Files/Gy_MouldFilen/" + HSourceBillNo), HFileName);
+ File.Delete(fileurl); //鍒犻櫎鎸囧畾鏂囦欢
+ 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.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
//鏍规嵁鏉$爜鎵剧墿鏂欎俊鎭�
[Route("Gy_Material/findMaterialByNumber")]
diff --git a/WebAPI/Controllers/Cg_ContractTransportBillListController.cs b/WebAPI/Controllers/Cg_ContractTransportBillListController.cs
new file mode 100644
index 0000000..90f972d
--- /dev/null
+++ b/WebAPI/Controllers/Cg_ContractTransportBillListController.cs
@@ -0,0 +1,386 @@
+锘縰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;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
+using System.IO;
+using SyntacticSugar.constant;
+namespace WebAPI.Controllers
+{
+ public class Cg_ContractTransportBillListController : ApiController
+ {
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;//鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛�
+ private json objJsonResult = new json();
+ public DataSet ds = new DataSet();
+ public DataSet ds1 = new DataSet();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ public DAL.ClsCg_ContractTransportBillList OBill = new DAL.ClsCg_ContractTransportBillList();
+ public DAL.ClsCg_ContractTransportBillList BillOld = new DAL.ClsCg_ContractTransportBillList();
+
+ #region 鍚堝悓鍒楄〃
+ [Route("Cg_ContractTransportBillListController/get锘縇ist")]
+ [HttpGet]
+ public object get锘縇ist(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Cg_ContractTransportBill_Check", 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_Cg_ContractTransportBillList order by 鍗曟嵁鍙� desc", "锘縣_v_Cg_ContractTransportBillList");
+ }
+ else
+ {
+ string sql1 = "select * from h_v_Cg_ContractTransportBillList where 1 = 1 ";
+ string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc";
+ ds = oCN.RunProcReturn(sql, "锘縣_v_Cg_ContractTransportBillList");
+ }
+
+ //娣诲姞鍒楀悕
+ 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("Cg_ContractTransportBillListController/Delete锘緽ill")]
+ [HttpGet]
+ public object Delete(string HInterID, string user)
+ {
+ try
+ {
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Cg_ContractTransportBill_Delete", 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;
+ }
+
+ oCN.BeginTran();
+
+ //鍒ゆ柇瀛樺湪鎬�
+ if (BillOld.ShowBill(Int64.Parse(HInterID), ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ //鍒犻櫎鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_Cg_ContractTransportBill_BeforeDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Cg_ContractTransportBill_BeforeDelCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:鍒犻櫎鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //==================================================================================
+
+ //鍒犻櫎鍗曟嵁锛堝寘鍚垹闄ゅ悗鎺у埗銆佸啓鍏ユ棩蹇楋級
+ if (!BillOld.DeleteBill(BillOld.omodel.HInterID, BillOld.omodel.HBillNo, "h_p_Cg_ContractTransportBill_AfterDelCtrl", user, ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+
+ 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 鑾峰彇缂栬緫鍒楄〃鏁版嵁
+ [Route("Cg_ContractTransportBillListController/锘縀ditList")]
+ [HttpGet]
+ public object EditList(string HInterID, string User)
+ {
+ try
+ {
+ List<DataTable> tableList = new List<DataTable>();
+
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Cg_ContractTransportBill_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;
+ }
+
+ ds = oCN.RunProcReturn("select * from h_v_Cg_ContractTransportBillList where HInterID = " + HInterID, " h_v_Cg_ContractTransportBillList");
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鏌ヨ鎴愬姛锛�";
+ 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 淇濆瓨/缂栬緫
+ [Route("Cg_ContractTransportBillListController/Save锘緾g_ContractTransportBillList")]
+ [HttpPost]
+ public object Save锘緾g_ContractTransportBillList([FromBody] JObject sMainSub)
+ {
+ var _value = sMainSub["sMainSub"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string msg3 = sArray[1].ToString();
+ string refSav = sArray[2].ToString();//鎿嶄綔鏂瑰紡鏁版嵁绫诲瀷 1娣诲姞 3淇敼 2 澶嶅埗
+ string user = sArray[3].ToString();//鐢ㄦ埛鍚�
+
+ string UserName = "";
+ string s = "";
+ ListModels oListModels = new ListModels();
+ try
+ {
+ //淇濆瓨鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Cg_ContractTransportBill_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ DAL.ClsCg_ContractTransportBillList oBill = new DAL.ClsCg_ContractTransportBillList();
+ List<Model.ClsCg_ContractTransportBillMain> lsmain = new List<Model.ClsCg_ContractTransportBillMain>();
+ msg2 = msg2.Replace("\\", "");
+ msg2 = msg2.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_ContractTransportBillMain(msg2);
+ foreach (Model.ClsCg_ContractTransportBillMain oItem in lsmain)
+ {
+ if (refSav == "Add")
+ {
+ //鍗曟嵁鍙锋槸鍚﹂噸澶�
+ if (OBill.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, OBill.omodel.HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鍙烽噸澶嶏紒涓嶅厑璁镐繚瀛橈紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ if (refSav == "Update")
+ {
+ if (OBill.ShowBill(oItem.HInterID, ref s) == false)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹湁璇紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //鍒ゆ柇鏄惁鍙紪杈�
+ if (OBill.omodel.HChecker != "" && OBill.omodel.HChecker != null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽淇敼锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (OBill.omodel.HBillStatus > 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹浜庝笉鍙紪杈戠姸鎬侊紝涓嶅厑璁镐慨鏀癸紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+
+ }
+ UserName = oItem.HMaker; //鍒跺崟浜�
+ oItem.HBillType = "1117";
+ oItem.HBillSubType = "1117";
+
+
+
+ oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+ oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
+
+ if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佹病鏈夊崟鎹棩鏈燂紝鏃犳硶淇濆瓨锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ oBill.omodel = oItem;
+ }
+ // 琛ㄤ綋鏁版嵁
+ //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+ msg3 = msg3.Substring(1, msg3.Length - 2);
+ msg3 = msg3.Replace("\\", "");
+ msg3 = msg3.Replace("\n", ""); //\n
+ List<Model.ClsCg_ContractTransportBillSub> ls = new List<Model.ClsCg_ContractTransportBillSub>();
+ ls = oListModels.getObjectByJson_Cg_ContractTransportBillSub(msg3);
+ int i = 0;
+ foreach (Model.ClsCg_ContractTransportBillSub oItemSub in ls)
+ {
+ i++;
+ oItemSub.HEntryID = i;
+
+
+ //oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+ oItemSub.HCloseType = false; //鍏抽棴绫诲瀷
+
+ oBill.DetailColl.Add(oItemSub);
+
+ }
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (refSav == "Add")
+ {
+
+ bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ else if (refSav == "Update")
+ {
+ bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ else
+ {
+ bResult = false;
+ }
+ if (bResult)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index fbd8580..871fe78 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -14768,7 +14768,7 @@
#endregion
#region 鍣ㄥ叿淇濆吇璁板綍鎷嶇収涓婁紶
- [Route("Sc_MouldMaintainBill/UploadFile")]
+ [Route("Sc_MouldMaintainBill/UploadFile_Maintain")]
[HttpPost]
public object UploadFile_Maintain()
{
@@ -15523,56 +15523,20 @@
}
#endregion
-
- #region[缂栬緫鏃惰幏鍙栬〃澶存暟鎹甝
- [Route("Gy_QCVerificationBillMain/Gy_QCVerificationBillMainCheckDetai")]
+ #region[缂栬緫鏃惰幏鍙栨暟鎹甝
+ [Route("Gy_QCVerificationBillMain/Gy_QCVerificationBillDetail")]
[HttpGet]
- public ApiResult<DataSet> Gy_QCVerificationBillMainCheckDetai(string HID)
+ public ApiResult<DataSet> Gy_QCVerificationBillDetail(string HID)
{
if (string.IsNullOrEmpty(HID))
return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_QCVerificationBillMain_Edit where hmainid= " + HID + " ", "h_v_Gy_QCVerificationBillMain");
+ var dataSet = oCN.RunProcReturn("select * from h_v_Gy_QCVerificationBillMain_Edit where hmainid= " + HID + " ", "h_v_Gy_QCVerificationBillMain_Edit");
if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄥ崟鍙�" };
return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
}
- #endregion
-
- #region[缂栬緫鏃惰幏鍙栬〃浣撴暟鎹甝
- [Route("Gy_QCVerificationBillMain/SGy_QCVerificationBillMainListProjectDetai")]
- [HttpGet]
- public object SGy_QCVerificationBillMainListProjectDetai(string sqlWhere)
- {
- DataSet ds;
- List<object> list = new List<object>();
- try
- {
- SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
-
- string sql = "select HInspectInstruMentID,妫�楠屼华鍣ㄤ唬鐮� HInspectInstruMentNumber,妫�楠屼华鍣ㄥ悕绉� HInspectInstruMentName,鐢熸晥鏃ユ湡 HBeginDate,澶辨晥鏃ユ湡 HEndDate,鏍″噯鐘舵�� HHCalibrationStatus from h_v_Gy_QCVerificationBillMain_Edit where 1 = 1 " + sqlWhere;
- ds = oCN.RunProcReturn(sql, "h_v_Gy_QCVerificationBillMain_Edit");
-
- list.Add(ds.Tables[0]);
-
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = null;
- objJsonResult.list = list;
-
- }
- catch (Exception e)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
- objJsonResult.data = null;
- }
- return objJsonResult;
- }
- #endregion
-
+ #endregion
#region 鍣ㄥ叿鏍″噯璁板綍鍗� 淇濆瓨/缂栬緫
@@ -15683,6 +15647,185 @@
}
}
#endregion
+
+ #region 鍣ㄥ叿鏍″噯璁板綍 鏂囦欢涓婁紶
+ [Route("Gy_QCVerificationBillMain/UploadFile_Gy_QCVerification")]
+ [HttpPost]
+ public object UploadFile_Gy_QCVerification()
+ {
+
+ string HBillNo = HttpContext.Current.Request.Params["HBillNo"]; //鍗曟嵁鍙�
+ string HRemark = HttpContext.Current.Request.Params["HRemark"]; //澶囨敞
+ string HUserName = HttpContext.Current.Request.Params["HUserName"]; //鍒涘缓浜�
+ HttpPostedFile files = HttpContext.Current.Request.Files["file"];
+ string path = HttpContext.Current.Server.MapPath("~/../Files/Gy_QCVerification/" + HBillNo);
+ dynamic dyResult = UploadFile_Gy_QCVerification(files, path, HBillNo, HRemark, HUserName);
+ if (dyResult != null && dyResult.result == 1)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "涓婁紶鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = dyResult.returnval;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+
+ public dynamic UploadFile_Gy_QCVerification(HttpPostedFile files, string path, string HBillNo, string HRemark, string HUserName)
+ {
+ dynamic Result_Ob = new { result = 1, returnval = "涓婁紶鎴愬姛锛�" };
+ string filePath = Path.GetFullPath(files.FileName);//鏂囦欢涓婁紶璺緞
+ string fileExtension = Path.GetExtension(files.FileName);// 鏂囦欢鎵╁睍鍚�
+ string filename = files.FileName;//鏂囦欢鍚�
+ string fileSavePath = path;// 涓婁紶淇濆瓨璺緞
+ int filesize = files.ContentLength;//鑾峰彇涓婁紶鏂囦欢鐨勫ぇ灏忓崟浣嶄负瀛楄妭byte
+ int Maxsize = 40000 * 1024;//瀹氫箟涓婁紶鏂囦欢鐨勬渶澶х┖闂村ぇ灏忎负40M
+ try
+ {
+ if (files == null || files.ContentLength <= 0)
+ {
+ Result_Ob = new { result = 0, returnval = "鏂囦欢涓嶈兘涓虹┖!" };
+ return Result_Ob;
+ }
+ if (filesize >= Maxsize)
+ {
+ Result_Ob = new { result = 0, returnval = "涓婁紶鏂囦欢瓒呰繃40M锛屼笉鑳戒笂浼狅紒" };
+ return Result_Ob;
+ }
+
+ string fileurl = Path.Combine(fileSavePath, filename);
+ if (Directory.Exists(fileurl) == true) //濡傛灉瀛樺湪閲嶅悕鏂囦欢灏辨彁绀�
+ {
+ Result_Ob = new { result = 0, returnval = "瀛樺湪鍚屽悕鏂囦欢锛�" };
+ return Result_Ob;
+ }
+ //鍒犻櫎鏁版嵁琛ㄦ暟鎹�
+ ds = oCN.RunProcReturn("delete from MES_AccessoriesList where HSourceBillNo ='" + HBillNo + "' and HFileName='" + filename + "'", "MES_AccessoriesList");
+ if (Directory.Exists(path))
+ {
+ File.Delete(fileurl); //鍒犻櫎鎸囧畾鏂囦欢
+ files.SaveAs(fileurl);
+ string StrPath = "/files/Gy_QCVerification/" + HBillNo + "/" + filename;
+ if (File.Exists(fileurl))
+ {
+ //杩欓噷鍙互鎵ц涓�浜涘叾瀹冪殑鎿嶄綔锛屾瘮濡傛洿鏂版暟鎹簱
+ //鍐欏叆鏁版嵁琛�
+ oCN.RunProc("Insert into MES_AccessoriesList (HFileName,HFilePath,HFilePath_Cus,HFileType" +
+ ",HLoadMan,HLoadDate,HRemark,HVerNum,HFileSize" +
+ ",HFileClsID,HSourceBillNo" +
+ ") values('"
+ + filename.ToString() + "','" + StrPath.ToString() + "','" + filePath.ToString() + "','" + fileExtension.ToString() + "'" +
+ ",'" + HUserName + "',getdate(),'" + HRemark + "','V1','" + filesize +
+ "','" + 0 + "','" + HBillNo +
+ "') ");
+ }
+ else
+ {
+ Result_Ob = new { result = 0, returnval = "涓婁紶澶辫触锛佹鏂囦欢涓烘伓鎰忔枃浠�" };
+ }
+ }
+ else
+ {
+ Directory.CreateDirectory(fileSavePath); //娣诲姞鏂囦欢澶�
+ files.SaveAs(fileurl);
+ string StrPath = "/files/Gy_QCVerification/" + HBillNo + "/" + filename;
+ if (File.Exists(fileurl))
+ {
+ //杩欓噷鍙互鎵ц涓�浜涘叾瀹冪殑鎿嶄綔锛屾瘮濡傛洿鏂版暟鎹簱
+ //鍐欏叆鏁版嵁琛�
+ oCN.RunProc("Insert into MES_AccessoriesList (HFileName,HFilePath,HFilePath_Cus,HFileType" +
+ ",HLoadMan,HLoadDate,HRemark,HVerNum,HFileSize" +
+ ",HFileClsID,HSourceBillNo" +
+ ") values('"
+ + filename.ToString() + "','" + StrPath.ToString() + "','" + filePath.ToString() + "','" + fileExtension.ToString() + "'" +
+ ",'" + HUserName + "',getdate(),'" + HRemark + "','V1','" + filesize +
+ "','" + 0 + "','" + HBillNo +
+ "') ");
+ }
+ else
+ {
+ Result_Ob = new { result = 0, returnval = "涓婁紶澶辫触锛佹鏂囦欢涓烘伓鎰忔枃浠�" };
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ Result_Ob = new { result = 0, returnval = e.Message };
+ }
+ return Result_Ob;
+ }
+
+ /// <summary>
+ /// 鏍规嵁鍗曟嵁鍙锋煡鎵句笂浼犳枃浠跺垪琛�
+ /// </summary>
+ /// <param name="sWhere"></param>
+ /// <returns></returns>
+ [Route("Gy_QCVerificationBillMain/Gy_QCVerification_Filelist")]
+ [HttpGet]
+ public object Gy_QCVerification_Filelist(string HBillNo)
+ {
+ var url = fileip + "/Files/Gy_QCVerification/" + HBillNo + "/";
+
+ try
+ {
+ ds = oCN.RunProcReturn("select *,'" + url + "'+CAST(HFileName as varchar(200))as url from MES_AccessoriesList where HSourceBillNo='" + HBillNo + "'", "MES_AccessoriesList");
+ 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;
+ }
+ }
+
+ /// <summary>
+ /// 鏍规嵁ID,鍗曟嵁鍙�,鏂囦欢鍚� 鍒犻櫎鏂囦欢
+ /// </summary>
+ /// <param name="sWhere"></param>
+ /// <returns></returns>
+ [Route("Gy_QCVerificationBillMain/Gy_QCVerification_DeleteFilelist")]
+ [HttpGet]
+ public object Gy_QCVerification_DeleteFilelist(string HItemID, string HSourceBillNo, string HFileName)
+ {
+ try
+ {
+
+ oCN.RunProc("delete from MES_AccessoriesList where HItemID =" + HItemID);
+ string fileurl = Path.Combine(HttpContext.Current.Server.MapPath("~/../Files/Gy_QCVerification/" + HSourceBillNo), HFileName);
+ File.Delete(fileurl); //鍒犻櫎鎸囧畾鏂囦欢
+ 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.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
#endregion
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index ce1f827..c590ab1 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -22415,7 +22415,7 @@
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- ds = oCN.RunProcReturn("Select * from Xt_BillType where HNumber = '" + HModuleType + "'", "Xt_BillType");
+ ds = oCN.RunProcReturn("Select * from Xt_BillType with(nolock) where HNumber = '" + HModuleType + "'", "Xt_BillType");
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs
index df007fb..ddfa10a 100644
--- a/WebAPI/ListModels.cs
+++ b/WebAPI/ListModels.cs
@@ -3432,9 +3432,30 @@
List<Model.ClsGy_MaterPreventErrMouldBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_MaterPreventErrMouldBillMain>>(jsonString);
return list;
}
-
-
/// <summary>
+ /// 澶勭悊鎵胯繍鍚堝悓娓呭崟涓昏〃鐨刯son
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsCg_ContractTransportBillMain> getObjectByJson_ContractTransportBillMain(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsCg_ContractTransportBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsCg_ContractTransportBillMain>>(jsonString);
+ return list;
+ }
+ /// <summary>ClsCg_ContractTransportBillSub
+ /// 澶勭悊鏂板鎵胯繍鍚堝悓瀛愯〃鐨刯son
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsCg_ContractTransportBillSub> getObjectByJson_Cg_ContractTransportBillSub(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsCg_ContractTransportBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsCg_ContractTransportBillSub>>(jsonString);
+ return list;
+ }
+
+ /// <summary>ClsCg_ContractTransportBillSub
/// 澶勭悊鏂板浜у搧鐘敊楠岃瘉娓呭崟瀛愯〃鐨刯son
/// </summary>
/// <param name="jsonString"></param>
diff --git a/WebAPI/Models/Gy_Mould.cs b/WebAPI/Models/Gy_Mould.cs
index 689bca4..2897b2e 100644
--- a/WebAPI/Models/Gy_Mould.cs
+++ b/WebAPI/Models/Gy_Mould.cs
@@ -80,5 +80,16 @@
public string HMouldUseStatus { get; set; }
public DateTime HNextMainDate { get; set; }
+
+ public int HUserID { get; set; } // 浣跨敤浜猴紙Gy_Employee锛�
+ public string HBrand { get; set; } // 鍝佺墝
+ public string HCalibrationType { get; set; } // 鏍″噯绫诲瀷 (鍐�/澶栨牎)
+ public string HLocation { get; set; } // 浣嶇疆
+ public DateTime HCalibrationDate { get; set; } // 鏍″噯鏃ユ湡
+ public string HCalibrationCycle { get; set; } // 鏍″噯鍛ㄦ湡
+ public string HProductDesignSize { get; set; } // 浜у搧璁捐灏哄
+ public string HGaugeDesignSize { get; set; } // 妫�鍏疯璁″昂瀵�
+ public int HProductQTY { get; set; } // 浜у搧鏁伴噺
+
}
}
\ No newline at end of file
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile8.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile8.pubxml.user
index 2ad2c3b..018a239 100644
--- a/WebAPI/Properties/PublishProfiles/FolderProfile8.pubxml.user
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile8.pubxml.user
@@ -5,7 +5,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_PublishTargetUrl>D:\缃戠珯鍙戝竷\鏅轰簯MESWMS\API</_PublishTargetUrl>
- <History>True|2025-12-04T01:53:53.3381625Z;False|2025-12-04T09:51:54.1953606+08:00;True|2025-12-03T20:17:43.6822978+08:00;False|2025-12-03T20:17:13.6794411+08:00;True|2025-12-03T20:04:33.7080472+08:00;False|2025-12-03T20:03:18.9092172+08:00;True|2025-12-03T17:55:36.8190814+08:00;True|2025-12-03T17:31:16.1192761+08:00;False|2025-12-03T17:25:01.3978650+08:00;True|2025-12-03T17:12:24.4237446+08:00;True|2025-12-03T16:54:15.1801517+08:00;False|2025-12-03T16:53:42.7976484+08:00;True|2025-12-03T12:26:32.8151086+08:00;True|2025-12-03T10:22:12.3177261+08:00;False|2025-12-03T10:21:38.7919750+08:00;True|2025-12-03T10:18:00.9077028+08:00;True|2025-12-03T10:02:30.4022692+08:00;False|2025-12-03T09:58:15.6880929+08:00;True|2025-12-02T20:20:19.5577161+08:00;True|2025-12-02T19:59:44.5694165+08:00;True|2025-12-02T18:53:53.4696294+08:00;True|2025-12-02T12:31:02.0786003+08:00;False|2025-12-02T12:30:35.5116200+08:00;True|2025-12-02T09:16:07.2877709+08:00;True|2025-02-12T14:57:08.1380239+08:00;True|2025-02-12T14:47:58.0901509+08:00;True|2025-02-12T14:15:10.5288654+08:00;True|2025-02-12T14:12:22.5382196+08:00;True|2025-02-12T14:07:11.7831540+08:00;True|2024-11-29T13:29:48.1554947+08:00;</History>
+ <History>True|2025-12-09T04:04:27.5887901Z;False|2025-12-09T12:02:37.2146599+08:00;True|2025-12-08T14:20:26.4878391+08:00;True|2025-12-08T12:37:30.4953352+08:00;True|2025-12-08T11:42:08.8772270+08:00;True|2025-12-08T11:38:52.8463177+08:00;True|2025-12-08T10:04:02.0917227+08:00;False|2025-12-08T10:03:46.8962836+08:00;True|2025-12-08T10:00:15.0547300+08:00;False|2025-12-08T09:58:28.7217278+08:00;True|2025-12-08T09:32:28.1251567+08:00;True|2025-12-08T09:29:41.3856966+08:00;False|2025-12-08T09:27:36.8951905+08:00;True|2025-12-05T16:39:06.2892731+08:00;True|2025-12-05T15:48:40.9542261+08:00;True|2025-12-05T14:08:26.7097242+08:00;False|2025-12-05T14:08:07.6105127+08:00;True|2025-12-05T12:59:40.2026457+08:00;True|2025-12-05T10:35:19.2246561+08:00;False|2025-12-05T10:32:23.4813105+08:00;True|2025-12-04T09:53:53.3381625+08:00;False|2025-12-04T09:51:54.1953606+08:00;True|2025-12-03T20:17:43.6822978+08:00;False|2025-12-03T20:17:13.6794411+08:00;True|2025-12-03T20:04:33.7080472+08:00;False|2025-12-03T20:03:18.9092172+08:00;True|2025-12-03T17:55:36.8190814+08:00;True|2025-12-03T17:31:16.1192761+08:00;False|2025-12-03T17:25:01.3978650+08:00;True|2025-12-03T17:12:24.4237446+08:00;True|2025-12-03T16:54:15.1801517+08:00;False|2025-12-03T16:53:42.7976484+08:00;True|2025-12-03T12:26:32.8151086+08:00;True|2025-12-03T10:22:12.3177261+08:00;False|2025-12-03T10:21:38.7919750+08:00;True|2025-12-03T10:18:00.9077028+08:00;True|2025-12-03T10:02:30.4022692+08:00;False|2025-12-03T09:58:15.6880929+08:00;True|2025-12-02T20:20:19.5577161+08:00;True|2025-12-02T19:59:44.5694165+08:00;True|2025-12-02T18:53:53.4696294+08:00;True|2025-12-02T12:31:02.0786003+08:00;False|2025-12-02T12:30:35.5116200+08:00;True|2025-12-02T09:16:07.2877709+08:00;True|2025-02-12T14:57:08.1380239+08:00;True|2025-02-12T14:47:58.0901509+08:00;True|2025-02-12T14:15:10.5288654+08:00;True|2025-02-12T14:12:22.5382196+08:00;True|2025-02-12T14:07:11.7831540+08:00;True|2024-11-29T13:29:48.1554947+08:00;</History>
</PropertyGroup>
<ItemGroup>
<File Include="apiapp.json">
@@ -45,19 +45,19 @@
<publishTime>02/22/2013 16:43:40</publishTime>
</File>
<File Include="bin/BLL.dll">
- <publishTime>12/03/2025 22:11:14</publishTime>
+ <publishTime>12/08/2025 11:37:12</publishTime>
</File>
<File Include="bin/BLL.pdb">
- <publishTime>12/03/2025 22:11:14</publishTime>
+ <publishTime>12/08/2025 11:37:12</publishTime>
</File>
<File Include="bin/BouncyCastle.Crypto.dll">
<publishTime>12/18/2020 05:32:28</publishTime>
</File>
<File Include="bin/DAL.dll">
- <publishTime>12/03/2025 22:10:50</publishTime>
+ <publishTime>12/08/2025 11:36:48</publishTime>
</File>
<File Include="bin/DAL.pdb">
- <publishTime>12/03/2025 22:10:50</publishTime>
+ <publishTime>12/08/2025 11:36:48</publishTime>
</File>
<File Include="bin/Dapper.dll">
<publishTime>07/22/2016 22:52:40</publishTime>
@@ -285,19 +285,19 @@
<publishTime>05/09/2023 10:43:40</publishTime>
</File>
<File Include="bin/TopSdk.dll">
- <publishTime>12/02/2025 09:07:14</publishTime>
+ <publishTime>12/04/2025 15:04:18</publishTime>
</File>
<File Include="bin/TopSdk.pdb">
- <publishTime>12/02/2025 09:07:14</publishTime>
+ <publishTime>12/04/2025 15:04:18</publishTime>
</File>
<File Include="bin/WebActivatorEx.dll">
<publishTime>11/24/2014 19:18:48</publishTime>
</File>
<File Include="bin/WebAPI.dll">
- <publishTime>12/04/2025 09:53:50</publishTime>
+ <publishTime>12/09/2025 12:04:18</publishTime>
</File>
<File Include="bin/WebAPI.pdb">
- <publishTime>12/04/2025 09:53:50</publishTime>
+ <publishTime>12/09/2025 12:04:18</publishTime>
</File>
<File Include="bin/WebAPI.XmlSerializers.dll">
<publishTime>02/12/2025 14:57:06</publishTime>
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index b8b6acb..6a5a2ef 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -438,6 +438,7 @@
<Compile Include="Controllers\CGGL\Cg_POStockInChangeBillController.cs" />
<Compile Include="Controllers\CGGL\Cg_POOrderChangeBillController.cs" />
<Compile Include="Controllers\CGGL\Cg_POStockInBillList_SecController.cs" />
+ <Compile Include="Controllers\Cg_ContractTransportBillListController.cs" />
<Compile Include="Controllers\CJGL\Cj_CallGoodsBillBackController.cs" />
<Compile Include="Controllers\CJGL\Cj_CallGoodsBillMainController.cs" />
<Compile Include="Controllers\CJGL\Cj_CenterCheckBillController.cs" />
@@ -1235,6 +1236,7 @@
<Folder Include="bin\" />
<Folder Include="Controllers\椤圭洰绠$悊\鍩虹寤烘ā\" />
<Folder Include="obj\x86\Debug\" />
+ <Folder Include="Views\Cg_ContractTransportBillList\" />
<Folder Include="Views\Cg_PODemandPlanBill\" />
<Folder Include="Views\Cg_PurchaseReturn\" />
<Folder Include="Views\Cj_CallGoodsBillBack\" />
diff --git a/WebAPI/WebAPI.csproj.user b/WebAPI/WebAPI.csproj.user
index 3633aaa..8d01cc4 100644
--- a/WebAPI/WebAPI.csproj.user
+++ b/WebAPI/WebAPI.csproj.user
@@ -5,16 +5,12 @@
<NameOfLastUsedPublishProfile>C:\Users\86130\Desktop\鏅轰簯杩堟�漒MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfilewtt.pubxml</NameOfLastUsedPublishProfile>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<NameOfLastUsedPublishProfile>C:\Users\86130\Desktop\鏅轰簯杩堟�漒MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfilewtt.pubxml</NameOfLastUsedPublishProfile>
- <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
- <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
+ <LastActiveSolutionConfig>Debug|x86</LastActiveSolutionConfig>
<NameOfLastUsedPublishProfile>C:\Users\86130\Desktop\鏅轰簯杩堟�漒MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfilewtt.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>C:\Users\19858\Desktop\鏅轰簯杩堟�漒MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfilewtt.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>C:\Users\19858\Desktop\鏅轰簯杩堟�漒MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfilewtt.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>C:\Users\19858\Desktop\鏅轰簯杩堟�漒MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfilewtt.pubxml</NameOfLastUsedPublishProfile>
- <NameOfLastUsedPublishProfile>C:\Users\19858\Desktop\鏅轰簯杩堟�漒MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfilewtt.pubxml</NameOfLastUsedPublishProfile>
- <NameOfLastUsedPublishProfile>C:\Users\19858\Desktop\鏅轰簯杩堟�漒MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfilewtt.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒MES\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile8.pubxml</NameOfLastUsedPublishProfile>
- <NameOfLastUsedPublishProfile>C:\Users\19858\Desktop\鏅轰簯杩堟�漒MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfilewtt.pubxml</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />
--
Gitblit v1.9.1