From 16f1fe483c481641f6a8a8ae81461ae15d91e54e Mon Sep 17 00:00:00 2001
From: 沈泽 <211959439@qq.com>
Date: 星期五, 05 十一月 2021 16:54:13 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/MJGL/Sc_MouldProdMoveBillListController.cs | 21
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user | 34
WebAPI/Controllers/MJGL/Sc_MouldRepairOutBillController.cs | 23
WebAPI/Models/ClsOA_InformBillSub.cs | 13
WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs | 21
WebAPI/Controllers/Sc_MouldOtherInBillController.cs | 21
WebAPI/Controllers/SellOutBackController.cs | 2
WebAPI/Controllers/POStockInBillController.cs | 203 +++++++-
WebAPI/Controllers/Sc_CheckToolsRepairWorkBillListController.cs | 22
WebAPI/Models/ClsOA_InformBillMain.cs | 17
WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs | 21
WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs | 21
WebAPI/Controllers/MJJY/Mj_PDA_MoudlCheckController.cs | 2
WebAPI/ListModels.cs | 12
WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs | 1
Model/生产管理/设备管理/ClsSb_EquipDotCheckBillMain.cs | 2
WebAPI/DLL/ClsOA_InformBill.cs | 245 +++++++++++
WebAPI/WebAPI.csproj | 4
WebAPI/Controllers/GG_NoticeController.cs | 241 ++++++++++
Model/生产管理/设备管理/ClsSb_EquipMaintainBillMain.cs | 1
WebAPI/Controllers/Sc_MouldController.cs | 255 ++++++++++-
WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs | 87 ++-
22 files changed, 1,089 insertions(+), 180 deletions(-)
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckBillMain.cs"
index b74b70c..4aa23a0 100644
--- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckBillMain.cs"
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckBillMain.cs"
@@ -12,7 +12,7 @@
public string HPlanNo;
public string HExplanation;
public string HInnerBillNo;
-
+ public Int64 HDeptID;
}
}
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainBillMain.cs"
index 7f26bbc..2e6e249 100644
--- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainBillMain.cs"
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainBillMain.cs"
@@ -12,6 +12,7 @@
public string HPlanNo;
public string HExplanation;
public string HInnerBillNo;
+ public Int64 HDeptID;
}
diff --git a/WebAPI/Controllers/GG_NoticeController.cs b/WebAPI/Controllers/GG_NoticeController.cs
new file mode 100644
index 0000000..4144c40
--- /dev/null
+++ b/WebAPI/Controllers/GG_NoticeController.cs
@@ -0,0 +1,241 @@
+锘縰sing DBUtility;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers
+{
+ public class GG_NoticeController : ApiController
+ {
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;//鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛�
+ private json objJsonResult = new json();
+ public DataSet ds = new DataSet();
+ public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ public DLL.ClsOA_InformBill BillNew0 = new DLL.ClsOA_InformBill(); //鍏憡鍒楄〃瀵瑰簲鍗曟嵁绫诲瀷
+ public DLL.ClsOA_InformBill BillOld0 = new DLL.ClsOA_InformBill(); //鍏憡鍒楄〃瀵瑰簲鍗曟嵁绫诲瀷
+
+ #region 鍏憡鍒楄〃
+
+ [Route("GG_Notice/Get_GG_NoticeBillList")]
+ [HttpGet]
+ public object Get_GG_NoticeBillList(string sWhere, string user)
+ {
+ try
+ {
+ //缂栬緫鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldRepairChangeBillList", 1, true, user))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ ds = Get_GG_NoticeBillList(sWhere);
+ if (ds == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ public static DataSet Get_GG_NoticeBillList(string sWhere)
+ {
+ var sql = "select A.HInterID,b.HEntryID,A.HContext,A.HDeptID,D.HName HDeptName, A.HSendMan, B.HReceiveMan,A.HLevel,A.HDescription,case when B.HReadFlag=0 then '鏈槄' when B.HReadFlag=1 then '宸查槄' end HReadFlag, A.HMaker,A.HDate,A.HUpDater,A.HUpDateDate" +
+ " from OA_InformBillMain A inner join OA_InformBillSub B on A.HInterID=B.HInterID left join Gy_Department D on A.HDeptID=D.HItemID where 1=1 " + sWhere;
+ return new SQLHelper.ClsCN().RunProcReturn(sql, "OA_InformBillMain");
+ }
+
+ #endregion
+
+ #region 鍏憡鍒楄〃淇濆瓨/缂栬緫
+ /// <summary>
+ /// 鍏憡鍒楄〃
+ /// </summary>
+ /// <param name="msg"></param>
+ /// <returns></returns>
+ [Route("GG_Notice/SaveGetGG_NoticeBillList")]
+ [HttpPost]
+ public object SaveGetGG_NoticeBillList([FromBody] JObject msg)
+ {
+ var _value = msg["msg"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string msg3 = sArray[1].ToString();
+ string refSav = sArray[2].ToString();
+ string msg4 = sArray[3].ToString();
+ string s = "";
+ ListModels oListModels = new ListModels();
+ try
+ {
+ //缂栬緫鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdInBill_Edit", 1, true, msg4))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ DLL.ClsOA_InformBill oBill = new DLL.ClsOA_InformBill();
+ List<Models.ClsOA_InformBillMain> lsmain = new List<Models.ClsOA_InformBillMain>();
+ List<Models.ClsOA_InformBillSub> lssub = new List<Models.ClsOA_InformBillSub>();
+ msg2 = msg2.Replace("\\", "");
+ msg2 = msg2.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_GG_NoticeBillMain(msg2);
+ foreach (Models.ClsOA_InformBillMain oItem in lsmain)
+ {
+ if (refSav == "Add")
+ {
+ //鍗曟嵁鍙锋槸鍚﹂噸澶�
+ if (BillNew0.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld0.omodel.HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鍙烽噸澶嶏紒涓嶅厑璁镐繚瀛橈紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ if (refSav == "Update")
+ {
+ if (BillOld0.ShowBill(oItem.HInterID, ref s) == false)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹湁璇紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ //鍒ゆ柇鏄惁鍙紪杈�
+ if (BillOld0.omodel.HChecker != "" && BillOld0.omodel.HChecker != null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽淇敼锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (BillOld0.omodel.HBillStatus > 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹浜庝笉鍙紪杈戠姸鎬侊紝涓嶅厑璁镐慨鏀癸紒";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld0, ref s))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = s + "锛屼笉鍏佽淇敼";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佹病鏈夊崟鎹棩鏈燂紝鏃犳硶淇濆瓨锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ oItem.HMaker = msg4; //鍒跺崟浜�
+ oItem.HBillType = "4506";
+ oItem.HBillSubType = "4506";
+ 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"));
+ lsmain.Add(oItem);
+ //琛ㄤ綋鏁版嵁
+ for (int i = 0; i < msg3.Length; i++)
+ {
+ i++;
+ Models.ClsOA_InformBillSub sb = new Models.ClsOA_InformBillSub();
+ sb.HEntryID = i;
+ sb.HCloseMan = "";
+ sb.HRemark = "";
+ sb.HSourceBillNo = "";
+ sb.HSourceInterID = 0;
+ sb.HSourceEntryID = 0;
+ sb.HSourceBillType = "";
+ sb.HRelationQty = 0;
+ sb.HRelationMoney = 0;
+ sb.HReceiveMan = "";
+ lssub.Add(sb);
+ }
+ }
+
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (oBill.omodel.HInterID == 0)
+ {
+ // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ else
+ {
+ bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ if (bResult)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ }
+}
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs
index 03293d2..1725134 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs
@@ -155,6 +155,8 @@
public object Sc_MouldMoveStockStepInBillListProjectDetai(string sqlWhere)
{
DataSet ds;
+ DataSet ds1;
+ List<object> list = new List<object>();
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
@@ -166,10 +168,6 @@
璋冨叆浠撲綅浠g爜 HSPCode, 璋冨叆浠撲綅 HSPName,HSCWHID, 璋冨嚭浠撳簱浠g爜 HSCWHCode, 璋冨嚭浠撳簱 HSCWHName,HSCSPID,
璋冨嚭浠撲綅浠g爜 HSCSPCode, 璋冨嚭浠撲綅 HSCSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅 FROM h_v_Sc_MouldMoveStockStepInBillListDetail"), "h_v_Sc_MouldMoveStockStepInBillListDetail");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
else
{
@@ -182,11 +180,18 @@
string sql = sql1 + sqlWhere;
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMoveStockStepInBillListDetail");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
+ //鏌ユ眹鎬�
+ ds1 = oCN.RunProcReturn(string.Format(@"select 鐗╂枡浠g爜,max(鐗╂枡鍚嶇О)鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,max(鍗曟嵁鍙�)鍗曟嵁鍙�,鎵规,sum(瀹炲彂鏁伴噺)瀹炲彂鏁伴噺,
+ hwhid,max(璋冨叆浠撳簱浠g爜)璋冨叆浠撳簱浠g爜,max(璋冨叆浠撳簱)璋冨叆浠撳簱,琛ㄤ綋澶囨敞 from h_v_Sc_MouldMoveStockStepInBillListDetail
+ where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,hwhid,鎵规,琛ㄤ綋澶囨敞"), "h_v_Sc_MouldMoveStockStepInBillListDetail");
+
+ list.Add(ds.Tables[0]);
+ list.Add(ds1.Tables[0]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.list = list;
}
catch (Exception e)
{
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs
index cb9454f..82c1256 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs
@@ -155,6 +155,8 @@
public object Sc_MouldMoveStockStepOutBillListProjectDetai(string sqlWhere)
{
DataSet ds;
+ DataSet ds1;
+ List<object> list = new List<object>();
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
@@ -166,10 +168,6 @@
璋冨叆浠撲綅浠g爜 HSPCode, 璋冨叆浠撲綅 HSPName,HSCWHID, 璋冨嚭浠撳簱浠g爜 HSCWHCode, 璋冨嚭浠撳簱 HSCWHName,HSCSPID,
璋冨嚭浠撲綅浠g爜 HSCSPCode, 璋冨嚭浠撲綅 HSCSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅 FROM h_v_Sc_MouldMoveStockStepOutBill"), "h_v_Sc_MouldMoveStockStepOutBill");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
else
{
@@ -182,11 +180,18 @@
string sql = sql1 + sqlWhere;
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMoveStockStepOutBill");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
+ //鏌ユ眹鎬�
+ ds1 = oCN.RunProcReturn(string.Format(@"select 鐗╂枡浠g爜,max(鐗╂枡鍚嶇О)鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,max(鍗曟嵁鍙�)鍗曟嵁鍙�,鎵规,sum(瀹炲彂鏁伴噺)瀹炲彂鏁伴噺,
+ hscwhid,max(璋冨嚭浠撳簱浠g爜)璋冨嚭浠撳簱浠g爜,max(璋冨嚭浠撳簱)璋冨嚭浠撳簱,琛ㄤ綋澶囨敞 from h_v_Sc_MouldMoveStockStepOutBill
+ where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,hscwhid,鎵规,琛ㄤ綋澶囨敞"), "h_v_Sc_MouldMoveStockStepOutBill");
+
+ list.Add(ds.Tables[0]);
+ list.Add(ds1.Tables[0]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.list = list;
}
catch (Exception e)
{
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs
index b1d7197..b77c76d 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs
@@ -154,6 +154,8 @@
public object Sc_MouldOtherOutBillListProjectDetai(string sqlWhere)
{
DataSet ds;
+ DataSet ds1;
+ List<object> list = new List<object>();
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
@@ -164,10 +166,6 @@
鍗曚环 HPrice, 閲戦 HMoney,HWHSonID HWHID, 鍙戞枡浠撳簱浠g爜 HWHCode, 鍙戞枡浠撳簱 HWHName,HSPID,
浠撲綅浠g爜 HSPCode, 浠撲綅 HSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅 FROM h_v_Sc_MouldOtherOutBillList"), "h_v_Sc_MouldOtherOutBillList");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
else
{
@@ -180,11 +178,18 @@
string sql = sql1 + sqlWhere;
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldOtherOutBillList");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
+ //鏌ユ眹鎬�
+ ds1 = oCN.RunProcReturn(string.Format(@"select 鐗╂枡浠g爜,max(鐗╂枡鍚嶇О)鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,max(鍗曟嵁鍙�)鍗曟嵁鍙�,鎵规,sum(瀹炲彂鏁伴噺)瀹炲彂鏁伴噺,
+ HWHSonID,max(鍙戞枡浠撳簱浠g爜)鍙戞枡浠撳簱浠g爜,max(鍙戞枡浠撳簱)鍙戞枡浠撳簱,琛ㄤ綋澶囨敞 from h_v_Sc_MouldOtherOutBillList
+ where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,HWHSonID,鎵规,琛ㄤ綋澶囨敞"), "h_v_Sc_MouldOtherOutBillList");
+
+ list.Add(ds.Tables[0]);
+ list.Add(ds1.Tables[0]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.list = list;
}
catch (Exception e)
{
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs
index 0541d52..493fbf3 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs
@@ -78,7 +78,6 @@
string sql = sql1 + sWhere+ "order by 鏃ユ湡 desc";
return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdInHouseBillList");
}
-
}
#endregion
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldProdMoveBillListController.cs b/WebAPI/Controllers/MJGL/Sc_MouldProdMoveBillListController.cs
index 017b2b8..86f6907 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldProdMoveBillListController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldProdMoveBillListController.cs
@@ -155,6 +155,8 @@
public object Sc_MouldProdMoveBillListProjectDetai(string sqlWhere)
{
DataSet ds;
+ DataSet ds1;
+ List<object> list = new List<object>();
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
@@ -166,10 +168,6 @@
璋冨叆浠撲綅浠g爜 HSPCode, 璋冨叆浠撲綅 HSPName,HSCWHID, 璋冨嚭浠撳簱浠g爜 HSCWHCode, 璋冨嚭浠撳簱 HSCWHName,HSCSPID,
璋冨嚭浠撲綅浠g爜 HSCSPCode, 璋冨嚭浠撲綅 HSCSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅 FROM h_v_Sc_MouldProdMoveBillList"), "h_v_Sc_MouldProdMoveBillList");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
else
{
@@ -183,11 +181,18 @@
string sql = sql1 + sqlWhere;
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldProdMoveBillList");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
+ //鏌ユ眹鎬�
+ ds1 = oCN.RunProcReturn(string.Format(@"select 鐗╂枡浠g爜,max(鐗╂枡鍚嶇О)鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,max(鍗曟嵁鍙�)鍗曟嵁鍙�,鎵规,sum(瀹炲彂鏁伴噺)瀹炲彂鏁伴噺,
+ HSCWHID,max(璋冨嚭浠撳簱浠g爜)璋冨嚭浠撳簱浠g爜,max(璋冨嚭浠撳簱)璋冨嚭浠撳簱,琛ㄤ綋澶囨敞 from h_v_Sc_MouldProdMoveBillList
+ where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,HSCWHID,鎵规,琛ㄤ綋澶囨敞"), "h_v_Sc_MouldProdMoveBillList");
+
+ list.Add(ds.Tables[0]);
+ list.Add(ds1.Tables[0]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.list = list;
}
catch (Exception e)
{
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldRepairOutBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldRepairOutBillController.cs
index 858ca7d..751c66d 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldRepairOutBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldRepairOutBillController.cs
@@ -471,6 +471,8 @@
public object Sc_MouldRepairOutBillListCheckDetai(string sqlWhere)
{
DataSet ds;
+ DataSet ds1;
+ List<object> list = new List<object>();
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
@@ -480,11 +482,6 @@
鎵规 HBatchNo,璁捐瀵垮懡 HDesignLife, 鍓╀綑瀵垮懡 HLeaveLife, 浣跨敤瀵垮懡 HUseLife,搴旀敹鏁伴噺 HQtyMust,
瀹炴敹鏁伴噺 HQty, HWHID, 浠撳簱浠g爜 HWHCode,浠撳簱 HWHName,瀛愬娉� HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅
FROM h_v_Sc_MouldRepairOutBillList"), "h_v_Sc_MouldRepairOutBillList");
-
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
else
{
@@ -496,12 +493,18 @@
FROM h_v_Sc_MouldRepairOutBillList where 1=1 ");
string sql = sql1 + sqlWhere;
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldRepairOutBillList");
-
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
+ //鏌ユ眹鎬�
+ ds1 = oCN.RunProcReturn(string.Format(@"select 鐗╂枡浠g爜,max(鐗╂枡鍚嶇О)鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,max(鍗曟嵁鍙�)鍗曟嵁鍙�,鎵规,sum(瀹炴敹鏁伴噺)瀹炴敹鏁伴噺,
+ hwhid,max(浠撳簱浠g爜)浠撳簱浠g爜,max(浠撳簱)浠撳簱,瀛愬娉� from h_v_Sc_MouldRepairOutBillList
+ where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,hwhid,鎵规,瀛愬娉�"), "h_v_Sc_MouldRepairOutBillList");
+
+ list.Add(ds.Tables[0]);
+ list.Add(ds1.Tables[0]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.list = list;
}
catch (Exception e)
{
diff --git a/WebAPI/Controllers/MJJY/Mj_PDA_MoudlCheckController.cs b/WebAPI/Controllers/MJJY/Mj_PDA_MoudlCheckController.cs
index f767a85..330401d 100644
--- a/WebAPI/Controllers/MJJY/Mj_PDA_MoudlCheckController.cs
+++ b/WebAPI/Controllers/MJJY/Mj_PDA_MoudlCheckController.cs
@@ -154,7 +154,7 @@
return objJsonResult;
}
//寰楀埌淇℃伅
- ds = oCN.RunProcReturn("select top 1 * from h_v_Gy_EquipFileMainList where HBarCode = '" + HBarCode + "'", "h_v_Gy_EquipFileMainList");
+ ds = oCN.RunProcReturn("select top 1 * from h_v_Gy_EquipFileMainList where 鏉″舰鐮� = '" + HBarCode + "'", "h_v_Gy_EquipFileMainList");
//ds = oWebs.get_InfoByBarCode(HBarCode, ref DBUtility.ClsPub.sErrInfo);
//鍐欏叆淇℃伅
if (ds == null)
diff --git a/WebAPI/Controllers/POStockInBillController.cs b/WebAPI/Controllers/POStockInBillController.cs
index c428c7d..31c4efd 100644
--- a/WebAPI/Controllers/POStockInBillController.cs
+++ b/WebAPI/Controllers/POStockInBillController.cs
@@ -26,14 +26,14 @@
public Int64 HWhID;//浠撳簱ID
public Int64 HSPID;//浠撲綅ID
- public string HSupName=string.Empty;
- public string HDeptName=string.Empty;
- public string HWhName=string.Empty;
- public string HSPName=string.Empty;
+ public string HSupName = string.Empty;
+ public string HDeptName = string.Empty;
+ public string HWhName = string.Empty;
+ public string HSPName = string.Empty;
public Int64 HInterID;//鏈崟ID
public string HBillNo;
- public string HSourceBillNo=string.Empty;
+ public string HSourceBillNo = string.Empty;
public string HBillType = "1201";//鍗曟嵁绫诲瀷
public string sBillCode = "ICStockBill";
public string sTranType = "1";
@@ -43,16 +43,17 @@
public string sSourceTypeName = "閲囪喘璁㈠崟";
public string sRedBlue2 = "钃濆瓧";
//public bool sRedBlue = false;
- public WebServer webserver =new WebServer();
- public DataSet ds =new DataSet();
- public ClsGy_BarCodeBill_WMS_Model_View oView =new ClsGy_BarCodeBill_WMS_Model_View();
- public ClsKF_PonderationBillMain_Temp model =new ClsKF_PonderationBillMain_Temp();
+ public WebServer webserver = new WebServer();
+ public DataSet ds = new DataSet();
+ public ClsGy_BarCodeBill_WMS_Model_View oView = new ClsGy_BarCodeBill_WMS_Model_View();
+ public ClsKF_PonderationBillMain_Temp model = new ClsKF_PonderationBillMain_Temp();
public ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
public double sRelQty = 0;
- // private DataBaseServices objDataBaseServices = new DataBaseServices();
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ // private DataBaseServices objDataBaseServices = new DataBaseServices();
private JsonResult objJsonResult = new JsonResult();
- // private string msgModel = "{{\"count\":{0},\"code\":{0},\"message\":\"{1}\",\"result\":{2}}}";
+ // private string msgModel = "{{\"count\":{0},\"code\":{0},\"message\":\"{1}\",\"result\":{2}}}";
public static string GetSession(string sMsg)
{
@@ -113,7 +114,7 @@
{
HBillType = "1239";
}
- oBar = webserver.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID,sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
+ oBar = webserver.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
if (oBar == null)
{
objJsonResult.code = "0";
@@ -168,16 +169,16 @@
objJsonResult.count = 0;
objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + HSourceBillType;
objJsonResult.data = null;
- return objJsonResult;
+ return objJsonResult;
}
else
- {
+ {
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
objJsonResult.data = ds.Tables[0];
return objJsonResult;
-
+
}
}
catch (Exception ex)
@@ -199,12 +200,12 @@
/// <returns></returns>
[Route("POStockInBill/set_SavePonderationBillMain_Temp_Source_Fast_Json")]
[HttpGet]
- public object set_SavePonderationBillMain_Temp_Source_Fast_Json(string HSourceBillType,string HSourceBillNo, Int64 sInterID, string sBillNo)
+ public object set_SavePonderationBillMain_Temp_Source_Fast_Json(string HSourceBillType, string HSourceBillNo, Int64 sInterID, string sBillNo)
{
try
{
- // DataSet ds = new DataSet();
- // WebServer webserver = new WebServer();
+ // DataSet ds = new DataSet();
+ // WebServer webserver = new WebServer();
string sWhere = " Where 鍗曟嵁鍙� like '%" + HSourceBillNo.Trim() + "'";
//鏍规嵁婧愬崟绫诲瀷鏉ヨ皟鐢ㄤ笉鍚岀殑WEBS鏂规硶 new
if (HSourceBillType == "1102")
@@ -259,10 +260,10 @@
}
catch (Exception ex)
{
-
+
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"+ex.ToString();
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
objJsonResult.data = null;
return objJsonResult;
}
@@ -299,12 +300,12 @@
}
catch (Exception e)
{
-
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"+e.ToString();
- objJsonResult.data = null;
- return objJsonResult;
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
}
}
/// <summary>
@@ -327,7 +328,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 1;
- objJsonResult.Message ="";
+ objJsonResult.Message = "";
objJsonResult.data = null;
return objJsonResult;
}
@@ -335,7 +336,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "澶辫触锛�"+DBUtility.ClsPub.sErrInfo;
+ objJsonResult.Message = "澶辫触锛�" + DBUtility.ClsPub.sErrInfo;
objJsonResult.data = null;
return objJsonResult;
}
@@ -363,7 +364,7 @@
else
{
- if (webserver.set_SavePonderationBillMain_Temp_Source_SourceBillType(sInterID, sBillNo, HBillType, sBarCode, sRedBlue2, ref HSourceBillNo, ref sSourceTypeName, ref HSupID, ref HSupName, ref HDeptID, ref HDeptName, ref DBUtility.ClsPub.sErrInfo))
+ if (webserver.set_SavePonderationBillMain_Temp_Source_SourceBillType(sInterID, sBillNo, HBillType, sBarCode, sRedBlue2, ref HSourceBillNo, ref sSourceTypeName, ref HSupID, ref HSupName, ref HDeptID, ref HDeptName, ref DBUtility.ClsPub.sErrInfo))
{
//----------鍒涘缓铏氳〃------------------------
DataTable dt_Main = new DataTable("Json");
@@ -424,7 +425,7 @@
[HttpGet]
public object get_InfoByBarCode_Source_Json(string sBarCode, Int64 sInterID, string sBillNo, Double sQty, Int64 HWHID, Int64 HSPID)
{
- // string sRedBlue = "钃濆瓧";
+ // string sRedBlue = "钃濆瓧";
try
{
string sErrMsg = "";
@@ -473,12 +474,12 @@
}
catch (Exception e)
{
-
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鎵爜澶辫触,姝ゆ潯鐮佷笉瀛樺湪锛�"+e.ToString();
- objJsonResult.data = null;
- return objJsonResult;
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵爜澶辫触,姝ゆ潯鐮佷笉瀛樺湪锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
}
}
/// <summary>
@@ -487,7 +488,7 @@
/// <returns></returns>
[Route("POStockInBill/set_SavePOStockInBackBill_Json")]
[HttpPost]
- public object set_SavePOStockInBackBill_Json([FromBody]JObject oMain)
+ public object set_SavePOStockInBackBill_Json([FromBody] JObject oMain)
{
var _value = oMain["oMain"].ToString();
string msg1 = _value.ToString();
@@ -543,7 +544,7 @@
/// <returns></returns>
[Route("POStockInBill/set_SavePOStockInBill_Json")]
[HttpPost]
- public object set_SavePOStockInBill_Json([FromBody]JObject oMain)
+ public object set_SavePOStockInBill_Json([FromBody] JObject oMain)
{
var _value = oMain["oMain"].ToString();
string msg1 = _value.ToString();
@@ -607,7 +608,7 @@
[Route("POStockInBill/GetSpName_Json")]
[HttpGet]
- public object GetSpName_Json(long HSpID, long HWHID,long HStockOrgID, ref string sErrMsg)
+ public object GetSpName_Json(long HSpID, long HWHID, long HStockOrgID, ref string sErrMsg)
{
try
{
@@ -650,7 +651,7 @@
string sErrMsg = string.Empty;
try
{
- if (webserver.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID,HAuxPropID,HMTONo,HSourceInterID,HSourceEntryID,sHBillType,ref sErrMsg))
+ if (webserver.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID, HAuxPropID, HMTONo, HSourceInterID, HSourceEntryID, sHBillType, ref sErrMsg))
{
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -719,7 +720,7 @@
[Route("POStockInBillList/DisBillEntryList_Mate_Webs_Json")]
[HttpGet]
- public object DisBillEntryList_Webs_Json(string HBillType,string sWhere)
+ public object DisBillEntryList_Webs_Json(string HBillType, string sWhere)
{
try
{
@@ -789,5 +790,125 @@
}
+
+ #region 鍒拌揣鐐规暟
+ [Route("POStockInBillList/get_InfoByBillNo")]
+ [HttpGet]
+ public object get_InfoByBillNo(string HBillno)
+ {
+ try
+ {
+ string sqlwhere = " where 1=1 ";
+ if (!String.IsNullOrEmpty(HBillno))
+ sqlwhere += "and 鍗曟嵁鍙�='" + HBillno + "'";
+ string sql = $"select * from h_v_Cg_POInStockBillList {sqlwhere} ";
+ ds = oCn.RunProcReturn(sql, "h_v_Cg_POInStockBillList");
+ 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 = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "澶辫触 锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+
+ //[Route("POStockInBillList/confirm")]
+ //public object confirm(string hmainid)
+ //{
+ // try
+ // {
+ // JObject model = new JObject();
+ // model.Add("FBILLTYPEID", new JObject() { ["Fnumber"] = "SLD01_SYS" }); //鍗曟嵁绫诲瀷
+ // model.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); //閫氱煡鏃ユ湡
+ // model.Add("FStockOrgId", new JObject() { ["Fnumber"] = (this.Model.GetValue("FHPURCHASEORGID") as DynamicObject)?["Number"].ToString() ?? "" }); // 鏀舵枡缁勭粐
+ // model.Add("FPurOrgId", new JObject() { ["Fnumber"] = (this.Model.GetValue("FHPURCHASEORGID") as DynamicObject)?["Number"].ToString() ?? "" }); //閲囪喘缁勭粐
+ // model.Add("FSupplierId", new JObject() { ["Fnumber"] = (this.Model.GetValue("FSupplierID") as DynamicObject)?["Number"].ToString() ?? "" }); //渚涘簲鍟�
+ // model.Add("FOwnerTypeIdHead", "BD_OwnerOrg");// 璐т富绫诲瀷
+ // model.Add("FOwnerIdHead", new JObject() { ["Fnumber"] = (this.Model.GetValue("FHPURCHASEORGID") as DynamicObject)?["Number"].ToString() ?? "" });//璐т富
+ // //瀛愯〃 鏁版嵁妯″瀷
+ // JArray Fentity = new JArray();
+ // foreach (var item in entityRows)
+ // {
+ // if (Convert.ToBoolean(item["FCloseStatus"]))
+ // continue;
+ // JObject FentityModel = new JObject();
+ // FentityModel.Add("FMaterialId", new JObject() { ["Fnumber"] = (item["FHMaterID"] as DynamicObject)?["Number"].ToString() ?? "" }); // 鐗╂枡缂栫爜
+ // FentityModel.Add("FUnitID", new JObject() { ["Fnumber"] = (item["FUnitID"] as DynamicObject)?["Number"].ToString() ?? "" }); // 鍗曚綅
+ // FentityModel.Add("FPreDeliveryDate", this.Model.GetValue("FHDate").ToString()); //棰勮鍒拌揣鏃ユ湡
+ // FentityModel.Add("FPriceUnitId", new JObject() { ["Fnumber"] = (item["FUnitID"] as DynamicObject)?["Number"].ToString() ?? "" }); // 璁′环鍗曚綅
+ // FentityModel.Add("FStockUnitID", new JObject() { ["Fnumber"] = (item["FUnitID"] as DynamicObject)?["Number"].ToString() ?? "" }); // 搴撳瓨鍗曚綅
+ // FentityModel.Add("FActReceiveQty", Convert.ToDecimal(item["FHQty"]) - Convert.ToDecimal(item["FReciveCount"])); // 渚涘簲鍟嗛�佽揣鏁伴噺锛堟彁鏂欒鍒掓暟閲� - 宸茬敓鎴愰�佽揣鍗曟暟閲忥級
+ // FentityModel.Add("FOwnerTypeId", "BD_OwnerOrg");//璐т富绫诲瀷
+ // FentityModel.Add("FOwnerID", new JObject() { ["Fnumber"] = (this.Model.GetValue("FHPURCHASEORGID") as DynamicObject)?["Number"].ToString() ?? "" });//璐т富
+ // FentityModel.Add("FSrcId", item["FHPOOrderInterID"].ToString());//婧愬崟鍐呯爜
+ // FentityModel.Add("FSRCFORMID", "PUR_PurchaseOrder");//婧愬崟绫诲瀷
+ // FentityModel.Add("FSrcBillNo", item["FHPOOrderBillNo"].ToString());//婧愬崟鍗曞彿
+ // FentityModel.Add("FSRCENTRYID", item["FHPOOrderEntryID"].ToString());//婧愬崟鍒嗗綍鍐呯爜
+ // FentityModel.Add("FORDERBILLNO", item["FHPOOrderBillNo"].ToString());//婧愬崟鍗曞彿
+ // FentityModel.Add("FPOORDERENTRYID", item["FHPOOrderEntryID"].ToString());//婧愬崟鍒嗗綍鍐呯爜
+
+
+ // JArray Fentity2 = new JArray();
+ // JObject FentityModel2 = new JObject();
+ // FentityModel2.Add("FDetailEntity_Link_FRULEID", "a8c6b6e5-a8c0-4fc1-8592-6b76c2136cf9");
+ // FentityModel2.Add("FDetailEntity_Link_FSTableName", "t_PUR_POOrderEntry");
+ // FentityModel2.Add("FDetailEntity_Link_FSBillId", item["FHPOOrderInterID"].ToString());
+ // FentityModel2.Add("FDetailEntity_Link_FSId", item["FHPOOrderEntryID"].ToString());
+ // Fentity2.Add(FentityModel2);
+ // FentityModel.Add("FDetailEntity_Link", Fentity2);
+ // Fentity.Add(FentityModel);
+ // }
+ // model.Add("FDetailEntity", Fentity); //鏄庣粏淇℃伅
+
+ // JObject _FentityModel = new JObject();
+ // _FentityModel.Add("FSettleOrgId", new JObject() { ["Fnumber"] = (this.Model.GetValue("FHPURCHASEORGID") as DynamicObject)?["Number"].ToString() ?? "" }); // 缁撶畻缁勭粐
+ // _FentityModel.Add("FSettleCurrId", new JObject() { ["Fnumber"] = (this.Model.GetValue("FSettleCurrId") as DynamicObject)?["Number"].ToString() ?? "" }); // 缁撶畻甯佸埆
+ // _FentityModel.Add("FPricePoint", 0); // 瀹氫环鏃剁偣
+ // model.Add("FinanceEntity ", _FentityModel);//璐㈠姟淇℃伅
+ // JObject jsonRoot = new JObject()
+ // {
+ // ["Creator"] = "",
+ // ["NeedUpDateFields"] = new JArray(),
+ // ["NeedReturnFields"] = new JArray(),
+ // ["IsDeleteEntry"] = "false",
+ // ["SubSystemId"] = "",
+ // ["IsVerifyBaseDataField"] = "false",
+ // //["IsAutoSubmitAndAudit"] = true,//鑷姩璋冪敤鎻愪氦鍜屽鏍稿姛鑳�
+ // ["Model"] = model
+ // };
+ // var result = cloudClient.Save("PUR_ReceiveBill", jsonRoot.ToString());
+ // JObject saveObj = JObject.Parse(result);
+ // string saveIsSuc = saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper();
+ // }
+ // catch (Exception)
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "澶辫触 锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
+
+ //}
+ #endregion
}
}
\ No newline at end of file
diff --git a/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillListController.cs b/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillListController.cs
index 1a4c036..53fa018 100644
--- a/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillListController.cs
+++ b/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillListController.cs
@@ -4268,6 +4268,8 @@
public object Sc_MouldRepairInBillListCheckDetai(string sqlWhere)
{
DataSet ds;
+ DataSet ds1;
+ List<object> list = new List<object>();
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
@@ -4278,10 +4280,7 @@
瀹炴敹鏁伴噺 HQty, HWHID, 浠撳簱浠g爜 HWHCode,浠撳簱 HWHName,瀛愬娉� HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅
FROM h_v_Sc_MouldRepairInBillList"), "h_v_Sc_MouldRepairInBillList");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
+
}
else
{
@@ -4294,11 +4293,18 @@
string sql = sql1 + sqlWhere;
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldRepairInBillList");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
+ //鏌ユ眹鎬�
+ ds1 = oCN.RunProcReturn(string.Format(@"select 鐗╂枡浠g爜,max(鐗╂枡鍚嶇О)鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,max(鍗曟嵁鍙�)鍗曟嵁鍙�,鎵规,sum(瀹炴敹鏁伴噺)瀹炴敹鏁伴噺,
+ hwhid,max(浠撳簱浠g爜)浠撳簱浠g爜,max(浠撳簱)浠撳簱,瀛愬娉� from h_v_Sc_MouldRepairInBillList
+ where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,hwhid,鎵规,瀛愬娉�"), "h_v_Sc_MouldRepairInBillList");
+
+ list.Add(ds.Tables[0]);
+ list.Add(ds1.Tables[0]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.list = list;
}
catch (Exception e)
{
diff --git a/WebAPI/Controllers/Sc_MouldController.cs b/WebAPI/Controllers/Sc_MouldController.cs
index af82ab5..4f9248d 100644
--- a/WebAPI/Controllers/Sc_MouldController.cs
+++ b/WebAPI/Controllers/Sc_MouldController.cs
@@ -1480,7 +1480,7 @@
#endregion
- #region 璁惧缁翠慨璁板綍鍗曚繚瀛�
+ #region 璁惧淇濆吇璁板綍鍗曚繚瀛�
[Route("Sb_EquipMaintainBill/EquipMaintainBill_Save")]
[HttpPost]
@@ -1497,15 +1497,15 @@
try
{
msg1 = "[" + msg1.ToString() + "]";
- DAL.ClsSb_MouldRepairWorkBill BillNew = new DAL.ClsSb_MouldRepairWorkBill();
- List<Model.ClsSb_MouldRepairWorkBillMain> mainList = Newtonsoft
+ DAL.ClsSb_EquipMaintainBill BillNew = new DAL.ClsSb_EquipMaintainBill();
+ List<Model.ClsSb_EquipMaintainBillMain> mainList = Newtonsoft
.Json
.JsonConvert
- .DeserializeObject<List<Model.ClsSb_MouldRepairWorkBillMain>>(msg1);
- List<Model.ClsSb_MouldRepairWorkBillSub> subList = Newtonsoft
+ .DeserializeObject<List<Model.ClsSb_EquipMaintainBillMain>>(msg1);
+ List<Model.ClsSb_EquipMaintainBillSub> subList = Newtonsoft
.Json
.JsonConvert
- .DeserializeObject<List<Model.ClsSb_MouldRepairWorkBillSub>>(msg1);
+ .DeserializeObject<List<Model.ClsSb_EquipMaintainBillSub>>(msg1);
string s = "";
int sYear = 0;
int sPeriod = 0;
@@ -1523,27 +1523,23 @@
BillNew.omodel.HBillNo = mainList[0].HBillNo.Trim();
BillNew.omodel.HMaker = mainList[0].HMaker;
BillNew.omodel.HDate = HDate;
- BillNew.omodel.HMouldID = mainList[0].HMouldID;
+ BillNew.omodel.HEquipID = mainList[0].HEquipID;
BillNew.omodel.HDeptID = mainList[0].HDeptID;
- BillNew.omodel.HEmpID = mainList[0].HEmpID;
- BillNew.omodel.HRepairID = mainList[0].HRepairID;
- BillNew.omodel.HManagerID = mainList[0].HManagerID;
- BillNew.omodel.HRepairBeginDate = mainList[0].HRepairBeginDate;
- BillNew.omodel.HRepairEndDate = mainList[0].HRepairEndDate;
- BillNew.omodel.HRepairContent = mainList[0].HRepairContent;
- BillNew.omodel.HCycleUnit = mainList[0].HCycleUnit;
- BillNew.omodel.HPlanTimes = mainList[0].HPlanTimes;
- BillNew.omodel.HTimes = mainList[0].HTimes;
+ BillNew.omodel.HBeginDate = mainList[0].HBeginDate;
+ BillNew.omodel.HEndDate = mainList[0].HEndDate;
+ //BillNew.omodel.HCycleUnit = mainList[0].HCycleUnit;
+ //BillNew.omodel.HPlanTimes = mainList[0].HPlanTimes;
+ //BillNew.omodel.HTimes = mainList[0].HTimes;
BillNew.omodel.HExplanation = mainList[0].HExplanation;
BillNew.omodel.HInnerBillNo = mainList[0].HInnerBillNo;
- BillNew.omodel.HMouldID = mainList[0].HMouldID;
- BillNew.omodel.HSupID = mainList[0].HSupID;
- BillNew.omodel.HRepairType = mainList[0].HRepairType;
- BillNew.omodel.HNewModel = mainList[0].HNewModel;
- BillNew.omodel.HNewDesignLife = mainList[0].HNewDesignLife;
- BillNew.omodel.HEquipID = mainList[0].HEquipID;
- BillNew.DetailColl = new List<Model.ClsSb_MouldRepairWorkBillSub>();
- Model.ClsSb_MouldRepairWorkBillSub oSub = new Model.ClsSb_MouldRepairWorkBillSub();
+ //BillNew.omodel.HMouldID = mainList[0].HMouldID;
+ //BillNew.omodel.HSupID = mainList[0].HSupID;
+ //BillNew.omodel.HRepairType = mainList[0].HRepairType;
+ //BillNew.omodel.HNewModel = mainList[0].HNewModel;
+ //BillNew.omodel.HNewDesignLife = mainList[0].HNewDesignLife;
+ //BillNew.omodel.HEquipID = mainList[0].HEquipID;
+ BillNew.DetailColl = new List<Model.ClsSb_EquipMaintainBillSub>();
+ Model.ClsSb_EquipMaintainBillSub oSub = new Model.ClsSb_EquipMaintainBillSub();
oSub.HEntryID = 1;
oSub.HRemark = DBUtility.ClsPub.isStrNull(subList[0].HRemark);
oSub.HSourceInterID = DBUtility.ClsPub.isLong(subList[0].HSourceInterID);
@@ -1555,10 +1551,215 @@
oSub.HCloseMan = DBUtility.ClsPub.isStrNull(subList[0].HCloseMan);
oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(subList[0].HEntryCloseDate);
oSub.HCloseType = DBUtility.ClsPub.isBool(subList[0].HCloseType);
- oSub.HRepairID = DBUtility.ClsPub.isLong(subList[0].HRepairID);
oSub.HManagerID = DBUtility.ClsPub.isLong(subList[0].HManagerID);
- oSub.HMoney = DBUtility.ClsPub.isDoule(subList[0].HMoney);
- oSub.HRepairExplanation = DBUtility.ClsPub.isStrNull(subList[0].HRepairExplanation);
+ BillNew.DetailColl.Add(oSub);
+ bResult = BillNew.AddBill(ref ClsPub.sExeReturnInfo);
+ if (bResult == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = ClsPub.sExeReturnInfo + "鍗曟嵁鍙�:" + mainList[0].HBillNo.Trim();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+
+
+ #region 璁惧缁翠慨璁板綍鍗曚繚瀛�
+
+ [Route("Sb_EquipRepairWorkBill/EquipRepairWorkBill_Save")]
+ [HttpPost]
+ public object EquipRepairWorkBill_Save([FromBody] JObject sMainSub)
+ {
+ var _value = sMainSub["sMainSub"].ToString();
+ string msg1 = _value.ToString();
+ return objJsonResult = EquipRepairWorkAddBill(msg1);
+ }
+
+ public json EquipRepairWorkAddBill(string msg1)
+ {
+ bool bResult;
+ try
+ {
+ msg1 = "[" + msg1.ToString() + "]";
+ DAL.ClsSb_EquipRepairWorkBill BillNew = new DAL.ClsSb_EquipRepairWorkBill();
+ List<Model.ClsSb_EquipRepairWorkBillMain> mainList = Newtonsoft
+ .Json
+ .JsonConvert
+ .DeserializeObject<List<Model.ClsSb_EquipRepairWorkBillMain>>(msg1);
+ List<Model.ClsSb_EquipRepairWorkBillSub> subList = Newtonsoft
+ .Json
+ .JsonConvert
+ .DeserializeObject<List<Model.ClsSb_EquipRepairWorkBillSub>>(msg1);
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ DateTime HDate = mainList[0].HDate;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = s;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ BillNew.omodel.HYear = sYear;
+ BillNew.omodel.HPeriod = sPeriod;
+ BillNew.omodel.HBillNo = mainList[0].HBillNo.Trim();
+ BillNew.omodel.HMaker = mainList[0].HMaker;
+ BillNew.omodel.HDate = HDate;
+ BillNew.omodel.HEquipID = mainList[0].HEquipID;
+ BillNew.omodel.HDeptID = mainList[0].HDeptID;
+ BillNew.omodel.HRepairBeginDate = mainList[0].HRepairBeginDate;
+ BillNew.omodel.HRepairEndDate = mainList[0].HRepairEndDate;
+ //BillNew.omodel.HCycleUnit = mainList[0].HCycleUnit;
+ //BillNew.omodel.HPlanTimes = mainList[0].HPlanTimes;
+ //BillNew.omodel.HTimes = mainList[0].HTimes;
+ BillNew.omodel.HExplanation = mainList[0].HExplanation;
+ BillNew.omodel.HInnerBillNo = mainList[0].HInnerBillNo;
+ //BillNew.omodel.HMouldID = mainList[0].HMouldID;
+ //BillNew.omodel.HSupID = mainList[0].HSupID;
+ //BillNew.omodel.HRepairType = mainList[0].HRepairType;
+ //BillNew.omodel.HNewModel = mainList[0].HNewModel;
+ //BillNew.omodel.HNewDesignLife = mainList[0].HNewDesignLife;
+ //BillNew.omodel.HEquipID = mainList[0].HEquipID;
+ BillNew.DetailColl = new List<Model.ClsSb_EquipRepairWorkBillSub>();
+ Model.ClsSb_EquipRepairWorkBillSub oSub = new Model.ClsSb_EquipRepairWorkBillSub();
+ oSub.HEntryID = 1;
+ oSub.HRemark = DBUtility.ClsPub.isStrNull(subList[0].HRemark);
+ oSub.HSourceInterID = DBUtility.ClsPub.isLong(subList[0].HSourceInterID);
+ oSub.HSourceEntryID = DBUtility.ClsPub.isLong(subList[0].HSourceEntryID);
+ oSub.HSourceBillType = DBUtility.ClsPub.isStrNull(subList[0].HSourceBillType);
+ oSub.HSourceBillNo = DBUtility.ClsPub.isStrNull(subList[0].HSourceBillNo);
+ oSub.HRelationQty = DBUtility.ClsPub.isDoule(subList[0].HRelationQty);
+ oSub.HRelationMoney = DBUtility.ClsPub.isDoule(subList[0].HRelationMoney);
+ oSub.HCloseMan = DBUtility.ClsPub.isStrNull(subList[0].HCloseMan);
+ oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(subList[0].HEntryCloseDate);
+ oSub.HCloseType = DBUtility.ClsPub.isBool(subList[0].HCloseType);
+ oSub.HRepairID = mainList[0].HRepairID;
+ BillNew.DetailColl.Add(oSub);
+ bResult = BillNew.AddBill(ref ClsPub.sExeReturnInfo);
+ if (bResult == true)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = ClsPub.sExeReturnInfo + "鍗曟嵁鍙�:" + mainList[0].HBillNo.Trim();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+
+ #region 璁惧鐐规璁板綍鍗曚繚瀛�
+
+ [Route("Sb_EquipDotCheckBill/EquipDotCheckBill_Save")]
+ [HttpPost]
+ public object EquipDotCheckBill_Save([FromBody] JObject sMainSub)
+ {
+ var _value = sMainSub["sMainSub"].ToString();
+ string msg1 = _value.ToString();
+ return objJsonResult = EquipDotCheckAddBill(msg1);
+ }
+
+ public json EquipDotCheckAddBill(string msg1)
+ {
+ bool bResult;
+ try
+ {
+ msg1 = "[" + msg1.ToString() + "]";
+ DAL.ClsSb_EquipDotCheckBill BillNew = new DAL.ClsSb_EquipDotCheckBill();
+ List<Model.ClsSb_EquipDotCheckBillMain> mainList = Newtonsoft
+ .Json
+ .JsonConvert
+ .DeserializeObject<List<Model.ClsSb_EquipDotCheckBillMain>>(msg1);
+ List<Model.ClsSb_EquipDotCheckBillSub> subList = Newtonsoft
+ .Json
+ .JsonConvert
+ .DeserializeObject<List<Model.ClsSb_EquipDotCheckBillSub>>(msg1);
+ string s = "";
+ int sYear = 0;
+ int sPeriod = 0;
+ DateTime HDate = mainList[0].HDate;
+ if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = s;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ BillNew.omodel.HYear = sYear;
+ BillNew.omodel.HPeriod = sPeriod;
+ BillNew.omodel.HBillNo = mainList[0].HBillNo.Trim();
+ BillNew.omodel.HMaker = mainList[0].HMaker;
+ BillNew.omodel.HDate = HDate;
+ BillNew.omodel.HEquipID = mainList[0].HEquipID;
+ BillNew.omodel.HDeptID = mainList[0].HDeptID;
+ BillNew.omodel.HBeginDate = mainList[0].HBeginDate;
+ BillNew.omodel.HEndDate = mainList[0].HEndDate;
+ //BillNew.omodel.HCycleUnit = mainList[0].HCycleUnit;
+ //BillNew.omodel.HPlanTimes = mainList[0].HPlanTimes;
+ //BillNew.omodel.HTimes = mainList[0].HTimes;
+ BillNew.omodel.HExplanation = mainList[0].HExplanation;
+ BillNew.omodel.HInnerBillNo = mainList[0].HInnerBillNo;
+ //BillNew.omodel.HMouldID = mainList[0].HMouldID;
+ //BillNew.omodel.HSupID = mainList[0].HSupID;
+ //BillNew.omodel.HRepairType = mainList[0].HRepairType;
+ //BillNew.omodel.HNewModel = mainList[0].HNewModel;
+ //BillNew.omodel.HNewDesignLife = mainList[0].HNewDesignLife;
+ //BillNew.omodel.HEquipID = mainList[0].HEquipID;
+ BillNew.DetailColl = new List<Model.ClsSb_EquipDotCheckBillSub>();
+ Model.ClsSb_EquipDotCheckBillSub oSub = new Model.ClsSb_EquipDotCheckBillSub();
+ oSub.HEntryID = 1;
+ oSub.HRemark = DBUtility.ClsPub.isStrNull(subList[0].HRemark);
+ oSub.HSourceInterID = DBUtility.ClsPub.isLong(subList[0].HSourceInterID);
+ oSub.HSourceEntryID = DBUtility.ClsPub.isLong(subList[0].HSourceEntryID);
+ oSub.HSourceBillType = DBUtility.ClsPub.isStrNull(subList[0].HSourceBillType);
+ oSub.HSourceBillNo = DBUtility.ClsPub.isStrNull(subList[0].HSourceBillNo);
+ oSub.HRelationQty = DBUtility.ClsPub.isDoule(subList[0].HRelationQty);
+ oSub.HRelationMoney = DBUtility.ClsPub.isDoule(subList[0].HRelationMoney);
+ oSub.HCloseMan = DBUtility.ClsPub.isStrNull(subList[0].HCloseMan);
+ oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(subList[0].HEntryCloseDate);
+ oSub.HCloseType = DBUtility.ClsPub.isBool(subList[0].HCloseType);
BillNew.DetailColl.Add(oSub);
bResult = BillNew.AddBill(ref ClsPub.sExeReturnInfo);
if (bResult == true)
diff --git a/WebAPI/Controllers/Sc_MouldOtherInBillController.cs b/WebAPI/Controllers/Sc_MouldOtherInBillController.cs
index e054928..38cc047 100644
--- a/WebAPI/Controllers/Sc_MouldOtherInBillController.cs
+++ b/WebAPI/Controllers/Sc_MouldOtherInBillController.cs
@@ -154,6 +154,8 @@
public object Sc_MouldOtherInBillListProjectDetai(string sqlWhere)
{
DataSet ds;
+ DataSet ds1;
+ List<object> list = new List<object>();
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
@@ -164,10 +166,6 @@
鍗曚环 HPrice, 閲戦 HMoney,HWHSonID HWHID, 鍙戞枡浠撳簱浠g爜 HWHCode, 鍙戞枡浠撳簱 HWHName,HSPID,
浠撲綅浠g爜 HSPCode, 浠撲綅 HSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID FROM h_v_Sc_MouldOtherInBillList"), "h_v_Sc_MouldOtherInBillList");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
else
{
@@ -180,11 +178,18 @@
string sql = sql1 + sqlWhere;
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldOtherInBillList");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
+ //鏌ユ眹鎬�
+ ds1 = oCN.RunProcReturn(string.Format(@"select 鐗╂枡浠g爜,max(鐗╂枡鍚嶇О)鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,max(鍗曟嵁鍙�)鍗曟嵁鍙�,鎵规,sum(瀹炲彂鏁伴噺)瀹炲彂鏁伴噺,
+ HWHSonID,max(鍙戞枡浠撳簱浠g爜)鍙戞枡浠撳簱浠g爜,max(鍙戞枡浠撳簱)鍙戞枡浠撳簱,琛ㄤ綋澶囨敞 from h_v_Sc_MouldOtherInBillList
+ where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,HWHSonID,鎵规,琛ㄤ綋澶囨敞"), "h_v_Sc_MouldOtherInBillList");
+
+ list.Add(ds.Tables[0]);
+ list.Add(ds1.Tables[0]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.list = list;
}
catch (Exception e)
{
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs
index ea5bb41..b3372e0 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs
@@ -3368,6 +3368,8 @@
public object Sc_MouldScrapInHouseBillListProjectDetai(string sqlWhere)
{
DataSet ds;
+ DataSet ds1;
+ List<object> list = new List<object>();
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
@@ -3379,10 +3381,6 @@
HSPID, 浠撲綅浠g爜 HSPCode, 浠撲綅鍚嶇О HSPName, 澶囨敞 HRemark,HStockOrgID
FROM h_v_Sc_MouldScrapInHouseBillList"), "h_v_Sc_MouldScrapInHouseBillList");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
else
{
@@ -3396,11 +3394,18 @@
string sql = sql1 + sqlWhere;
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldScrapInHouseBillList");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
+ //鏌ユ眹鎬�
+ ds1 = oCN.RunProcReturn(string.Format(@"select 鐗╂枡浠g爜,max(鐗╂枡鍚嶇О)鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,max(鍗曟嵁鍙�)鍗曟嵁鍙�,鎵规,sum(瀹炴敹鏁伴噺)瀹炴敹鏁伴噺,
+ hwhid1,max(鏀舵枡浠撳簱浠g爜)鏀舵枡浠撳簱浠g爜,max(鏀舵枡浠撳簱鍚嶇О)鏀舵枡浠撳簱鍚嶇О,瀛愬娉� from h_v_Sc_MouldScrapInHouseBillList
+ where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,hwhid1,鎵规,瀛愬娉�"), "h_v_Sc_MouldScrapInHouseBillList");
+
+ list.Add(ds.Tables[0]);
+ list.Add(ds1.Tables[0]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.list = list;
}
catch (Exception e)
{
@@ -3822,6 +3827,8 @@
public object Sc_MouldScrapOutHouseBillListProjectDetai(string sqlWhere)
{
DataSet ds;
+ DataSet ds1;
+ List<object> list = new List<object>();
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
@@ -3831,11 +3838,7 @@
HSecUnitID, 杈呭姪璁¢噺鍗曚綅浠g爜 HSecUnitCode, 杈呭姪璁¢噺鍗曚綅鍚嶇О HSecUnitName, 鎹㈢畻鐜� HSecUnitRate, HUnitID, 璁¢噺鍗曚綅浠g爜 HUnitCode, 璁¢噺鍗曚綅鍚嶇О HUnitName, 鎵规 HBatchNo,
璁捐瀵垮懡 HDesignLife, 鍓╀綑瀵垮懡 HLeaveLife, 浣跨敤瀵垮懡 HUseLife, 瀹炲彂鏁伴噺 HQty, 鍗曚环 HPrice, 閲戦 HMoney, HWHID, 鍙戣揣浠撳簱浠g爜 HWHCode, 鍙戣揣浠撳簱鍚嶇О HWHName,
HSPID, 浠撲綅浠g爜 HSPCode, 浠撲綅鍚嶇О HSPName, 澶囨敞 HRemark,HStockOrgID FROM h_v_Sc_MouldScrapOutHouseBillList"), "h_v_Sc_MouldScrapOutHouseBillList");
-
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
+
}
else
{
@@ -3848,11 +3851,18 @@
string sql = sql1 + sqlWhere;
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldScrapOutHouseBillList");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
+ //鏌ユ眹鎬�
+ ds1 = oCN.RunProcReturn(string.Format(@"select 鐗╂枡浠g爜,max(鐗╂枡鍚嶇О)鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,max(鍗曟嵁鍙�)鍗曟嵁鍙�,鎵规,sum(瀹炲彂鏁伴噺)瀹炲彂鏁伴噺,
+ hwhid1,max(鍙戣揣浠撳簱浠g爜)鍙戣揣浠撳簱浠g爜,max(鍙戣揣浠撳簱鍚嶇О)鍙戣揣浠撳簱鍚嶇О,瀛愬娉� from h_v_Sc_MouldScrapOutHouseBillList
+ where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,hwhid1,鎵规,瀛愬娉�"), "h_v_Sc_MouldScrapOutHouseBillList");
+
+ list.Add(ds.Tables[0]);
+ list.Add(ds1.Tables[0]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.list = list;
}
catch (Exception e)
{
@@ -4391,6 +4401,8 @@
public object Sc_MouldProdBackBillListProjectDetai(string sqlWhere)
{
DataSet ds;
+ DataSet ds1;
+ List<object> list = new List<object>();
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
@@ -4401,10 +4413,6 @@
鍗曚环 HPrice, 閲戦 HMoney,HWHSonID HWHID, 鍙戞枡浠撳簱浠g爜 HWHCode, 鍙戞枡浠撳簱 HWHName,HSPID,
浠撲綅浠g爜 HSPCode, 浠撲綅 HSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅 FROM h_v_Sc_MouldProdBackBillList"), "h_v_Sc_MouldProdBackBillList");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
else
{
@@ -4417,11 +4425,18 @@
string sql = sql1 + sqlWhere;
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldProdBackBillList");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
+ //鏌ユ眹鎬�
+ ds1 = oCN.RunProcReturn(string.Format(@"select 鐗╂枡浠g爜,max(鐗╂枡鍚嶇О)鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,max(鍗曟嵁鍙�)鍗曟嵁鍙�,鎵规,sum(瀹炲彂鏁伴噺)瀹炲彂鏁伴噺,
+ HWHSonID,max(鍙戞枡浠撳簱浠g爜)鍙戞枡浠撳簱浠g爜,max(鍙戞枡浠撳簱)鍙戞枡浠撳簱,琛ㄤ綋澶囨敞 from h_v_Sc_MouldProdBackBillList
+ where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,HWHSonID,鎵规,琛ㄤ綋澶囨敞"), "h_v_Sc_MouldProdBackBillList");
+
+ list.Add(ds.Tables[0]);
+ list.Add(ds1.Tables[0]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.list = list;
}
catch (Exception e)
{
@@ -4819,6 +4834,8 @@
public object Sc_MouldProdOutBillListProjectDetai(string sqlWhere)
{
DataSet ds;
+ DataSet ds1;
+ List<object> list = new List<object>();
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
@@ -4829,10 +4846,6 @@
鍗曚环 HPrice, 閲戦 HMoney,HWHSonID HWHID, 鍙戞枡浠撳簱浠g爜 HWHCode, 鍙戞枡浠撳簱 HWHName,HSPID,
浠撲綅浠g爜 HSPCode, 浠撲綅 HSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅 FROM h_v_Sc_MouldProdOutHouseBillList"), "h_v_Sc_MouldProdOutHouseBillList");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
else
{
@@ -4844,12 +4857,18 @@
浠撲綅浠g爜 HSPCode, 浠撲綅 HSPName,琛ㄤ綋澶囨敞 HRemark,HStockOrgID,HUnitID,璁¢噺鍗曚綅浠g爜,璁¢噺鍗曚綅 FROM h_v_Sc_MouldProdOutHouseBillList where 1 = 1 ");
string sql = sql1 + sqlWhere;
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldProdOutHouseBillList");
-
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
}
+ //鏌ユ眹鎬�
+ ds1 = oCN.RunProcReturn(string.Format(@"select 鐗╂枡浠g爜,max(鐗╂枡鍚嶇О)鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,max(鍗曟嵁鍙�)鍗曟嵁鍙�,鎵规,sum(瀹炲彂鏁伴噺)瀹炲彂鏁伴噺,
+ HWHSonID,max(鍙戞枡浠撳簱浠g爜)鍙戞枡浠撳簱浠g爜,max(鍙戞枡浠撳簱)鍙戞枡浠撳簱,琛ㄤ綋澶囨敞 from h_v_Sc_MouldProdOutHouseBillList
+ where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,HWHSonID,鎵规,琛ㄤ綋澶囨敞"), "h_v_Sc_MouldProdOutHouseBillList");
+
+ list.Add(ds.Tables[0]);
+ list.Add(ds1.Tables[0]);
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.list = list;
}
catch (Exception e)
{
diff --git a/WebAPI/Controllers/SellOutBackController.cs b/WebAPI/Controllers/SellOutBackController.cs
index c8a743f..3fc17c7 100644
--- a/WebAPI/Controllers/SellOutBackController.cs
+++ b/WebAPI/Controllers/SellOutBackController.cs
@@ -246,6 +246,8 @@
{
try
{
+ if (String.IsNullOrEmpty(sWhere))
+ sWhere = "and 1 = 1 ";
ds = webserver.GetKf_PonderationBillMain_Temp(HBillID, HBillType, sWhere);
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
diff --git a/WebAPI/DLL/ClsOA_InformBill.cs b/WebAPI/DLL/ClsOA_InformBill.cs
new file mode 100644
index 0000000..b047f43
--- /dev/null
+++ b/WebAPI/DLL/ClsOA_InformBill.cs
@@ -0,0 +1,245 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace WebAPI.DLL
+{
+ public class ClsOA_InformBill:DBUtility.ClsXt_BaseBill
+ {
+ public Model.ClsOA_InformBillMain omodel = new Model.ClsOA_InformBillMain();
+ public List<Model.ClsOA_InformBillSub> DetailColl = new List<Model.ClsOA_InformBillSub>();
+
+ public ClsOA_InformBill()
+ {
+ base.MvarItemKeySub = "OA_InformBillSub";
+ base.MvarItemKeySub2 = "";
+ base.MvarItemKeySub3 = "";
+ base.MvarItemKeySub4 = "";
+ base.MvarItemKey="OA_InformBillMain";
+ base.MvarReportTitle = "閫氱煡鏂囦欢";
+ base.BillType = "4506";
+ base.HBillSubType = "4506";
+
+ }
+
+ #region 鍥哄畾浠g爜
+
+ ~ClsOA_InformBill()
+ {
+ DetailColl = null;
+ }
+
+ #endregion 鑷畾涔夋柟娉�
+ //淇敼鍗曟嵁
+ public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //
+ oCn.BeginTran();
+ //鏇存柊涓昏〃
+ oCn.RunProc("UpDate OA_InformBillMain set " +
+ " HBillNo='" + omodel.HBillNo + "'" + //鍥哄畾璧嬪��===============
+ ",HDate='" + omodel.HDate + "'" +
+ ",HYear='" + omodel.HYear.ToString() + "'" +
+ ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+ ",HRemark='" + omodel.HRemark + "'" +
+ ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
+ ",HUpDateDate=getdate()" +
+ //========================================
+ ",HContext='" + omodel.HContext + "'" +
+ ",HDeptID=" + omodel.HDeptID.ToString() +
+ ",HSendMan =" + omodel.HSendMan.ToString() +
+ ",HReceiveMan='" + omodel.HReceiveMan + "'" +
+ ",HLevel='" + omodel.HLevel + "'" +
+ ",HDescription='" + omodel.HDescription + "'" +
+
+ " where HInterID=" + lngBillKey.ToString());
+ //鍒犻櫎鍏宠仈
+ DeleteRelation(ref sReturn, lngBillKey);
+ //鍒犻櫎瀛愯〃
+ DeleteBillSub(lngBillKey);
+ //鎻掑叆瀛愯〃
+ omodel.HInterID = lngBillKey;
+ foreach (Model.ClsOA_InformBillSub oSub in DetailColl)
+ {
+ oCn.RunProc("Insert into OA_InformBillSub " +
+ " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HReceiveMan,HReadFlag " +
+ ") 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.HReceiveMan.ToString() + "," + Convert.ToString(oSub.HReadFlag ? 1 : 0) +
+ ") ");
+ }
+ //
+ //foreach (Model.ClsOA_InformBillSub oSub in DetailColl)
+ //{
+ // Ds = oCn.RunProcReturn("exec h_p_OA_InformBill_Qty " + oSub.HICMOInterID, "");
+ // if (Ds.Tables[0].Rows.Count == 0)
+ // return;
+ // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
+ // {
+ // sReturn = "姹囨姤鏁伴噺瓒呰繃璁″垝鏁伴噺锛佷笉鍏佽淇濆瓨";
+ // return false;
+ // }
+ //}
+ sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+ //鏂板鍗曟嵁
+ public override bool AddBill(ref string sReturn)
+ {
+ try
+ {
+ //寰楀埌mainid
+ omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+ //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+ oCn.BeginTran();
+ //涓昏〃
+ oCn.RunProc("Insert Into OA_InformBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
+ ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
+ ",HContext,HDeptID,HSendMan" +
+ ",HReceiveMan,HLevel,HDescription" +
+ ") " +
+ " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
+ "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
+ ",'" + omodel.HContext + "'," + omodel.HDeptID.ToString() + "," + omodel.HSendMan.ToString() +
+ ",'" + omodel.HReceiveMan + "','" + omodel.HLevel + "','" + omodel.HDescription + "'" +
+ ") ");
+ //鎻掑叆瀛愯〃
+ foreach (Model.ClsOA_InformBillSub oSub in DetailColl)
+ {
+ oCn.RunProc("Insert into OA_InformBillSub " +
+ " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HReceiveMan,HReadFlag " +
+ ") 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.HReceiveMan.ToString() + "," + Convert.ToString(oSub.HReadFlag ? 1 : 0) +
+ ") ");
+ }
+ //
+ //foreach (Model.ClsOA_InformBillSub oSub in DetailColl)
+ //{
+ // Ds = oCn.RunProcReturn("exec h_p_OA_InformBill_Qty " + oSub.HICMOInterID, "");
+ // if (Ds.Tables[0].Rows.Count == 0)
+ // return;
+ // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
+ // {
+ // sReturn = "姹囨姤鏁伴噺瓒呰繃璁″垝鏁伴噺锛佷笉鍏佽淇濆瓨";
+ // return false;
+ // }
+ //}
+ //
+ sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+ oCn.Commit();
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ oCn.RollBack();
+ throw (e);
+ }
+ }
+ //鏄剧ず鍗曟嵁
+ public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //鏌ヨ涓昏〃
+ DataSet Ds ;
+ Ds = oCn.RunProcReturn("Select * from OA_InformBillMain Where HInterID=" + lngBillKey.ToString(), "OA_InformBillMain");
+ if(Ds.Tables[0].Rows.Count==0)
+ {
+ sReturn = "鍗曟嵁鏈壘鍒帮紒";
+ return false;
+ }
+ //鍥哄畾璧嬪��===========================================
+ omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+ omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+ omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+ omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+ omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+ omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+ omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+ omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+ omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
+ omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
+ omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
+ omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
+ omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
+ omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
+ omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
+ omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
+ omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
+ omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
+ omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
+ omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
+ omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+ omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+ omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
+ omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+ omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+ //========================================================
+ omodel.HSendMan = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSendMan"]);
+ omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
+ omodel.HContext = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HContext"]);
+ omodel.HReceiveMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HReceiveMan"]);
+ omodel.HLevel = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HLevel"]);
+ omodel.HDescription = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HDescription"]);
+
+ //
+
+ //寰幆
+ DataSet DsSub ;
+ DsSub = oCn.RunProcReturn("Select * from OA_InformBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "OA_InformBillSub");
+ DetailColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+ {
+ Model.ClsOA_InformBillSub oSub = new Model.ClsOA_InformBillSub();
+ // 鍥哄畾璧嬪��===============================================
+ oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
+ oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
+ oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
+ oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
+ oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
+ oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
+ oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
+ oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
+ oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
+ oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
+ oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
+ oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+ //===================================================
+ oSub.HReceiveMan = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HReceiveMan"]);
+ oSub.HReadFlag = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HReadFlag"]);
+ DetailColl.Add(oSub);
+ }
+ sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
+
+
+ }
+
+}
diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs
index 3fa16b9..e9c88df 100644
--- a/WebAPI/ListModels.cs
+++ b/WebAPI/ListModels.cs
@@ -1626,5 +1626,17 @@
return list;
}
+ /// <summary>
+ /// 鍏憡鍒楄〃涓昏〃鐨刯son
+ /// </summary>
+ /// <param name="jsonString"></param>
+ /// <returns></returns>
+ public List<Models.ClsOA_InformBillMain> getObjectByJson_GG_NoticeBillMain(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Models.ClsOA_InformBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsOA_InformBillMain>>(jsonString);
+ return list;
+ }
+
}
}
\ No newline at end of file
diff --git a/WebAPI/Models/ClsOA_InformBillMain.cs b/WebAPI/Models/ClsOA_InformBillMain.cs
new file mode 100644
index 0000000..72b1c61
--- /dev/null
+++ b/WebAPI/Models/ClsOA_InformBillMain.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WebAPI.Models
+{
+ public class ClsOA_InformBillMain : DBUtility.ClsXt_BaseBillMain
+ {
+ public string HContext; // varchar(200) 主题
+ public Int64 HDeptID; // int --发送部门(h_v_IF_Department)
+ public Int64 HSendMan; // int --发送人(h_v_IF_Employee)
+ public string HReceiveMan; // int --接收(可多选人)(h_v_IF_Employee)
+ public string HLevel; // varchar(10) --紧急程度(普通,紧急)
+ public string HDescription; // varchar(5000) --详细内容
+
+ }
+}
diff --git a/WebAPI/Models/ClsOA_InformBillSub.cs b/WebAPI/Models/ClsOA_InformBillSub.cs
new file mode 100644
index 0000000..b5b1d6b
--- /dev/null
+++ b/WebAPI/Models/ClsOA_InformBillSub.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WebAPI.Models
+{
+ public class ClsOA_InformBillSub : DBUtility.ClsXt_BaseBillSub
+ {
+ public string HReceiveMan;// int 接收人(h_v_IF_Employee)
+ public bool HReadFlag;// bit //已阅标记(保存时默认为0)
+
+ }
+}
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
index 02cd5d2..34c3bf0 100644
--- a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -18,25 +18,25 @@
<publishTime>02/22/2013 08:43:40</publishTime>
</File>
<File Include="bin/BLL.dll">
- <publishTime>11/04/2021 16:46:04</publishTime>
+ <publishTime>11/05/2021 14:35:36</publishTime>
</File>
<File Include="bin/BLL.pdb">
- <publishTime>11/04/2021 16:46:04</publishTime>
+ <publishTime>11/05/2021 14:35:36</publishTime>
</File>
<File Include="bin/DAL.dll">
- <publishTime>11/04/2021 16:46:02</publishTime>
+ <publishTime>11/05/2021 14:35:33</publishTime>
</File>
<File Include="bin/DAL.pdb">
- <publishTime>11/04/2021 16:46:02</publishTime>
+ <publishTime>11/05/2021 14:35:33</publishTime>
</File>
<File Include="bin/Dapper.dll">
<publishTime>07/22/2016 14:52:40</publishTime>
</File>
<File Include="bin/DBUtility.dll">
- <publishTime>11/04/2021 16:45:59</publishTime>
+ <publishTime>11/05/2021 14:35:27</publishTime>
</File>
<File Include="bin/DBUtility.pdb">
- <publishTime>11/04/2021 16:45:59</publishTime>
+ <publishTime>11/05/2021 14:35:27</publishTime>
</File>
<File Include="bin/Interop.gregn6Lib.dll">
<publishTime>08/25/2021 10:28:25</publishTime>
@@ -60,10 +60,10 @@
<publishTime>07/25/2012 11:48:56</publishTime>
</File>
<File Include="bin/Model.dll">
- <publishTime>11/04/2021 16:45:59</publishTime>
+ <publishTime>11/05/2021 14:35:28</publishTime>
</File>
<File Include="bin/Model.pdb">
- <publishTime>11/04/2021 16:45:59</publishTime>
+ <publishTime>11/05/2021 14:35:28</publishTime>
</File>
<File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
<publishTime>08/16/2021 17:23:15</publishTime>
@@ -72,22 +72,22 @@
<publishTime>08/03/2014 20:33:56</publishTime>
</File>
<File Include="bin/Pub_Class.dll">
- <publishTime>11/04/2021 16:45:56</publishTime>
+ <publishTime>11/05/2021 14:35:23</publishTime>
</File>
<File Include="bin/Pub_Class.pdb">
- <publishTime>11/04/2021 16:45:56</publishTime>
+ <publishTime>11/05/2021 14:35:23</publishTime>
</File>
<File Include="bin/Pub_Control.dll">
- <publishTime>11/04/2021 16:45:57</publishTime>
+ <publishTime>11/05/2021 14:35:25</publishTime>
</File>
<File Include="bin/Pub_Control.pdb">
- <publishTime>11/04/2021 16:45:57</publishTime>
+ <publishTime>11/05/2021 14:35:25</publishTime>
</File>
<File Include="bin/SQLHelper.dll">
- <publishTime>11/04/2021 16:45:58</publishTime>
+ <publishTime>11/05/2021 14:35:25</publishTime>
</File>
<File Include="bin/SQLHelper.pdb">
- <publishTime>11/04/2021 16:45:58</publishTime>
+ <publishTime>11/05/2021 14:35:25</publishTime>
</File>
<File Include="bin/stdole.dll">
<publishTime>05/09/2021 13:35:37</publishTime>
@@ -189,10 +189,10 @@
<publishTime>11/24/2014 11:18:48</publishTime>
</File>
<File Include="bin/WebAPI.dll">
- <publishTime>11/04/2021 16:46:08</publishTime>
+ <publishTime>11/05/2021 14:35:41</publishTime>
</File>
<File Include="bin/WebAPI.pdb">
- <publishTime>11/04/2021 16:46:08</publishTime>
+ <publishTime>11/05/2021 14:35:41</publishTime>
</File>
<File Include="bin/WebGrease.dll">
<publishTime>07/17/2013 17:03:52</publishTime>
@@ -363,7 +363,7 @@
<publishTime>08/06/2021 22:57:28</publishTime>
</File>
<File Include="Web.config">
- <publishTime>11/04/2021 16:46:18</publishTime>
+ <publishTime>11/05/2021 14:36:03</publishTime>
</File>
</ItemGroup>
</Project>
\ No newline at end of file
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index 28bdd20..54537df 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -348,6 +348,7 @@
<Compile Include="Controllers\ProductionOrderController.cs" />
<Compile Include="Controllers\PublicPageMethodController.cs" />
<Compile Include="Controllers\ReportFromController.cs" />
+ <Compile Include="Controllers\GG_NoticeController.cs" />
<Compile Include="Controllers\ReportPlatFormController.cs" />
<Compile Include="Controllers\SBGL\Gy_EquipFileMainController.cs" />
<Compile Include="Controllers\SBGL\Gy_EquipTypeController.cs" />
@@ -400,6 +401,7 @@
<Compile Include="DLL\ClsGy_Source_Ctl.cs" />
<Compile Include="DLL\ClsGy_WorkPayTypeBill.cs" />
<Compile Include="DLL\ClsGy_WorkTypeBill.cs" />
+ <Compile Include="DLL\ClsOA_InformBill.cs" />
<Compile Include="DLL\ClsQC_NoPassProdCheckBill.cs" />
<Compile Include="DLL\ClsQC_PatrolProcCheckBill.cs" />
<Compile Include="DLL\ClsSb_EquipConkBookBill.cs" />
@@ -444,6 +446,8 @@
<Compile Include="Models\ClsGy_Maintain.cs" />
<Compile Include="Models\ClsGy_Repair.cs" />
<Compile Include="Models\ClsGy_RepairCheck.cs" />
+ <Compile Include="Models\ClsOA_InformBillMain.cs" />
+ <Compile Include="Models\ClsOA_InformBillSub.cs" />
<Compile Include="Models\Gy_OrderBackInfo.cs" />
<Compile Include="Models\Gy_OrderLevList.cs" />
<Compile Include="Models\ClsGy_EquipFileMain.cs" />
--
Gitblit v1.9.1