From c87cf9a415a98d71b83f6a00a9c6e9cd8bc18b8d Mon Sep 17 00:00:00 2001
From: 杨乐 <yang.le.192@qq.com>
Date: 星期二, 28 十二月 2021 20:16:44 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
Model/车间管理/ClsSc_PackUnionBillMain.cs | 7 ++
WebAPI/Models/Gy_Mould.cs | 2
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 11 ++-
WebAPI/Controllers/SCGL/Sc_PackUnionBillController.cs | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++
WebAPI/Controllers/基础资料/基础资料/Gy_StockCheckItemBillController.cs | 5 -
WebAPI/WebAPI.csproj | 1
6 files changed, 172 insertions(+), 6 deletions(-)
diff --git "a/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_PackUnionBillMain.cs" "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_PackUnionBillMain.cs"
index e1983bc..88ebe5c 100644
--- "a/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_PackUnionBillMain.cs"
+++ "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_PackUnionBillMain.cs"
@@ -11,5 +11,12 @@
public string HBarCode_Pack;
public Int64 HMaterID;
public Int64 HUnitID;
+ public double HWeight;// money --净重
+ public double HMWeight;// money --毛重
+ public double HPWeight;// money --皮重
+ public int HProdOrgID;// int --生产组织
+ public int HDeptID;// int --车间
+ public int HEmpID;// int --操作员
+ public string HBarCode_Cus;// varchar(100) --客户标签号
}
}
diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index 0c3a0cc..41081e7 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -594,6 +594,8 @@
int HCaveQty = mainList[0].HCaveQty;
int HMouldDotCheckRuleInterID= mainList[0].HMouldDotCheckRuleInterID;
int HMouldMaintainRuleInterID= mainList[0].HMouldMaintainRuleInterID;
+ int HNowSupID = mainList[0].HNowSupID;
+ int HNowSupTypeID = mainList[0].HNowSupTypeID;
@@ -606,7 +608,7 @@
",HMaterID,HMaterNumber,HMouldType,HUnitID" +
",HOutComDate,HOutComNo,HDeptID,HSupID,HSupNumber" +
",HPrintQty,HMouldStatus,HWhID,HRoutingID,HCaveQty" +
- ",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife" +
+ ",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife,HNowSupID,HNowSupTypeID" +
",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID" +
") " +
" values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
@@ -616,7 +618,7 @@
"," + HMaterID + ",'" + HMaterNumber + "'," + HMouleTypeID + "," + HUnitID +
",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" +
"," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID +","+ HCaveQty+
- "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "'" +
+ "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID+"','"+ HNowSupTypeID+"'"+
",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID+"','"+ HMouldMaintainRuleInterID+"'"+
") ");
@@ -732,7 +734,8 @@
int HCaveQty = mainList[0].HCaveQty;
int HMouldDotCheckRuleInterID = mainList[0].HMouldDotCheckRuleInterID;
int HMouldMaintainRuleInterID = mainList[0].HMouldMaintainRuleInterID;
-
+ int HNowSupID = mainList[0].HNowSupID;
+ int HNowSupTypeID = mainList[0].HNowSupTypeID;
//鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
oCN.BeginTran();
@@ -781,6 +784,8 @@
",HMouldDotCheckRuleInterID="+ HMouldDotCheckRuleInterID.ToString()+
",HMouldMaintainRuleInterID=" + HMouldMaintainRuleInterID.ToString() +
",HMouldOWNER='" + HMouldOWNER + "'" +
+ ",HNowSupID="+HNowSupID.ToString()+
+ ",HNowSupTypeID="+HNowSupTypeID.ToString()+
",HProdWeight=" + HProdWeight.ToString() +
" where HInterID=" + HInterID.ToString());
diff --git a/WebAPI/Controllers/SCGL/Sc_PackUnionBillController.cs b/WebAPI/Controllers/SCGL/Sc_PackUnionBillController.cs
new file mode 100644
index 0000000..54a7fcb
--- /dev/null
+++ b/WebAPI/Controllers/SCGL/Sc_PackUnionBillController.cs
@@ -0,0 +1,152 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.SCGL
+{
+ public class Sc_PackUnionBillController : 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 DAL.ClsSc_PackUnionBill BillNew0 = new DAL.ClsSc_PackUnionBill(); //
+ public DAL.ClsSc_PackUnionBill BillOld0 = new DAL.ClsSc_PackUnionBill(); //
+
+ #region 缁勬墭鍗曞垪琛�
+
+ [Route("Sc_PackUnionBill/Get_PackUnionBillList")]
+ [HttpGet]
+ public object GetMateOutBillList(string sWhere)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("select * from h_v_PackUnionBillList order by 鏃ユ湡 desc", "h_v_PackUnionBillList");
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region [缁勬墭鍗曞垹闄ゅ姛鑳絔
+ /// <summary>
+ /// 缁勬墭鍗曞垹闄ゅ姛鑳�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Sc_PackUnionBill/set_DeleteBill")]
+ [HttpGet]
+ public object set_DeleteBill(string HInterID, string user)
+ {
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("Sc_PackUnionBill", 1, true, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ string s = "";
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+ if (lngBillKey == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ DLL.ClsKf_MateOutBackBill oBill = new DLL.ClsKf_MateOutBackBill();
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ if (oBill.omodel.HBillStatus > 1)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁褰撳墠澶勪簬涓嶈兘鍒犻櫎鐘舵��,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HChecker != "" && oBill.omodel.HChecker != null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸茬粡瀹℃牳,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (!DBUtility.Xt_BaseBillFun.Fun_AllowDeleteBill(oBill, ref s))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = s + "锛屼笉鍏佽鍒犻櫎";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ bool IsDete = oBill.DeleteBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo);
+ if (IsDete)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region[缁勬墭鍗曠紪杈戞椂鑾峰彇琛ㄥご鏁版嵁]
+ [Route("Sc_PackUnionBill/Sc_PackUnionBillListCheckDetai")]
+ [HttpGet]
+ public ApiResult<DataSet> Sc_PackUnionBillListCheckDetai(string HID)
+ {
+ if (string.IsNullOrEmpty(HID))
+ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+ var dataSet = oCN.RunProcReturn("select top 1 * from h_v_PackUnionBillList where hmainid= " + HID + " ", "h_v_PackUnionBillList");
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄥ崟鍙�" };
+
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+ #endregion
+ }
+}
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs"
index e7e8dd2..14262b3 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs"
@@ -262,7 +262,7 @@
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- if (sID==null||sID=="")
+ if (sID == null || sID == "")
{
sql = string.Format(@"select k.HBarCode 鏉$爜,m.HBillNo 鍣ㄥ叿缂栧彿,s.HName 鐩樼偣鏂规,
case when k.HCorrespondentTypeID=1 then '渚涘簲鍟�' when k.HCorrespondentTypeID=2 then '瀹㈡埛' when k.HCorrespondentTypeID=4 then '浠撳簱' end 瀹為檯浣嶇疆绫诲瀷,
@@ -296,9 +296,8 @@
left join Gy_Customer c1 on m.HNowSupID=c1.HItemID
left join Gy_Warehouse w on k.HCorrespondentID=w.HItemID
left join Gy_Warehouse w1 on m.HNowSupID=w1.HItemID
- where " + sWhere+ " and k.HSourceInterID=(select HItemID from Gy_StockCheckItem where HItemID="+sID+") and k.HMakeDate<=(select HEndDate from Gy_StockCheckItem where HItemID="+sID+")");
+ where " + sWhere + " and k.HSourceInterID=(select HItemID from Gy_StockCheckItem where HItemID=" + sID + ") and k.HMakeDate<=(select HEndDate from Gy_StockCheckItem where HItemID=" + sID + ")");
}
-
ds = oCN.RunProcReturn(sql, "Sc_MouldStockBillMain_Temp");
list.Add(ds.Tables[0]);
objJsonResult.code = "0";
diff --git a/WebAPI/Models/Gy_Mould.cs b/WebAPI/Models/Gy_Mould.cs
index 9c3b871..7dd6a0e 100644
--- a/WebAPI/Models/Gy_Mould.cs
+++ b/WebAPI/Models/Gy_Mould.cs
@@ -61,6 +61,8 @@
public string HMouldOWNER { get; set; }
public int HMouldMaintainRuleInterID { get; set; }
public int HMouldDotCheckRuleInterID { get; set; }
+ public int HNowSupID { get; set; }
+ public int HNowSupTypeID { get; set; }
}
}
\ No newline at end of file
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index cb0af79..f3592b7 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -348,6 +348,7 @@
<Compile Include="Controllers\MoveStockBillController.cs" />
<Compile Include="Controllers\Open_PrintTemController.cs" />
<Compile Include="Controllers\ReportStepPlatFormController.cs" />
+ <Compile Include="Controllers\SCGL\Sc_PackUnionBillController.cs" />
<Compile Include="Controllers\Sc_ProcessMangementController.cs" />
<Compile Include="Controllers\鍗氭棩鑷姩鎵爜绾縗ScanlineAPIController.cs" />
<Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_StockCheckItemBillController.cs" />
--
Gitblit v1.9.1