From 702aba29448a0f5729f31df6f511873b8d42cef2 Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期一, 22 十一月 2021 14:24:31 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
DBUtility/基础资料/ClsGy_Base_Model.cs | 2
LMES/ClsShowMod.cs | 7
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user | 34
WebAPI/Controllers/仓存管理/ClsKf_MateOutBackBillController.cs | 699 ++++++++
WebAPI/Models/ClsKf_MateOutBillMain.cs | 21
DAL/仓库管理/ClsKf_ProductInBill.cs | 2
Model/Model.csproj | 2
WebAPI/Models/ClsKf_ICStockBillMain.cs | 53
Model/基础资料/基础资料/ClsGy_ConkReason_Model.cs | 10
WebAPI/Controllers/仓存管理/Kf_MateOutBillController.cs | 701 ++++++++
Model/仓库管理/ClsKf_MoveStockStepOutBillSub.cs | 37
WebAPI/Models/ClsSb_EquipDotCheckRuleBillMain.cs | 17
WebAPI/DLL/ClsKf_MateOutBill.cs | 498 ++++++
WebAPI/DLL/ClsSb_EquipMaintainRuleBill.cs | 37
WebAPI/Models/ClsKf_MateOutBillScheme.cs | 29
WebAPI/Models/ClsSb_EquipDotCheckRuleBillSub.cs | 16
WebAPI/WebServer.cs | 46
WebAPI/Controllers/CGGL/WW_EntrustOrderBillController.cs | 312 +++
Model/仓库管理/ClsKf_MoveStockStepOutBillMain.cs | 23
WebAPI/Controllers/基础资料/基础资料/Gy_ConkReasonBillController.cs | 256 +++
WebAPI/Models/ClsSb_EquipMaintainRuleBillSub.cs | 17
WebAPI/Controllers/XSGL/Xs_SeOutStockBackBillController.cs | 30
WebAPI/Controllers/WebAPIController.cs | 118 +
WebAPI/DLL/ClsKf_MateOutBackBill.cs | 386 ++++
WebAPI/Controllers/POStockInBillController.cs | 134 +
WebAPI/Controllers/PublicPageMethodController.cs | 76
WebAPI/ListModels.cs | 88 +
WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs | 175 ++
WebAPI/Controllers/MoveStockBillController.cs | 184 ++
WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs | 185 ++
WebAPI/Models/ClsGy_EquipFileMain.cs | 2
WebAPI/Models/ClsSb_EquipMaintainRuleBillSub_Item.cs | 18
WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs | 25
WebAPI/Models/ClsSb_EquipMaintainRuleBillMain.cs | 15
WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs | 70
WebAPI/WebAPI.csproj | 21
WebAPI/Models/ClsKf_ICStockBillScheme.cs | 23
WebAPI/Models/ClsKf_MateOutBillSub.cs | 34
WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs | 10
WebAPI/Models/ClsKf_ICStockBillSub.cs | 71
WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs | 195 +-
41 files changed, 4,484 insertions(+), 195 deletions(-)
diff --git "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_ProductInBill.cs" "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_ProductInBill.cs"
index 2055ed8..ecfe34f 100644
--- "a/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_ProductInBill.cs"
+++ "b/DAL/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_ProductInBill.cs"
@@ -473,7 +473,7 @@
{
if (DBUtility.ClsPub.isStrNull(DS2.Tables[0].Rows[0][0]) != "OK")
{
- sErrMsg = "鍐欏叆瀛愯〃澶辫触锛�";
+ sErrMsg = "鍗曟嵁鍙凤細" + omodel.HBillNo + "锛屽啓鍏ュ瓙琛ㄥけ璐ワ紒";
return false;
}
}
diff --git "a/DBUtility/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_Base_Model.cs" "b/DBUtility/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_Base_Model.cs"
index ee9b050..0e84930 100644
--- "a/DBUtility/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_Base_Model.cs"
+++ "b/DBUtility/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_Base_Model.cs"
@@ -15,7 +15,7 @@
public bool HStopflag;
public string HRemark;
public long HLevel;
- public long HParentID;
+ public long HParentID=0;
public string HModel;
public long HUnitID;
public string HUnitNumber;
diff --git a/LMES/ClsShowMod.cs b/LMES/ClsShowMod.cs
index 948d4c3..93c9adb 100644
--- a/LMES/ClsShowMod.cs
+++ b/LMES/ClsShowMod.cs
@@ -5224,6 +5224,13 @@
oSc_ProdWIPTotalReport.Show();
oMainForm.AddTabPage(oSc_ProdWIPTotalReport);
break;
+ case "mes_wipprocreport_wip":
+ MES_WIPProcReport_WIP oMES_WIPProcReport_WIP = new MES_WIPProcReport_WIP();
+ oMES_WIPProcReport_WIP.MdiParent = oMain;
+ oMES_WIPProcReport_WIP.ModCaption = gnmc;
+ oMES_WIPProcReport_WIP.Show();
+ oMainForm.AddTabPage(oMES_WIPProcReport_WIP);
+ break;
case "mes_wipprocreport":
MES_WIPProcReport oMES_WIPProcReport = new MES_WIPProcReport();
oMES_WIPProcReport.MdiParent = oMain;
diff --git a/Model/Model.csproj b/Model/Model.csproj
index 2c96eb5..e255fcb 100644
--- a/Model/Model.csproj
+++ b/Model/Model.csproj
@@ -214,8 +214,10 @@
<Compile Include="浠撳簱绠$悊\ClsKf_MateOutRequestBillSub.cs" />
<Compile Include="浠撳簱绠$悊\ClsKF_ChangeBoxBillMain.cs" />
<Compile Include="浠撳簱绠$悊\ClsKF_ChangeBoxBillSub.cs" />
+ <Compile Include="浠撳簱绠$悊\ClsKf_MoveStockStepOutBillMain.cs" />
<Compile Include="浠撳簱绠$悊\ClsKf_MoveStockBillMain.cs" />
<Compile Include="浠撳簱绠$悊\ClsKf_MoveStockBillScheme.cs" />
+ <Compile Include="浠撳簱绠$悊\ClsKf_MoveStockStepOutBillSub.cs" />
<Compile Include="浠撳簱绠$悊\ClsKf_MoveStockBillSub.cs" />
<Compile Include="浠撳簱绠$悊\ClsKf_OtherInBillMain.cs" />
<Compile Include="浠撳簱绠$悊\ClsKf_OtherInBillScheme.cs" />
diff --git "a/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepOutBillMain.cs" "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepOutBillMain.cs"
new file mode 100644
index 0000000..31d783d
--- /dev/null
+++ "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepOutBillMain.cs"
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsKf_MoveStockStepOutBillMain : DBUtility.ClsXt_BaseBillMain
+ {
+ public Int64 HSupID;// int --供应商
+ public Int64 HWHID;// int --仓库
+ public Int64 HSCWHID;// int --调出仓库
+ public Int64 HEmpID;// int --业务员
+ public Int64 HManagerID;// int --负责人
+ public Int64 HSecManagerID;// int --验收
+ public Int64 HKeeperID;// int --保管员
+ public Int64 HDeptID;// int --部门
+ public string HExplanation;// varchar(200) --摘要
+ public string HInnerBillNo;// varchar(50) --内部单据号
+ public bool HRedBlueFlag;// bit --红蓝单
+ public int HCurID;
+
+ }
+}
diff --git "a/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepOutBillSub.cs" "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepOutBillSub.cs"
new file mode 100644
index 0000000..bad2524
--- /dev/null
+++ "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepOutBillSub.cs"
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+ public class ClsKf_MoveStockStepOutBillSub : DBUtility.ClsXt_BaseBillSub
+ {
+ public Int64 HMaterID;// int --物料ID
+ public string HBatchNo;// varchar(50) --批次
+ public int HAuxPropID;
+ public Int64 HPropertyID;// int --辅助属性
+ public Int64 HSecUnitID;// int --辅助计量单位
+ public Single HSecUnitRate;// money --换算率
+ public Int64 HUnitID;// int --计量单位
+ public double HQtyMust;// dec(18,8) --应收数量
+ public double HQty;// dec(18,8) --实收数量
+ public double HPrice;// dec(18,8) --单价
+ public double HMoney;// dec(18,8) --金额
+ public Int64 HWHID;// int --收料仓库
+ public Int64 HSCWHID;// int --调出仓库ID
+ public Int64 HSPID;// int --调入仓位
+ public Int64 HSCSPID;// int --调出仓位ID
+ public Int64 HPOOrderInterID;// int --采购订单主内码
+ public Int64 HPOOrderEntryID;// int --采购订单子内码
+ public string HPOOrderBillNo;// varchar(50) --采购订单号
+ public Int64 HSeOrderInterID;// int --销售订单主内码
+ public Int64 HSeOrderEntryID;// int --销售订单子内码
+ public string HSeOrderBillNo;// varchar(50) --销售订单号
+ public double HOrderPrice;
+ public double HInvoiceQty;
+ public string HContainerNum;
+ public double HGrossQty;
+ public double HNetQty;
+
+ }
+}
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/ClsGy_ConkReason_Model.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/ClsGy_ConkReason_Model.cs"
index 38e6e0a..319f784 100644
--- "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/ClsGy_ConkReason_Model.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/ClsGy_ConkReason_Model.cs"
@@ -8,5 +8,15 @@
{
//
public string HExplanation; //描述varchar(500)
+ public DateTime HMakeTime;
+ public string HMakeEmp;
+ public int HConkTypeID;
+ public string HCheckEmp;
+ public DateTime HCheckTime;
+ public string HModifyEmp;
+ public DateTime HModifyTime;
+ public string HStopEmp;
+ public DateTime HStopTime;
+
}
}
diff --git a/WebAPI/Controllers/CGGL/WW_EntrustOrderBillController.cs b/WebAPI/Controllers/CGGL/WW_EntrustOrderBillController.cs
index a2e6028..6093f7a 100644
--- a/WebAPI/Controllers/CGGL/WW_EntrustOrderBillController.cs
+++ b/WebAPI/Controllers/CGGL/WW_EntrustOrderBillController.cs
@@ -27,36 +27,91 @@
/// </summary>
[Route("WW_EntrustOrderBill/list")]
[HttpGet]
- public object list(string sWhere)
+ public object list(string sWhere, string user)
{
try
{
- if (sWhere == null || sWhere.Equals(""))
+ //if (sWhere == null || sWhere.Equals(""))
+ //{
+ // ds = oCN.RunProcReturn("select * from h_v_IF_EntrustOrderBillList " + sWhere, "h_v_IF_EntrustOrderBillList");
+ //}
+ //else
+ //{
+ // string sql1 = "select * from h_v_IF_EntrustOrderBillList where 1 = 1 ";
+ // string sql = sql1 + sWhere;
+ // ds = oCN.RunProcReturn(sql, "h_v_IF_EntrustOrderBillList");
+ //}
+
+ //鍒ゆ柇鏄惁鏈夐噰璐粡鐞嗘潈闄�
+ bool isCgjl = Security_Log("WW_EntrustOrderBill_PurchasManager", 1, true, user);
+ if (!isCgjl)
{
- ds = oCN.RunProcReturn("select * from h_v_IF_EntrustOrderBillList " + sWhere, "h_v_IF_EntrustOrderBillList");
+ sWhere += $" and HEmpID in (select HEmpID from Gy_Czygl where Czymc='{user}' )";
}
- else
- {
- string sql1 = "select * from h_v_IF_EntrustOrderBillList where 1 = 1 ";
- string sql = sql1 + sWhere;
- ds = oCN.RunProcReturn(sql, "h_v_IF_EntrustOrderBillList");
- }
- if (ds == null || ds.Tables[0].Rows.Count == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
- objJsonResult.data = ds.Tables[0];
- return objJsonResult;
- }
+ string sql = "select * from h_v_IF_EntrustOrderBillList where 1 = 1 " + sWhere;
+ ds = oCN.RunProcReturn(sql, "h_v_IF_EntrustOrderBillList");
+
+ 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>
+ /// 閲囪喘璁㈠崟 鍒嗛厤
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("WW_EntrustOrderBill/distribut")]
+ [HttpGet]
+ public object distribut(string Hmainid, string HSupplierId)
+ {
+ try
+ {
+ string sql = $"update銆�WW_EntrustOrderBillMain銆� set HBusinessStatus = 2 ,HEmpID ={HSupplierId} where HInterID in ({Hmainid})";
+ oCN.RunProc(sql);
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎿嶄綔鎴愬姛锛�";
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 閲囪喘璁㈠崟 鍙戝竷
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("WW_EntrustOrderBill/release")]
+ [HttpGet]
+ public object release(string Hmainid)
+ {
+ try
+ {
+ string sql = $"update銆�WW_EntrustOrderBillMain銆� set HBusinessStatus = 3 where HInterID in ({Hmainid})";
+ oCN.RunProc(sql);
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎿嶄綔鎴愬姛锛�";
+ return objJsonResult;
}
catch (Exception e)
{
@@ -69,7 +124,212 @@
}
+ /// <summary>
+ /// 閲囪喘璁㈠崟 鎾ら攢
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("WW_EntrustOrderBill/Back")]
+ [HttpGet]
+ public object Back(string Hmainid)
+ {
+ try
+ {
+ string sql = $"update銆�WW_EntrustOrderBillMain銆� set HBusinessStatus = 2 where HInterID in ({Hmainid})";
+ oCN.RunProc(sql);
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎿嶄綔鎴愬姛锛�";
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
- //
+
+ /// <summary>
+ /// 閲囪喘璁㈠崟 浼樺厛绾�
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("WW_EntrustOrderBill/yxj")]
+ [HttpGet]
+ public object yxj(string Hmainid, string HyxjId)
+ {
+ try
+ {
+ string sql = $"update銆�WW_EntrustOrderBillMain銆� set HPriority ={HyxjId} where HInterID in ({Hmainid})";
+
+ oCN.RunProc(sql);
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎿嶄綔鎴愬姛锛�";
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+
+ [Route("POOrderBack")]
+ [HttpGet]
+ /// <summary>
+ /// 璁㈠崟鍙嶉鐘舵��
+ /// </summary>
+ /// <param name=""></param>
+ /// <returns></returns>
+ public object POOrderBack(string HmainidList, string OrderBackId)
+ {
+ try
+ {
+ string sql = "";
+ for (int i = 0; i < HmainidList.Split(',').Length; i++)
+ {
+ var Hmainid = HmainidList.Split(',')[i];
+ sql = string.Format(@"
+ update WW_EntrustOrderBillSub set
+ HFeedback ='{0}'
+ where HInterID = '{1}' and HEntryID = '{2}' ", OrderBackId, Hmainid.Split('-')[0], Hmainid.Split('-')[1]);
+ oCN.RunProc(sql);
+
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎿嶄綔鎴愬姛锛�";
+ //objJsonResult.Message = string.Join(",", HmainidList.ToArray());
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ //鍒ゆ柇鏄惁瀛樺湪鏉冮檺,骞跺啓鍏ユ棩蹇�
+ public static bool Security_Log(string gnsy, int LogTF, bool Msg, string CurUserName)
+ {
+ //gnsy 鍔熻兘绱㈠紩,妯″潡
+ //usercode 褰撳墠鐢ㄦ埛浠g爜
+ //LogTF 1鍒ゆ柇鏉冮檺骞跺啓鏃ュ織锛�2鍙啓鏃ュ織锛�3鍙垽鏂潈闄�
+ //Msg 娌℃湁鏉冮檺鏃� 鏄惁鎻愮ず妗�
+ string UserID = CurUserName;
+ try
+ {
+ ClsSqlHelper oCn = new ClsSqlHelper();
+ DataSet Ds = new DataSet();
+ DataSet DsUser = new DataSet();
+ DataSet DsJS = new DataSet();//瑙掕壊
+ long ModID = 0;
+ bool HavRight = false;
+ //鎵惧埌妯″潡鏉冮檺
+ Ds = oCn.RunProcReturn("select * from xt_xtgnb where gnsy='" + gnsy.Trim() + "'", "xt_xtgnb");
+ if (Ds.Tables[0].Rows.Count == 0)
+ {
+ if (Msg == true)
+ {
+ //MessageBox.Show("娌℃湁鎵惧埌璇ュ姛鑳芥ā鍧楋紒", "鎻愮ず");
+ }
+ return false;
+ }
+ else
+ {
+ ModID = ClsPub.isLong(Ds.Tables[0].Rows[0]["ID"].ToString()); //杩斿洖妯″潡
+ }
+ if (LogTF == 1 || LogTF == 3)//闇�瑕佸垽鏂潈闄�
+ {
+ //鏍规嵁鐢ㄦ埛鍚嶇О鍒ゆ柇鏉冮檺
+ DsUser = oCn.RunProcReturn("select * from gy_czygl where czymc='" + UserID.Trim() + "'", "gy_czygl");
+ if (DsUser.Tables[0].Rows.Count == 0)
+ {
+ if (Msg == true)
+ {
+ //MessageBox.Show("娌℃湁鎵惧埌褰撳墠鎿嶄綔鍛橈紒", "鎻愮ず");
+ }
+ return false;
+ }
+ //鏍规嵁鐢ㄦ埛鍚嶇О鍒ゆ柇鏉冮檺
+ if ((bool)DsUser.Tables[0].Rows[0]["ManagerFlag"]) //鏄惁绠$悊鍛�
+ {
+ HavRight = true;
+ }
+ else
+ {
+ if (DsUser.Tables[0].Rows[0]["AuthorityID"].ToString().Trim().Substring((int)ModID - 1, 1) == "1")
+ {
+ HavRight = true;
+ }
+ else
+ {
+ //鑾峰彇鐢ㄦ埛缁� 骞跺惊鐜垽鏂潈闄�
+ //鍒ゆ柇瑙掕壊鏄惁鏈夋潈闄�
+ DsJS = oCn.RunProcReturn("select isnull(AuthorityID,'') AuthorityID from System_UserGroupinfo a inner join System_UserGroup b on a.GroupID=b.GroupID " +
+ " Where a.USERID='" + UserID.Trim() + "'", "gy_czygl");
+ if (DsJS == null)
+ {
+ HavRight = false;
+ }
+ else
+ {
+ HavRight = false;
+ for (int i = 0; i < DsJS.Tables[0].Rows.Count; i++)
+ {
+ if (ClsPub.isStrNull(DsJS.Tables[0].Rows[i]["AuthorityID"]).Length > ModID)
+ {
+ if (DsJS.Tables[0].Rows[i]["AuthorityID"].ToString().Trim().Substring((int)ModID - 1, 1) == "1")
+ {
+ HavRight = true;
+ break;
+ }
+ }
+ }
+
+ }
+ }
+ }
+
+ if (HavRight == false)
+ {
+ if (Msg == true)
+ {
+ //MessageBox.Show("鎮ㄦ病鏈夋潈闄�,璇蜂笌绠$悊鍛樿仈绯伙紒", "鎻愮ず");
+ }
+ }
+ }
+ //闇�瑕佸啓鍏ユ棩蹇�
+ if ((LogTF == 1 && HavRight) || LogTF == 2)
+ {
+ //Add_Log(Ds.Tables[0].Rows[0]["id"].ToString().Trim(), gnsy + "," + Ds.Tables[0].Rows[0]["gnmc"].ToString().Trim(), CurUserName);
+ }
+ return HavRight;
+ }
+ catch (Exception e)
+ {
+ if (Msg == true)
+ {
+ //MessageBox.Show("鍒ゆ柇鏉冮檺鏃跺彂鐜伴敊璇�,璇蜂笌绠$悊鍛樿仈绯伙紒", "鎻愮ず");
+ }
+ return false;
+ }
+ }
+
+
+
}
}
\ No newline at end of file
diff --git a/WebAPI/Controllers/MoveStockBillController.cs b/WebAPI/Controllers/MoveStockBillController.cs
index 7b0c127..700638a 100644
--- a/WebAPI/Controllers/MoveStockBillController.cs
+++ b/WebAPI/Controllers/MoveStockBillController.cs
@@ -467,6 +467,90 @@
return objJsonResult;
}
}
+
+
+
+ /// <summary>
+ /// 鐢熸垚鍒嗗竷寮忚皟鍑哄崟
+ /// </summary>
+ /// <returns></returns>
+ [Route("MoveStockStepOutBill/set_SaveMoveStockStepOutBill_Json")]
+ [HttpPost]
+ public object set_SaveMoveStockStepOutBill_Json([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ //List<Model.ClsKf_MoveStockBillMain> lsmain = new List<Model.ClsKf_MoveStockBillMain>();
+ //ListModels oListModels = new ListModels();
+ //lsmain = oListModels.getMoveStockBillMainByJson(msg1);
+ //lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+ //lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
+ //string sSourceBillType = lsmain[0].HBillType;
+ //BLL.ClsKf_MoveStockBill bll = new BLL.ClsKf_MoveStockBill();
+ //return bll.set_SaveMoveStockBill(lsmain[0], sSourceBillType, ref DBUtility.ClsPub.sErrInfo);
+ try
+ {
+ List<Model.ClsKf_MoveStockStepOutBillMain> lsmain = new List<Model.ClsKf_MoveStockStepOutBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getMoveStockStepOutBillMainByJson(msg1);
+ lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+ lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
+ string sSourceBillType = lsmain[0].HBillType;
+ //string sSourceBillType = "-1";
+
+
+ WebAPI.WebS.ClsKf_MoveStockStepOutBillMain websLsmain = new WebS.ClsKf_MoveStockStepOutBillMain();
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HDate = lsmain[0].HDate;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HDeptID = lsmain[0].HDeptID;
+ websLsmain.HEmpID = lsmain[0].HEmpID;
+ websLsmain.HRemark = lsmain[0].HRemark;
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HWHID = lsmain[0].HWHID;
+ websLsmain.HSCWHID = lsmain[0].HSCWHID;
+ websLsmain.HKeeperID = lsmain[0].HKeeperID;
+ websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
+ websLsmain.HManagerID = 0;
+ websLsmain.HBillerID = 0;
+ websLsmain.HExplanation = "";
+ websLsmain.HInnerBillNo = "";
+ websLsmain.HRedBlueFlag = true;
+ websLsmain.HMainSourceBillType = "-1";
+ websLsmain.HStockStyle = "";
+ websLsmain.HBillType = "1250";
+ websLsmain.HSupID = 0;
+ //websLsmain.HGroupID = lsmain[0].HGroupID;
+
+ if (webserver.set_SaveMoveStockBill(websLsmain, "-1", ref DBUtility.ClsPub.sErrInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鐢熸垚璋冩嫧鍗曟垚鍔燂紒鍗曟嵁鍙蜂负锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "99";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "涓婁紶澶辫触锛�" + DBUtility.ClsPub.sErrInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+
+ objJsonResult.code = "3";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "涓婁紶澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+
/// <summary>
///
/// </summary>
@@ -567,6 +651,106 @@
}
}
+
+ /// <summary>
+ /// 鍐欏叆涓存椂琛� 鎵簮鍗曠殑鏂规硶
+ /// </summary>
+ /// <param name="HSourceBillNo"></param>
+ /// <returns></returns>
+ [Route("MoveStockStepOutBill/set_sourcebill")]
+ [HttpGet]
+ public object set_sourcebill(string HSourceBillType, string HSourceBillNo, Int64 sInterID, string sBillNo)
+ {
+ try
+ {
+ // DataSet ds = new DataSet();
+ // WebServer webserver = new WebServer();
+ string sWhere = " Where 鍗曟嵁鍙� like '%" + HSourceBillNo.Trim() + "%'";
+ ds = webserver.GetXs_SeOutStockBillList(sWhere);
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning);
+ }
+ else
+ {
+ //HSupID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HSupID"]);
+ //HSupName = Convert.ToString(ds.Tables[0].Rows[0]["HSupName"]);
+ HDeptID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HDeptID"]);
+ HDeptName = Convert.ToString(ds.Tables[0].Rows[0]["HDeptName"]);
+ if (webserver.set_SavePonderationBillMain_Temp_Source_Fast(sInterID, sBillNo, HBillType, HSourceBillNo, HSourceBillType, "钃濆瓧", ref DBUtility.ClsPub.sErrInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍐欏叆涓存椂琛ㄥけ璐ワ紒" + DBUtility.ClsPub.sErrInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+
+
+ /// <summary>
+ /// 鍒嗗竷寮忚皟鍑哄崟鎵爜/鎵潯鐮�/鐩存帴璋冪敤webservice
+ /// </summary>
+ /// <returns></returns>
+ [Route("MoveStockStepOutBill/get_CheckTypeByBarCode_Json")]
+ [HttpGet]
+ public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID, string sBillNo, string sBillType, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID)
+ {
+ //if (sRedBlue == true)
+ //{
+ // HBillType = "1245";
+ //}
+ //oBar = webserver.get_CheckTypeByBarCode(sCode, sInterID, sBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
+ WebS.WebService1 oWebs = new WebS.WebService1();
+ WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
+ string sExpressNumber = "";
+ //WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
+ WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
+ if (WebSoBar == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+ objJsonResult.data = WebSoBar;
+ return objJsonResult;
+ }
+ }
+
+
//鍒犻櫎璁板綍
[Route("MoveStock/Delete_Json")]
[HttpGet]
diff --git a/WebAPI/Controllers/POStockInBillController.cs b/WebAPI/Controllers/POStockInBillController.cs
index 31c4efd..437a105 100644
--- a/WebAPI/Controllers/POStockInBillController.cs
+++ b/WebAPI/Controllers/POStockInBillController.cs
@@ -268,6 +268,80 @@
return objJsonResult;
}
}
+
+
+
+ /// <summary>
+ /// 鍐欏叆涓存椂琛� 鎵簮鍗曠殑鏂规硶
+ /// </summary>
+ /// <param name="HSourceBillNo"></param>
+ /// <returns></returns>
+ [Route("ICMOReportBill/set_SaveICMOReportBill")]
+ [HttpGet]
+ public object set_SaveICMOReportBill(string HSourceBillType, string HSourceBillNo, Int64 sInterID, string sBillNo)
+ {
+ try
+ {
+ // DataSet ds = new DataSet();
+ // WebServer webserver = new WebServer();
+ string sWhere = " Where 鍗曟嵁鍙� like '%" + HSourceBillNo.Trim() + "'";
+ //鏍规嵁婧愬崟绫诲瀷鏉ヨ皟鐢ㄤ笉鍚岀殑WEBS鏂规硶 new
+ if (HSourceBillType == "3710")
+ {
+ ds = webserver.GetSc_ICMOBillList(sWhere + " ");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍,婧愬崟绫诲瀷鏈夐敊璇紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ //
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + HSourceBillType;
+ objJsonResult.data = null;
+ return objJsonResult;
+ //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning);
+ }
+ else
+ {
+ HDeptID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HDeptID"]);
+ HDeptName = Convert.ToString(ds.Tables[0].Rows[0]["HDeptName"]);
+ if (webserver.set_SavePonderationBillMain_Temp_Source_Fast(sInterID, sBillNo, HBillType, HSourceBillNo, HSourceBillType, "钃濆瓧", ref DBUtility.ClsPub.sErrInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍐欏叆涓存椂琛ㄥけ璐ワ紒" + DBUtility.ClsPub.sErrInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+
/// <summary>
/// 杩斿洖鍑哄叆搴撴潯鐮佷复鏃惰〃
/// </summary>
@@ -606,6 +680,66 @@
}
}
+
+ /// <summary>
+ /// 鐢熶骇姹囨姤鍗�/鎻愪氦/鐩存帴璋僿ebservice
+ /// </summary>
+ /// <returns></returns>
+ [Route("ICMOReportBill/set_SaveICMOReportBill_Json")]
+ [HttpPost]
+ public object set_SaveICMOReportBill_Json([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ try
+ {
+ List<Model.ClsSc_ICMOReportBillMain> lsmain = new List<Model.ClsSc_ICMOReportBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getICMOReportBillMainByJson(msg1);
+ lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+ lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
+ string sSourceBillType = lsmain[0].HBillType;
+
+ WebAPI.WebS.ClsSc_ICMOReportBillMain websLsmain = new WebS.ClsSc_ICMOReportBillMain();
+
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = "1201";//鍥哄畾鍊�
+ websLsmain.HDate = lsmain[0].HDate;
+ websLsmain.HDeptID = lsmain[0].HDeptID;
+ websLsmain.HEmpID = 0;
+ websLsmain.HBillerID = lsmain[0].HBillerID;
+ websLsmain.HRemark = "";
+ websLsmain.HMainSourceBillType = lsmain[0].HBillType;
+
+
+ if (webserver.set_SaveICMOReportBill_Json(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛佸崟鎹彿涓猴細";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "涓婁紶澶辫触锛�" + DBUtility.ClsPub.sErrInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "涓婁紶澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
[Route("POStockInBill/GetSpName_Json")]
[HttpGet]
public object GetSpName_Json(long HSpID, long HWHID, long HStockOrgID, ref string sErrMsg)
diff --git a/WebAPI/Controllers/PublicPageMethodController.cs b/WebAPI/Controllers/PublicPageMethodController.cs
index dc37059..9f9d590 100644
--- a/WebAPI/Controllers/PublicPageMethodController.cs
+++ b/WebAPI/Controllers/PublicPageMethodController.cs
@@ -29,7 +29,7 @@
{
try
{
- ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Customer "+ sWhere + " Order by HItemID ", "h_v_IF_Customer");
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Customer " + sWhere + " Order by HItemID ", "h_v_IF_Customer");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -103,7 +103,7 @@
SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
//ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
- ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Customer " + sWhere+"", "h_v_IF_Customer");
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Customer " + sWhere + "", "h_v_IF_Customer");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -134,8 +134,8 @@
{
try
{
-
- ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Emp "+sWhere+" Order by HItemID ", "h_v_IF_Emp");
+
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Emp " + sWhere + " Order by HItemID ", "h_v_IF_Emp");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -209,7 +209,7 @@
SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
//ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
- ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Emp " + sWhere+"", "h_v_IF_Emp");
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Emp " + sWhere + "", "h_v_IF_Emp");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -240,7 +240,7 @@
{
try
{
- ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Warehouse "+sWhere+" Order by HItemID ", "h_v_IF_Warehouse");
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Warehouse " + sWhere + " Order by HItemID ", "h_v_IF_Warehouse");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -314,7 +314,7 @@
SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
//ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
- ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Warehouse "+sWhere+"", "h_v_IF_Warehouse");
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Warehouse " + sWhere + "", "h_v_IF_Warehouse");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -345,7 +345,7 @@
{
try
{
- ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_StockPlace "+sWhere+" Order by HItemID ", "Gy_StockPlace");
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_StockPlace " + sWhere + " Order by HItemID ", "Gy_StockPlace");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -419,7 +419,7 @@
SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
//ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
- ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_StockPlace "+sWhere+"", "Gy_StockPlace");
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_StockPlace " + sWhere + "", "Gy_StockPlace");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -450,7 +450,7 @@
{
try
{
- ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Department "+sWhere+" Order by HItemID ", "h_v_IF_Department");
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Department " + sWhere + " Order by HItemID ", "h_v_IF_Department");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -524,7 +524,7 @@
SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
//ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
- ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Department "+sWhere+"", "h_v_IF_Department");
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Department " + sWhere + "", "h_v_IF_Department");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -1110,7 +1110,7 @@
{
try
{
- ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_Supplier "+sWhere+" Order by HItemID", "Gy_Supplier");
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_Supplier " + sWhere + " Order by HItemID", "Gy_Supplier");
//if (ds == null || ds.Tables[0].Rows.Count == 0)
//{
// objJsonResult.code = "0";
@@ -1121,11 +1121,11 @@
//}
//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];
+ return objJsonResult;
//}
}
catch (Exception e)
@@ -1184,7 +1184,7 @@
SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
//ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
- ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_Supplier "+sWhere+"", "Gy_Supplier");
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_Supplier " + sWhere + "", "Gy_Supplier");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -1899,23 +1899,14 @@
{
try
{
- ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName,HModel from h_v_IF_Material "+sWhere+" Order by HItemID", "h_v_IF_Material");
- 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;
- }
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName,HModel from h_v_IF_Material " + sWhere + " Order by HItemID", "h_v_IF_Material");
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+
}
catch (Exception e)
{
@@ -1973,7 +1964,7 @@
SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
//ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
- ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Material "+sWhere+"", "h_v_IF_Material");
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Material " + sWhere + "", "h_v_IF_Material");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -3360,7 +3351,7 @@
#region 鏉′欢鏌ヨ鏉冮檺鍒楄〃
[Route("PublicPageMethod/PowerList")]
[HttpGet]
- public object PowerList(string czybm,string sGnbm)
+ public object PowerList(string czybm, string sGnbm)
{
try
{
@@ -3371,11 +3362,12 @@
{
sName = "";
}
- else {
+ else
+ {
sName = sGnbm;
}
}
-
+
ds = oCN.RunProcReturn("select * from Gy_Czygl where czybm='" + czybm + "'", "Gy_Czygl");
string AuthorityID = ClsPub.isStrNull(ds.Tables[0].Rows[0]["AuthorityID"]);
ds = oCN.RunProcReturn("SELECT id hid,case when id<=" + AuthorityID.Length + " then case when SUBSTRING('" + AuthorityID + "',id,1)=1 then 1 else 0 end else 0 end AuthorityID,'' AuthorityHID, gnms ,gnbm hgnbm FROM xt_xtgnb where useflag=1 and sjgnbm='" + sName + "' and rightflag=1 order by gnbm", "xt_xtgnb");
@@ -3512,7 +3504,7 @@
}
}
}
- oDs = null;
+ oDs = null;
}
oCN.RunProc("UPDATE Gy_Czygl SET AuthorityID='" + Auth_str + "' WHERE czybm='" + msg4.Trim() + "'");
objJsonResult.code = "1";
@@ -3525,13 +3517,13 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = e.Message;
- objJsonResult.data =null;
+ objJsonResult.data = null;
}
return objJsonResult;
}
-
+
#endregion
#endregion
diff --git a/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs b/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
index 6d4099f..38ee92b 100644
--- a/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
+++ b/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
@@ -202,6 +202,8 @@
int HMakeSupID = list[0].HMakeSupID; // int //鍒堕�犲晢 (Gy_Supplier)
string HMaker = msg4;
string HMakeDate = DateTime.Now.Date.ToString();
+ int HEquipDotCheckRuleInterID = list[0].HEquipDotCheckRuleInterID;
+ int HEquipMaintainRuleInterID = list[0].HEquipMaintainRuleInterID;
if (!DBUtility.ClsPub.AllowNumber(HEquipFileNumber))
{
@@ -217,11 +219,11 @@
oCN.RunProc("Insert into Gy_EquipFileBillMain " +
" (hbillno,HEquipFileNumber,HEquipFileNo,HName,HModel,HModel2,HMaterID,HUnitID,HOutComDate" +
",HOutComNo,HDeptID,HUseEmpID,HRepairEmpID,HAddress,HSetupDate,HStartupDate,HStatus," +
- "HEquipFileTypeID,HProNum,HBarCode,HWorkArea,HLogo,HSellSupID,HMakeSupID,hbilltype,HDate,HYear,HMaker,HMakeDate) " +
+ "HEquipFileTypeID,HProNum,HBarCode,HWorkArea,HLogo,HSellSupID,HMakeSupID,hbilltype,HDate,HYear,HMaker,HMakeDate,HEquipMaintainRuleInterID,HEquipDotCheckRuleInterID) " +
" Values('" + hbillno + "','" + HEquipFileNumber + "','" + HEquipFileNo + "','" + HName + "','" + HModel + "','" + HModel2 + "'," + HMaterID + "," + HUnitID +
",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HUseEmpID + "," + HRepairEmpID + ",'" + HAddress +
"','" + HSetupDate + "','" + HStartupDate + "','" + HStatus + "'," + HEquipFileTypeID + ",'" + HProNum +
- "','" + HBarCode + "','" + HWorkArea + "','" + HLogo + "'," + HSellSupID + "," + HMakeSupID +",'3308','" + HDate +"','"+ HYear+ "','" + HMaker + "','" + HMakeDate +
+ "','" + HBarCode + "','" + HWorkArea + "','" + HLogo + "'," + HSellSupID + "," + HMakeSupID +",'3308','" + HDate +"','"+ HYear+ "','" + HMaker + "','" + HMakeDate +"','"+ HEquipMaintainRuleInterID+"','"+ HEquipDotCheckRuleInterID+
"')", ref DBUtility.ClsPub.sExeReturnInfo);
//淇敼涓婄骇涓洪潪鏈骇浠g爜
oCN.Commit();
@@ -289,6 +291,8 @@
int HMakeSupID = list[0].HMakeSupID; // int //鍒堕�犲晢 (Gy_Supplier)
string HUpDater = msg4;
string HUpDateDate = DateTime.Now.Date.ToString();
+ int HEquipDotCheckRuleInterID = list[0].HEquipDotCheckRuleInterID;
+ int HEquipMaintainRuleInterID = list[0].HEquipMaintainRuleInterID;
if (!DBUtility.ClsPub.AllowNumber(HEquipFileNumber))
{
@@ -340,6 +344,8 @@
",HMakeSupID= " + HMakeSupID +
",HUpDater= '" + HUpDater + "'" +
",HUpDateDate= '" + HUpDateDate + "'" +
+ ",HEquipDotCheckRuleInterID='"+ HEquipDotCheckRuleInterID+"'"+
+ ",HEquipMaintainRuleInterID='"+ HEquipMaintainRuleInterID+"'"+
" Where HInterID=" + HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
//淇敼瀛愰」鐩唬鐮�
//oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_RepairCheck,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs
new file mode 100644
index 0000000..0f5157b
--- /dev/null
+++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs
@@ -0,0 +1,185 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.SBGL
+{
+ public class Sb_EquipDotCheckRuleBillController : ApiController
+ {
+ private json objJsonResult = new json();
+ public DataSet ds = new DataSet();
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;//鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛�
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ public DLL.ClsSb_EquipDotCheckRuleBill BillNew = new DLL.ClsSb_EquipDotCheckRuleBill(); //瀵瑰簲鍗曟嵁绫�
+ public DLL.ClsSb_EquipDotCheckRuleBill BillOld = new DLL.ClsSb_EquipDotCheckRuleBill(); //瀵瑰簲鍗曟嵁绫�
+
+
+ #region 璁惧鐐规瑙勭▼鍗曞垪琛�
+ [Route("Sb_EquipDotCheckRuleBill/GetEquipDotCheckRuleList")]
+ [HttpGet]
+ public object GetEquipDotCheckRuleList(string sWhere)
+ {
+ try
+ {
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Sb_EquipDotCheckRuleList " + sWhere + " order by hmainid desc", "h_v_Sb_EquipDotCheckRuleList");
+ }
+ else
+ {
+ string sql1 = "select * from h_v_Sb_EquipDotCheckRuleList where 1 = 1";
+ string sql = sql1 + sWhere + " order by hmainid desc";
+ ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckRuleList");
+ }
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁浣犺鎵剧殑璁板綍锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 璁惧鐐规瑙勭▼璁板綍鍒犻櫎鍔熻兘
+ [Route("Sb_EquipDotCheckRuleBill/DeleteEquipDotCheckRuleBillList")]
+ [HttpGet]
+ public object DeleteEquipDotCheckRuleBillList(string HInterID)
+ {
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+ if (lngBillKey == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ DLL.ClsSb_EquipDotCheckRuleBill oBill = new DLL.ClsSb_EquipDotCheckRuleBill();
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ if (oBill.omodel.HBillStatus > 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁褰撳墠澶勪簬涓嶈兘鍒犻櫎鐘舵��,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HChecker != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸茬粡瀹℃牳,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ if (IsDete)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region[璁惧鐐规瑙勭▼鍗曠紪杈戞椂鑾峰彇琛ㄥご鏁版嵁]
+ [Route("Sb_EquipDotCheckRuleBill/Sb_EquipDotCheckRuleBillListCheckDetai")]
+ [HttpGet]
+ public ApiResult<DataSet> Sb_EquipDotCheckRuleBillListCheckDetai(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_Sb_EquipDotCheckRuleList where hmainid= " + HID + " ", "h_v_Sb_EquipDotCheckRuleList");
+ 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("Sb_EquipDotCheckRuleBill/Sb_EquipDotCheckRuleBillListProjectDetai")]
+ [HttpGet]
+ public object Sb_EquipDotCheckRuleBillListProjectDetai(string sqlWhere)
+ {
+ DataSet ds;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if (sqlWhere == null || sqlWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select 鐐规椤圭洰ID,鐐规椤圭洰,鐐规閮ㄤ綅,鍏蜂綋瑕佹眰,璐熻矗浜篒D,璐熻矗浜轰唬鐮�,璐熻矗浜�,瀛愬娉� from h_v_Sb_EquipDotCheckRuleList", "h_v_Sb_EquipDotCheckRuleList");
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ }
+ else
+ {
+ string sql1 = "select 鐐规椤圭洰ID,鐐规椤圭洰,鐐规閮ㄤ綅,鍏蜂綋瑕佹眰,璐熻矗浜篒D,璐熻矗浜轰唬鐮�,璐熻矗浜�,瀛愬娉� from h_v_Sb_EquipDotCheckRuleList where 1 = 1 ";
+ string sql = sql1 + sqlWhere;
+ ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckRuleList");
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
+ }
+ #endregion
+ }
+}
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs
new file mode 100644
index 0000000..3939dd1
--- /dev/null
+++ b/WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs
@@ -0,0 +1,175 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.SBGL
+{
+ public class Sb_EquipMaintainRuleBillController : ApiController
+ {
+ private json objJsonResult = new json();
+ public DataSet ds = new DataSet();
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;//鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛�
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ public DLL.ClsSb_EquipMaintainRuleBill BillNew = new DLL.ClsSb_EquipMaintainRuleBill(); //瀵瑰簲鍗曟嵁绫�
+ public DLL.ClsSb_EquipMaintainRuleBill BillOld = new DLL.ClsSb_EquipMaintainRuleBill(); //瀵瑰簲鍗曟嵁绫�
+
+ #region 璁惧淇濆吇瑙勭▼鍗曞垪琛�
+ [Route("Sb_EquipMaintainRuleBill/GetEquipMaintainRuleList")]
+ [HttpGet]
+ public object GetEquipMaintainRuleList(string sWhere)
+ {
+ try
+ {
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Sb_EquipMaintainRuleList " + sWhere + " order by hmainid desc", "h_v_Sb_EquipMaintainRuleList");
+ }
+ else
+ {
+ string sql1 = "select * from h_v_Sb_EquipMaintainRuleList where 1 = 1";
+ string sql = sql1 + sWhere + " order by hmainid desc";
+ ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMaintainRuleList");
+ }
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁浣犺鎵剧殑璁板綍锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 璁惧淇濆吇瑙勭▼璁板綍鍒犻櫎鍔熻兘
+ [Route("Sb_EquipMaintainRuleBill/DeleteEquipMaintainRuleBillList")]
+ [HttpGet]
+ public object DeleteEquipMaintainRuleBillList(string HInterID)
+ {
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+ if (lngBillKey == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ DLL.ClsSb_EquipMaintainRuleBill oBill = new DLL.ClsSb_EquipMaintainRuleBill();
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ if (oBill.omodel.HBillStatus > 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁褰撳墠澶勪簬涓嶈兘鍒犻櫎鐘舵��,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HChecker != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸茬粡瀹℃牳,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ if (IsDete)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ # region 璁惧淇濆吇瑙勭▼璁板綍鐐瑰嚮涓昏〃鏃惰幏鍙栬〃浣撴暟鎹柊(淇濆吇椤瑰垪琛ㄣ�侀厤浠堕」鍒楄〃)
+ [Route("Sb_EquipMaintainRuleBill/Sb_EquipMaintainRuleBillListProjectDetaiNew")]
+ [HttpGet]
+ public object Sb_EquipMaintainRuleBillListProjectDetaiNew(string HInterID)
+ {
+
+ DataSet ds, ds1;
+ List<object> list = new List<object>();
+ string Swhere = "";
+ try
+ {
+ if (HInterID != "" || HInterID != null)
+ {
+ Swhere = " and hmainid='" + HInterID + "'";
+ }
+ else
+ {
+ Swhere = HInterID;
+ }
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ //鑾峰彇淇濆吇椤圭洰缂栬緫鏁版嵁
+ string sql = "select 淇濆吇椤圭洰ID,淇濆吇椤圭洰,淇濆吇閮ㄤ綅,鍏蜂綋瑕佹眰,璐熻矗浜篒D,璐熻矗浜轰唬鐮�,璐熻矗浜哄悕绉�,瀛愬娉�2 from h_v_Sb_EquipMaintainRuleList where 1 = 1 " + Swhere + "";
+ ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMaintainRuleList");
+ //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
+ string sql1 = "select 閰嶄欢ID,閰嶄欢浠g爜,閰嶄欢鍚嶇О,鍗曚綅ID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅鍚嶇О,鐢ㄩ噺,鏍囧噯鐢ㄩ噺,瀛愬娉�1 from h_v_Sb_EquipMaintainRuleList where 1 = 1 " + Swhere + "";
+ ds1 = oCN.RunProcReturn(sql1, "h_v_Sb_EquipMaintainRuleList");
+
+ list.Add(ds.Tables[0]);
+ list.Add(ds1.Tables[0]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.list = list;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
+ }
+ #endregion
+ }
+}
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs
index ebf6599..cac2f61 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs
@@ -18,6 +18,7 @@
public DataSet ds = new DataSet();
public WebServer webserver = new WebServer();
public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
public DAL.ClsSc_MouldScrapInBill BillNew0 = new DAL.ClsSc_MouldScrapInBill(); //妯″叿鎶ュ簾鍏ュ簱瀵瑰簲鍗曟嵁绫�
public DAL.ClsSc_MouldScrapInBill BillOld0 = new DAL.ClsSc_MouldScrapInBill(); //妯″叿鎶ュ簾鍏ュ簱瀵瑰簲鍗曟嵁绫�
@@ -227,9 +228,9 @@
else
{
string sql1 = "select * from h_v_Sc_MouldMaintain where 1 = 1 ";
- string sql = sql1 + sWhere+ "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldMaintain");
-
+
}
//return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMaintainBillList ", "h_v_Sc_MouldMaintainBillList");
}
@@ -329,7 +330,7 @@
public static DataSet Sc_MouldDotCheckBillList_s(string sWhere)
{
- return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckBillList where 1=1 "+sWhere+ "order by 鏃ユ湡 desc", "h_v_Sc_MouldDotCheckBillList");
+ return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckBillList where 1=1 " + sWhere + "order by 鏃ユ湡 desc", "h_v_Sc_MouldDotCheckBillList");
}
#endregion
@@ -468,12 +469,12 @@
DataSet ds;
if (sWhere == null || sWhere.Equals(""))
{
- ds = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldConkBookBillList order by 鏃ユ湡 desc" + sWhere, "h_v_Sc_MouldConkBookBillList");
+ ds = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldConkBookBillList order by 鏃ユ湡 desc" + sWhere, "h_v_Sc_MouldConkBookBillList");
}
else
{
string sql1 = "select * from h_v_Sc_MouldConkBookBillList where 1 = 1 ";
- string sql = sql1 + sWhere+ "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
ds = new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldConkBookBillList");
}
return ds;
@@ -523,7 +524,7 @@
else
{
string sql1 = "select * from h_v_Sc_MouldRepairCheckBillList_Edit where 1 = 1 ";
- string sql = sql1 + sWhere+ "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
ds = new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldRepairCheckBillList_Edit");
}
return ds;
@@ -639,7 +640,7 @@
else
{
string sql1 = "select * from h_v_Sc_MouldRepairWorkBillList where 1 = 1 ";
- string sql = sql1 + sWhere+ "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldRepairWorkBillList");
}
}
@@ -791,56 +792,6 @@
return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_MoveStockBillList order by 鏃ユ湡 desc", "h_v_IF_MoveStockBillList");
}
#endregion
-
- /// <summary>
- /// 鐢熶骇棰嗘枡鍗曞垪琛�
- /// </summary>
- /// <returns></returns>
- [Route("Kf_MateOutBill/GetMateOutBillList")]
- [HttpGet]
- public object GetMateOutBillList(string sWhere)
- {
- try
- {
-
- ds = Sc_GetMateOutBillList(sWhere);
- if (ds == null || ds.Tables[0].Rows.Count <= 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
- return objJsonResult;
- }
- }
- catch (Exception ex)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
- objJsonResult.data = null;
- return objJsonResult;
- }
- }
-
- #region sql璇彞
-
-
- public static DataSet Sc_GetMateOutBillList(string sWhere)
- {
- return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_MateOutBillList order by 鏃ユ湡 desc", "h_v_IF_MateOutBillList");
- }
- #endregion
-
-
/// <summary>
/// 閿�鍞嚭搴撳崟鍒楄〃
/// </summary>
@@ -879,7 +830,36 @@
return objJsonResult;
}
}
-
+ /// <summary>
+ ///閿�鍞嚭搴撳崟鍒犻櫎鍔熻兘
+ /// </summary>
+ /// <returns></returns>
+ [Route("Kf_SellOutBill/DeltetSellOutBill")]
+ [HttpGet]
+ public object DeltetSeOutStockBackBill(string HInterID)
+ {
+ try
+ {
+ oCN.BeginTran();
+ oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
+ oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
#region sql璇彞
@@ -1076,7 +1056,36 @@
return objJsonResult;
}
}
-
+ /// <summary>
+ ///浜у搧鍏ュ簱鍗曞垹闄ゅ姛鑳�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Kf_ProductInBill/DeltetProductInBill")]
+ [HttpGet]
+ public object DeltetProductInBill(string HInterID)
+ {
+ try
+ {
+ oCN.BeginTran();
+ oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
+ oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
#region sql璇彞
@@ -1502,7 +1511,7 @@
public object AuditProcessReportList(int HInterID, int IsAudit, string CurUserName)
{
string ModRightNameCheck = "Sb_MouldRepairWorkBill_Check";
- DBUtility.ClsPub.CurUserName=CurUserName;
+ DBUtility.ClsPub.CurUserName = CurUserName;
try
{
//瀹℃牳鏉冮檺
@@ -1576,7 +1585,7 @@
return objJsonResult;
}
if (IsAudit == 0) //瀹℃牳鎻愪氦
- {
+ {
//瀹℃牳鎻愪氦
if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
{
@@ -2572,12 +2581,12 @@
//oItemSub.HSourceBillNo = ""; //婧愬崟鍗曞彿
//oItemSub.HSourceBillType = ""; //婧愬崟绫诲瀷
Sub.HRelationQty = 0; //鍏宠仈鏁伴噺
- //oItemSub.HRelationMoney = 0; //鍏宠仈閲戦
- //HMaterID = "";//閰嶄欢浠g爜
- //HUnitID = "";//鍗曚綅浠g爜
- //HQty = "";//瀹為檯鐢ㄩ噺
- //HQtyMust = "";//鍗曚綅鐢ㄩ噺
- //HRemark = "";//澶囨敞
+ //oItemSub.HRelationMoney = 0; //鍏宠仈閲戦
+ //HMaterID = "";//閰嶄欢浠g爜
+ //HUnitID = "";//鍗曚綅浠g爜
+ //HQty = "";//瀹為檯鐢ㄩ噺
+ //HQtyMust = "";//鍗曚綅鐢ㄩ噺
+ //HRemark = "";//澶囨敞
oBill.DetailColl.Add(Sub);
@@ -2683,7 +2692,7 @@
public object Sc_MouldMaintainBillListProjectDetaiNew(string HInterID)
{
- DataSet ds,ds1;
+ DataSet ds, ds1;
List<object> list = new List<object>();
string Swhere = "";
try
@@ -2692,7 +2701,7 @@
{
Swhere = " and hmainid='" + HInterID + "'";
}
- else
+ else
{
Swhere = HInterID;
}
@@ -2700,7 +2709,7 @@
//鑾峰彇淇濆吇椤圭洰缂栬緫鏁版嵁
string sql = "select HMaintainItemID, 淇濆吇椤圭洰浠g爜 HMaintainItemNumber,淇濆吇椤圭洰鍚嶇О HMaintainItem,淇濆吇閮ㄤ綅 HMaintainPart,鍏蜂綋瑕佹眰 HClaim,HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜� HManagerName,琛ㄤ綋澶囨敞 HRemark from h_v_Sc_MouldMaintainBillListItem where 1 = 1 " + Swhere + "";
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainBillListItem");
- //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
+ //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
string sql1 = "select HMaterID, 閰嶄欢浠g爜 HMaterNumber,閰嶄欢鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,HUnitID,鍗曚綅浠g爜 HUnitNumber,鍗曚綅鍚嶇О HUnitName,瀹為檯鐢ㄩ噺 HQty,鏍囧噯鐢ㄩ噺 HQtyMust,HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜� HManagerName,琛ㄤ綋澶囨敞 HRemark from h_v_Sc_MouldMaintainBillList where 1 = 1 " + Swhere + "";
ds1 = oCN.RunProcReturn(sql1, "h_v_Sc_MouldMaintainBillList");
list.Add(ds.Tables[0]);
@@ -2722,11 +2731,11 @@
#endregion
#region [妯″叿淇濆吇璁板綍琛ㄥ垹闄ゅ姛鑳絔
- /// <summary>
- /// 妯″叿缁翠慨鍗曞垹闄ゅ姛鑳�
- /// </summary>
- /// <returns></returns>
- [Route("Sc_MouldMaintainBill/DeltetSc_MouldMaintainBill")]
+ /// <summary>
+ /// 妯″叿缁翠慨鍗曞垹闄ゅ姛鑳�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Sc_MouldMaintainBill/DeltetSc_MouldMaintainBill")]
[HttpGet]
public object DeltetSc_MouldMaintainBill(string HInterID)
{
@@ -3675,7 +3684,7 @@
oBill.omodel = oItem;
}
//瀛愯〃浣撴暟鎹�
-
+
List<Models.ClsSc_MouldStockBillSub> ls = new List<Models.ClsSc_MouldStockBillSub>();
ls = oListModels.getObjectByJson_Gy_MouldScrapInHouseBillSub(msg2);
int i = 0;
@@ -3753,7 +3762,7 @@
[Route("Sc_MouldScrapOutHouseBill/GetMouldScrapOutHouseBill")]
[HttpGet]
- public object GetMouldScrapOutHouseBill(string sWhere,string user, string Organization)
+ public object GetMouldScrapOutHouseBill(string sWhere, string user, string Organization)
{
try
{
@@ -3767,7 +3776,7 @@
return objJsonResult;
}
- ds = Sc_GetMouldScrapOutHouseBill(sWhere,Organization);
+ ds = Sc_GetMouldScrapOutHouseBill(sWhere, Organization);
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
@@ -3789,11 +3798,11 @@
string sql1 = string.Format(@"select * from h_v_Sc_MouldScrapOutHouseBillList where 搴撳瓨缁勭粐='" + Organization + "'");
if (sWhere == null || sWhere.Equals(""))
{
- return new SQLHelper.ClsCN().RunProcReturn(sql1+ "order by 鏃ユ湡 desc", "h_v_Sc_MouldScrapOutHouseBillList");
+ return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鏃ユ湡 desc", "h_v_Sc_MouldScrapOutHouseBillList");
}
else
{
- string sql = sql1 + sWhere+ "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldScrapOutHouseBillList");
}
}
@@ -3834,7 +3843,7 @@
HSecUnitID, 杈呭姪璁¢噺鍗曚綅浠g爜 HSecUnitCode, 杈呭姪璁¢噺鍗曚綅鍚嶇О HSecUnitName, 鎹㈢畻鐜� HSecUnitRate, HUnitID, 璁¢噺鍗曚綅浠g爜 HUnitCode, 璁¢噺鍗曚綅鍚嶇О HUnitName, 鎵规 HBatchNo,
璁捐瀵垮懡 HDesignLife, 鍓╀綑瀵垮懡 HLeaveLife, 浣跨敤瀵垮懡 HUseLife, 瀹炲彂鏁伴噺 HQty, 鍗曚环 HPrice, 閲戦 HMoney, HWHID, 鍙戣揣浠撳簱浠g爜 HWHCode, 鍙戣揣浠撳簱鍚嶇О HWHName,
HSPID, 浠撲綅浠g爜 HSPCode, 浠撲綅鍚嶇О HSPName, 澶囨敞 HRemark,HStockOrgID FROM h_v_Sc_MouldScrapOutHouseBillList"), "h_v_Sc_MouldScrapOutHouseBillList");
-
+
}
else
{
@@ -4023,7 +4032,7 @@
/// <returns></returns>
[Route("Sc_MouldScrapOutHouseBill/DeltetMouldScrapOutHouseBill")]
[HttpGet]
- public object DeltetMouldScrapOutHouseBill(string HInterID,string user)
+ public object DeltetMouldScrapOutHouseBill(string HInterID, string user)
{
//缂栬緫鏉冮檺
if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBill_Delete", 1, true, user))
@@ -4327,7 +4336,7 @@
[Route("Sc_MouldProdBackBill/GetMouldProdBackBill")]
[HttpGet]
- public object GetMouldProdBackBill(string sWhere,string user, string Organization)
+ public object GetMouldProdBackBill(string sWhere, string user, string Organization)
{
try
{
@@ -4340,7 +4349,7 @@
return objJsonResult;
}
- ds = Sc_GetMouldProdBackBill(sWhere,Organization);
+ ds = Sc_GetMouldProdBackBill(sWhere, Organization);
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
@@ -4357,7 +4366,7 @@
}
}
- public static DataSet Sc_GetMouldProdBackBill(string sWhere,string Organization)
+ public static DataSet Sc_GetMouldProdBackBill(string sWhere, string Organization)
{
string sql1 = string.Format(@"select * from h_v_Sc_MouldProdBackBillList where 搴撳瓨缁勭粐='" + Organization + "'");
if (sWhere == null || sWhere.Equals(""))
@@ -4366,7 +4375,7 @@
}
else
{
- string sql = sql1 + sWhere+ "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdBackBillList");
}
@@ -4596,7 +4605,7 @@
/// <returns></returns>
[Route("Sc_MouldProdBackBill/DeltetMouldProdBackBill")]
[HttpGet]
- public object DeltetMouldProdBackBill(string HInterID,string user)
+ public object DeltetMouldProdBackBill(string HInterID, string user)
{
//缂栬緫鏉冮檺
if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBill_Delete", 1, true, user))
@@ -4760,7 +4769,7 @@
[Route("Sc_MouldProdOutBill/GetMouldProdOutBill")]
[HttpGet]
- public object GetMouldProdOutBill(string sWhere, string user,string Organization)
+ public object GetMouldProdOutBill(string sWhere, string user, string Organization)
{
try
{
@@ -4773,7 +4782,7 @@
return objJsonResult;
}
- ds = Sc_GetMouldProdOutBill(sWhere,Organization);
+ ds = Sc_GetMouldProdOutBill(sWhere, Organization);
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
@@ -4795,11 +4804,11 @@
string sql1 = string.Format(@"select * from h_v_Sc_MouldProdOutHouseBillList where 搴撳瓨缁勭粐='" + Organization + "'");
if (sWhere == null || sWhere.Equals(""))
{
- return new SQLHelper.ClsCN().RunProcReturn(sql1+ "order by 鏃ユ湡 desc", "h_v_Sc_MouldProdOutHouseBillList");
+ return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鏃ユ湡 desc", "h_v_Sc_MouldProdOutHouseBillList");
}
else
{
- string sql = sql1 + sWhere+ "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdOutHouseBillList");
}
@@ -4892,7 +4901,7 @@
string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
string msg2 = sArray[0].ToString();
string msg3 = sArray[1].ToString();
- string msg4= sArray[2].ToString();
+ string msg4 = sArray[2].ToString();
string UserName = "";
@@ -5223,7 +5232,7 @@
else
{
string sql1 = "select * from h_v_Sc_MouldLifeChangeBillList where 1 = 1 ";
- string sql = sql1 + sWhere+ "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldLifeChangeBillList");
}
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 03fbe4b..a693ef5 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -2144,21 +2144,13 @@
/// <returns></returns>
[Route("Sc_MouldDotCheckRuleInter/GetMouldDotCheckRuleInterList")]
[HttpGet]
- public object GetMouldDotCheckRuleInterList(int MouldProjectID)
+ public object GetMouldDotCheckRuleInterList(string sWhere)
{
- if (MouldProjectID <= 0)
- {
- objjson.code = "0";
- objjson.count = 0;
- objjson.Message = "浜у搧鍣ㄥ叿鏈�夋嫨";
- objjson.data = null;
- return objjson;
- }
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- string sql = string.Format(@"select * from h_v_Sc_MouldDotCheckRuleBillList");
- ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldDotCheckRuleBillList");
+ string sql = string.Format(@"select * from h_v_Sc_MouldDotCheckRuleBillList ");
+ ds = oCN.RunProcReturn(sql+sWhere, "h_v_Sc_MouldDotCheckRuleBillList");
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
objjson.code = "0";
@@ -2186,6 +2178,110 @@
}
}
+ /// <summary>
+ /// 鏍规嵁璁惧鏄剧ず璁惧淇濆吇瑙勭▼椤圭洰
+ /// </summary>
+ /// <returns></returns>
+ [Route("Web/GetMaintainItemtemByEquipProjectID")]
+ [HttpGet]
+ public object GetMaintainItemtemByEquipProjectID(int EquipProjectID)
+ {
+ if (EquipProjectID <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "浜у搧鍣ㄥ叿鏈�夋嫨";
+ objjson.data = null;
+ return objjson;
+ }
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ string sql = string.Format(@"select t.HMaintainItemID HMaintainItemID,m.HNumber HMaintainItemNumber,t.HMaintainItem HMaintainItem,t.HMaintainPart HMaintainPart,t.HClaim HClaim,t.HManagerID HManagerID,e.HNumber HManagerNumber,e.HName HManagerName,a.HRemark
+ from Sb_EquipMaintainRuleBillMain a left join Sb_EquipMaintainRuleBillSub_Item t on a.HInterID=t.HInterID
+ left join Gy_Maintain m on m.HItemID=t.HMaintainItemID
+ left join Gy_Employee e on e.HItemID=t.HManagerID
+ where a.HInterID=(select HEquipMaintainRuleInterID from Gy_EquipFileBillMain where HInterID=" + EquipProjectID + ") ");
+ ds = oCN.RunProcReturn(sql, "Sb_EquipMaintainRuleBillMain");
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+ objjson.data = null;
+ return objjson;
+ }
+ else
+ {
+ objjson.code = "1";
+ objjson.count = 1;
+ objjson.Message = "鑾峰彇鎴愬姛!";
+ objjson.data = ds.Tables[0];
+ 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/GetDotCheckRuleItemByEquipProjectID")]
+ [HttpGet]
+ public object GetDotCheckRuleItemByEquipProjectID(int EquipProjectID)
+ {
+ if (EquipProjectID <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "浜у搧鍣ㄥ叿鏈�夋嫨";
+ objjson.data = null;
+ return objjson;
+ }
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ string sql = string.Format(@"select b.HDotCheckItemID HDotCheckItemID,c.HNumber HDotCheckCode,b.HDotCheckItem,b.HDotCheckPart,b.HClaim,
+ b.HManagerID,e.HNumber HManagerCode,e.HName HManagerName,b.HRemark from Sb_EquipDotCheckRuleBillMain a
+ left join Sb_EquipDotCheckRuleBillSub b on a.HInterID=b.HInterID
+ left join Gy_QCCheckItem c on c.HItemID=b.HDotCheckItemID
+ left join Gy_Employee e on e.HItemID=b.HManagerID
+ where a.HInterID=(select HEquipDotCheckRuleInterID from Gy_EquipFileBillMain where HInterID=" + EquipProjectID + ") ");
+ ds = oCN.RunProcReturn(sql, "Sb_EquipDotCheckRuleBillMain");
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+ objjson.data = null;
+ return objjson;
+ }
+ else
+ {
+ objjson.code = "1";
+ objjson.count = 1;
+ objjson.Message = "鑾峰彇鎴愬姛!";
+ objjson.data = ds.Tables[0];
+ return objjson;
+ }
+ }
+ catch (Exception ex)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + ex.ToString();
+ objjson.data = null;
+ return objjson;
+ }
+ }
/// <summary>
/// 鑾峰彇缁翠慨椤圭洰鍒楄〃
diff --git a/WebAPI/Controllers/XSGL/Xs_SeOutStockBackBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOutStockBackBillController.cs
index 41086ed..e36ad10 100644
--- a/WebAPI/Controllers/XSGL/Xs_SeOutStockBackBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_SeOutStockBackBillController.cs
@@ -67,6 +67,36 @@
return objJsonResult;
}
}
+ /// <summary>
+ ///鍒犻櫎鍔熻兘
+ /// </summary>
+ /// <returns></returns>
+ [Route("Xs_SeOutStockBackBill/DeltetSeOutStockBackBill")]
+ [HttpGet]
+ public object DeltetSeOutStockBackBill(string HInterID)
+ {
+ try
+ {
+ oCN.BeginTran();
+ oCN.RunProc("Delete From Xs_SeOutStockBackBillMain where HInterID = " + HInterID);
+ oCN.RunProc("Delete From Xs_SeOutStockBackBillSub where HInterID = " + HInterID);
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
diff --git a/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs
index 4b71ae8..29c6a3f 100644
--- a/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs
@@ -19,6 +19,45 @@
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
DataSet ds;
+ /// <summary>
+ /// 鏍规嵁鍩虹璧勬枡ID 鏌ユ壘璁板綍
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Xs_SeOutStockBill/cx")]
+ [HttpGet]
+ public object cx(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn("select * from h_v_IF_SeOutStockBillList where HitemID=" + HInterID, "h_v_IF_SeOutStockBillList");
+ 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;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
/// <summary>
/// 杩斿洖鍙戣揣閫氱煡鍗曞垪琛�
@@ -67,7 +106,36 @@
return objJsonResult;
}
}
-
+ /// <summary>
+ ///鍒犻櫎鍔熻兘
+ /// </summary>
+ /// <returns></returns>
+ [Route("Xs_SeOutStockBill/DeltetSeOutStockBill")]
+ [HttpGet]
+ public object DeltetSeOutStockBill(string HInterID)
+ {
+ try
+ {
+ oCN.BeginTran();
+ oCN.RunProc("Delete From Xs_SeOutStockBillMain where HInterID = " + HInterID);
+ oCN.RunProc("Delete From Xs_SeOutStockBillSub where HInterID = " + HInterID);
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
//
diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/ClsKf_MateOutBackBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/ClsKf_MateOutBackBillController.cs"
new file mode 100644
index 0000000..bcf927a
--- /dev/null
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/ClsKf_MateOutBackBillController.cs"
@@ -0,0 +1,699 @@
+锘縰sing DBUtility;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers
+{
+ public class ClsKf_MateOutBackBillController : 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 DLL.ClsKf_MateOutBackBill BillNew0 = new DLL.ClsKf_MateOutBackBill(); //
+ public DLL.ClsKf_MateOutBackBill BillOld0 = new DLL.ClsKf_MateOutBackBill(); //
+
+ #region 鐢熶骇閫�鏂欏崟鍒楄〃
+
+ [Route("Kf_MateOutBackBill/GetMateOutBillList")]
+ [HttpGet]
+ public object GetMateOutBillList(string sWhere)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("select * from h_v_IF_MateOutBackBillList order by 鏃ユ湡 desc", "h_v_IF_MateOutBackBillList");
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region [鐢熶骇閫�鏂欏崟鍒犻櫎鍔熻兘]
+ /// <summary>
+ /// 鐢熶骇閫�鏂欏崟鍒犻櫎鍔熻兘
+ /// </summary>
+ /// <returns></returns>
+ [Route("Kf_MateOutBackBill/set_DeleteBill")]
+ [HttpGet]
+ public object set_DeleteBill(string HInterID,string user)
+ {
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBackBill_Delete", 1, true, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ string s = "";
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+ if (lngBillKey == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ DLL.ClsKf_MateOutBackBill oBill = new DLL.ClsKf_MateOutBackBill();
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ if (oBill.omodel.HBillStatus > 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁褰撳墠澶勪簬涓嶈兘鍒犻櫎鐘舵��,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HChecker != ""&& oBill.omodel.HChecker !=null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸茬粡瀹℃牳,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (!DBUtility.Xt_BaseBillFun.Fun_AllowDeleteBill(oBill, ref s))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = s + "锛屼笉鍏佽鍒犻櫎";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ bool IsDete = oBill.DeleteBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo);
+ if (IsDete)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region [鐢熶骇閫�鏂欏崟瀹℃牳銆佸弽瀹℃牳]
+ /// <summary>
+ /// 瀹℃牳
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Kf_MateOutBackBill/set_CheckBill")]
+ [HttpGet]
+ public object set_CheckBill(int HInterID, string CurUserName)
+ {
+ string ModRightNameCheck = "Kf_MateOutBackBill_Check";
+ DBUtility.ClsPub.CurUserName = CurUserName;
+ DLL.ClsKf_MateOutBackBill oBill = new DLL.ClsKf_MateOutBackBill();
+ try
+ {
+ //瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //瀹℃牳鍓嶅垽鏂槸鍚﹀厑璁�
+ string s = "";
+ if (!DBUtility.Xt_BaseBillFun.Fun_AllowCheckBill(oBill, ref s))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = s + "锛屼笉鍏佽瀹℃牳";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (HInterID <= 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID灏忎簬0锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+ //鏌ョ湅鏄惁宸插鏍�,鍏抽棴,浣滃簾
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ if (oBill.omodel.HCloseMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HDeleteMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HChecker.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //瀹℃牳鎻愪氦
+ if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ /// <summary>
+ /// 鍙嶅鏍�
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Kf_MateOutBackBill/set_AbandonCheck")]
+ [HttpGet]
+ public object set_AbandonCheck(int HInterID, string CurUserName)
+ {
+ string ModRightNameCheck = "Kf_MateOutBackBill_Check";
+ DBUtility.ClsPub.CurUserName = CurUserName;
+ DLL.ClsKf_MateOutBackBill oBill = new DLL.ClsKf_MateOutBackBill();
+ try
+ {
+ //瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅鏍稿け璐ワ紒鏃犳潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶅鏍稿墠鍒ゆ柇
+ string s = "";
+ if (!DBUtility.Xt_BaseBillFun.Fun_AllowCheckBill(oBill, ref s))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = s + "锛屼笉鍏佽鍙嶅鏍�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (HInterID <= 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID灏忎簬0锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+ //鏌ョ湅鏄惁宸插鏍�,鍏抽棴,浣滃簾
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ if (oBill.omodel.HCloseMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆鍙嶅鏍革紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HDeleteMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆鍙嶅鏍革紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HChecker.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶅鏍告彁浜bandonCheck
+ if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅鏍稿け璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region[鐢熶骇閫�鏂欏崟缂栬緫鏃惰幏鍙栬〃澶存暟鎹甝
+ [Route("Kf_MateOutBackBill/Kf_MateOutBackBillListCheckDetai")]
+ [HttpGet]
+ public ApiResult<DataSet> Kf_MateOutBackBillListCheckDetai(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_IF_MateOutBackBillList where hmainid= " + HID + " ", "h_v_IF_MateOutBackBillList");
+ 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("Kf_MateOutBackBill/Kf_MateOutBackBillListProjectDetai")]
+ [HttpGet]
+ public object Kf_MateOutBackBillListProjectDetai(string sqlWhere)
+ {
+ DataSet ds;
+ DataSet ds1;
+ List<object> list = new List<object>();
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if (sqlWhere == null || sqlWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn(string.Format(@"select HMaterID ,鐗╂枡浠g爜 HMaterCode ,鐗╂枡鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,HUnitID,璁¢噺鍗曚綅浠g爜 HUnitCode,璁¢噺鍗曚綅 HUnitName,搴旀敹鏁伴噺 HQtyMust,瀹炴敹鏁伴噺 HQty,鍗曚环 HPrice,閲戦 HMoney,HWHID,棰嗘枡浠撳簱浠g爜 HWHCode,棰嗘枡浠撳簱 HWHName,琛ㄤ綋澶囨敞 HRemark
+from h_v_IF_MateOutBackBillList"), "h_v_IF_MateOutBackBillList");
+
+ }
+ else
+ {
+ string sql1 = string.Format(@"select HMaterID ,鐗╂枡浠g爜 HMaterCode ,鐗╂枡鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,HUnitID,璁¢噺鍗曚綅浠g爜 HUnitCode,璁¢噺鍗曚綅 HUnitName,搴旀敹鏁伴噺 HQtyMust,瀹炴敹鏁伴噺 HQty,鍗曚环 HPrice,閲戦 HMoney,HWHID,棰嗘枡浠撳簱浠g爜 HWHCode,棰嗘枡浠撳簱 HWHName,琛ㄤ綋澶囨敞 HRemark
+from h_v_IF_MateOutBackBillList WHERE 1=1");
+ string sql = sql1 + sqlWhere;
+ ds = oCN.RunProcReturn(sql, "h_v_IF_MateOutBackBillList");
+ }
+ //鏌ユ眹鎬�
+ ds1 = oCN.RunProcReturn(string.Format(@"select 鐗╂枡浠g爜,max(鐗╂枡鍚嶇О)鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,max(鍗曟嵁鍙�)鍗曟嵁鍙�,鎵规,sum(瀹炴敹鏁伴噺)瀹炴敹鏁伴噺,
+ hwhid1,max(鏀舵枡浠撳簱浠g爜)鏀舵枡浠撳簱浠g爜,max(鏀舵枡浠撳簱)鏀舵枡浠撳簱,琛ㄤ綋澶囨敞 from h_v_Sc_MouldProdInHouseBillList
+ where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,hwhid1,鎵规,琛ㄤ綋澶囨敞"), "h_v_IF_MateOutBackBillList");
+
+ list.Add(ds.Tables[0]);
+ list.Add(ds1.Tables[0]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.list = list;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
+ }
+ #endregion
+
+ #region 鐢熶骇閫�鏂欏崟淇濆瓨/缂栬緫
+ /// <summary>
+ /// 淇濆瓨鐢熶骇閫�鏂欏崟
+ /// </summary>
+ /// <param name="msg"></param>
+ /// <returns></returns>
+ [Route("Kf_MateOutBackBill/SaveGetMateOutBillList")]
+ [HttpPost]
+ public object SaveGetMateOutBillList([FromBody] JObject msg)
+ {
+ var _value = msg["msg"].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();
+ string msg4 = sArray[3].ToString();
+
+ string UserName = "";
+ string s = "";
+ ListModels oListModels = new ListModels();
+ try
+ {
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBackBill_Edit", 1, true, msg4))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ DLL.ClsKf_MateOutBackBill oBill = new DLL.ClsKf_MateOutBackBill();
+ List<Models.ClsKf_ICStockBillMain> lsmain = new List<Models.ClsKf_ICStockBillMain>();
+ msg2 = msg2.Replace("\\", "");
+ msg2 = msg2.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_Kf_ICStockBillMain(msg2);
+ foreach (Models.ClsKf_ICStockBillMain oItem in lsmain)
+ {
+ if (refSav == "Add")
+ {
+ //鍗曟嵁鍙锋槸鍚﹂噸澶�
+ if (BillNew0.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld0.omodel.HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鍙烽噸澶嶏紒涓嶅厑璁镐繚瀛橈紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ if (refSav == "Update")
+ {
+ if (BillOld0.ShowBill(oItem.HInterID, ref s) == false)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹湁璇紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //鍒ゆ柇鏄惁鍙紪杈�
+ if (BillOld0.omodel.HChecker != "" && BillOld0.omodel.HChecker != null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽淇敼锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (BillOld0.omodel.HBillStatus > 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹浜庝笉鍙紪杈戠姸鎬侊紝涓嶅厑璁镐慨鏀癸紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld0, ref s))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = s + "锛屼笉鍏佽淇敼";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ //oItem.HMaker = "";
+ UserName = oItem.HMaker; //鍒跺崟浜�
+ oItem.HBillType = "1244";
+ oItem.HBillSubType = "1244";
+ //oItem.HBillNo = ""; //鍗曟嵁鍙�
+ //oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --鏃ユ湡
+ //oItem.HInnerBillNo = ""; // --鍐呴儴鍗曟嵁鍙�
+ oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+ oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
+ oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
+ //oItem.HEquipID = 0; //璁惧ID(Gy_EquipMent)
+ //oItem.HPeriod = 0;
+ //oItem.HCheckBeginDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); // --缁翠慨鏃ユ湡
+ //oItem.HCheckResult = ""; //楠屾敹缁撹--(姝e父锛屽紓甯�)
+ //oItem.HEmpID = 0; //楠屾敹浜�(Gy_Employee)
+ //oItem.HManagerID = 0; //璐熻矗浜�(Gy_Employee)
+ //oItem.HDeptID = 0; //楠屾敹閮ㄩ棬(Gy_Department)
+ //oItem.HExplanation = ""; //鎽樿(鏁呴殰鎻忚堪)
+ //oItem.HRemark = ""; //澶囨敞
+
+ //oItem.HMainSourceInterID = oItem.HInterID;
+
+ //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
+ 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
+ //msg2 = msg2.Replace("'", "鈥�");
+ List<Models.ClsKf_ICStockBillSub> ls = new List<Models.ClsKf_ICStockBillSub>();
+ ls = oListModels.getObjectByJson_Kf_ICStockBillMSub(msg3);
+ int i = 0;
+ foreach (Models.ClsKf_ICStockBillSub oItemSub in ls)
+ {
+
+ i++;
+ oItemSub.HEntryID = i;
+
+ //oItemSub.HRepairCheckID = 0; //楠屾敹椤圭洰ID
+ //oItemSub.HRepairCheckContent = ""; //楠屾敹鍐呭
+ //oItemSub.HManagerID = 0; //璐熻矗浜篒D
+ //oItemSub.HCloseMan = ""; //琛屽叧闂�
+ oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+ oItemSub.HCloseType = false; //鍏抽棴绫诲瀷
+ //oItemSub.HRemark = ""; //澶囨敞
+ oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮�
+ oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮�
+ //oItemSub.HSourceBillNo = ""; //婧愬崟鍗曞彿
+ //oItemSub.HSourceBillType = ""; //婧愬崟绫诲瀷
+ //oItemSub.HRelationQty = 0; //鍏宠仈鏁伴噺
+ //oItemSub.HRelationMoney = 0; //鍏宠仈閲戦
+ //oItemSub.HRepairID = 0; //缁翠慨椤圭洰
+ //oItemSub.HRepairExplanation =""; //缁翠慨瑕佹眰
+ //oItemSub.HMoney = 0; //缁翠慨璐圭敤
+ oBill.DetailColl.Add(oItemSub);
+
+ }
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (oBill.omodel.HInterID == 0)
+ {
+ // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ else
+ {
+ bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ if (bResult)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+ 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
+
+ #region 鍣ㄥ叿閲囪喘鍏ュ簱鍗曞鏍�/鍙嶅鏍�
+ [Route("Sc_MouldProdInHouseBill/AuditMouldProdInHouseBill")]
+ [HttpGet]
+ public object AuditMouldProdInHouseBill(string HInterID, string user, int flag)
+ {
+ //flag=1 瀹℃牳锛� flag=2 鍙嶅鏍�
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBackBill_Check", 1, true, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲鏍告潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+ if (lngBillKey == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ DLL.ClsSc_MouldProdOutBill oBill = new DLL.ClsSc_MouldProdOutBill();
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ if (flag == 1)
+ {
+ if (oBill.omodel.HBillStatus == 2)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "褰撳墠鍗曟嵁宸插鏍革紝鏃犻渶鍐嶆瀹℃牳";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ string HCheckDate = DateTime.Now.Date.ToString();
+ oCn.RunProc(" Update Sc_MouldStockBillMain set HChecker='" + user + "',HCheckDate='" + HCheckDate + "',HBillStatus=2 Where HBillType='3801' and HInterID=" + HInterID);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳鎴愬姛锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ if (oBill.omodel.HBillStatus == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "褰撳墠鍗曟嵁鏈鏍革紝鏃犻渶鍙嶅鏍�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ string HCheckDate = DateTime.Now.Date.ToString();
+ oCn.RunProc(" Update Sc_MouldStockBillMain set HChecker=' ',HCheckDate=' ',HBillStatus=1 Where HBillType='3801' and HInterID=" + HInterID);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍告垚鍔燂紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+ }
+}
diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/Kf_MateOutBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/Kf_MateOutBillController.cs"
new file mode 100644
index 0000000..097ea57
--- /dev/null
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/Kf_MateOutBillController.cs"
@@ -0,0 +1,701 @@
+锘縰sing DBUtility;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers
+{
+ public class Kf_MateOutBillController : 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 DLL.ClsKf_MateOutBill BillNew0 = new DLL.ClsKf_MateOutBill(); //妯″叿鎶ュ簾鍏ュ簱瀵瑰簲鍗曟嵁绫�
+ public DLL.ClsKf_MateOutBill BillOld0 = new DLL.ClsKf_MateOutBill(); //妯″叿鎶ュ簾鍏ュ簱瀵瑰簲鍗曟嵁绫�
+
+ #region 鐢熶骇棰嗘枡鍗曞垪琛�
+
+ [Route("Kf_MateOutBill/GetMateOutBillList")]
+ [HttpGet]
+ public object GetMateOutBillList(string sWhere)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("select * from h_v_IF_MateOutBillList order by 鏃ユ湡 desc", "h_v_IF_MateOutBillList");
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region [鐢熶骇棰嗘枡鍗曞垹闄ゅ姛鑳絔
+ /// <summary>
+ /// 鐢熶骇棰嗘枡鍗曞垹闄ゅ姛鑳�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Kf_MateOutBill/set_DeleteBill")]
+ [HttpGet]
+ public object set_DeleteBill(string HInterID,string user)
+ {
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBill_Delete", 1, true, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ string s = "";
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+ if (lngBillKey == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ DLL.ClsKf_MateOutBill oBill = new DLL.ClsKf_MateOutBill();
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ if (oBill.omodel.HBillStatus > 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁褰撳墠澶勪簬涓嶈兘鍒犻櫎鐘舵��,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HChecker != ""&& oBill.omodel.HChecker !=null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸茬粡瀹℃牳,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (!DBUtility.Xt_BaseBillFun.Fun_AllowDeleteBill(oBill, ref s))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = s + "锛屼笉鍏佽鍒犻櫎";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ bool IsDete = oBill.DeleteBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo);
+ if (IsDete)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region [鐢熶骇棰嗘枡鍗曞鏍搞�佸弽瀹℃牳]
+ /// <summary>
+ /// 瀹℃牳
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Kf_MateOutBill/set_CheckBill")]
+ [HttpGet]
+ public object set_CheckBill(int HInterID, string CurUserName)
+ {
+ string ModRightNameCheck = "Kf_MateOutBill_Check";
+ DBUtility.ClsPub.CurUserName = CurUserName;
+ DLL.ClsKf_MateOutBill oBill = new DLL.ClsKf_MateOutBill();
+ try
+ {
+ //瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //瀹℃牳鍓嶅垽鏂槸鍚﹀厑璁�
+ string s = "";
+ if (!DBUtility.Xt_BaseBillFun.Fun_AllowCheckBill(oBill, ref s))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = s + "锛屼笉鍏佽瀹℃牳";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (HInterID <= 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID灏忎簬0锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+ //鏌ョ湅鏄惁宸插鏍�,鍏抽棴,浣滃簾
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ if (oBill.omodel.HCloseMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HDeleteMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HChecker.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //瀹℃牳鎻愪氦
+ if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳鎴愬姛";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ /// <summary>
+ /// 鍙嶅鏍�
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="CurUserName">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Kf_MateOutBill/set_AbandonCheck")]
+ [HttpGet]
+ public object set_AbandonCheck(int HInterID, string CurUserName)
+ {
+ string ModRightNameCheck = "Kf_MateOutBill_Check";
+ DBUtility.ClsPub.CurUserName = CurUserName;
+ DLL.ClsKf_MateOutBill oBill = new DLL.ClsKf_MateOutBill();
+ try
+ {
+ //瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅鏍稿け璐ワ紒鏃犳潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶅鏍稿墠鍒ゆ柇
+ string s = "";
+ if (!DBUtility.Xt_BaseBillFun.Fun_AllowCheckBill(oBill, ref s))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = s + "锛屼笉鍏佽鍙嶅鏍�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (HInterID <= 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID灏忎簬0锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+ //鏌ョ湅鏄惁宸插鏍�,鍏抽棴,浣滃簾
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ if (oBill.omodel.HCloseMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆鍙嶅鏍革紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HDeleteMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆鍙嶅鏍革紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HChecker.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶅鏍告彁浜bandonCheck
+ if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅鏍稿け璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region[鐢熶骇棰嗘枡鍗曠紪杈戞椂鑾峰彇琛ㄥご鏁版嵁]
+ [Route("Kf_MateOutBill/Kf_MateOutBillListCheckDetai")]
+ [HttpGet]
+ public ApiResult<DataSet> Kf_MateOutBillListCheckDetai(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_IF_MateOutBillList where hmainid= " + HID + " ", "h_v_Sc_MouldProdInHouseBillList");
+ 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("Kf_MateOutBill/Kf_MateOutBillListProjectDetai")]
+ [HttpGet]
+ public object Kf_MateOutBillListProjectDetai(string sqlWhere)
+ {
+ DataSet ds;
+ DataSet ds1;
+ List<object> list = new List<object>();
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if (sqlWhere == null || sqlWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn(string.Format(@"select HMaterID ,鐗╂枡浠g爜 HMaterCode ,鐗╂枡鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,HUnitID,璁¢噺鍗曚綅浠g爜 HUnitCode,璁¢噺鍗曚綅 HUnitName,搴旀敹鏁伴噺 HQtyMust,瀹炴敹鏁伴噺 HQty,鍗曚环 HPrice,閲戦 HMoney,HWHID,棰嗘枡浠撳簱浠g爜 HWHCode,棰嗘枡浠撳簱 HWHName,琛ㄤ綋澶囨敞 HRemark
+from h_v_IF_MateOutBillList"), "H_V_IF_MATEOUTBILLLIST");
+
+ }
+ else
+ {
+
+ //string sql1 = "select HRepairCheckID,HRepairCheckContent,HManagerID,HRemark from Sc_MouldRepairCheckBillSub where 1 = 1 ";
+ string sql1 = string.Format(@"select HMaterID ,鐗╂枡浠g爜 HMaterCode ,鐗╂枡鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,HUnitID,璁¢噺鍗曚綅浠g爜 HUnitCode,璁¢噺鍗曚綅 HUnitName,搴旀敹鏁伴噺 HQtyMust,瀹炴敹鏁伴噺 HQty,鍗曚环 HPrice,閲戦 HMoney,HWHID,棰嗘枡浠撳簱浠g爜 HWHCode,棰嗘枡浠撳簱 HWHName,琛ㄤ綋澶囨敞 HRemark
+from h_v_IF_MateOutBillList WHERE 1=1");
+ string sql = sql1 + sqlWhere;
+ ds = oCN.RunProcReturn(sql, "H_V_IF_MATEOUTBILLLIST");
+ }
+ //鏌ユ眹鎬�
+ ds1 = oCN.RunProcReturn(string.Format(@"select 鐗╂枡浠g爜,max(鐗╂枡鍚嶇О)鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,max(鍗曟嵁鍙�)鍗曟嵁鍙�,鎵规,sum(瀹炴敹鏁伴噺)瀹炴敹鏁伴噺,
+ hwhid1,max(鏀舵枡浠撳簱浠g爜)鏀舵枡浠撳簱浠g爜,max(鏀舵枡浠撳簱)鏀舵枡浠撳簱,琛ㄤ綋澶囨敞 from h_v_Sc_MouldProdInHouseBillList
+ where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,hwhid1,鎵规,琛ㄤ綋澶囨敞"), "h_v_Sc_MouldProdInHouseBillList");
+
+ list.Add(ds.Tables[0]);
+ list.Add(ds1.Tables[0]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.list = list;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
+ }
+ #endregion
+
+ #region 鐢熶骇棰嗘枡鍗曚繚瀛�/缂栬緫
+ /// <summary>
+ /// 淇濆瓨鐢熶骇棰嗘枡鍗�
+ /// </summary>
+ /// <param name="msg"></param>
+ /// <returns></returns>
+ [Route("Kf_MateOutBill/SaveGetMateOutBillList")]
+ [HttpPost]
+ public object SaveGetMateOutBillList([FromBody] JObject msg)
+ {
+ var _value = msg["msg"].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();
+ string msg4 = sArray[3].ToString();
+
+ string UserName = "";
+ string s = "";
+ ListModels oListModels = new ListModels();
+ try
+ {
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBill_Edit", 1, true, msg4))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ DLL.ClsKf_MateOutBill oBill = new DLL.ClsKf_MateOutBill();
+ List<Models.ClsKf_MateOutBillMain> lsmain = new List<Models.ClsKf_MateOutBillMain>();
+ msg2 = msg2.Replace("\\", "");
+ msg2 = msg2.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_Kf_MateOutBillMain(msg2);
+ foreach (Models.ClsKf_MateOutBillMain oItem in lsmain)
+ {
+ if (refSav == "Add")
+ {
+ //鍗曟嵁鍙锋槸鍚﹂噸澶�
+ if (BillNew0.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld0.omodel.HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鍙烽噸澶嶏紒涓嶅厑璁镐繚瀛橈紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ if (refSav == "Update")
+ {
+ if (BillOld0.ShowBill(oItem.HInterID, ref s) == false)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹湁璇紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //鍒ゆ柇鏄惁鍙紪杈�
+ if (BillOld0.omodel.HChecker != "" && BillOld0.omodel.HChecker != null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽淇敼锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (BillOld0.omodel.HBillStatus > 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹浜庝笉鍙紪杈戠姸鎬侊紝涓嶅厑璁镐慨鏀癸紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld0, ref s))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = s + "锛屼笉鍏佽淇敼";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ //oItem.HMaker = "";
+ UserName = oItem.HMaker; //鍒跺崟浜�
+ oItem.HBillType = "1204";
+ oItem.HBillSubType = "1204";
+ //oItem.HBillNo = ""; //鍗曟嵁鍙�
+ //oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --鏃ユ湡
+ //oItem.HInnerBillNo = ""; // --鍐呴儴鍗曟嵁鍙�
+ oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+ oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
+ oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
+ //oItem.HEquipID = 0; //璁惧ID(Gy_EquipMent)
+ //oItem.HPeriod = 0;
+ //oItem.HCheckBeginDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); // --缁翠慨鏃ユ湡
+ //oItem.HCheckResult = ""; //楠屾敹缁撹--(姝e父锛屽紓甯�)
+ //oItem.HEmpID = 0; //楠屾敹浜�(Gy_Employee)
+ //oItem.HManagerID = 0; //璐熻矗浜�(Gy_Employee)
+ //oItem.HDeptID = 0; //楠屾敹閮ㄩ棬(Gy_Department)
+ //oItem.HExplanation = ""; //鎽樿(鏁呴殰鎻忚堪)
+ //oItem.HRemark = ""; //澶囨敞
+
+ //oItem.HMainSourceInterID = oItem.HInterID;
+
+ //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
+ 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
+ //msg2 = msg2.Replace("'", "鈥�");
+ List<Models.ClsKf_MateOutBillSub> ls = new List<Models.ClsKf_MateOutBillSub>();
+ ls = oListModels.getObjectByJson_Kf_MateOutBillSub(msg3);
+ int i = 0;
+ foreach (Models.ClsKf_MateOutBillSub oItemSub in ls)
+ {
+
+ i++;
+ oItemSub.HEntryID = i;
+
+ //oItemSub.HRepairCheckID = 0; //楠屾敹椤圭洰ID
+ //oItemSub.HRepairCheckContent = ""; //楠屾敹鍐呭
+ //oItemSub.HManagerID = 0; //璐熻矗浜篒D
+ //oItemSub.HCloseMan = ""; //琛屽叧闂�
+ oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+ oItemSub.HCloseType = false; //鍏抽棴绫诲瀷
+ //oItemSub.HRemark = ""; //澶囨敞
+ oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮�
+ oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮�
+ //oItemSub.HSourceBillNo = ""; //婧愬崟鍗曞彿
+ //oItemSub.HSourceBillType = ""; //婧愬崟绫诲瀷
+ //oItemSub.HRelationQty = 0; //鍏宠仈鏁伴噺
+ //oItemSub.HRelationMoney = 0; //鍏宠仈閲戦
+ //oItemSub.HRepairID = 0; //缁翠慨椤圭洰
+ //oItemSub.HRepairExplanation =""; //缁翠慨瑕佹眰
+ //oItemSub.HMoney = 0; //缁翠慨璐圭敤
+ oBill.DetailColl.Add(oItemSub);
+
+ }
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (oBill.omodel.HInterID == 0)
+ {
+ // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ else
+ {
+ bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ if (bResult)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+ 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
+
+ #region 鍣ㄥ叿閲囪喘鍏ュ簱鍗曞鏍�/鍙嶅鏍�
+ [Route("Sc_MouldProdInHouseBill/AuditMouldProdInHouseBill")]
+ [HttpGet]
+ public object AuditMouldProdInHouseBill(string HInterID, string user, int flag)
+ {
+ //flag=1 瀹℃牳锛� flag=2 鍙嶅鏍�
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBill_Check", 1, true, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲鏍告潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+ if (lngBillKey == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ DLL.ClsSc_MouldProdOutBill oBill = new DLL.ClsSc_MouldProdOutBill();
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ if (flag == 1)
+ {
+ if (oBill.omodel.HBillStatus == 2)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "褰撳墠鍗曟嵁宸插鏍革紝鏃犻渶鍐嶆瀹℃牳";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ string HCheckDate = DateTime.Now.Date.ToString();
+ oCn.RunProc(" Update Sc_MouldStockBillMain set HChecker='" + user + "',HCheckDate='" + HCheckDate + "',HBillStatus=2 Where HBillType='3801' and HInterID=" + HInterID);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳鎴愬姛锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ if (oBill.omodel.HBillStatus == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "褰撳墠鍗曟嵁鏈鏍革紝鏃犻渶鍙嶅鏍�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ string HCheckDate = DateTime.Now.Date.ToString();
+ oCn.RunProc(" Update Sc_MouldStockBillMain set HChecker=' ',HCheckDate=' ',HBillStatus=1 Where HBillType='3801' and HInterID=" + HInterID);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍙嶅鏍告垚鍔燂紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+ }
+}
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_ConkReasonBillController.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_ConkReasonBillController.cs"
new file mode 100644
index 0000000..442ac6e
--- /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_ConkReasonBillController.cs"
@@ -0,0 +1,256 @@
+锘縰sing Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
+{
+ public class Gy_ConkReasonBillController : 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 Model.ClsGy_ConkReason_Model BillNew0 = new Model.ClsGy_ConkReason_Model();
+
+
+ #region 鏁呴殰鍘熷洜鍒楄〃
+ [Route("Gy_ConkReasonBill/Get_ConkReasonBillList")]
+ [HttpGet]
+ public object Get_ConkReasonBillList(string sWhere)
+ {
+ try
+ {
+ ds = Sc_GetConkReasonBill(sWhere);
+ if (ds == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ public static DataSet Sc_GetConkReasonBill(string sWhere)
+ {
+ string sql1 = string.Format(@"select * from h_v_Gy_ConkReasonList");
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ return new SQLHelper.ClsCN().RunProcReturn(sql1 + sWhere + " order by hitemid desc", "h_v_Gy_ConkReasonList");
+ }
+ else
+ {
+ string sql = sql1 + sWhere + "order by hitemid desc";
+ return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Gy_ConkReasonList");
+ }
+ }
+ #endregion
+
+ #region [鏁呴殰鍘熷洜鍒犻櫎鍔熻兘]
+ [Route("Gy_ConkReasonBill/set_DeleteBill")]
+ [HttpGet]
+ public object set_DeleteBill(string HItemID)
+ {
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HItemID);
+ if (lngBillKey == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ ds = oCn.RunProcReturn("select * from Gy_ConkReason where HItemID=" + lngBillKey, "Gy_ConkReason");
+ if (ds != null)
+ {
+ oCn.RunProc("Delete from Gy_ConkReason where HItemID=" + lngBillKey);
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹笉瀛樺湪锛岃鏌ョ湅鏄惁閲嶅鍒犻櫎";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+
+ #endregion
+
+ #region [缂栬緫鏄剧ず琛ㄥご]
+ [Route("Gy_ConkReasonBill/GetConkReasonByID")]
+ [HttpGet]
+ public object GetConkReasonByID(string HID)
+ {
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HID);
+ if (lngBillKey == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ ds = oCn.RunProcReturn("select * from Gy_ConkReason where HItemID=" + lngBillKey, "Gy_ConkReason");
+ if (ds != null)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹笉瀛樺湪";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+
+ #endregion
+
+ #region 淇濆瓨鏁呴殰鍘熷洜
+ [Route("Gy_ConkReasonBill/SaveGy_ConkReason")]
+ [HttpPost]
+ public object SaveGy_ConkReason([FromBody] JObject msg)
+ {
+ var _value = msg["msg"].ToString();
+ string msg2 = _value.ToString();
+ string[] sArray = msg2.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg1 = sArray[0].ToString();
+ string msg3 = sArray[1].ToString();//褰撳墠浜�
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ ListModels oListModels = new ListModels();
+ try
+ {
+ Model.ClsGy_ConkReason_Model oBill = new Model.ClsGy_ConkReason_Model();
+ List<Model.ClsGy_ConkReason_Model> lsmain = new List<Model.ClsGy_ConkReason_Model>();
+ msg1 = msg1.Replace("\\", "");
+ msg1 = msg1.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_Gy_ConkReason(msg1);
+ foreach (Model.ClsGy_ConkReason_Model oItem in lsmain)
+ {
+ if (oItem.HNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷笉鑳戒负绌猴紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (oItem.HName.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佸悕绉颁笉鑳戒负绌猴紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+
+ //寰楀埌鐭唬鐮�
+ string sShortNumber;
+ sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim());
+ if (sShortNumber.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ oItem.HShortNumber = sShortNumber;//鐭唬鐮�
+ oItem.HEndFlag = true;//鏈骇鏍囧織
+ oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //绛夌骇
+ oBill = oItem;
+ }
+
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ if (oBill.HItemID == 0)
+ {
+ oCn.RunProc("Insert into Gy_ConkReason " +
+ " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+ ",HLevel,HEndFlag,HStopflag,HRemark,HUseFlag,HMakeTime,HMakeEmp,HExplanation,HConkTypeID) " +
+ " Values('" + oBill.HNumber + "','" + oBill.HName + "','" + oBill.HHelpCode + "','" + oBill.HShortNumber + "'," + oBill.HParentID.ToString() +
+ "," + oBill.HLevel.ToString() + "," + Convert.ToString(oBill.HEndFlag ? 1 : 0) + "," + Convert.ToString(oBill.HStopflag ? 1 : 0) + ",'" + oBill.HRemark +
+ "','" + oBill.HUseFlag + "',getdate(),'" + msg3 + "','" + oBill.HExplanation + "',0" +
+ ")", ref DBUtility.ClsPub.sExeReturnInfo);
+ //淇敼涓婄骇涓洪潪鏈骇浠g爜
+ oCn.RunProc("Update Gy_ConkReason set HEndflag=0 where HItemID=" + oBill.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ else
+ {
+ oCN.RunProc("UpDate Gy_ConkReason set " +
+ " HNumber='" + oBill.HNumber + "'" + //鍥哄畾璧嬪��===============
+ ",HName='" + oBill.HName + "'" +
+ ",HShortNumber='" + oBill.HShortNumber + "'" +
+ ",HHelpCode='" + oBill.HHelpCode + "'" +
+ ",HUseFlag='" + oBill.HUseFlag + "'" +
+ ",HRemark='" + oBill.HRemark + "'" +
+ ",HExplanation='" + oBill.HExplanation + "'" +
+ ",HModifyTime=getdate()" +
+ ",HModifyEmp='" + msg3 + "'" +
+ ",HStopflag=" + Convert.ToString(oBill.HStopflag ? 1 : 0) +
+ " where HInterID=" + oBill.HItemID.ToString());
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇敼鎴愬姛锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ #endregion
+ }
+}
diff --git a/WebAPI/DLL/ClsKf_MateOutBackBill.cs b/WebAPI/DLL/ClsKf_MateOutBackBill.cs
new file mode 100644
index 0000000..96919a4
--- /dev/null
+++ b/WebAPI/DLL/ClsKf_MateOutBackBill.cs
@@ -0,0 +1,386 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace WebAPI.DLL
+{
+ public class ClsKf_MateOutBackBill:DBUtility.ClsXt_BaseBill
+ {
+ public Models.ClsKf_ICStockBillMain omodel = new Models.ClsKf_ICStockBillMain();
+ public List<Models.ClsKf_ICStockBillSub> DetailColl = new List<Models.ClsKf_ICStockBillSub>();
+ public List<Models.ClsKf_ICStockBillScheme> DetailSubColl = new List<Models.ClsKf_ICStockBillScheme>();
+
+ public ClsKf_MateOutBackBill()
+ {
+ base.MvarItemKeySub = "Kf_ICStockBillSub";
+ base.MvarItemKeySub2 = "";
+ base.MvarItemKeySub3 = "";
+ base.MvarItemKeySub4 = "";
+ base.MvarItemKey="Kf_ICStockBillMain";
+ base.MvarReportTitle="鐢熶骇閫�鏂欏崟";
+ base.BillType="1244";
+ base.HBillSubType = "1244";
+ }
+
+ #region 鍥哄畾浠g爜
+
+ ~ClsKf_MateOutBackBill()
+ {
+ DetailColl = null;
+ }
+
+
+ #endregion 鑷畾涔夋柟娉�
+
+ //淇敼鍗曟嵁
+ public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ oCn.BeginTran();
+ //鏇存柊涓昏〃
+ oCn.RunProc("UpDate Kf_ICStockBillMain set " +
+ //鍥哄畾璧嬪��===============
+ " HBillNo='" + omodel.HBillNo + "'" +
+ ",HDate='" + omodel.HDate + "'" +
+ ",HYear='" + omodel.HYear.ToString() + "'" +
+ ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+ ",HRemark='" + omodel.HRemark + "'" +
+ ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
+ ",HUpDateDate=getdate()" +
+ //========================================
+ ",HSupID=" + omodel.HSupID.ToString() +
+ ",HWHID=" + omodel.HWHID.ToString() +
+ ",HSCWHID=" + omodel.HSCWHID.ToString() +
+ ",HEmpID=" + omodel.HEmpID.ToString() +
+ ",HManagerID=" + omodel.HManagerID.ToString() +
+ ",HSecManagerID=" + omodel.HSecManagerID.ToString() +
+ ",HKeeperID=" + omodel.HKeeperID.ToString() +
+ ",HDeptID=" + omodel.HDeptID.ToString() +
+ ",HExplanation='" + omodel.HExplanation + "'" +
+ ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
+ ",HRedBlueFlag=" + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
+ " where HInterID=" + lngBillKey.ToString());
+ //鍒犻櫎鍏宠仈
+ DeleteRelation(ref sReturn, lngBillKey);
+ //鍒犻櫎瀛愯〃
+ DeleteBillSub(lngBillKey);
+ //鎻掑叆瀛愯〃
+ omodel.HInterID = lngBillKey;
+ foreach (Models.ClsKf_ICStockBillSub oSub in DetailColl)
+ {
+ oCn.RunProc("Insert into Kf_ICStockBillSub " +
+ " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" +
+ ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" +
+ ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" +
+ ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
+ ") values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + 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.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() +
+ "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() +
+ "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" +
+ "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" +
+ ") ");
+ }
+ sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+
+ //鏂板鍗曟嵁
+ public override bool AddBill(ref string sReturn)
+ {
+ try
+ {
+ //寰楀埌mainid
+ omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+ omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
+ //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ if (IsExistBillNo(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HBillNo, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew, omodel.HInterID))
+ {
+ omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
+ }
+ if (IsExistMainID(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HInterID, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew))
+ {
+ omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ //
+ oCn.BeginTran();
+ //涓昏〃
+ oCn.RunProc("Insert Into Kf_ICStockBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
+ ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
+ ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
+ ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
+ ") " +
+ " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
+ ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
+ ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() +
+ ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
+ ") ");
+ //鎻掑叆瀛愯〃
+ foreach (Models.ClsKf_ICStockBillSub oSub in DetailColl)
+ {
+ oCn.RunProc("Insert into Kf_ICStockBillSub " +
+ " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" +
+ ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" +
+ ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" +
+ ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
+ ") values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + 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.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() +
+ "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() +
+ "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" +
+ "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" +
+ ") ");
+ }
+ 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 Kf_ICStockBillMain Where HInterID=" + lngBillKey.ToString(), "Kf_ICStockBillMain");
+ if (Ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "鍗曟嵁鏈壘鍒帮紒";
+ return false;
+ }
+ //鍥哄畾璧嬪��===========================================
+ omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+ omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+ omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+ omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+ omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+ omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+ omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+ omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+ 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.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.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.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+ omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+ omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
+ omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+ omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+ //========================================================
+ omodel.HSupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSupID"]);
+ omodel.HWHID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWHID"]);
+ omodel.HSCWHID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSCWHID"]);
+ omodel.HEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEmpID"]);
+ omodel.HManagerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HManagerID"]);
+ omodel.HSecManagerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSecManagerID"]);
+ omodel.HKeeperID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HKeeperID"]);
+ omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
+ omodel.HExplanation = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExplanation"]);
+ omodel.HInnerBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInnerBillNo"]);
+ omodel.HRedBlueFlag = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HRedBlueFlag"]);
+
+ //寰幆
+ DataSet DsSub;
+ DsSub = oCn.RunProcReturn("Select * from Kf_ICStockBillSub Where HInterID=" + lngBillKey.ToString(), "Kf_ICStockBillSub");
+ DetailColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+ {
+ Models.ClsKf_ICStockBillSub oSub = new Models.ClsKf_ICStockBillSub();
+ // 鍥哄畾璧嬪��===============================================
+ 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();
+ //===================================================
+ oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]);
+ oSub.HPropertyID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPropertyID"]);
+ oSub.HSecUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSecUnitID"]);
+ oSub.HSecUnitRate = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HSecUnitRate"]);
+ oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]);
+ oSub.HQtyMust = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQtyMust"]);
+ oSub.HQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQty"]);
+ oSub.HPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPrice"]);
+ oSub.HMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HMoney"]);
+ oSub.HWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWHID"]);
+ oSub.HSCWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCWHID"]);
+ oSub.HSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPID"]);
+ oSub.HSCSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCSPID"]);
+ oSub.HSPGroupID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPGroupID"]);
+ oSub.HBatchNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HBatchNo"]);
+ oSub.HPOOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPOOrderInterID"]);
+ oSub.HPOOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPOOrderEntryID"]);
+ oSub.HPOOrderBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HPOOrderBillNo"]);
+ oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderInterID"]);
+ oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderEntryID"]);
+ oSub.HSeOrderBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSeOrderBillNo"]);
+ DetailColl.Add(oSub);
+ }
+ sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
+
+ //鏄剧ず鍗曟嵁鏉$爜淇℃伅
+ public bool ShowBill_Scheme(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //寰幆瀛愯〃2
+ DataSet DsSubSec;
+ DsSubSec = oCn.RunProcReturn("Select * from Kf_ICStockBillSub_WMS with (nolock) Where HInterID=" + lngBillKey.ToString() + " and HBillType='" + this.BillType + "'", "Kf_ICStockBillSub_WMS");
+ DetailSubColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSubSec.Tables[0].Rows.Count; i++)
+ {
+ Models.ClsKf_ICStockBillScheme oSubSec = new Models.ClsKf_ICStockBillScheme();
+ oSubSec.HInterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HInterID"].ToString());
+ oSubSec.HEntryID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HEntryID"].ToString());
+ oSubSec.HItemID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HItemID"].ToString());
+ oSubSec.HBillType = DsSubSec.Tables[0].Rows[i]["HBillType"].ToString();
+ oSubSec.HMaterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HMaterID"].ToString());
+ oSubSec.HProcID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HProcID"].ToString());
+ oSubSec.HWhID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HWhID"].ToString());
+ oSubSec.HGroupID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HGroupID"].ToString());
+ oSubSec.HQty = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HQty"].ToString());
+ oSubSec.HBarCode = DsSubSec.Tables[0].Rows[i]["HBarCode"].ToString();
+ oSubSec.HAddr = DsSubSec.Tables[0].Rows[i]["HAddr"].ToString();
+ oSubSec.HMaker = DsSubSec.Tables[0].Rows[i]["HMaker"].ToString();
+ oSubSec.HMakeDate = DBUtility.ClsPub.isDate(DsSubSec.Tables[0].Rows[i]["HMakeDate"].ToString());
+ oSubSec.HSourceInterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HSourceInterID"].ToString());
+ oSubSec.HSourceEntryID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HSourceEntryID"].ToString());
+ oSubSec.HSourceBillType = DsSubSec.Tables[0].Rows[i]["HSourceBillType"].ToString();
+ oSubSec.HSourceBillNo = DsSubSec.Tables[0].Rows[i]["HSourceBillNo"].ToString();
+ oSubSec.HSourceItemID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HSourceItemID"].ToString());
+ //
+ DetailSubColl.Add(oSubSec);
+ }
+ sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
+
+
+ #region WMS鏉$爜绋嬪簭
+
+ //鏉$爜鎵弿璁板綍锛屾柊澧炲埌鐢熶骇閫�鏂欏崟 鏃犳簮鍗�
+ public bool AddBill_PDA_NoSource(ref string sReturn)
+ {
+ try
+ {
+ //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(omodel.HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ sReturn = s;
+ return false;
+ }
+ omodel.HYear = sYear;
+ omodel.HPeriod = sPeriod;
+
+ DataSet Ds;
+ oCn.BeginTran();
+ //鍒犻櫎涓昏〃
+ oCn.RunProc("Delete From Kf_ICStockBillMain where HInterID=" + omodel.HInterID.ToString());
+ //鎻掑叆瀛愯〃
+ oCn.RunProc("EXEC h_p_Kf_MateOutBackBillSub_Insert_NoSource " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'");
+ //鎻掑叆涓昏〃
+ oCn.RunProc("Insert Into Kf_ICStockBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMainSourceBillType" +
+ ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
+ ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
+ ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
+ ") " +
+ " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "',convert(varchar(10),getdate(),120),'" + omodel.HMainSourceBillType + "'" +
+ ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',convert(varchar(10),getdate(),120)" +
+ ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() +
+ ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
+ ") ");
+ //鏇存柊鍏宠仈鏁伴噺
+
+ //瀹℃牳鍗曟嵁
+ oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + omodel.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + omodel.HInterID.ToString());
+
+ //鐢熸垚K3鍗曟嵁
+ //鏂板瀛愯〃銆佷富琛�
+ oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBackBill_Insert " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillerID.ToString());
+ //鍥炲~鍏宠仈鏁伴噺
+ oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBackBill_UpdateBillRelateData " + omodel.HInterID.ToString());
+ //瀹℃牳鍗曟嵁
+ oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBackBill_Check " + omodel.HInterID.ToString() + "," + omodel.HBillerID.ToString());
+ ////鏇存柊搴撳瓨
+ oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBackBill_UpdateStock " + omodel.HInterID.ToString());
+ oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBackBill_UpdateOrderStock " + omodel.HInterID.ToString());
+
+ sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+
+
+
+ #endregion
+
+
+
+
+ }
+}
diff --git a/WebAPI/DLL/ClsKf_MateOutBill.cs b/WebAPI/DLL/ClsKf_MateOutBill.cs
new file mode 100644
index 0000000..8deba8f
--- /dev/null
+++ b/WebAPI/DLL/ClsKf_MateOutBill.cs
@@ -0,0 +1,498 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace WebAPI.DLL
+{
+ public class ClsKf_MateOutBill:DBUtility.ClsXt_BaseBill
+ {
+ public Models.ClsKf_MateOutBillMain omodel = new Models.ClsKf_MateOutBillMain();
+ public List<Models.ClsKf_MateOutBillSub> DetailColl = new List<Models.ClsKf_MateOutBillSub>();
+ public List<Models.ClsKf_MateOutBillScheme> DetailSubColl = new List<Models.ClsKf_MateOutBillScheme>();
+
+ public ClsKf_MateOutBill()
+ {
+ base.MvarItemKeySub = "Kf_ICStockBillSub";
+ base.MvarItemKeySub2 = "";
+ base.MvarItemKeySub3 = "";
+ base.MvarItemKeySub4 = "";
+ base.MvarItemKey="Kf_ICStockBillMain";
+ base.MvarReportTitle="鐢熶骇棰嗘枡鍗�";
+ base.BillType="1204";
+ base.HBillSubType = "1204";
+
+ }
+
+ #region 鍥哄畾浠g爜
+
+ ~ClsKf_MateOutBill()
+ {
+ DetailColl = null;
+ }
+
+ #endregion 鑷畾涔夋柟娉�
+ //淇敼鍗曟嵁
+ public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //
+ oCn.BeginTran();
+ //鏇存柊涓昏〃
+ oCn.RunProc("UpDate Kf_ICStockBillMain set " +
+ " HBillNo='" + omodel.HBillNo + "'" + //鍥哄畾璧嬪��===============
+ ",HDate='" + omodel.HDate + "'" +
+ ",HYear='" + omodel.HYear.ToString() + "'" +
+ ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+ ",HRemark='" + omodel.HRemark + "'" +
+ ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
+ ",HUpDateDate=getdate()" +
+ //========================================
+ ",HSupID=" + omodel.HSupID.ToString() +
+ ",HWHID=" + omodel.HWHID.ToString() +
+ ",HSCWHID=" + omodel.HSCWHID.ToString() +
+ ",HEmpID=" + omodel.HEmpID.ToString() +
+ ",HManagerID=" + omodel.HManagerID.ToString() +
+ ",HSecManagerID=" + omodel.HSecManagerID.ToString() +
+ ",HKeeperID=" + omodel.HKeeperID.ToString() +
+ ",HDeptID=" + omodel.HDeptID.ToString() +
+ ",HExplanation='" + omodel.HExplanation + "'" +
+ ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
+ ",HRedBlueFlag=" + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
+ " where HInterID=" + lngBillKey.ToString());
+ //鍒犻櫎鍏宠仈
+ DeleteRelation(ref sReturn, lngBillKey);
+ //鍒犻櫎瀛愯〃
+ DeleteBillSub(lngBillKey);
+ //鎻掑叆瀛愯〃
+ omodel.HInterID = lngBillKey;
+ foreach (Models.ClsKf_MateOutBillSub oSub in DetailColl)
+ {
+ oCn.RunProc("Insert into Kf_ICStockBillSub " +
+ " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" +
+ ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" +
+ ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" +
+ ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
+ ") values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + 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.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() +
+ "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() +
+ "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" +
+ "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" +
+ ") ");
+ }
+ //
+ //foreach (Model.ClsKf_MateOutBillSub oSub in DetailColl)
+ //{
+ // Ds = oCn.RunProcReturn("exec h_p_Kf_MateOutBill_Qty " + oSub.HICMOInterID, "");
+ // if (Ds.Tables[0].Rows.Count == 0)
+ // return;
+ // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
+ // {
+ // sReturn = "姹囨姤鏁伴噺瓒呰繃璁″垝鏁伴噺锛佷笉鍏佽淇濆瓨";
+ // 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
+ {
+ //寰楀埌mainid
+ omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+ omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
+ //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ if (IsExistBillNo(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HBillNo, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew, omodel.HInterID))
+ {
+ omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
+ }
+ if (IsExistMainID(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HInterID, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew))
+ {
+ omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ //
+ oCn.BeginTran();
+ //涓昏〃
+ oCn.RunProc("Insert Into Kf_ICStockBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
+ ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
+ ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
+ ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
+ ") " +
+ " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
+ ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
+ ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() +
+ ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
+ ") ");
+ //鎻掑叆瀛愯〃
+ foreach (Models.ClsKf_MateOutBillSub oSub in DetailColl)
+ {
+ oCn.RunProc("Insert into Kf_ICStockBillSub " +
+ " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" +
+ ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" +
+ ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" +
+ ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" +
+ ") values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + 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.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() +
+ "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() +
+ "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" +
+ "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" +
+ ") ");
+ }
+ //
+ //foreach (Model.ClsKf_MateOutBillSub oSub in DetailColl)
+ //{
+ // Ds = oCn.RunProcReturn("exec h_p_Kf_MateOutBill_Qty " + oSub.HICMOInterID, "");
+ // if (Ds.Tables[0].Rows.Count == 0)
+ // return;
+ // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
+ // {
+ // sReturn = "姹囨姤鏁伴噺瓒呰繃璁″垝鏁伴噺锛佷笉鍏佽淇濆瓨";
+ // 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 Kf_ICStockBillMain Where HInterID=" + lngBillKey.ToString(), "Kf_ICStockBillMain");
+ if(Ds.Tables[0].Rows.Count==0)
+ {
+ sReturn = "鍗曟嵁鏈壘鍒帮紒";
+ return false;
+ }
+ //鍥哄畾璧嬪��===========================================
+ omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+ omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+ omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+ omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+ omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+ omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+ omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+ omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+ 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.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.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.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+ omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+ omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
+ omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+ omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+ //========================================================
+ omodel.HSupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSupID"]);
+ omodel.HWHID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWHID"]);
+ omodel.HSCWHID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSCWHID"]);
+ omodel.HEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEmpID"]);
+ omodel.HManagerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HManagerID"]);
+ omodel.HSecManagerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSecManagerID"]);
+ omodel.HKeeperID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HKeeperID"]);
+ omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
+ omodel.HExplanation = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExplanation"]);
+ omodel.HInnerBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInnerBillNo"]);
+ omodel.HRedBlueFlag = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HRedBlueFlag"]);
+ //
+
+ //寰幆
+ DataSet DsSub ;
+ DsSub = oCn.RunProcReturn("Select * from Kf_ICStockBillSub Where HInterID=" + lngBillKey.ToString(), "Kf_ICStockBillSub");
+ DetailColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+ {
+ Models.ClsKf_MateOutBillSub oSub = new Models.ClsKf_MateOutBillSub();
+ // 鍥哄畾璧嬪��===============================================
+ 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();
+ //===================================================
+ oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]);
+ oSub.HPropertyID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPropertyID"]);
+ oSub.HSecUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSecUnitID"]);
+ oSub.HSecUnitRate = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HSecUnitRate"]);
+ oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]);
+ oSub.HQtyMust = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQtyMust"]);
+ oSub.HQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQty"]);
+ oSub.HPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPrice"]);
+ oSub.HMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HMoney"]);
+ oSub.HWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWHID"]);
+ oSub.HSCWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCWHID"]);
+ oSub.HSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPID"]);
+ oSub.HSCSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCSPID"]);
+ oSub.HSPGroupID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPGroupID"]);
+ oSub.HBatchNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HBatchNo"]);
+ oSub.HPOOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPOOrderInterID"]);
+ oSub.HPOOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPOOrderEntryID"]);
+ oSub.HPOOrderBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HPOOrderBillNo"]);
+ oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderInterID"]);
+ oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderEntryID"]);
+ oSub.HSeOrderBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSeOrderBillNo"]);
+ DetailColl.Add(oSub);
+ }
+ sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
+
+ //鏄剧ず鍗曟嵁鏉$爜淇℃伅
+ public bool ShowBill_Scheme(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //寰幆瀛愯〃2
+ DataSet DsSubSec;
+ DsSubSec = oCn.RunProcReturn("Select * from Kf_ICStockBillSub_WMS with (nolock) Where HInterID=" + lngBillKey.ToString() + " and HBillType='" + this.BillType + "'", "Kf_ICStockBillSub_WMS");
+ DetailSubColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSubSec.Tables[0].Rows.Count; i++)
+ {
+ Models.ClsKf_MateOutBillScheme oSubSec = new Models.ClsKf_MateOutBillScheme();
+ oSubSec.HInterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HInterID"].ToString());
+ oSubSec.HEntryID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HEntryID"].ToString());
+ oSubSec.HItemID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HItemID"].ToString());
+ oSubSec.HBillType = DsSubSec.Tables[0].Rows[i]["HBillType"].ToString();
+ oSubSec.HMaterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HMaterID"].ToString());
+ oSubSec.HProcID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HProcID"].ToString());
+ oSubSec.HWhID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HWhID"].ToString());
+ oSubSec.HGroupID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HGroupID"].ToString());
+ oSubSec.HQty = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HQty"].ToString());
+ oSubSec.HBarCode = DsSubSec.Tables[0].Rows[i]["HBarCode"].ToString();
+ oSubSec.HAddr = DsSubSec.Tables[0].Rows[i]["HAddr"].ToString();
+ oSubSec.HMaker = DsSubSec.Tables[0].Rows[i]["HMaker"].ToString();
+ oSubSec.HMakeDate = DBUtility.ClsPub.isDate(DsSubSec.Tables[0].Rows[i]["HMakeDate"].ToString());
+ oSubSec.HSourceInterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HSourceInterID"].ToString());
+ oSubSec.HSourceEntryID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HSourceEntryID"].ToString());
+ oSubSec.HSourceBillType = DsSubSec.Tables[0].Rows[i]["HSourceBillType"].ToString();
+ oSubSec.HSourceBillNo = DsSubSec.Tables[0].Rows[i]["HSourceBillNo"].ToString();
+ oSubSec.HSourceItemID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HSourceItemID"].ToString());
+ //
+ DetailSubColl.Add(oSubSec);
+ }
+ sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
+
+ //鍒ゆ柇 璐熷簱瀛�
+ public bool CheckKF(Int64 lngBillKey, int iType, ref string sReturn)
+ {
+
+ //try
+ //{
+ //DataSet oDs = new DataSet();
+ //oDs = oCn.RunProcReturn("exec h_p_Kf_ICStockBill_CheckKF " + lngBillKey.ToString() + "," + iType.ToString(), "gy_czygl");
+ //if (oDs == null || oDs.Tables[0].Rows.Count == 0)
+ //{
+ // return false;
+ //}
+ //if (DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0][0]) == "N")
+ //{
+ // sReturn = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0][1]);
+ // return false;
+ //}
+ //else
+ //{
+ // sReturn = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0][1]);
+ return true;
+ // }
+ //}
+ //catch (Exception e)
+ //{
+ // sReturn = e.Message;
+ // throw (e);
+ //}
+ }
+
+ //鏉$爜鎵弿璁板綍,鏂板鍒伴鏂欏嚭搴�
+ public bool AddBill_PDA(ref string sReturn)
+ {
+ try
+ {
+ //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(omodel.HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ sReturn = s;
+ return false;
+ }
+ omodel.HYear = sYear;
+ omodel.HPeriod = sPeriod;
+
+ DataSet Ds;
+ oCn.BeginTran();
+ //鍒犻櫎涓昏〃
+ oCn.RunProc("Delete From Kf_ICStockBillMain where HInterID=" + omodel.HInterID.ToString());
+ //鎻掑叆瀛愯〃
+ oCn.RunProc("EXEC h_p_Kf_MateOutBillSub_Insert " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'");
+ //鎻掑叆涓昏〃
+ oCn.RunProc("Insert Into Kf_ICStockBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMainSourceBillType" +
+ ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
+ ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
+ ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
+ ") " +
+ " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "',convert(varchar(10),getdate(),120),'" + omodel.HMainSourceBillType + "'" +
+ ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',convert(varchar(10),getdate(),120)" +
+ ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() +
+ ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
+ ") ");
+ //鏇存柊鍏宠仈鏁伴噺
+ oCn.RunProc("exec h_p_Sc_UpDatePPBomRelation_Add " + omodel.HInterID.ToString());
+ //瀹℃牳鍗曟嵁
+ oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + omodel.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + omodel.HInterID.ToString());
+
+ //鐢熸垚K3鍗曟嵁
+ //鏂板瀛愯〃銆佷富琛�
+ oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBill_Insert " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillerID.ToString());
+ //鍥炲~鍏宠仈鏁伴噺
+ oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBill_UpdateBillRelateData " + omodel.HInterID.ToString());
+ //瀹℃牳鍗曟嵁
+ oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBill_Check " + omodel.HInterID.ToString() + "," + omodel.HBillerID.ToString());
+ //鏇存柊搴撳瓨
+ oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBill_UpdateStock " + omodel.HInterID.ToString());
+ oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBill_UpdateOrderStock " + omodel.HInterID.ToString());
+
+ //鍒ゆ柇鏉$爜搴撳瓨鏄惁寮傚父锛堣礋搴撳瓨銆佸簱瀛樺ぇ浜庢潯鐮佸垵濮嬪寲锛�
+ Ds = oCn.RunProcReturn("EXEC h_p_KF_ICInventoryBarCodeQtyCtrl " + omodel.HInterID.ToString(), "h_p_KF_ICInventoryBarCodeQtyCtrl");
+
+ if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 1)
+ {
+
+ }
+ else
+ {
+ sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0][1]);
+ oCn.RollBack();
+ return false;
+ }
+ sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+
+ //鏉$爜鎵弿璁板綍,鏂板鍒伴鏂欏嚭搴� (绾㈠瓧)
+ public bool AddBill_PDA_Red(ref string sReturn)
+ {
+ try
+ {
+ //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(omodel.HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ sReturn = s;
+ return false;
+ }
+ omodel.HYear = sYear;
+ omodel.HPeriod = sPeriod;
+
+ DataSet Ds;
+ oCn.BeginTran();
+ //鍒犻櫎涓昏〃
+ oCn.RunProc("Delete From Kf_ICStockBillMain where HInterID=" + omodel.HInterID.ToString());
+ //鎻掑叆瀛愯〃
+ oCn.RunProc("EXEC h_p_Kf_MateOutBillSub_Red_Insert " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'");
+ //鎻掑叆涓昏〃
+ oCn.RunProc("Insert Into Kf_ICStockBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMainSourceBillType" +
+ ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
+ ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
+ ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
+ ") " +
+ " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "',convert(varchar(10),getdate(),120),'" + omodel.HMainSourceBillType + "'" +
+ ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',convert(varchar(10),getdate(),120)" +
+ ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() +
+ ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) +
+ ") ");
+ //鏇存柊鍏宠仈鏁伴噺
+ oCn.RunProc("exec h_p_Sc_UpDatePPBomRelation_Add " + omodel.HInterID.ToString());
+ //瀹℃牳鍗曟嵁
+ oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + omodel.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + omodel.HInterID.ToString());
+ sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+
+
+
+
+
+
+ }
+}
diff --git a/WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs b/WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs
new file mode 100644
index 0000000..8d0e535
--- /dev/null
+++ b/WebAPI/DLL/ClsSb_EquipDotCheckRuleBill.cs
@@ -0,0 +1,25 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.DLL
+{
+ public class ClsSb_EquipDotCheckRuleBill : DBUtility.ClsXt_BaseBill
+ {
+ public Models.ClsSb_EquipDotCheckRuleBillMain omodel = new Models.ClsSb_EquipDotCheckRuleBillMain();
+ public List<Models.ClsSb_EquipDotCheckRuleBillSub> DetailColl_Mater = new List<Models.ClsSb_EquipDotCheckRuleBillSub>();
+
+ public ClsSb_EquipDotCheckRuleBill()
+ {
+ base.MvarItemKeySub = "ClsSb_EquipDotCheckRuleBillSub";
+ base.MvarItemKeySub2 = "";
+ base.MvarItemKeySub3 = "";
+ base.MvarItemKeySub4 = "";
+ base.MvarItemKey = "Sb_EquipDotCheckRuleBillMain";
+ base.MvarReportTitle = "璁惧鐐规瑙勭▼";
+ base.BillType = "3913";
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/DLL/ClsSb_EquipMaintainRuleBill.cs b/WebAPI/DLL/ClsSb_EquipMaintainRuleBill.cs
new file mode 100644
index 0000000..9a2ee03
--- /dev/null
+++ b/WebAPI/DLL/ClsSb_EquipMaintainRuleBill.cs
@@ -0,0 +1,37 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.DLL
+{
+ public class ClsSb_EquipMaintainRuleBill : DBUtility.ClsXt_BaseBill
+ {
+ public Models.ClsSb_EquipMaintainRuleBillMain omodel = new Models.ClsSb_EquipMaintainRuleBillMain();
+ public List<Models.ClsSb_EquipMaintainRuleBillSub> DetailColl_Mater = new List<Models.ClsSb_EquipMaintainRuleBillSub>();
+ public List<Models.ClsSb_EquipMaintainRuleBillSub_Item> DetailColl_Pay = new List<Models.ClsSb_EquipMaintainRuleBillSub_Item>();
+
+ public ClsSb_EquipMaintainRuleBill()
+ {
+ base.MvarItemKeySub = "Sb_EquipMaintainRuleBillSub";
+ base.MvarItemKeySub2 = "Sb_EquipMaintainRuleBillSub_Item";
+ base.MvarItemKeySub3 = "";
+ base.MvarItemKeySub4 = "";
+ base.MvarItemKey = "Sb_EquipMaintainRuleBillMain";
+ base.MvarReportTitle = "璁惧淇濆吇瑙勭▼";
+ base.BillType = "3912";
+ }
+
+ #region 鍥哄畾浠g爜
+
+ ~ClsSb_EquipMaintainRuleBill()
+ {
+ DetailColl_Mater = null;
+ DetailColl_Pay = null;
+ //DetailColl_Entrust = null;
+ //DetailColl_Money = null;
+ }
+
+ #endregion 鑷畾涔夋柟娉�
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs
index c8796ba..f11da88 100644
--- a/WebAPI/ListModels.cs
+++ b/WebAPI/ListModels.cs
@@ -28,6 +28,18 @@
List<Model.ClsKf_POStockInBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsKf_POStockInBillMain>>(jsonString);
return list;
}
+
+ /// <summary>
+ /// 鐢熶骇姹囨姤鍗曞弽搴忓垪鍖�
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsSc_ICMOReportBillMain> getICMOReportBillMainByJson(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsSc_ICMOReportBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_ICMOReportBillMain>>(jsonString);
+ return list;
+ }
/// <summary>
/// 澶栬喘鍏ュ簱(绾㈠瓧)鍙嶅簭鍒楀寲
/// </summary>
@@ -60,6 +72,18 @@
{
jsonString = "[" + jsonString.ToString() + "]";
List<Model.ClsKf_MoveStockBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsKf_MoveStockBillMain>>(jsonString);
+ return list;
+ }
+
+ /// <summary>
+ /// 鍒嗗竷寮忚皟鍑哄崟鍙嶅簭鍒楀寲
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsKf_MoveStockStepOutBillMain> getMoveStockStepOutBillMainByJson(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsKf_MoveStockStepOutBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsKf_MoveStockStepOutBillMain>>(jsonString);
return list;
}
/// <summary>
@@ -543,6 +567,18 @@
{
jsonString = "[" + jsonString.ToString() + "]";
List<Model.ClsGy_BadReason_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_BadReason_Model>>(jsonString);
+ return list;
+ }
+
+ /// <summary>
+ /// 澶勭悊鏂板鏁呴殰鍘熷洜琛ㄧ殑json
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Model.ClsGy_ConkReason_Model> getObjectByJson_Gy_ConkReason(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Model.ClsGy_ConkReason_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_ConkReason_Model>>(jsonString);
return list;
}
@@ -1673,5 +1709,57 @@
List<Models.UserPower> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.UserPower>>(jsonString);
return list;
}
+
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Models.ClsKf_MateOutBillMain> getObjectByJson_Kf_MateOutBillMain(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Models.ClsKf_MateOutBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsKf_MateOutBillMain>>(jsonString);
+ return list;
+ }
+
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Models.ClsKf_MateOutBillSub> getObjectByJson_Kf_MateOutBillSub(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Models.ClsKf_MateOutBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsKf_MateOutBillSub>>(jsonString);
+ return list;
+ }
+
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Models.ClsKf_ICStockBillMain> getObjectByJson_Kf_ICStockBillMain(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Models.ClsKf_ICStockBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsKf_ICStockBillMain>>(jsonString);
+ return list;
+ }
+
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Models.ClsKf_ICStockBillSub> getObjectByJson_Kf_ICStockBillMSub(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Models.ClsKf_ICStockBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsKf_ICStockBillSub>>(jsonString);
+ return list;
+ }
}
}
\ No newline at end of file
diff --git a/WebAPI/Models/ClsGy_EquipFileMain.cs b/WebAPI/Models/ClsGy_EquipFileMain.cs
index 8aac7ca..3f587f2 100644
--- a/WebAPI/Models/ClsGy_EquipFileMain.cs
+++ b/WebAPI/Models/ClsGy_EquipFileMain.cs
@@ -30,6 +30,8 @@
public string HLogo; //鈭� varchar(50) //鍝佺墝
public int HSellSupID; // 鈭� int //渚涘簲鍟�(Gy_Supplier)
public int HMakeSupID; // int //鍒堕�犲晢 (Gy_Supplier)
+ public int HEquipDotCheckRuleInterID;
+ public int HEquipMaintainRuleInterID;
}
}
\ No newline at end of file
diff --git a/WebAPI/Models/ClsKf_ICStockBillMain.cs b/WebAPI/Models/ClsKf_ICStockBillMain.cs
new file mode 100644
index 0000000..5af248d
--- /dev/null
+++ b/WebAPI/Models/ClsKf_ICStockBillMain.cs
@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WebAPI.Models
+{
+ public class ClsKf_ICStockBillMain:DBUtility.ClsXt_BaseBillMain
+ {
+ public Int64 HSupID; // int --往来单位(界面上不需要显示,存0进去)
+ public Int64 HWHID; // int --仓库
+ public Int64 HSCWHID; // int --调出仓库( 界面上不需要显示,存0进去)
+ public Int64 HEmpID; // int --业务员
+ public Int64 HManagerID; // int --负责人(主管)
+ public Int64 HSecManagerID; // int --验收
+ public Int64 HKeeperID; // int --保管员
+ public Int64 HDeptID; // int --部门
+ public Int64 HCurID; // int --币别( 界面上不需要显示,存0进去)
+ public string HExplanation; // varchar(200) --摘要
+ public string HInnerBillNo; // varchar(50) --内部单据号
+ public bool HRedBlueFlag; // bit --红蓝单
+ public Int64 HSellSID; // int --销售方式 (Gy_SellStyle) addnew
+ public Int64 HConveyCompID; // int --运输公司 addnew
+ public Int64 HConveyTypeID; // int --运输方式 addnew
+ public Single HCarriage; // money --运费 addnew
+ public string HSeOrderBillNo_M; // varchar(100) --销售订单 addnew
+ public string HSeOrderBillNo; // varchar(100) --销售订单 addnew
+ public double HConveyMoney; // dec(18,8) --送货费用(无用)
+ public double HCheckMoney; // dec(18,8) --检测费用(无用)
+ public double HCheckMoneyFor; // dec(18,8) --检测费用本位币(无用)
+ public double HRemainMoney; // dec(18,8) --核销剩余数量(无用)
+ public Int64 HCheckStatus; // int --核销状态(无用)
+ public string HHookType; // varchar(50) --勾稽类型(无用)
+ public double HHookQty; // dec(18,8) --勾稽数量(无用)
+ public string HCarNo; // varchar(100) --车牌号
+ public string HMainSourceBillType;// varchar(50) --源单类型
+ public string HLinkMan; // varchar(50) --联系人
+ public string HLinkPhone; // varchar(50) --联系电话
+ public string HAddress; // varchar(500) --送货地址
+ public Int64 HProcID; // int --工序(gy_process)
+ public Int64 HSALEORGID; // int --销售组织
+ public Int64 HPRDORGID; // int --生产组织
+ public Int64 HSTOCKORGID; // int --库存组织
+ public Int64 HOWNERID; // int --货主
+ public Int64 HSETTLEORGID; // int --结算组织
+ public Int64 HOWNERSUPPLIERID; // int --供应货主
+ public Int64 HDEMANDORGID; // int --需求组织
+ public Int64 HPURCHASEORGID; // int --采购组织
+ public Int64 HPAYORGID; // int --付款结算组织
+ public string HOWNERTYPEID; // varchar(100) --货主类型
+ public string HStockStyle; // varchar(100) --库存类型
+
+ }
+}
diff --git a/WebAPI/Models/ClsKf_ICStockBillScheme.cs b/WebAPI/Models/ClsKf_ICStockBillScheme.cs
new file mode 100644
index 0000000..c6d8a47
--- /dev/null
+++ b/WebAPI/Models/ClsKf_ICStockBillScheme.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WebAPI.Models
+{
+ public class ClsKf_ICStockBillScheme : DBUtility.ClsXt_BaseBillSub
+ {
+ public Int64 HItemID;
+ public string HBillType;
+ public Int64 HMaterID;
+ public Int64 HProcID;
+ public Int64 HWhID;
+ public Int64 HGroupID;
+ public double HQty;
+ public string HBarCode;
+ public string HAddr;
+ public string HMaker;
+ public DateTime HMakeDate;
+ public Int64 HSourceItemID;
+
+ }
+}
diff --git a/WebAPI/Models/ClsKf_ICStockBillSub.cs b/WebAPI/Models/ClsKf_ICStockBillSub.cs
new file mode 100644
index 0000000..36d61a4
--- /dev/null
+++ b/WebAPI/Models/ClsKf_ICStockBillSub.cs
@@ -0,0 +1,71 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WebAPI.Models
+{
+ public class ClsKf_ICStockBillSub:DBUtility.ClsXt_BaseBillSub
+ {
+ public Int64 HMaterID; // int --物料ID
+ public Int64 HPropertyID; // int --辅助属性
+ public Int64 HSecUnitID; // int --辅助计量单位
+ public Single HSecUnitRate; // money --换算率
+ public Int64 HUnitID; // int --计量单位
+ public double HQtyMust; // dec(18,8) --应收数量
+ public double HQty; // dec(18,8) --实收数量
+ public double HPrice; // dec(18,8) --单价
+ public double HMoney; // dec(18,8) --金额
+ public double HOrderPrice; // dec(18,8) --采购金额 --addnew
+ public Int64 HWHID; // int --收料仓库
+ public Int64 HSCWHID; // int --调出仓库ID(界面上不需要显示,存0进去)
+ public Int64 HSPID; // int --仓位ID
+ public Int64 HSCSPID; // int --调出仓位ID(界面上不需要显示,存0进去)
+ public Int64 HSPGroupID; // int --仓位组ID(仓库选择完自动带出)
+ public string HBatchNo; // varchar(50) --批次
+ public Int64 HPOOrderInterID; // int --采购订单主内码
+ public Int64 HPOOrderEntryID; // int --采购订单子内码
+ public string HPOOrderBillNo; // varchar(50) --采购订单号
+ public Int64 HSeOrderInterID; // int --销售订单主内码
+ public Int64 HSeOrderEntryID; // int --销售订单子内码
+ public string HSeOrderBillNo; // varchar(50) --销售订单号
+ public Int64 HICMOInterID; // int --生产订单主内码
+ public Int64 HICMOEntryID; // int --生产订单子内码
+ public string HICMOBillNo; // varchar(50) --生产订单号
+ public Int64 HWWOrderInterID; // int --委外订单主内码
+ public Int64 HWWOrderEntryID; // int --委外订单子内码
+ public string HWWOrderBillNo; // varchar(50) --委外订单号
+ public string HEngineNum; // varchar(100) --发动机号(隐藏)
+ public string HUnderPanNum; // varchar(100) --地盘号(隐藏)
+ public string HLeaveFactCard; // varchar(100) --出厂证(隐藏)
+ public double HSalePrice; // dec(18,8) --销售单价 --addnew
+ public Single HCostPrice; // money --成本单价 --addnew
+ public Single HCostMoney; // money --成本金额 --addnew
+ public double HQtyRel; // dec(18,8) --实际数量
+ public DateTime HEndDate; // datetime --结束日期
+ public bool HOldMaterBackFlag; // bit --旧件返回标记
+ public Int64 HProcID; // int --工序(Gy_Process)
+ public double HHookQty; // dec(18,8) --勾稽数量
+ public string HHookType; // varchar(50) --勾稽类型
+ public double HTaxPrice; // dec(18,8) --含税单价
+ public double HTaxMoney; // dec(18,8) --含税金额
+ public Int64 HPackMaterID; // int --包装材料
+ public double HPackQty; // dec(18,8) --包装数量
+ public Int64 HBottleMaterID; // int --无用
+ public double HBottleLackQty; // dec(18,8) --无用
+ public double HBottleQty; // dec(18,8) --无用
+ public string HMTONo; // varchar(50) --计划跟踪号
+ public Int64 HPlanMode; // int --计划模式
+ public Int64 HEOWNERSUPPLIERID; // int --供应组织货主
+ public Int64 HOWNERID; // int --货主
+ public Int64 HKEEPERID; // int --保管者
+ public Int64 HPARENTOWNERID; // int --产品货主
+ public Int64 HRECEIVEOWNERID; // int --收料组织
+ public string HOWNERTYPEID; // varchar(100) --货主类型
+ public string HKEEPERTYPEID; // varchar(100) --保管类型
+ public string HPARENTOWNERTYPEID; // varchar(100) --产品货主类型
+ public string HRECEIVEOWNERTYPEID; // varchar(100) --收料货主类型
+ public Single HTaxRate; // money --税率
+ public Int64 HSTOCKORGID; // int --库存组织
+
+ }
+}
diff --git a/WebAPI/Models/ClsKf_MateOutBillMain.cs b/WebAPI/Models/ClsKf_MateOutBillMain.cs
new file mode 100644
index 0000000..f5b43d1
--- /dev/null
+++ b/WebAPI/Models/ClsKf_MateOutBillMain.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WebAPI.Models
+{
+ public class ClsKf_MateOutBillMain:DBUtility.ClsXt_BaseBillMain
+ {
+ public Int64 HSupID;// int --供应商
+ public Int64 HWHID;// int --仓库
+ public Int64 HSCWHID;// int --调出仓库
+ public Int64 HEmpID;// int --业务员
+ public Int64 HManagerID;// int --负责人
+ public Int64 HSecManagerID;// int --验收
+ public Int64 HKeeperID;// int --保管员
+ public Int64 HDeptID;// int --部门
+ public string HExplanation;// varchar(200) --摘要
+ public string HInnerBillNo;// varchar(50) --内部单据号
+ public bool HRedBlueFlag;// bit --红蓝单
+ }
+}
diff --git a/WebAPI/Models/ClsKf_MateOutBillScheme.cs b/WebAPI/Models/ClsKf_MateOutBillScheme.cs
new file mode 100644
index 0000000..22989ef
--- /dev/null
+++ b/WebAPI/Models/ClsKf_MateOutBillScheme.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WebAPI.Models
+{
+ public class ClsKf_MateOutBillScheme : DBUtility.ClsXt_BaseBillSub
+ {
+ public Int64 HInterID;
+ public Int64 HEntryID;
+ public Int64 HItemID;
+ public string HBillType;
+ public Int64 HMaterID;
+ public Int64 HProcID;
+ public Int64 HWhID;
+ public Int64 HGroupID;
+ public double HQty;
+ public string HBarCode;
+ public string HAddr;
+ public string HMaker;
+ public DateTime HMakeDate;
+ public Int64 HSourceInterID;
+ public Int64 HSourceEntryID;
+ public string HSourceBillType;
+ public string HSourceBillNo;
+ public Int64 HSourceItemID;
+
+ }
+}
diff --git a/WebAPI/Models/ClsKf_MateOutBillSub.cs b/WebAPI/Models/ClsKf_MateOutBillSub.cs
new file mode 100644
index 0000000..6799a63
--- /dev/null
+++ b/WebAPI/Models/ClsKf_MateOutBillSub.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WebAPI.Models
+{
+ public class ClsKf_MateOutBillSub:DBUtility.ClsXt_BaseBillSub
+ {
+ public DateTime HEntryCloseDate;// datetime --行关闭 (默认为'') new
+ public string HRemark;// varchar(200) --备注
+ public Int64 HMaterID;// int --物料ID
+ public Int64 HPropertyID;// int --辅助属性
+ public Int64 HSecUnitID;// int --辅助计量单位
+ public Single HSecUnitRate;// money --换算率
+ public Int64 HUnitID;// int --计量单位
+ public double HQtyMust;// dec(18,8) --应收数量
+ public double HQty;// dec(18,8) --实收数量
+ public double HPrice;// dec(18,8) --单价
+ public double HMoney;// dec(18,8) --金额
+ public Int64 HWHID;// int --收料仓库
+ public Int64 HSCWHID;// int --调出仓库ID
+ public Int64 HSPID;// int --仓位ID
+ public Int64 HSCSPID;// int --调出仓位ID
+ public Int64 HSPGroupID;// int --仓位组ID(仓库选择完自动带出)
+ public string HBatchNo;// varchar(50) --批次
+ public Int64 HPOOrderInterID;// int --采购订单主内码
+ public Int64 HPOOrderEntryID;// int --采购订单子内码
+ public string HPOOrderBillNo;// varchar(50) --采购订单号
+ public Int64 HSeOrderInterID;// int --销售订单主内码
+ public Int64 HSeOrderEntryID;// int --销售订单子内码
+ public string HSeOrderBillNo;// varchar(50) --销售订单号
+
+ }
+}
diff --git a/WebAPI/Models/ClsSb_EquipDotCheckRuleBillMain.cs b/WebAPI/Models/ClsSb_EquipDotCheckRuleBillMain.cs
new file mode 100644
index 0000000..1c9fe42
--- /dev/null
+++ b/WebAPI/Models/ClsSb_EquipDotCheckRuleBillMain.cs
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Models
+{
+ public class ClsSb_EquipDotCheckRuleBillMain : DBUtility.ClsXt_BaseBillMain
+ {
+ public DateTime HBeginDate;// datetime --璁″垝寮�濮嬫棩鏈�
+ public DateTime HEndDate;// datetime --璁″垝缁撴潫鏃ユ湡
+ public string HCycleUnit;// varchar(10) --鍛ㄦ湡鍗曚綅(澶╋紝鏈堬紝鍛�)
+ public int HCheckCycle;// int --鐐规鍛ㄦ湡
+ public string HExplanation;// varchar(500) --鎽樿
+ public string HInnerBillNo;// varchar(50) --鍐呴儴鍗曟嵁鍙�
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Models/ClsSb_EquipDotCheckRuleBillSub.cs b/WebAPI/Models/ClsSb_EquipDotCheckRuleBillSub.cs
new file mode 100644
index 0000000..005d6f0
--- /dev/null
+++ b/WebAPI/Models/ClsSb_EquipDotCheckRuleBillSub.cs
@@ -0,0 +1,16 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Models
+{
+ public class ClsSb_EquipDotCheckRuleBillSub : DBUtility.ClsXt_BaseBillSub
+ {
+ public int HDotCheckItemID;// int --鐐规椤圭洰ID
+ public string HDotCheckItem;// varchar(100) --鐐规椤圭洰
+ public string HDotCheckPart;// varchar(100) --鐐规閮ㄤ綅
+ public string HClaim;// varchar(100) --鍏蜂綋瑕佹眰
+ public int HManagerID;// int --璐熻矗浜篿d(鑱屽憳琛�)
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Models/ClsSb_EquipMaintainRuleBillMain.cs b/WebAPI/Models/ClsSb_EquipMaintainRuleBillMain.cs
new file mode 100644
index 0000000..f729114
--- /dev/null
+++ b/WebAPI/Models/ClsSb_EquipMaintainRuleBillMain.cs
@@ -0,0 +1,15 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Models
+{
+ public class ClsSb_EquipMaintainRuleBillMain : DBUtility.ClsXt_BaseBillMain
+ {
+ public string HCycleUnit; //--鍛ㄦ湡鍗曚綅(澶╋紝鏈堬紝鍛�)
+ public int HCheckCycle; //--淇濆吇鍛ㄦ湡
+ public string HExplanation; // varchar(500) --鎽樿
+ public string HInnerBillNo; //varchar(50) --鍐呴儴鍗曟嵁鍙�
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Models/ClsSb_EquipMaintainRuleBillSub.cs b/WebAPI/Models/ClsSb_EquipMaintainRuleBillSub.cs
new file mode 100644
index 0000000..018b56e
--- /dev/null
+++ b/WebAPI/Models/ClsSb_EquipMaintainRuleBillSub.cs
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Models
+{
+ public class ClsSb_EquipMaintainRuleBillSub : DBUtility.ClsXt_BaseBillSub
+ {
+ public string HBillNo_bak;
+ public int HItemSubID; // --鑷鍒�(GUID)
+ public int HMaterID; //int --閰嶄欢ID
+ public int HUnitID;// int --璁¢噺鍗曚綅
+ public string HQty;// dec(18,8) --鐢ㄩ噺
+ public string HQtyMust;// dec(18,8) --鏍囧噯鐢ㄩ噺(鏆傛椂闅愯棌)
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Models/ClsSb_EquipMaintainRuleBillSub_Item.cs b/WebAPI/Models/ClsSb_EquipMaintainRuleBillSub_Item.cs
new file mode 100644
index 0000000..97d1c30
--- /dev/null
+++ b/WebAPI/Models/ClsSb_EquipMaintainRuleBillSub_Item.cs
@@ -0,0 +1,18 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Models
+{
+ public class ClsSb_EquipMaintainRuleBillSub_Item : DBUtility.ClsXt_BaseBillSub
+ {
+ public string HBillNo_bak;
+ public int HItemSubID; // --鑷鍒�(GUID)
+ public int HMaintainItemID;// int --淇濆吇椤圭洰ID
+ public string HMaintainItem;// varchar(100) --淇濆吇椤圭洰
+ public string HMaintainPart; //varchar(100) --淇濆吇閮ㄤ綅
+ public string HClaim;// varchar(100) --鍏蜂綋瑕佹眰
+ public int HManagerID;// int --璐熻矗浜篿d(鑱屽憳琛�)
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
index 1e8a616..b1a1872 100644
--- a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -18,25 +18,25 @@
<publishTime>02/22/2013 08:43:40</publishTime>
</File>
<File Include="bin/BLL.dll">
- <publishTime>11/16/2021 18:46:35</publishTime>
+ <publishTime>11/19/2021 17:06:10</publishTime>
</File>
<File Include="bin/BLL.pdb">
- <publishTime>11/16/2021 18:46:35</publishTime>
+ <publishTime>11/19/2021 17:06:10</publishTime>
</File>
<File Include="bin/DAL.dll">
- <publishTime>11/16/2021 18:46:33</publishTime>
+ <publishTime>11/19/2021 17:06:06</publishTime>
</File>
<File Include="bin/DAL.pdb">
- <publishTime>11/16/2021 18:46:33</publishTime>
+ <publishTime>11/19/2021 17:06:06</publishTime>
</File>
<File Include="bin/Dapper.dll">
<publishTime>07/22/2016 14:52:40</publishTime>
</File>
<File Include="bin/DBUtility.dll">
- <publishTime>11/16/2021 18:46:29</publishTime>
+ <publishTime>11/19/2021 17:06:00</publishTime>
</File>
<File Include="bin/DBUtility.pdb">
- <publishTime>11/16/2021 18:46:29</publishTime>
+ <publishTime>11/19/2021 17:06:00</publishTime>
</File>
<File Include="bin/Interop.gregn6Lib.dll">
<publishTime>08/25/2021 10:28:25</publishTime>
@@ -60,10 +60,10 @@
<publishTime>07/25/2012 11:48:56</publishTime>
</File>
<File Include="bin/Model.dll">
- <publishTime>11/16/2021 18:46:30</publishTime>
+ <publishTime>11/19/2021 17:06:01</publishTime>
</File>
<File Include="bin/Model.pdb">
- <publishTime>11/16/2021 18:46:30</publishTime>
+ <publishTime>11/19/2021 17:06:01</publishTime>
</File>
<File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
<publishTime>08/16/2021 17:23:15</publishTime>
@@ -72,22 +72,22 @@
<publishTime>08/03/2014 20:33:56</publishTime>
</File>
<File Include="bin/Pub_Class.dll">
- <publishTime>11/16/2021 18:46:28</publishTime>
+ <publishTime>11/19/2021 17:05:56</publishTime>
</File>
<File Include="bin/Pub_Class.pdb">
- <publishTime>11/16/2021 18:46:28</publishTime>
+ <publishTime>11/19/2021 17:05:56</publishTime>
</File>
<File Include="bin/Pub_Control.dll">
- <publishTime>11/16/2021 18:46:28</publishTime>
+ <publishTime>11/19/2021 17:05:58</publishTime>
</File>
<File Include="bin/Pub_Control.pdb">
- <publishTime>11/16/2021 18:46:28</publishTime>
+ <publishTime>11/19/2021 17:05:58</publishTime>
</File>
<File Include="bin/SQLHelper.dll">
- <publishTime>11/16/2021 18:46:29</publishTime>
+ <publishTime>11/19/2021 17:05:58</publishTime>
</File>
<File Include="bin/SQLHelper.pdb">
- <publishTime>11/16/2021 18:46:29</publishTime>
+ <publishTime>11/19/2021 17:05:58</publishTime>
</File>
<File Include="bin/stdole.dll">
<publishTime>05/09/2021 13:35:37</publishTime>
@@ -189,10 +189,10 @@
<publishTime>11/24/2014 11:18:48</publishTime>
</File>
<File Include="bin/WebAPI.dll">
- <publishTime>11/16/2021 18:46:38</publishTime>
+ <publishTime>11/19/2021 17:06:15</publishTime>
</File>
<File Include="bin/WebAPI.pdb">
- <publishTime>11/16/2021 18:46:38</publishTime>
+ <publishTime>11/19/2021 17:06:15</publishTime>
</File>
<File Include="bin/WebGrease.dll">
<publishTime>07/17/2013 17:03:52</publishTime>
@@ -363,7 +363,7 @@
<publishTime>08/06/2021 22:57:28</publishTime>
</File>
<File Include="Web.config">
- <publishTime>11/16/2021 18:46:49</publishTime>
+ <publishTime>11/19/2021 17:09:40</publishTime>
</File>
</ItemGroup>
</Project>
\ No newline at end of file
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index a84bcd1..7fe8d77 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -357,6 +357,8 @@
<Compile Include="Controllers\ReportPlatFormController.cs" />
<Compile Include="Controllers\SBGL\Gy_EquipFileMainController.cs" />
<Compile Include="Controllers\SBGL\Gy_EquipTypeController.cs" />
+ <Compile Include="Controllers\SBGL\Sb_EquipDotCheckRuleBillController.cs" />
+ <Compile Include="Controllers\SBGL\Sb_EquipMaintainRuleBillController.cs" />
<Compile Include="Controllers\SCGL\Sc_MESProductReportBillController.cs" />
<Compile Include="Controllers\Sc_MouldRepairOutBillController.cs" />
<Compile Include="Controllers\Sc_MouldRepairInBillListController - .cs" />
@@ -386,8 +388,11 @@
<Compile Include="Controllers\XSGL\Xs_SeOutStockBackBillController.cs" />
<Compile Include="Controllers\XSGL\Xs_SeOutStockBillController.cs" />
<Compile Include="Controllers\XSGL\Xs_SeOrderBillController.cs" />
+ <Compile Include="Controllers\浠撳瓨绠$悊\ClsKf_MateOutBackBillController.cs" />
+ <Compile Include="Controllers\浠撳瓨绠$悊\Kf_MateOutBillController.cs" />
<Compile Include="Controllers\鍝佽川绠$悊\宸ュ簭妫�楠屽崟\QC_ProcessCheckBillController.cs" />
<Compile Include="Controllers\鍝佽川绠$悊\棣栦欢妫�楠屽崟\QC_FirstPieceCheckBillController.cs" />
+ <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_ConkReasonBillController.cs" />
<Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DotCheckBillController.cs" />
<Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_MaintainBillController.cs" />
<Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_RepairBillController.cs" />
@@ -406,12 +411,15 @@
<Compile Include="DLL\ClsGy_Source_Ctl.cs" />
<Compile Include="DLL\ClsGy_WorkPayTypeBill.cs" />
<Compile Include="DLL\ClsGy_WorkTypeBill.cs" />
+ <Compile Include="DLL\ClsKf_MateOutBackBill.cs" />
+ <Compile Include="DLL\ClsKf_MateOutBill.cs" />
<Compile Include="DLL\ClsOA_InformBill.cs" />
<Compile Include="DLL\ClsQC_NoPassProdCheckBill.cs" />
<Compile Include="DLL\ClsQC_PatrolProcCheckBill.cs" />
<Compile Include="DLL\ClsSb_EquipConkBookBill.cs" />
<Compile Include="DLL\ClsSb_EquipDotCheckBill.cs" />
<Compile Include="DLL\ClsSb_EquipMaintainBill.cs" />
+ <Compile Include="DLL\ClsSb_EquipMaintainRuleBill.cs" />
<Compile Include="DLL\ClsSb_EquipRepairCheckBill.cs" />
<Compile Include="DLL\ClsSb_EquipRepairWorkBill.cs" />
<Compile Include="DLL\ClsSc_ICMOBillWorkQtyStatus_Tmp.cs" />
@@ -443,6 +451,7 @@
<Compile Include="DLL\ClsWW_EntrustProcessReportBill.cs" />
<Compile Include="DLL\ClsWW_EntrustProcessSendOutBill.cs" />
<Compile Include="DLL\ClsWW_EntrustWorkOrderBill.cs" />
+ <Compile Include="DLL\ClsSb_EquipDotCheckRuleBill.cs" />
<Compile Include="LogService.cs" />
<Compile Include="Models\ApiConfig.cs" />
<Compile Include="Models\ApiResult.cs" />
@@ -451,8 +460,19 @@
<Compile Include="Models\ClsGy_Maintain.cs" />
<Compile Include="Models\ClsGy_Repair.cs" />
<Compile Include="Models\ClsGy_RepairCheck.cs" />
+ <Compile Include="Models\ClsKf_ICStockBillMain.cs" />
+ <Compile Include="Models\ClsKf_ICStockBillScheme.cs" />
+ <Compile Include="Models\ClsKf_ICStockBillSub.cs" />
+ <Compile Include="Models\ClsKf_MateOutBillMain.cs" />
+ <Compile Include="Models\ClsKf_MateOutBillScheme.cs" />
+ <Compile Include="Models\ClsKf_MateOutBillSub.cs" />
<Compile Include="Models\ClsOA_InformBillMain.cs" />
<Compile Include="Models\ClsOA_InformBillSub.cs" />
+ <Compile Include="Models\ClsSb_EquipDotCheckRuleBillMain.cs" />
+ <Compile Include="Models\ClsSb_EquipDotCheckRuleBillSub.cs" />
+ <Compile Include="Models\ClsSb_EquipMaintainRuleBillMain.cs" />
+ <Compile Include="Models\ClsSb_EquipMaintainRuleBillSub.cs" />
+ <Compile Include="Models\ClsSb_EquipMaintainRuleBillSub_Item.cs" />
<Compile Include="Models\Pay_PeriodInfoSet.cs" />
<Compile Include="Models\Gy_OrderBackInfo.cs" />
<Compile Include="Models\Gy_OrderLevList.cs" />
@@ -593,7 +613,6 @@
<Compile Include="Controllers\EntrustOutController.cs" />
<Compile Include="Controllers\Kf_EntrustInBillController.cs" />
<Compile Include="Controllers\MateOutController.cs" />
- <Compile Include="Controllers\MoveStockBillController.cs" />
<Compile Include="Controllers\OtherOutBillController.cs" />
<Compile Include="Controllers\OtherInStockController.cs" />
<Compile Include="Controllers\POStockInBackBillController.cs" />
diff --git a/WebAPI/WebServer.cs b/WebAPI/WebServer.cs
index 29f5db2..6509869 100644
--- a/WebAPI/WebServer.cs
+++ b/WebAPI/WebServer.cs
@@ -3991,6 +3991,25 @@
//sErrMsg = "淇濆瓨璋冩嫧鍗曞け璐ワ紒" + sErrMsg;
//return false;
}
+
+ public bool set_MoveStockStepOutBill(WebAPI.WebS.ClsKf_MoveStockStepOutBillMain oMain, string sHSourceType, ref string sErrMsg)
+ {
+ WebS.WebService1 oWebs = new WebS.WebService1();
+ if (oWebs.set_SaveMoveStockStepOutBill_New(oMain, sHSourceType, ref sErrMsg))
+ {
+ sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
+ return true;
+ }
+ else
+ {
+ sErrMsg = "鍗曟嵁鍙凤細" + oMain.HBillNo + ", 鍗曟嵁ID锛�" + oMain.HInterID + ";" + sErrMsg;
+ return false;
+ }
+
+
+ }
+
+
//鍒犻櫎璁板綍
public bool set_DelPonderationBillMain_Temp_InterIDAndSource(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string sHBillType, ref string sErrMsg)
{
@@ -4487,6 +4506,33 @@
}
}
+ public bool set_SaveICMOReportBill_Json(WebAPI.WebS.ClsSc_ICMOReportBillMain oMain, string sHSourceType, ref string sErrMsg)
+ {
+ //BLL.ClsKf_POStockInBill bll = new BLL.ClsKf_POStockInBill();
+ //return bll.set_SavePOStockInBill_New(oMain, sHSourceType, ref DBUtility.ClsPub.sExeReturnInfo);
+ WebS.WebService1 oWebs = new WebS.WebService1();
+ if (oWebs.set_SaveICMOReportBill_New(oMain, sHSourceType, ref sErrMsg))
+ {
+ //鍒ゆ柇鏄惁鍙嶅啓鎴愬姛
+ //if (set_UpdateHStatus(oMain.HInterID, oMain.HExplanation.ToString()))
+ //{
+ sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo;
+ return true;
+ //}
+ //else
+ //{
+ // sErrMsg = "淇濆瓨鎴愬姛锛�" + oMain.HBillNo + "鐘舵�佸弽鍐欏け璐ワ紒";
+ // return true;
+ //}
+ }
+ else
+ {
+ sErrMsg = "鍗曟嵁鍙凤細" + oMain.HBillNo + ", 鍗曟嵁ID锛�" + oMain.HInterID + ";" + sErrMsg;
+ return false;
+ }
+ }
+
+
/// <summary>
/// 鐢熸垚澶栬喘鍏ュ簱鍗昁3
/// </summary>
--
Gitblit v1.9.1