From 0a56001e1b8e9ae7d2f39c982912cd6d10c22032 Mon Sep 17 00:00:00 2001
From: cwjbxqmz <1134865194@qq.com>
Date: 星期二, 06 二月 2024 11:35:20 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/项目管理/工作周计划/PM_WorkTaskWeekBillController.cs | 157 +++++++++++++++
DAL/销售管理/ClsXs_SeOutStockBackBillForLayUI.cs | 37 +++
WebAPI/Controllers/条码管理/WEBSController.cs | 169 ++++++++++++++++
WebAPI/Controllers/XSGL/Xs_SeOutStockBackBillController.cs | 49 ++++
WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs | 93 ++++++--
DAL/项目管理/ClsPM_WorkReportWeekBillMain.cs | 13
WebAPI/Controllers/项目管理/工作任务/PM_WorkTaskBillController.cs | 74 ++++++-
7 files changed, 545 insertions(+), 47 deletions(-)
diff --git "a/DAL/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOutStockBackBillForLayUI.cs" "b/DAL/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOutStockBackBillForLayUI.cs"
index 40632e7..938e7cd 100644
--- "a/DAL/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOutStockBackBillForLayUI.cs"
+++ "b/DAL/\351\224\200\345\224\256\347\256\241\347\220\206/ClsXs_SeOutStockBackBillForLayUI.cs"
@@ -131,8 +131,23 @@
try
{
//寰楀埌mainid
- //omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
- //omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
+ omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ DataSet ds = oCn.RunProcReturn("Exec h_p_Xs_SeOutStockBackBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Xs_SeOutStockBackBill_BeforeSaveCtrl ");
+ if (ds == null)
+ {
+ sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ return false;
+ }
+ //=========================================================
//鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
if (IsExistBillNo(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HBillNo, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew, omodel.HInterID))
{
@@ -174,7 +189,23 @@
//
//鏇存柊璁㈠崟鍏宠仈鏁伴噺
//AddNewRelation(ref sReturn, omodel.HInterID);
- //
+
+ //=========================淇濆瓨鍚庢帶鍒�
+ DataSet ds2 = oCn.RunProcReturn("Exec h_p_Xs_SeOutStockBackBill_AfterSaveCtr " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Xs_SeOutStockBackBill_AfterSaveCtr");
+ if (ds2 == null)
+ {
+ sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+ oCn.RollBack();
+ return false;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+ oCn.RollBack();
+ return false;
+ }
+ //============================
+
sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
oCn.Commit();
return true;
diff --git "a/DAL/\351\241\271\347\233\256\347\256\241\347\220\206/ClsPM_WorkReportWeekBillMain.cs" "b/DAL/\351\241\271\347\233\256\347\256\241\347\220\206/ClsPM_WorkReportWeekBillMain.cs"
index 23098f3..2a8836e 100644
--- "a/DAL/\351\241\271\347\233\256\347\256\241\347\220\206/ClsPM_WorkReportWeekBillMain.cs"
+++ "b/DAL/\351\241\271\347\233\256\347\256\241\347\220\206/ClsPM_WorkReportWeekBillMain.cs"
@@ -43,19 +43,20 @@
" HBillNo = '" + omodel.HBillNo +
"', HDate = '" + omodel.HDate +
"', HYear = " + omodel.HYear +
- ", HPeriod = " + omodel.HPeriod +
+ ", HWeek = " + omodel.HWeek +
", HRemark = '" + omodel.HRemark +
"', HUpDater = '" + omodel.HUpDater +
"', HUpDateDate = getdate()" +
//===============================================================
", HOrgID = " + omodel.HOrgID +
- ", HYear = " + omodel.HYear +
- ", HWeek = " + omodel.HWeek +
- ", HBeginDate = '" + omodel.HBeginDate +
+ ", HWorkReport = '" + omodel.HWorkReport +
+ "', HNextPlan = '" + omodel.HNextPlan +
+ "', HWorkGain = '" + omodel.HWorkGain +
+ "', HBeginDate = '" + omodel.HBeginDate +
"', HEndDate = '" + omodel.HEndDate +
- "', HPlanEmpID = " + omodel.HReportEmpID +
+ "', HReportEmpID = " + omodel.HReportEmpID +
" where HInterID = " + omodel.HInterID;
-
+ oCn.RunProc(mainSql);
//鍒犻櫎鍏宠仈
DeleteRelation(ref sReturn, lngBillKey);
//鍒犻櫎瀛愯〃
diff --git a/WebAPI/Controllers/XSGL/Xs_SeOutStockBackBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOutStockBackBillController.cs
index fc77be8..178eaea 100644
--- a/WebAPI/Controllers/XSGL/Xs_SeOutStockBackBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_SeOutStockBackBillController.cs
@@ -480,7 +480,29 @@
//Type 1 瀹℃牳 2 鍙嶅鏍�
if (Type == 1)
{
- if (!BillOld.CheckBill(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ //瀹℃牳鍓嶆帶鍒�
+ DataSet BeforeDs = oCN.RunProcReturn("Exec h_p_Xs_SeOutStockBackBill_BeforeCheckCtrl " + HInterID.ToString() + ",'" + user + "'", "h_p_Xs_SeOutStockBackBill_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 (!BillOld.CheckBill(int.Parse(HInterID), BillOld.omodel.HBillNo, "h_p_Xs_SeOutStockBackBill_AfterCheckCtrl", user, ref ClsPub.sExeReturnInfo))
{
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -491,7 +513,30 @@
}
else
{
- if (BillOld.AbandonCheck(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+
+ //鍙嶅鏍稿墠鎺у埗
+ DataSet BeforeDs = oCN.RunProcReturn("Exec h_p_Xs_SeOutStockBackBill_BeforeUnCheckCtrl " + HInterID.ToString() + ",'" + user + "'", "h_p_Xs_SeOutStockBackBill_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 (BillOld.AbandonCheck(int.Parse(HInterID), BillOld.omodel.HBillNo, "h_p_Xs_SeOutStockBackBill_AfterUnCheckCtrl", user, ref ClsPub.sExeReturnInfo))
{
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
//DataSet DSet = oCn.RunProcReturn("exec h_p_Sc_ICMOBill_AbandonCheckCtrl " + int.Parse(HInterID), "h_p_Sc_ICMOBill_AbandonCheckCtrl");
diff --git a/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs
index 9b2efbf..b139a93 100644
--- a/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_SeOutStockBillController.cs
@@ -265,31 +265,33 @@
ds = oCN.RunProcReturn("select * from h_v_IF_SeOutStockBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_IF_SeOutStockBillList");
- //淇濆瓨鍓嶆帶鍒�=========================================
- string HBillNote = "";
- ds = oCN.RunProcReturn("Exec h_p_Xs_SeOutStockBill_BeforeSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "','" + HBillNote + "',1 ", "h_p_Xs_SeOutStockBill_BeforeSaveCtrl");
- if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:淇濆瓨鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
- objJsonResult.data = null;
- return objJsonResult;
- }
-
- if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
- {
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); ;
- objJsonResult.data = null;
- return objJsonResult;
- }
- //=========================================================
-
+
if ((OperationType == 1 || OperationType == 2) && ds.Tables[0].Rows.Count == 0)//鏂板
{
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ ds = oCN.RunProcReturn("Exec h_p_Xs_SeOutStockBill_BeforeSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "','" + HBillNote + "',1 ", "h_p_Xs_SeOutStockBill_BeforeSaveCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:淇濆瓨鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //=========================================================
+
+
//涓昏〃
string sql = $@"Insert Into Xs_SeOutStockBillMain
(HInterID,HYear,HPeriod,HBillType,HBillSubType,HDate,HBillNo,HBillStatus
@@ -887,7 +889,28 @@
//Type 1 瀹℃牳 2 鍙嶅鏍�
if (Type == 1)
{
- if (!BillOld.CheckBill(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ //瀹℃牳鍓嶆帶鍒�
+ DataSet BeforeDs = oCN.RunProcReturn("Exec h_p_Xs_SeOutStockBill_BeforeCheckCtrl " + HInterID.ToString() + ",'" + user + "'", "h_p_Xs_SeOutStockBill_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 (!BillOld.CheckBill(int.Parse(HInterID), BillOld.omodel.HBillNo, "h_p_Xs_SeOutStockBill_AfterCheckCtrl", user, ref ClsPub.sExeReturnInfo))
{
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -898,7 +921,29 @@
}
else
{
- if (BillOld.AbandonCheck(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+ //鍙嶅鏍稿墠鎺у埗
+ DataSet BeforeDs = oCN.RunProcReturn("Exec h_p_Xs_SeOutStockBill_BeforeUnCheckCtrl " + HInterID.ToString() + ",'" + user + "'", "h_p_Xs_SeOutStockBill_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 (BillOld.AbandonCheck(int.Parse(HInterID), BillOld.omodel.HBillNo, "h_p_Xs_SeOutStockBill_AfterUnCheckCtrl", user, ref ClsPub.sExeReturnInfo))
{
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
//DataSet DSet = oCn.RunProcReturn("exec h_p_Sc_ICMOBill_AbandonCheckCtrl " + int.Parse(HInterID), "h_p_Sc_ICMOBill_AbandonCheckCtrl");
diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
index cf5b082..75bd2fb 100644
--- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
@@ -1371,6 +1371,175 @@
#region 閲囪喘鍏ュ簱 涓婁紶鐢熷崟
+ #region 閲囪喘鍏ュ簱 鏂板妯″紡
+
+ /// <summary>
+ /// 閲囪喘鍏ュ簱鏂板涓婁紶
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SavePOStockInBill_Json")]
+ [HttpPost]
+ public object set_SavePOStockInBill_Json([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ try
+ {
+ List<Model.ClsKf_POStockInBillMain> lsmain = new List<Model.ClsKf_POStockInBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getPOStockInBillMainByJson(msg1);
+ WebS.ClsKf_POStockInBillMain websLsmain = new WebS.ClsKf_POStockInBillMain();
+ string sSourceType = lsmain[0].HMainSourceBillType;
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = lsmain[0].HBillType;
+ websLsmain.HDate = lsmain[0].HDate;
+ websLsmain.HDeptID = lsmain[0].HDeptID;
+ websLsmain.HWHID = lsmain[0].HWHID;
+ websLsmain.HSCWHID = lsmain[0].HSCWHID;
+ websLsmain.HSupID = lsmain[0].HSupID;
+ websLsmain.HKeeperID = lsmain[0].HKeeperID;
+ websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
+ websLsmain.HEmpID = lsmain[0].HEmpID;
+ websLsmain.HManagerID = lsmain[0].HManagerID;
+ websLsmain.HRemark = lsmain[0].HRemark;
+ websLsmain.HExplanation = lsmain[0].HExplanation;
+ websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
+ websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
+ websLsmain.HBillSubType = lsmain[0].HBillSubType;
+ if (lsmain[0].HMainSourceBillType == "1102")
+ {
+ websLsmain.HMainSourceBillType = "閲囪喘璁㈠崟";
+ }
+ else if (lsmain[0].HMainSourceBillType == "1103")
+ {
+ websLsmain.HMainSourceBillType = "鏀舵枡閫氱煡鍗�";
+ }
+ else
+ {
+ websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
+ }
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HBillerID = lsmain[0].HBillerID;
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+ websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SavePOStockInBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
+ 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;
+ }
+ }
+
+ #endregion
+
+
+ #endregion
+
+ #region 濮斿鍏ュ簱 涓婁紶鐢熷崟
+
+ #region 濮斿鍏ュ簱 鏂板妯″紡
+
+ /// <summary>
+ /// 濮斿鍏ュ簱鏂板涓婁紶
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveEntrustInBill_Json")]
+ [HttpPost]
+ public object set_SaveEntrustInBill_Json([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ try
+ {
+ List<Model.ClsKf_EntrustInBillMain> lsmain = new List<Model.ClsKf_EntrustInBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getEntrustInBillMainByJson(msg1);
+ WebS.ClsKf_EntrustInBillMain websLsmain = new WebS.ClsKf_EntrustInBillMain();
+ string sSourceType = lsmain[0].HMainSourceBillType;
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = lsmain[0].HBillType;
+ websLsmain.HDate = lsmain[0].HDate;
+ websLsmain.HDeptID = lsmain[0].HDeptID;
+ websLsmain.HWHID = lsmain[0].HWHID;
+ websLsmain.HSCWHID = lsmain[0].HSCWHID;
+ websLsmain.HSupID = lsmain[0].HSupID;
+ websLsmain.HKeeperID = lsmain[0].HKeeperID;
+ websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
+ websLsmain.HEmpID = lsmain[0].HEmpID;
+ websLsmain.HMangerID = lsmain[0].HMangerID;
+ websLsmain.HRemark = lsmain[0].HRemark;
+ websLsmain.HExplanation = lsmain[0].HExplanation;
+ websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
+ websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
+ websLsmain.HBillSubType = lsmain[0].HBillSubType;
+ if (lsmain[0].HMainSourceBillType == "1601")
+ {
+ websLsmain.HMainSourceBillType = "濮斿璁㈠崟";
+ }
+ else if (lsmain[0].HMainSourceBillType == "1103")
+ {
+ websLsmain.HMainSourceBillType = "鏀舵枡閫氱煡鍗�";
+ }
+ else
+ {
+ websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
+ }
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HBillerID = lsmain[0].HBillerID;
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+ websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SaveEntrustInBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
+ 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;
+ }
+ }
+
+ #endregion
+
#endregion
diff --git "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillController.cs" "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillController.cs"
index bdc1de9..f63d04c 100644
--- "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillController.cs"
+++ "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillController.cs"
@@ -65,7 +65,6 @@
public string HMainSourceBillNo;
public string HMainSourceBillType;
public int HOrderLevID;
- public int HHasten;
}
#endregion
@@ -184,7 +183,7 @@
string HMainSourceBillNo = mainList[0].HMainSourceBillNo;
string HMainSourceBillType = mainList[0].HMainSourceBillType;
int HOrderLevID = mainList[0].HOrderLevID;
- int HHasten = mainList[0].HHasten;
+
if (OperationType == 2)
@@ -206,7 +205,7 @@
{
string sql = "insert into PM_WorkTaskBillMain" +
"(HYear,HPeriod,HBillType,HBillSubType,HInterID,HBillNo,HProjectID,HProNumber,HProjectStageID,HName,HDate,HTaskNote,HPlanTimes" +
- ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID,HHasten)" +
+ ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID)" +
"values(" +
"" + HYear +
"," + HPeriod +
@@ -227,7 +226,7 @@
"','" + HReceiveEmp +
"','" + HType +
"','" + HCopyEmp +
- "','" + HRemark +
+ "','" + HRemark +
"'," + HOrgID +
",'" + HMaker +
"','" + HMakerDate +
@@ -235,8 +234,7 @@
"," + HMainSourceEntryID +
",'" + HMainSourceBillNo +
"','" + HMainSourceBillType +
- "','" + HOrderLevID +
- "','" + HHasten +
+ "','" + HOrderLevID +
"')";
//涓昏〃
@@ -273,8 +271,7 @@
",HMainSourceEntryID = " + HMainSourceEntryID +
",HMainSourceBillNo = '" + HMainSourceBillNo +
"',HMainSourceBillType = '" + HMainSourceBillType +
- "',HOrderLevID = '" + HOrderLevID +
- "',HHasten = '" + HHasten +
+ "',HOrderLevID = '" + HOrderLevID +
"' where HInterID = " + HInterID;
oCN.RunProc(sql);
@@ -288,7 +285,7 @@
{
string sql = "insert into PM_WorkTaskBillMain" +
"(HYear,HPeriod,HBillType,HBillSubType,HInterID,HBillNo,HProjectID,HProNumber,HProjectStageID,HName,HDate,HTaskNote,HPlanTimes" +
- ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID,HHasten )" +
+ ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID )" +
"values(" +
"" + HYear +
"," + HPeriod +
@@ -318,7 +315,6 @@
",'" + HMainSourceBillNo +
"','" + HMainSourceBillType +
"','" + HOrderLevID +
- "','" + HHasten +
"')";
//涓昏〃
oCN.RunProc(sql);
@@ -1170,6 +1166,64 @@
}
#endregion
+ #region 宸ヤ綔浠诲姟 鍌績娆℃暟鍔熻兘
+ [Route("PM_WorkTaskBill/UpdateHHasten")]
+ [HttpGet]
+ public object UpdateHHasten(string HInterID, int HHasten, string user)
+ {
+ try
+ {
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ BillOld.MvarItemKey = "PM_WorkTaskBillMain";
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+
+ DataSet ds;
+ string sql = "select * from PM_WorkTaskBillMain where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, "PM_WorkTaskBillMain");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+ {
+ string sql1 = "update PM_WorkTaskBillMain set HHasten='"+ HHasten+ "' where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql1, "PM_WorkTaskBillMain");
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ 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 浠诲姟姹囨姤 鏂板/缂栬緫-淇濆瓨
#region 浠诲姟姹囨姤 琛ㄥご鏁版嵁
public class PM_WorkTaskReportBill_Main
diff --git "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\345\221\250\350\256\241\345\210\222/PM_WorkTaskWeekBillController.cs" "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\345\221\250\350\256\241\345\210\222/PM_WorkTaskWeekBillController.cs"
index 52ce606..0fab731 100644
--- "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\345\221\250\350\256\241\345\210\222/PM_WorkTaskWeekBillController.cs"
+++ "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\345\221\250\350\256\241\345\210\222/PM_WorkTaskWeekBillController.cs"
@@ -883,6 +883,105 @@
}
#endregion
+ #region 宸ヤ綔鍛ㄦ�荤粨 鑾峰彇鍒楄〃鏁版嵁
+ [Route("PM_WorkTaskWeekBill/PM_WorkReportWeekBillList")]
+ [HttpGet]
+ public object PM_WorkReportWeekBillList(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCn.RunProcReturn("select * from h_v_PM_WorkReportWeekBillMainList order by 鍗曟嵁鍙� desc", "h_v_PM_WorkReportWeekBillMainList");
+ }
+ else
+ {
+ string sql1 = "select * from h_v_PM_WorkReportWeekBillMainList where 1 = 1 ";
+ string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc";
+ ds = oCn.RunProcReturn(sql, "h_v_PM_WorkReportWeekBillMainList");
+ }
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈幏鍙栧埌鍛ㄦ�荤粨鐩稿叧鏁版嵁锛�";
+ objJsonResult.data = null;
+ }
+
+ objJsonResult.code = "1";
+ 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 宸ヤ綔鍛ㄦ�荤粨 鑾峰彇缂栬緫鍒楄〃鏁版嵁
+ [Route("PM_WorkTaskWeekBill/PM_WorkReportWeekBillMainEditList")]
+ [HttpGet]
+ public object PM_WorkReportWeekBillMainEditList(string HInterID)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ ds = oCn.RunProcReturn("select * from h_v_PM_WorkReportWeekBillMainList where HInterID='" + HInterID + "'", "h_v_PM_WorkReportWeekBillMainList");
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈幏鍙栧埌鍛ㄦ�荤粨鐩稿叧鏁版嵁锛�";
+ objJsonResult.data = null;
+ }
+
+ objJsonResult.code = "1";
+ 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 宸ヤ綔鍛ㄦ�荤粨 閫夋嫨鎬荤粨浜哄甫鍑哄伐鏃�
[Route("PM_WorkTaskWeekBill/PM_WorkReportWeekBillMainList")]
[HttpGet]
@@ -944,7 +1043,7 @@
#region 宸ヤ綔鍛ㄦ�荤粨淇濆瓨/缂栬緫
/// <summary>
- /// 淇濆瓨鐢熶骇棰嗘枡鍗�
+ /// 淇濆瓨宸ヤ綔鍛ㄦ�荤粨
/// </summary>
/// <param name="msg"></param>
/// <returns></returns>
@@ -1033,7 +1132,7 @@
oItem.HBillType = "4757";
oItem.HBillSubType = "4757";
- //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"));
@@ -1270,5 +1369,59 @@
}
}
#endregion
+
+ #region 宸ヤ綔鍛ㄦ�荤粨 鍒犻櫎
+ /// <summary>
+ ///鍙傛暟锛歴tring HInterID銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("PM_WorkTaskWeekBill/PM_WorkReportWeekBillMainDelete")]
+ [HttpGet]
+ public object PM_WorkReportWeekBillMainDelete(string HInterID, string user)
+ {
+ try
+ {
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("PM_WorkReportWeekBillMain_Drop", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (HInterID == null || HInterID.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓嶈兘涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ oCn.BeginTran();
+
+ oCn.RunProc("delete from PM_WorkReportWeekBillMain where HInterID = " + HInterID);
+ //oCn.RunProc("delete from PM_WorkTaskWeekBillSub where HInterID='" + HInterID + "'");
+
+ oCn.Commit();
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
}
}
--
Gitblit v1.9.1