From 374460d6ef36bea1e76d04c76af409c91def38d8 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期二, 23 四月 2024 17:14:44 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/基础资料/工资基础资料/Gy_WorkTypeController.cs | 2
Model/工资管理/ClsPay_SingleBalBillSub.cs | 1
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs | 39 +
WebAPI/Controllers/BLL/Xt_UserController.cs | 6
WebAPI/Web.config | 4
DAL/工资管理/ClsPay_SingleBalBill.cs | 180 ++++--
WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs | 15
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs | 371 ++++++++++++++
WebAPI/Controllers/工资管理/Pay_SingleBalBillController.cs | 251 ++++++++-
WebAPI/Models/Gy_User.cs | 1
Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs | 1
WebAPI/Controllers/仓存管理/验收入库/Kf_ProductInBillController.cs | 621 ++++++++++++++++++++++-
12 files changed, 1,345 insertions(+), 147 deletions(-)
diff --git "a/DAL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_SingleBalBill.cs" "b/DAL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_SingleBalBill.cs"
index ac73af0..da19e6a 100644
--- "a/DAL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_SingleBalBill.cs"
+++ "b/DAL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_SingleBalBill.cs"
@@ -29,15 +29,75 @@
{
DetailColl = null;
}
-
+
#endregion 鑷畾涔夋柟娉�
+
+ //淇濆瓨鍓嶆帶鍒�
+ public bool BeforeSave(Int64 HInterID, string HBillNo, Int64 OperationType, ref string sReturn)
+ {
+ try
+ {
+ DataSet Ds = oCn.RunProcReturn("Exec h_p_Pay_SingleBalBill_BeforeSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Pay_SingleBalBill_BeforeSaveCtrl");
+ if (Ds == null || Ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+ return false;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
+ return false;
+ }
+ }
+ return true;
+ }
+ catch (Exception e)
+ {
+ throw (e);
+ }
+ }
+
+ //淇濆瓨鍚庢帶鍒�
+ public bool AfterSave(Int64 HInterID, string HBillNo, Int64 OperationType, ref string sReturn)
+ {
+ try
+ {
+ DataSet Ds = oCn.RunProcReturn("Exec h_p_Pay_SingleBalBill_AfterSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Pay_SingleBalBill_AfterSaveCtrl");
+ if (Ds == null || Ds.Tables[0].Rows.Count == 0)
+ {
+ sReturn = "淇濆瓨鍚庡垽鏂け璐ワ紒";
+ return false;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
+ return false;
+ }
+ }
+ return true;
+ }
+ catch (Exception e)
+ {
+ throw (e);
+ }
+ }
+
//淇敼鍗曟嵁
public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
{
try
{
- //
oCn.BeginTran();
+ //淇濆瓨鍓嶆帶鍒�
+ if (!BeforeSave(lngBillKey, omodel.HBillNo, 2, ref sReturn))
+ {
+ oCn.RollBack();
+ return false;
+ }
//鏇存柊涓昏〃
oCn.RunProc("UpDate Pay_SingleBalBillMain set " +
" HBillNo='" + omodel.HBillNo + "'" + //鍥哄畾璧嬪��===============
@@ -48,12 +108,13 @@
",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
",HUpDateDate=getdate()" +
//========================================
- ",HGroupID=" + omodel.HGroupID.ToString() +
",HDeptID=" + omodel.HDeptID.ToString() +
+ ",HGroupID=" + omodel.HGroupID.ToString() +
",HEmpID=" + omodel.HEmpID.ToString() +
- ",HPayType=" + omodel.HPayType.ToString() +
+ ",HPayType='" + omodel.HPayType + "'" +
",HExplanation='" + omodel.HExplanation + "'" +
",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
+ ",HStockOrgID=" + omodel.HSTOCKORGID.ToString() +
" where HInterID=" + lngBillKey.ToString());
//鍒犻櫎鍏宠仈
DeleteRelation(ref sReturn, lngBillKey);
@@ -64,37 +125,30 @@
foreach (Model.ClsPay_SingleBalBillSub oSub in DetailColl)
{
oCn.RunProc("Insert into Pay_SingleBalBillSub " +
- " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
- ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
- ",HMaterID,HProcID,HEmpID,HSourceID,HTimes,HQty,HPrice,HSqty" +
- ",HMoney,HICMOInterID,HICMOBillNo,HProcReportInterID,HProcReportEntryID,HProcReportBillNo" +
+ " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
+ ",HMaterID,HProcID,HSourceID,HEmpID,HTimes,HQty" +
+ ",HPrice,HPackQty,HPackPrice,HPackMoney,HPackMaterID,HPriceRate" +
+ ",HSubsidyID,HSubsidyTotal,HDeuctID,HDeuctTotal,HSubsidyQty,HSubsidyMoney,HMoney" +
+ ",HICMOInterID,HICMOEntryID,HICMOBillNo,HProcReportInterID,HProcReportEntryID,HProcReportBillNo" +
",HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo" +
- ",HPriceRate,HSubsidyTotal,HDeuctTotal,HSubsidyID,HDeuctID" +
- ",HPackQty,HPackPrice,HPackMoney,HPackMaterID,HSubsidyQty,HSubsidyMoney" +
") 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.HProcID.ToString() + "," + oSub.HEmpID.ToString() + "," + oSub.HSourceID.ToString()
- + "," + oSub.HTimes.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HSqty.ToString() +
- "," + oSub.HMoney.ToString() + "," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HProcReportInterID.ToString() + "," + oSub.HProcReportEntryID.ToString() + ",'" + oSub.HProcReportBillNo + "'" +
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+ "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'" +
+ "," + oSub.HMaterID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HSourceID.ToString() + "," + oSub.HEmpID.ToString() + "," + oSub.HTimes.ToString() + "," + oSub.HQty.ToString() +
+ "," + oSub.HPrice.ToString() + "," + oSub.HPackQty.ToString() + "," + oSub.HPackPrice.ToString() + "," + oSub.HPackMoney.ToString() + "," + oSub.HPackMaterID.ToString() + "," + oSub.HPriceRate.ToString() +
+ "," + oSub.HSubsidyID.ToString() + "," + oSub.HSubsidyTotal.ToString() + "," + oSub.HDeuctID.ToString() + "," + oSub.HDeuctTotal.ToString() + "," + oSub.HSubsidyQty.ToString() + "," + oSub.HSubsidyMoney.ToString() + "," + oSub.HMoney.ToString() +
+ "," + oSub.HICMOInterID.ToString() + "," + oSub.HICMOEntryID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HProcReportInterID.ToString() + "," + oSub.HProcReportEntryID.ToString() + ",'" + oSub.HProcReportBillNo + "'" +
"," + oSub.HProcPlanInterID.ToString() + "," + oSub.HProcPlanEntryID.ToString() + ",'" + oSub.HProcPlanBillNo + "'" +
- "," + oSub.HPriceRate.ToString() + "," + oSub.HSubsidyTotal.ToString() + "," + oSub.HDeuctTotal.ToString() + "," + oSub.HSubsidyID.ToString() + "," + oSub.HDeuctID.ToString() +
- "," + oSub.HPackQty.ToString() + "," + oSub.HPackPrice.ToString() + "," + oSub.HPackMoney.ToString() + "," + oSub.HPackMaterID.ToString() + "," + oSub.HSubsidyQty.ToString() + "," + oSub.HSubsidyMoney.ToString() +
") ");
}
- //
- //foreach (Model.ClsPay_SingleBalBillSub oSub in DetailColl)
- //{
- // Ds = oCn.RunProcReturn("exec h_p_Pay_SingleBalBill_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 = "淇敼鍗曟嵁鎴愬姛锛�";
+ //淇濆瓨鍚庢帶鍒�
+ if (!AfterSave(lngBillKey, omodel.HBillNo, 2, ref sReturn))
+ {
+ oCn.RollBack();
+ return false;
+ }
+ sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 淇敼鎴愬姛锛�";
oCn.Commit();
return true;
}
@@ -114,52 +168,54 @@
omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
//鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
oCn.BeginTran();
+ //淇濆瓨鍓嶆帶鍒�
+ if (!BeforeSave(omodel.HInterID, omodel.HBillNo, 1, ref sReturn))
+ {
+ oCn.RollBack();
+ return false;
+ }
//涓昏〃
oCn.RunProc("Insert Into Pay_SingleBalBillMain " +
"(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
- ",HYear,HPeriod,HRemark,HMaker,HMakeDate,HSaveFlag" +
- ",HGroupID,HDeptID,HEmpID,HPayType,HExplanation,HInnerBillNo" +
+ ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
+ ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" +
+ ",HDeptID,HGroupID,HEmpID,HPayType,HExplanation" +
+ ",HSaveFlag,HInnerBillNo,HStockOrgID" +
") " +
- " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
- ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()," + Convert.ToString(omodel.HSaveFlag ? 1 : 0) +
- ", " + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HPayType.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" +
+ " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate.ToShortDateString() + "'" +
+ ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
+ ", " + omodel.HMainSourceInterID.ToString() + "," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'" +
+ ", " + omodel.HDeptID.ToString() + "," + omodel.HGroupID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HPayType.ToString() + ",'" + omodel.HExplanation + "'" +
+ ", " + Convert.ToString(omodel.HSaveFlag ? 1 : 0) + ",'" + omodel.HInnerBillNo + "'," + omodel.HSTOCKORGID.ToString() +
") ");
//鎻掑叆瀛愯〃
foreach (Model.ClsPay_SingleBalBillSub oSub in DetailColl)
{
oCn.RunProc("Insert into Pay_SingleBalBillSub " +
- " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
- ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
- ",HMaterID,HProcID,HEmpID,HSourceID,HTimes,HQty,HPrice,HSqty" +
- ",HMoney,HICMOInterID,HICMOBillNo,HProcReportInterID,HProcReportEntryID,HProcReportBillNo" +
+ " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
+ ",HMaterID,HProcID,HSourceID,HEmpID,HTimes,HQty" +
+ ",HPrice,HPackQty,HPackPrice,HPackMoney,HPackMaterID,HPriceRate" +
+ ",HSubsidyID,HSubsidyTotal,HDeuctID,HDeuctTotal,HSubsidyQty,HSubsidyMoney,HMoney" +
+ ",HICMOInterID,HICMOEntryID,HICMOBillNo,HProcReportInterID,HProcReportEntryID,HProcReportBillNo" +
",HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo" +
- ",HPriceRate,HSubsidyTotal,HDeuctTotal,HSubsidyID,HDeuctID" +
- ",HPackQty,HPackPrice,HPackMoney,HPackMaterID,HSubsidyQty,HSubsidyMoney" +
") 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.HProcID.ToString() + "," + oSub.HEmpID.ToString() + "," + oSub.HSourceID.ToString()
- + "," + oSub.HTimes.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HSqty.ToString() +
- "," + oSub.HMoney.ToString() + "," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HProcReportInterID.ToString() + "," + oSub.HProcReportEntryID.ToString() + ",'" + oSub.HProcReportBillNo + "'" +
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+ "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'" +
+ "," + oSub.HMaterID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HSourceID.ToString() + "," + oSub.HEmpID.ToString() + "," + oSub.HTimes.ToString() + "," + oSub.HQty.ToString() +
+ "," + oSub.HPrice.ToString() + "," + oSub.HPackQty.ToString() + "," + oSub.HPackPrice.ToString() + "," + oSub.HPackMoney.ToString() + "," + oSub.HPackMaterID.ToString() + "," + oSub.HPriceRate.ToString() +
+ "," + oSub.HSubsidyID.ToString() + "," + oSub.HSubsidyTotal.ToString() + "," + oSub.HDeuctID.ToString() + "," + oSub.HDeuctTotal.ToString() + "," + oSub.HSubsidyQty.ToString() + "," + oSub.HSubsidyMoney.ToString() + "," + oSub.HMoney.ToString() +
+ "," + oSub.HICMOInterID.ToString() + "," + oSub.HICMOEntryID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HProcReportInterID.ToString() + "," + oSub.HProcReportEntryID.ToString() + ",'" + oSub.HProcReportBillNo + "'" +
"," + oSub.HProcPlanInterID.ToString() + "," + oSub.HProcPlanEntryID.ToString() + ",'" + oSub.HProcPlanBillNo + "'" +
- "," + oSub.HPriceRate.ToString() + "," + oSub.HSubsidyTotal.ToString() + "," + oSub.HDeuctTotal.ToString() + "," + oSub.HSubsidyID.ToString() + "," + oSub.HDeuctID.ToString() +
- "," + oSub.HPackQty.ToString() + "," + oSub.HPackPrice.ToString() + "," + oSub.HPackMoney.ToString() + "," + oSub.HPackMaterID.ToString() + "," + oSub.HSubsidyQty.ToString() + "," + oSub.HSubsidyMoney.ToString() +
") ");
}
- //
- //foreach (Model.ClsPay_SingleBalBillSub oSub in DetailColl)
- //{
- // Ds = oCn.RunProcReturn("exec h_p_Pay_SingleBalBill_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 = "鏂板鍗曟嵁鎴愬姛锛�";
+ //淇濆瓨鍚庢帶鍒�
+ if (!AfterSave(omodel.HInterID, omodel.HBillNo, 1, ref sReturn))
+ {
+ oCn.RollBack();
+ return false;
+ }
+ sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 鏂板鎴愬姛锛�";
oCn.Commit();
return true;
}
diff --git "a/Model/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_SingleBalBillSub.cs" "b/Model/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_SingleBalBillSub.cs"
index 52a0201..46a60cc 100644
--- "a/Model/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_SingleBalBillSub.cs"
+++ "b/Model/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_SingleBalBillSub.cs"
@@ -21,6 +21,7 @@
public double HMoney;// decimal(18,8) --金额
public Int64 HICMOInterID;// int --生产任务单ID
+ public Int64 HICMOEntryID;// int --生产任务单子ID
public string HICMOBillNo;// varchar(50) --生产任务单号
public Int64 HProcReportInterID;// int --工序汇报单ID
public Int64 HProcReportEntryID;// int --工序汇报单子ID
diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
index b16841f..4af1846 100644
--- a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
+++ b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
@@ -436,6 +436,7 @@
public string MES_StationInBill_DeleteRelationCtl; //进站接收单删除时是否进行关联控制
public string MES_StationInBill_PreQtyCtl; //本道进站数量不能大于上道出站合格数量
public string MES_StationInBill_QtyRateCtl; //本道进站数量汇总数不能大于流转卡数量上限
+ public string MES_StationInBill_DyCentralInspectionControl; //判断工序进站之前是否做过检验单
//工序出站汇报单
public string MES_StationOutBill_AutoCheck; //保存后是否自动审核
diff --git a/WebAPI/Controllers/BLL/Xt_UserController.cs b/WebAPI/Controllers/BLL/Xt_UserController.cs
index 08c0326..5bb295d 100644
--- a/WebAPI/Controllers/BLL/Xt_UserController.cs
+++ b/WebAPI/Controllers/BLL/Xt_UserController.cs
@@ -206,14 +206,14 @@
",HWhID,HWHName,HSupID,HSupName " +
",HSCWHID,HSCWHName " +
",HCloudUserName,HCloudUserPsd,HUSEORGID,HProcID" +
- ",HGroupID,HSourceID,HCheckEmpID) " +
+ ",HGroupID,HSourceID,HCheckEmpID,HWorkCenterID) " +
"values ('" + lsmain[0].Czybm.ToString() + "','" + lsmain[0].Czymc.ToString() + "','" + ClsPub.StrToPsd(lsmain[0].Czmm.ToString()) + "','" + lsmain[0].Explain.ToString() + "','" + lsmain[0].HEmpID.ToString() + "',"+ lsmain[0].HK3UserID.ToString() + "" +
","+ lsmain[0].HKeeperID.ToString() + ",'"+ lsmain[0].HKeeper.ToString() + "',"+ lsmain[0].HSecManagerID.ToString() + ",'"+ lsmain[0].HSecManager.ToString() + "'" +
"," + lsmain[0].HSellManID.ToString() + ",'" + lsmain[0].HSellMan.ToString() + "'," + lsmain[0].HDeptID.ToString() + ",'" + lsmain[0].HDept.ToString() + "'" +
"," + lsmain[0].HWhID.ToString() + ",'" + lsmain[0].HWHName.ToString() + "'," + lsmain[0].HSupID.ToString() + ",'" + lsmain[0].HSupName.ToString() + "'" +
"," + lsmain[0].HSCWHID.ToString() + ",'" + lsmain[0].HSCWHName.ToString() + "'" +
",'" + lsmain[0].HCloudUserName.ToString() + "','" + lsmain[0].HCloudUserPsd.ToString() + "',"+ lsmain[0].HOrgID.ToString() + "," + lsmain[0].HProcID.ToString() + "" +
- ","+ lsmain[0].HGroupID.ToString() + ","+ lsmain[0].HSourceID.ToString() + "," + lsmain[0].HCheckEmpID.ToString() + ")");
+ ","+ lsmain[0].HGroupID.ToString() + ","+ lsmain[0].HSourceID.ToString() + "," + lsmain[0].HCheckEmpID.ToString() + "," + lsmain[0].HWorkCenterID.ToString() + ")");
//鏂板鍚庢煡璇� 纭繚鏁版嵁娣诲姞鎴愬姛
ds = oCN.RunProcReturn("Select * from Gy_Czygl where Czybm='" + lsmain[0].Czybm.ToString() + "'", "Gy_Czygl");
@@ -264,6 +264,7 @@
",HProcID=" + lsmain[0].HProcID.ToString() +
",HSourceID=" + lsmain[0].HSourceID.ToString() +
",HGroupID=" + lsmain[0].HGroupID.ToString() +
+ ",HWorkCenterID=" + lsmain[0].HWorkCenterID.ToString() +
",HSupName='" + lsmain[0].HSupName.ToString() + "'" +
",HCloudUserName='" + lsmain[0].HCloudUserName.ToString() + "'" +
",HCloudUserPsd='" + lsmain[0].HCloudUserPsd.ToString() + "'" +
@@ -293,6 +294,7 @@
",HProcID=" + lsmain[0].HProcID.ToString() +
",HSourceID=" + lsmain[0].HSourceID.ToString() +
",HGroupID=" + lsmain[0].HGroupID.ToString() +
+ ",HWorkCenterID=" + lsmain[0].HWorkCenterID.ToString() +
",HSupName='" + lsmain[0].HSupName.ToString() + "'" +
",HCloudUserName='" + lsmain[0].HCloudUserName.ToString() + "'" +
",HCloudUserPsd='" + lsmain[0].HCloudUserPsd.ToString() + "'" +
diff --git a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
index 4800450..57b9a60 100644
--- a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -1851,6 +1851,45 @@
}
#endregion
+ #region 宸ュ簭鍗曞搧杩囩珯 杩芥函鎶ヨ〃 閰嶄欢娓呭崟鏌ヨ
+ [Route("Sc_AssemblyBill/AssemblyBillAndStationInBillList_SN")]
+ [HttpGet]
+ public object AssemblyBillAndStationInBillList_SN(string sWhere)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ string sql1 = "exec h_p_Sc_AssemblyBillAndStationInBillList_SN ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "h_p_Sc_AssemblyBillAndStationInBillList_SN");
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#region 宸ュ簭鍗曞搧杩囩珯 閫嗗悜杩芥函鎶ヨ〃 娴佽浆鍗℃煡璇�
[Route("Cj_SingleStation/Sc_ProcessExchangeBillMainList")]
[HttpGet]
diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
index 15577f4..9fde5b9 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
@@ -1023,12 +1023,19 @@
}
ds = oCN.RunProcReturn("select ManagerFlag from gy_czygl where czymc='" + user.Trim() + "'", "gy_czygl");
- if (!(bool)ds.Tables[0].Rows[0]["ManagerFlag"]) //鏄惁绠$悊鍛�
+ string sErr = "";
+ oSystemParameter.ShowBill(ref sErr);
+ if (oSystemParameter.omodel.WMS_CampanyName == "涔斾竴")
{
- //涓嶆槸绠$悊鍛�
- sWhere += " and 鍒跺崟浜� = '" + user + "'";
}
-
+ else
+ {
+ if (!(bool)ds.Tables[0].Rows[0]["ManagerFlag"]) //鏄惁绠$悊鍛�
+ {
+ //涓嶆槸绠$悊鍛�
+ sWhere += " and 鍒跺崟浜� = '" + user + "'";
+ }
+ }
string sql = "select * from h_v_QC_FirstPieceCheckBillMainList where 1=1 " + sWhere + " order by 鏃ユ湡 ";
diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
index 2dbbae2..8442208 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -3210,5 +3210,376 @@
}
}
#endregion
+
+ #region 褰撳墠宸ュ崟(鎵爜姹囨姤) 鏉$爜鏌ヨ
+ [Route("Cj_StationOutBill_CurrentWork/SNHBardCodeList")]
+ [HttpGet]
+ public object SNHBardCodeList(string HBarCode, string user, int HOrgID)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn(@"select HSourceInterID,HSourceBillNo from Gy_BarCodeBill WITH(NOLOCK) where HBarCode='" + HBarCode + "'", "Gy_BarCodeBill");
+
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ string HSourceInterID = ds.Tables[0].Rows[0]["HSourceInterID"].ToString();
+ string HSourceBillNo = ds.Tables[0].Rows[0]["HSourceBillNo"].ToString();
+
+ ds = oCN.RunProcReturn("select * from gy_czygl WITH(NOLOCK) where czymc='" + user + "'", "gy_czygl");
+ string HProcID = ds.Tables[0].Rows[0]["HProcID"].ToString();
+
+ ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillList where hmainid=" + HSourceInterID + " and 鍗曟嵁鍙�='" + HSourceBillNo + "' and HProcID=" + HProcID, "h_v_Sc_ProcessExchangeBillList");
+
+ if (ds.Tables[0].Rows.Count == 0) {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏉$爜:" + HBarCode + ",娴佽浆鍗�:" + HSourceBillNo + ",涓庡綋鍓嶆祦杞崱,鎵�瀵瑰簲鐨勫伐搴忎笉瀛樺湪!";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ 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;
+ }
+ }
+ catch (Exception e)
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 褰撳墠宸ュ崟(鎵爜姹囨姤) 鍑虹珯鍗曟煡璇�
+ [Route("Cj_StationOutBill_CurrentWork/get_Out_Display")]
+ [HttpGet]
+ public object get_Out_Display(string sWhere, string user,string HBillSubType)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍑虹珯鍗曟棤鏌ヨ鏉冮檺!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ string sql1 = "select * from h_v_MES_StationOutBillList_SN where 1 = 1 ";
+ string sql = sql1 + sWhere + " order by 鍒跺崟鏃ユ湡 desc";
+ ds = oCN.RunProcReturn(sql, "h_v_MES_StationOutBillList_SN");
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 褰撳墠宸ュ崟(鎵爜姹囨姤) 瀛愯〃淇濆瓨
+ [Route("Cj_StationOutBill_CurrentWork/AddBillSub")]
+ [HttpPost]
+ public object AddBillSub([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ try
+ {
+ //鍙嶅簭鍒楀寲
+ string msg2 = "[" + sArray[0].ToString() + "]";
+ string user = sArray[1].ToString();//鐢ㄦ埛鍚�
+ string OperationType = sArray[2].ToString();//绫诲瀷
+
+ if (OperationType == "5")
+ {
+ //鍒ゆ柇鏄惁鏈夌紪杈戞潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Sub_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹屽伐鍗曟棤缂栬緫鏉冮檺!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ //鍒ゆ柇鏄惁鏈夌紪杈戞潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍑虹珯鍗曟棤缂栬緫鏉冮檺!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ List<StationBill> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<StationBill>>(msg2);
+ long HInterID = list[0].HInterID;//閫掑叆type寰楀埌鐨勫崟鎹甀D
+ string HBillNo = list[0].HBillNo;//閫掑叆type寰楀埌鐨勫崟鎹彿
+ double HQty = list[0].HQty;//鍚堟牸鏁伴噺
+ long HProcExchInterID = list[0].lngBillKey;
+ long HProcExchEntryID = list[0].lngBillSubKey;
+ string HProcExchBillNo = list[0].HProcExchBillNo;//娴佽浆鍗�
+ string HBarCode = list[0].HBarCode;//鏉$爜
+ string eventType = list[0].eventType;
+
+ //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ oCN.BeginTran();
+ if ("Add".Equals(eventType))
+ {
+ ds = oCN.RunProcReturn("select * from Sc_StationOutBillSub_SN WITH(NOLOCK) where HInterID='" + HInterID + "' order by HEntryID desc", "Sc_StationOutBillSub_SN");
+
+ oCN.RunProc($@"insert into Sc_StationOutBillSub_SN(HInterID,HBillNo_bak,HEntryID,HBarCode,HBarCodeQty,HMakeTime,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney)
+values({HInterID}, '{HBillNo}', {(ds.Tables[0].Rows.Count == 0 ? 1 : int.Parse(ds.Tables[0].Rows[0]["HEntryID"].ToString()) + 1)}, '{HBarCode}', {HQty}, GETDATE(), '', " + HProcExchInterID + "," + HProcExchEntryID + ", '" + HProcExchBillNo + "', '', 0, 0)");
+
+ }
+ else
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎿嶄綔绫诲瀷鏃犳晥锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鏂板鍗曟嵁鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 褰撳墠宸ュ崟(鎵爜姹囨姤) 鍒犻櫎鍑虹珯鏁版嵁
+ [Route("Cj_StationOutBill_CurrentWork/DelOutBill_SN")]
+ [HttpGet]
+ public object DelOutBill_SN(int HInterID, string HDeleteMan,string HBillSubType)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Drop", 1, false, HDeleteMan))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("select * from h_v_MES_StationOutBillList_SN WITH(NOLOCK) where hmainid = " + HInterID, "h_v_MES_StationOutBillList_SN");
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ユ棤鏁版嵁锛�";
+ objJsonResult.data = null;
+ }
+
+ oCN.BeginTran();
+
+ string sql = "";
+ if (ds.Tables[0].Rows.Count == 1)
+ {
+ sql = "delete from Sc_StationOutBillMain where HInterID = " + HInterID;
+ oCN.RunProc(sql);
+ }
+ sql = "delete from Sc_StationOutBillSub_SN where HInterID = " + HInterID ;
+ oCN.RunProc(sql);
+
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ 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;
+ }
+ }
+ #endregion
+
+ #region 褰撳墠宸ュ崟(鎵爜姹囨姤) 浠〃鐩樻煡璇�
+ [Route("Cj_StationOutBill_CurrentWork/get_PanelDisplay")]
+ [HttpGet]
+ public object get_PanelDisplay(string HBarCode, string user, int HOrgID)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn(@"select HSourceInterID,HSourceBillNo from Gy_BarCodeBill WITH(NOLOCK) where HBarCode='" + HBarCode + "'", "Gy_BarCodeBill");
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 褰撳墠宸ュ崟(璧嬬爜姹囨姤) 鏍规嵁鐢熶骇璁㈠崟鏌ヨ鏁版嵁
+ [Route("Cj_StationOutBill_CodingReport/get_ICMOProcessExchangeBillList")]
+ [HttpGet]
+ public object get_ICMOProcessExchangeBillList(string sWhere, string user, int HOrgID)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Sc_ICMOProcessExchangeBillList WITH(NOLOCK) where 1=1 " + sWhere, "h_v_Sc_ICMOProcessExchangeBillList");
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 褰撳墠宸ュ崟(璧嬬爜姹囨姤) 鏌ヨ褰撳墠鐢ㄦ埛浠婂ぉ鐢熸垚鏉$爜鐨勬暟鎹�
+ [Route("Cj_StationOutBill_CodingReport/get_BarCodeBillList")]
+ [HttpGet]
+ public object get_BarCodeBillList(string sWhere, string user, int HOrgID)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("select * from h_v_IF_BarCodeBillList WITH(NOLOCK) where 1=1 " + sWhere, "h_v_IF_BarCodeBillList");
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 褰撳墠宸ュ崟(鎵爜姹囨姤) 鍒犻櫎鍑虹珯鏁版嵁
+ [Route("Cj_StationOutBill_CodingReport/DelBarCodeBill_SN")]
+ [HttpGet]
+ public object DelBarCodeBill_SN(int HInterID, string HDeleteMan, string HBillSubType)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Gy_BarCodeBillList_Edit", 1, false, HDeleteMan))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("select * from h_v_IF_BarCodeBillList WITH(NOLOCK) where hmainid = " + HInterID, "h_v_IF_BarCodeBillList");
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ユ棤鏁版嵁锛�";
+ objJsonResult.data = null;
+ }
+
+ oCN.BeginTran();
+
+ string sql = "";
+ sql = "delete from Gy_BarCodeBill where HItemID = " + HInterID;
+ oCN.RunProc(sql);
+
+ oCN.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ 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;
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_ProductInBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_ProductInBillController.cs"
index e9d1972..a866df1 100644
--- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_ProductInBillController.cs"
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\252\214\346\224\266\345\205\245\345\272\223/Kf_ProductInBillController.cs"
@@ -12,18 +12,541 @@
namespace WebAPI.Controllers
{
- //鐢熶骇鍏ュ簱鍗旵ontroller
public class Kf_ProductInBillController : ApiController
{
- //鑾峰彇绯荤粺鍙傛暟
- Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
-
public DBUtility.ClsPub.Enum_BillStatus BillStatus;
- public DAL.ClsKf_ProductInBill BillOld = new DAL.ClsKf_ProductInBill();
+ public const string ModName = "1202"; //鍗曟嵁绫诲瀷
+ public const string ModCaption = "鐢熶骇鍏ュ簱鍗�"; //鍗曟嵁鍚嶇О
+ public const string ModRightName = "Kf_ProductInBill";
+ public const string ModRightNameList = ModRightName + "List"; //鍒楄〃
+ public const string ModRightNameEdit = ModRightName + "_Edit"; //缂栬緫
+ public const string ModRightNameCheck = ModRightName + "_Check"; //瀹℃牳
+ public const string ModRightNameClose = ModRightName + "_Close"; //鍏抽棴
+ public const string ModRightNameDelete = ModRightName + "_Delete"; //浣滃簾
+ public const string ModRightNameDrop = ModRightName + "_Drop"; //鍒犻櫎
+ public const string ModRightNameMoney = ModRightName + "_Money"; //閲戦
+ public const string ModRightNameQty = ModRightName + "_Qty"; //鏁伴噺
+ public DataSet ds = new DataSet();
private json objJsonResult = new json();
- SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- DataSet ds;
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ public DAL.ClsKf_ProductInBill oBill = new DAL.ClsKf_ProductInBill();
+ public DAL.ClsKf_ProductInBill BillOld = new DAL.ClsKf_ProductInBill();
+
+ #region 鐢熶骇鍏ュ簱鍗曞垪琛�
+ /// <summary>
+ /// 鑾峰彇鐢熶骇鍏ュ簱鍗曞垪琛ㄤ俊鎭�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Kf_ProductInBillController/GetKf_ProductInBillList_Json")]
+ [HttpGet]
+ public object GetKf_ProductInBillList_Json(string sWhere, string HMaker, string OperationType, string ViewName)
+ {
+ try
+ {
+ //鍒ゆ柇鏉冮檺
+ if (OperationType == "1")
+ {
+ //鍒ゆ柇鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log(ModRightNameList, 3, false, HMaker))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ //杩斿洖鍒楄〃淇℃伅
+ ds = oCn.RunProcReturn("select * from " + ViewName + " where 1=1 " + sWhere + " order by hmainid desc", ViewName);
+ List<object> columnNameList = new List<object>();
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ鍒楄〃淇℃伅澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鐢熶骇鍏ュ簱鍗� 鍒犻櫎
+ /// <summary>
+ /// 鍒犻櫎鐢熶骇鍏ュ簱鍗�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Kf_ProductInBillController/GetKf_ProductInBill_Delete_Json")]
+ [HttpGet]
+ public object GetKf_ProductInBill_Delete_Json(Int64 HInterID, string HMaker)
+ {
+ try
+ {
+ //鍒ゆ柇鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log(ModRightNameDrop, 3, false, HMaker))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鍒犻櫎鍔熻兘鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //鍒ゆ柇瀛樺湪鎬�
+ if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ //鍒犻櫎鍓嶆帶鍒�
+ DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_Kf_ProductInBill_BeforeDelCtrl " + HInterID.ToString() + ",'" + HMaker + "'", "h_p_Kf_ProductInBill_BeforeDelCtrl");
+ if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎鍓嶅垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ //鍒犻櫎鍗曟嵁锛堝寘鍚垹闄ゅ悗鎺у埗銆佸啓鍏ユ棩蹇楋級
+ if (!oBill.DeleteBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Kf_ProductInBill_AfterDelCtrl", HMaker, ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鐢熶骇鍏ュ簱鍗曟垚鍔燂紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈煡璇㈠埌璇ョ敓浜у叆搴撳崟锛岃鍒锋柊鏁版嵁鍚庨噸鏂伴�夋嫨锛�";
+ 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 鐢熶骇鍏ュ簱鍗� 瀹℃牳/鍙嶅鏍�
+ /// <summary>
+ /// 瀹℃牳/鍙嶅鏍哥敓浜у叆搴撳崟
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="Type">瀹℃牳(1),鍙嶅鏍�(2)</param>
+ /// <param name="HMaker">瀹℃牳浜�</param>
+ /// <returns></returns>
+ [Route("Kf_ProductInBillController/GetKf_ProductInBill_Check_Json")]
+ [HttpGet]
+ public object GetKf_ProductInBill_Check_Json(Int64 HInterID, int Type, string HMaker)
+ {
+ try
+ {
+ //鍒ゆ柇鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 3, false, HMaker))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡瀹℃牳/鍙嶅鏍稿姛鑳芥潈闄�,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //鍒ゆ柇瀛樺湪鎬�
+ if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ //Type 1 瀹℃牳 2 鍙嶅鏍�
+ if (Type == 1)
+ {
+ if (oBill.omodel.HChecker.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍革紝涓嶈兘鍐嶆瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ 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;
+ }
+ //瀹℃牳鍓嶆帶鍒�
+ DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_Kf_ProductInBill_BeforeCheckCtrl " + HInterID.ToString() + ",'" + HMaker + "'", "h_p_Kf_ProductInBill_BeforeCheckCtrl");
+ if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳鍓嶅垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触锛�" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ //瀹℃牳鍗曟嵁
+ if (!oBill.CheckBill(HInterID, oBill.omodel.HBillNo, "h_p_Kf_ProductInBill_AfterCheckCtrl", HMaker, ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍗曟嵁鍙凤細" + oBill.omodel.HBillNo + " 瀹℃牳鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ else
+ {
+ if (oBill.omodel.HChecker.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈鏍革紝涓嶉渶瑕佸弽瀹℃牳锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶅鏍稿墠鎺у埗
+ DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_Kf_ProductInBill_BeforeUnCheckCtrl " + HInterID.ToString() + ",'" + HMaker + "'", "h_p_Kf_ProductInBill_BeforeUnCheckCtrl");
+ if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅鏍稿墠鍒ゆ柇澶辫触锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅鏍稿け璐ワ紒" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ //鍙嶅鏍稿崟鎹�
+ if (!oBill.AbandonCheck(HInterID, oBill.omodel.HBillNo, "h_p_Kf_ProductInBill_AfterUnCheckCtrl", HMaker, ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍗曟嵁鍙凤細" + oBill.omodel.HBillNo + " 鍙嶅鏍告垚鍔燂紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈煡璇㈠埌璇ョ敓浜у叆搴撳崟锛岃鍒锋柊鏁版嵁鍚庨噸鏂伴�夋嫨锛�";
+ 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 鐢熶骇鍏ュ簱鍗� 鍏抽棴/鍙嶅叧闂�
+ /// <summary>
+ /// 鍏抽棴/鍙嶅叧闂敓浜у叆搴撳崟
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="Type">鍏抽棴(1),鍙嶅叧闂�(2)</param>
+ /// <param name="HMaker">鍏抽棴浜�</param>
+ /// <returns></returns>
+ [Route("Kf_ProductInBillController/GetKf_ProductInBill_Close_Json")]
+ [HttpGet]
+ public object GetKf_ProductInBill_Close_Json(Int64 HInterID, int Type, string HMaker)
+ {
+ try
+ {
+ //鍒ゆ柇鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log(ModRightNameClose, 3, false, HMaker))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鍏抽棴/鍙嶅叧闂姛鑳芥潈闄�,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //鍒ゆ柇瀛樺湪鎬�
+ if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ //Type 1 鍏抽棴 2 鍙嶅叧闂�
+ if (Type == 1)
+ {
+ if (oBill.omodel.HCloseMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插叧闂紝涓嶈兘鍐嶆鍏抽棴锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍏抽棴鍗曟嵁
+ if (!oBill.CloseBill(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍗曟嵁鍙凤細" + oBill.omodel.HBillNo + " 鍏抽棴鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ else
+ {
+ if (oBill.omodel.HCloseMan.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈叧闂紝涓嶉渶瑕佸弽鍏抽棴锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶅叧闂崟鎹�
+ if (!oBill.CancelClose(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍗曟嵁鍙凤細" + oBill.omodel.HBillNo + " 鍙嶅叧闂垚鍔燂紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈煡璇㈠埌璇ョ敓浜у叆搴撳崟锛岃鍒锋柊鏁版嵁鍚庨噸鏂伴�夋嫨锛�";
+ 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 鐢熶骇鍏ュ簱鍗� 浣滃簾/鍙嶄綔搴�
+ /// <summary>
+ /// 浣滃簾/鍙嶄綔搴熺敓浜у叆搴撳崟
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <param name="Type">浣滃簾(1),鍙嶄綔搴�(2)</param>
+ /// <param name="HMaker">浣滃簾浜�</param>
+ /// <returns></returns>
+ [Route("Kf_ProductInBillController/GetKf_ProductInBill_Cancelltion_Json")]
+ [HttpGet]
+ public object GetKf_ProductInBill_Cancelltion_Json(Int64 HInterID, int Type, string HMaker)
+ {
+ try
+ {
+ //鍒ゆ柇鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 3, false, HMaker))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡浣滃簾/鍙嶄綔搴熷姛鑳芥潈闄�,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //鍒ゆ柇瀛樺湪鎬�
+ if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ //Type 1 浣滃簾 2 鍙嶄綔搴�
+ if (Type == 1)
+ {
+ if (oBill.omodel.HDeleteMan.Trim() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸蹭綔搴燂紝涓嶈兘鍐嶆浣滃簾锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //浣滃簾鍗曟嵁
+ if (!oBill.Cancelltion(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍗曟嵁鍙凤細" + oBill.omodel.HBillNo + " 浣滃簾鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ else
+ {
+ if (oBill.omodel.HDeleteMan.Trim() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈綔搴燂紝涓嶉渶瑕佸弽浣滃簾锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍙嶄綔搴熷崟鎹�
+ if (!oBill.AbandonCancelltion(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙嶄綔搴熷け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍗曟嵁鍙凤細" + oBill.omodel.HBillNo + " 鍙嶄綔搴熸垚鍔燂紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈煡璇㈠埌璇ョ敓浜у叆搴撳崟锛岃鍒锋柊鏁版嵁鍚庨噸鏂伴�夋嫨锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "浣滃簾鎴栧弽浣滃簾鐢熶骇鍏ュ簱鍗曞け璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+
+
+
+ //---------------------------------------------------------------------------------------------鏃ф柟娉�20240422鍓�
#region 鐢熶骇鍏ュ簱鍗� 鏌ユ壘璁板綍鍔熻兘
/// <summary>
@@ -38,7 +561,7 @@
try
{
- ds = oCN.RunProcReturn("select * from h_v_IF_ProductInBillList where hmainid=" + HInterID, "h_v_IF_ProductInBillList");
+ ds = oCn.RunProcReturn("select * from h_v_IF_ProductInBillList where hmainid=" + HInterID, "h_v_IF_ProductInBillList");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -91,12 +614,12 @@
if (sWhere == null || sWhere.Equals(""))
{
- ds = oCN.RunProcReturn("select * from h_v_IF_ProductInBillList where 1=1 order by hmainid desc", "h_v_IF_ProductInBillList");
+ ds = oCn.RunProcReturn("select * from h_v_IF_ProductInBillList where 1=1 order by hmainid desc", "h_v_IF_ProductInBillList");
}
else
{
string sql = "select * from h_v_IF_ProductInBillList where 1 = 1 " + sWhere + " order by hmainid desc";
- ds = oCN.RunProcReturn(sql, "h_v_IF_ProductInBillList");
+ ds = oCn.RunProcReturn(sql, "h_v_IF_ProductInBillList");
}
@@ -133,7 +656,7 @@
string HBillNo = "";
//鍒犻櫎鍓嶆帶鍒�=========================================
string sql1 = "exec h_p_Kf_ProductInBill_BeforeDelCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'";
- ds = oCN.RunProcReturn(sql1, "h_p_Kf_ProductInBill_BeforeDelCtrl");
+ ds = oCn.RunProcReturn(sql1, "h_p_Kf_ProductInBill_BeforeDelCtrl");
if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -154,14 +677,14 @@
//==================================================================================
string sReturn = "";
- oCN.BeginTran();
- oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
- oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
- oCN.Commit();
+ oCn.BeginTran();
+ oCn.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
+ oCn.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
+ oCn.Commit();
//鍒犻櫎鍚庢帶鍒�==================================================================================
string sql2 = "exec h_p_Kf_ProductInBill_AfterDelCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'";
- ds = oCN.RunProcReturn(sql2, "h_p_Kf_ProductInBill_AfterDelCtrl");
+ ds = oCn.RunProcReturn(sql2, "h_p_Kf_ProductInBill_AfterDelCtrl");
if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
{
sReturn = "鍒犻櫎鍚庡垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
@@ -169,7 +692,7 @@
objJsonResult.count = 1;
objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + sReturn;
objJsonResult.data = null;
- oCN.RollBack();
+ oCn.RollBack();
return objJsonResult;
}
if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
@@ -179,7 +702,7 @@
objJsonResult.count = 1;
objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + sReturn;
objJsonResult.data = null;
- oCN.RollBack();
+ oCn.RollBack();
return objJsonResult;
}
//==============================================================================================
@@ -192,7 +715,7 @@
}
catch (Exception e)
{
- oCN.RollBack();
+ oCn.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "Exception锛�" + e.ToString();
@@ -211,19 +734,19 @@
{
var _value = sMainSub["sMainSub"].ToString();
string msg1 = _value.ToString();
- oCN.BeginTran();
+ oCn.BeginTran();
//淇濆瓨涓昏〃
objJsonResult = AddBillMain(msg1);
if (objJsonResult.code == "0")
{
- oCN.RollBack();
+ oCn.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = objJsonResult.Message;
objJsonResult.data = null;
return objJsonResult;
}
- oCN.Commit();
+ oCn.Commit();
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "鍗曟嵁淇濆瓨鎴愬姛锛�";
@@ -233,7 +756,7 @@
}
catch (Exception e)
{
- oCN.RollBack();
+ oCn.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
@@ -304,12 +827,12 @@
string HSUPPLYADDRESS = mainList2[0].HSUPPLYADDRESS == null ? "''" : mainList2[0].HSUPPLYADDRESS;
long HPROVIDERCONTACTID = mainList2[0].HPROVIDERCONTACTID == null ? 0 : mainList2[0].HPROVIDERCONTACTID;
- ds = oCN.RunProcReturn("select * from h_v_IF_ProductInBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_IF_ProductInBillList");
+ ds = oCn.RunProcReturn("select * from h_v_IF_ProductInBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_IF_ProductInBillList");
if ((OperationType == 1 || OperationType == 2 || OperationType == 4) && ds.Tables[0].Rows.Count == 0)//鏂板
{
//淇濆瓨鍓嶆帶鍒�=========================================
- ds = oCN.RunProcReturn("exec h_p_Kf_ProductInBill_BeforeSaveCtrl " + HInterID, "h_p_Kf_ProductInBill_BeforeSaveCtrl");
+ ds = oCn.RunProcReturn("exec h_p_Kf_ProductInBill_BeforeSaveCtrl " + HInterID, "h_p_Kf_ProductInBill_BeforeSaveCtrl");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
@@ -337,7 +860,7 @@
"," + HManagerID + "," + HEmpID + "," + HDeptID + "," + HSecManagerID + "," + HKeeperID + ",'" + HRemark + "','" + HMaker +
"',getdate()" + "," + HCurID + "," + HExRate + "," + HWHID + ",'" + HInnerBillNo + "','" + HExplanation + "')";
- oCN.RunProc(sql);
+ oCn.RunProc(sql);
}
else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
@@ -348,20 +871,20 @@
+ ",HExRate=" + HExRate + ",HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HDeptID=" + HDeptID
+ ",HInnerBillNo='" + HInnerBillNo + "' where HInterID=" + HInterID;
- oCN.RunProc(sql);
+ oCn.RunProc(sql);
//鍒犻櫎瀛愯〃
- oCN.RunProc("delete from Kf_ICStockBillSub where HInterID='" + HInterID + "'");
+ oCn.RunProc("delete from Kf_ICStockBillSub where HInterID='" + HInterID + "'");
}
//淇濆瓨瀛愯〃
objJsonResult = AddBillSub(msg3, HInterID, OperationType, user);
//鐢熶骇鍏ュ簱鍗曟柊澧炲洖濉敓浜ц鍗曞叧鑱旀暟閲�
- oCN.RunProc("exec h_p_Kf_UpDateRelation_ProductInToICMO_Add " + HInterID);
+ oCn.RunProc("exec h_p_Kf_UpDateRelation_ProductInToICMO_Add " + HInterID);
//鐢熶骇鍏ュ簱鍗曟柊澧炲洖濉敓浜ф眹鎶ュ崟鍏宠仈鏁伴噺
- oCN.RunProc("exec h_p_Kf_UpDateRelation_ProductInToICMOReport_Add " + HInterID);
+ oCn.RunProc("exec h_p_Kf_UpDateRelation_ProductInToICMOReport_Add " + HInterID);
if (objJsonResult.code == "0")
{
@@ -445,7 +968,7 @@
DataSet Cs;
Int64 NewHEntryID = 1;
- Cs = oCN.RunProcReturn("select MAX(HEntryID)HEntryID from Kf_ICStockBillSub", "Kf_ICStockBillSub");
+ Cs = oCn.RunProcReturn("select MAX(HEntryID)HEntryID from Kf_ICStockBillSub", "Kf_ICStockBillSub");
if (Cs.Tables[0].Rows.Count != 0 && ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString()) != 0)
{
NewHEntryID = ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString());
@@ -453,7 +976,7 @@
}
- oCN.RunProc($@"Insert into Kf_ICStockBillSub
+ oCn.RunProc($@"Insert into Kf_ICStockBillSub
(HInterID,HEntryID,HMaterID,HUnitID,HQtyMust,HQty,HPrice
,HMoney,HWHID,HSPID,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HPOOrderInterID
,HPOOrderEntryID,HPOORderBillNo,HSecUnitID,HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo,HRelationQty,HSecUnitRate,HPropertyID)
@@ -463,7 +986,7 @@
}
//淇濆瓨鍚庢帶鍒�=========================================
- ds = oCN.RunProcReturn("exec h_p_Kf_ProductInBill_AfterSaveCtrl " + HInterID, "h_p_Kf_ProductInBill_AfterSaveCtrl");
+ ds = oCn.RunProcReturn("exec h_p_Kf_ProductInBill_AfterSaveCtrl " + HInterID, "h_p_Kf_ProductInBill_AfterSaveCtrl");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
@@ -496,14 +1019,14 @@
[HttpGet]
public ApiResult<DataTable> getMaterialByMaterID(Int64 HMaterID)
{
- SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
string sql = "select a.HItemID HMaterID,a.HNumber HMaterNumber,a.HName HMaterName,a.HMaterRuleType,a.HModel HMaterModel,a.HUnitID, b.HNumber HUnitNumber, b.HName HUnitName" +
" from Gy_Material AS a " +
" LEFT OUTER JOIN Gy_Unit AS b on a.HUnitID = b.HItemID " +
" where a.HItemID =" + HMaterID;
- var dataSet = oCN.RunProcReturn(sql, "Gy_Material");
+ var dataSet = oCn.RunProcReturn(sql, "Gy_Material");
if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
@@ -541,7 +1064,7 @@
ClsPub.CurUserName = user;
BillOld.MvarItemKey = "Kf_ICStockBillMain";
- oCN.BeginTran();//寮�濮嬩簨鍔�
+ oCn.BeginTran();//寮�濮嬩簨鍔�
//Type 1 瀹℃牳 2 鍙嶅鏍�
if (Type == 1)
@@ -549,7 +1072,7 @@
//鍒ゆ柇鍗曟嵁鏄惁宸茬粡瀹℃牳
DataSet ds;
string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
- ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ ds = oCn.RunProcReturn(sql, BillOld.MvarItemKey);
if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
{
if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
@@ -576,7 +1099,7 @@
//鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶅鏍�
DataSet ds;
string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
- ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ ds = oCn.RunProcReturn(sql, BillOld.MvarItemKey);
if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
{
if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "")
@@ -612,7 +1135,7 @@
}
}
- oCN.Commit();//鎻愪氦浜嬪姟
+ oCn.Commit();//鎻愪氦浜嬪姟
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -729,7 +1252,7 @@
//瀹℃牳鍓嶆帶鍒�=========================================
string sql1 = "exec h_p_Kf_ProductInBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
- ds = oCN.RunProcReturn(sql1, "h_p_Kf_ProductInBill_BeforeCheckCtrl");
+ ds = oCn.RunProcReturn(sql1, "h_p_Kf_ProductInBill_BeforeCheckCtrl");
if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -770,7 +1293,7 @@
if (IsAudit == 1) //鍙嶅鏍告彁浜�
{
//鍙嶅鏍稿墠鎺у埗=========================================
- DataSet ds = oCN.RunProcReturn("Exec h_p_Kf_ProductInBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'", "h_p_Kf_ProductInBill_BeforeUnCheckCtrl");
+ DataSet ds = oCn.RunProcReturn("Exec h_p_Kf_ProductInBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'", "h_p_Kf_ProductInBill_BeforeUnCheckCtrl");
if (ds == null)
{
objJsonResult.code = "0";
@@ -848,7 +1371,7 @@
ClsPub.CurUserName = user;
BillOld.MvarItemKey = "Kf_ICStockBillMain";
- oCN.BeginTran();//寮�濮嬩簨鍔�
+ oCn.BeginTran();//寮�濮嬩簨鍔�
//Type 1 鍏抽棴 2 鍙嶅叧闂�
if (Type == 1)
@@ -856,7 +1379,7 @@
//鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍏抽棴
DataSet ds;
string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
- ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ ds = oCn.RunProcReturn(sql, BillOld.MvarItemKey);
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -908,7 +1431,7 @@
//鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶅叧闂�
DataSet ds;
string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
- ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ ds = oCn.RunProcReturn(sql, BillOld.MvarItemKey);
if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
{
if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "")
@@ -947,7 +1470,7 @@
}
}
- oCN.Commit();//鎻愪氦浜嬪姟
+ oCn.Commit();//鎻愪氦浜嬪姟
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -995,7 +1518,7 @@
ClsPub.CurUserName = user;
BillOld.MvarItemKey = "Kf_ICStockBillMain";
- oCN.BeginTran();//寮�濮嬩簨鍔�
+ oCn.BeginTran();//寮�濮嬩簨鍔�
//Type 1 浣滃簾 2 鍙嶄綔搴�
if (Type == 1)
@@ -1003,7 +1526,7 @@
//鍒ゆ柇鍗曟嵁鏄惁宸茬粡浣滃簾
DataSet ds;
string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
- ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ ds = oCn.RunProcReturn(sql, BillOld.MvarItemKey);
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -1046,7 +1569,7 @@
//鍒ゆ柇鍗曟嵁鏄惁宸茬粡鍙嶄綔搴�
DataSet ds;
string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
- ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ ds = oCn.RunProcReturn(sql, BillOld.MvarItemKey);
if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
{
if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
@@ -1077,7 +1600,7 @@
}
}
- oCN.Commit();//鎻愪氦浜嬪姟
+ oCn.Commit();//鎻愪氦浜嬪姟
objJsonResult.code = "0";
objJsonResult.count = 1;
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkTypeController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkTypeController.cs"
index 16684c7..ff98ed7 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkTypeController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkTypeController.cs"
@@ -40,7 +40,7 @@
{
try
{
- //鍒ゆ柇鏉冮檺
+ //鍒ゆ柇鏉冮檺 1涓虹洿鎺ュ垪琛ㄦā鍧楁墦寮� 2涓轰粠鍏朵粬妯″潡璺宠浆鎵撳紑鍒楄〃
if (OperationType == "1")
{
//鍒ゆ柇鏉冮檺
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SingleBalBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SingleBalBillController.cs"
index bdb05bd..fafa6d8 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SingleBalBillController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SingleBalBillController.cs"
@@ -592,7 +592,231 @@
}
#endregion
+ #region 宸ヨ祫缁撶畻鍗�(涓汉)妯″潡 浠庡垪琛ㄩ�変腑鎵撳紑鍗曟嵁锛岃繑鍥炲崟鎹俊鎭椂璋冪敤
+ /// <summary>
+ /// 宸ヨ祫缁撶畻鍗�(涓汉)缂栬緫鏃讹紝鏍规嵁鍗曟嵁ID鑾峰彇鍗曟嵁淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("Pay_SingleBalBillController/GetPay_SingleBalBill_Json")]
+ [HttpGet]
+ public object GetPay_SingleBalBill_Json(Int64 HInterID, string HMaker)
+ {
+ try
+ {
+ //鍒ゆ柇鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log(ModRightNameEdit, 3, false, HMaker))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡缂栬緫鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //杩斿洖鍒楄〃淇℃伅
+ ds = oCn.RunProcReturn("exec h_p_Pay_SingleBalBill_EditInit " + HInterID, "h_p_Pay_SingleBalBill_EditInit");
+ 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 = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "杩斿洖宸ヨ祫缁撶畻鍗�(涓汉)淇℃伅澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 宸ヨ祫缁撶畻鍗�(涓汉)淇濆瓨
+ /// <summary>
+ /// 宸ヨ祫缁撶畻鍗�(涓汉)淇濆瓨
+ /// </summary>
+ [Route("Pay_SingleBalBillController/GetPay_SingleBalBill_Save_Json")]
+ [HttpPost]
+ public object GetPay_SingleBalBill_Save_Json([FromBody] JObject sMainSub)
+ {
+ var _value = sMainSub["sMainSub"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string sMainStr = sArray[0].ToString(); //涓昏〃鏁版嵁
+ string sSubStr = sArray[1].ToString(); //瀛愯〃鏁版嵁
+ string OperationType = sArray[2].ToString(); //鎿嶄綔绫诲瀷锛�1鏂板銆�2缂栬緫锛�
+ string HMaker = sArray[3].ToString(); //鍒跺崟浜�
+ try
+ {
+ //鍒ゆ柇鏉冮檺
+ if (OperationType == "1")
+ {
+ BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew;
+ //鍒ゆ柇鏂板鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HMaker))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏂板鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_Modify;
+ //鍒ゆ柇缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log(ModRightNameEdit, 1, false, HMaker))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡缂栬緫鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ //琛ㄥご璧嬪��
+ sMainStr = sMainStr.Replace("\\", "");
+ sMainStr = sMainStr.Replace("\n", "");
+ sMainStr = "[" + sMainStr.ToString() + "]";
+ List<Model.ClsPay_SingleBalBillMain> lsmain = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsPay_SingleBalBillMain>>(sMainStr);
+ foreach (Model.ClsPay_SingleBalBillMain oItem in lsmain)
+ {
+ //鍗曟嵁鍙锋槸鍚﹂噸澶�
+ if (oBill.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, oItem.HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鍙烽噸澶嶏紒涓嶅厑璁镐繚瀛橈紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod_Pay(oItem.HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = s;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ oItem.HYear = sYear;
+ oItem.HPeriod = sPeriod;
+ DBUtility.ClsPub.CurUserName = oItem.HMaker;
+ oBill.omodel = oItem;
+ }
+ //琛ㄤ綋璧嬪��
+ //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+ sSubStr = sSubStr.Substring(1, sSubStr.Length - 2);
+ sSubStr = sSubStr.Replace("\\", "");
+ sSubStr = sSubStr.Replace("\n", "");
+ sSubStr = "[" + sSubStr.ToString() + "]";
+ List<Model.ClsPay_SingleBalBillSub> ls = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsPay_SingleBalBillSub>>(sSubStr);
+ int i = 0;
+ foreach (Model.ClsPay_SingleBalBillSub oItemSub in ls)
+ {
+ i++;
+ oItemSub.HEntryID = i;
+ oBill.DetailColl.Add(oItemSub);
+ }
+
+ //淇濆瓨
+ bool bResult;
+ if (OperationType == "1") //鏂板淇濆瓨
+ {
+ 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 = 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;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.Message;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 鏍规嵁鐗╂枡ID銆佸伐搴廔D銆佽祫婧怚D鑾峰彇宸ヤ环
+ [Route("Pay_SingleBalBill/get_HPrice_BaseMaterHProcHSource")]
+ [HttpGet]
+ public object get_HPrice_BaseMaterHProcHSource(Int64 HMaterID, Int64 HProcID, Int64 HSourceID)
+ {
+ try
+ {
+ DAL.ClsGy_ProcPrice_Ctl oProcPrice = new DAL.ClsGy_ProcPrice_Ctl();
+ double HPrice = oProcPrice.LoadProcPrice(HMaterID, HProcID, HSourceID, true);
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = HPrice;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ //---------------------------------------------------------------------------------------------鏃ф柟娉�
#region 宸ヨ祫缁撶畻鍗曚釜浜�-鏌ヨ
/// <summary>
@@ -1375,33 +1599,6 @@
objJsonResult.data = null;
return objJsonResult;
}
- }
- }
- #endregion
-
- #region 鏍规嵁鐗╂枡ID銆佸伐搴廔D銆佽祫婧怚D鑾峰彇宸ヤ环
- [Route("Pay_SingleBalBill/get_HPrice_BaseMaterHProcHSource")]
- [HttpGet]
- public object get_HPrice_BaseMaterHProcHSource(Int64 HMaterID, Int64 HProcID, Int64 HSourceID)
- {
- try
- {
- DAL.ClsGy_ProcPrice_Ctl oProcPrice = new DAL.ClsGy_ProcPrice_Ctl();
- double HPrice = oProcPrice.LoadProcPrice(HMaterID, HProcID, HSourceID, true);
-
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
- objJsonResult.data = HPrice;
- return objJsonResult;
- }
- catch(Exception e)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = e.ToString();
- objJsonResult.data = null;
- return objJsonResult;
}
}
#endregion
diff --git a/WebAPI/Models/Gy_User.cs b/WebAPI/Models/Gy_User.cs
index 3c303a3..c674f59 100644
--- a/WebAPI/Models/Gy_User.cs
+++ b/WebAPI/Models/Gy_User.cs
@@ -35,5 +35,6 @@
public int HGroupID;
public int HSourceID;
public int HCheckEmpID;
+ public int HWorkCenterID;
}
}
\ No newline at end of file
diff --git a/WebAPI/Web.config b/WebAPI/Web.config
index 0eb305a..674d84e 100644
--- a/WebAPI/Web.config
+++ b/WebAPI/Web.config
@@ -22,7 +22,7 @@
<!--<add key="FileIP" value="http://localhost:8082/LuBaoAPI"/>-->
<!--<add key="FileIP" value="http://localhost:8080/" />-->
<!--<add key="sUrl" value="http://183.129.128.86:9090/WEBS-WMSTest/WebService1.asmx"/> -->
- <!--add key="sUrl" value="http://192.168.63.53/WEBS-WMS/WebService1.asmx"/> 棰滃彴寮忔満-->
+ <add key="sUrl" value="http://192.168.63.53/WEBS-WMS/WebService1.asmx"/> <!--棰滃彴寮忔満-->
<!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> 澶忓疂-->
<!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> -->
<!--<add key="sUrl" value="http://10.10.130.181/WEBS-WMS/WebService1.asmx"/> 鍗氭棩绉戞妧-->
@@ -34,7 +34,7 @@
<!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS-WMS/WebService1.asmx"/> 瀹夌憺鏈嶅姟鍣�-->
<!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> --> <!--娴嬭瘯鏈嶅姟鍣�-->
<!--<add key="sUrl" value="http://localhost:8082/WEBS/WebService1.asmx"/> 鏈湴-->
- <add key="sUrl" value="http://192.168.110.57:81/WEBS/WebService1.asmx"/> <!--闄堥洴闈欐湰鍦伴厤缃�-->
+ <!--<add key="sUrl" value="http://192.168.110.57:81/WEBS/WebService1.asmx"/> 闄堥洴闈欐湰鍦伴厤缃�-->
<!--<add key="sUrl" value="http://192.168.1.57:8082/WEBS-WMS/WebService1.asmx"/>涔濊彵-->
<add key="webpages:Version" value="3.0.0.0" />
--
Gitblit v1.9.1