From f94f83b88bcfa267ebaed30af58fdbf2327c0491 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期三, 17 七月 2024 11:34:44 +0800
Subject: [PATCH] 设备,器具报表(点检任务,保养任务,维修任务,故障登记跟踪);设备,器具编辑页面添加源单字段信息;条码生成页面添加检验员字段
---
DAL/生产管理/模具管理/ClsSb_MouldRepairWorkBill.cs | 33 ++
WebAPI/Controllers/仓存管理/条码生成/Sc_BarCodeController.cs | 13
Model/生产管理/模具管理/ClsSc_MouldDotCheckBillMain.cs | 4
WebAPI/Controllers/SBGL/Sb_EquipReportController.cs | 237 +++++++++++++++++++
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 2
WebAPI/DLL/ClsSc_MouldRepairCheckBill.cs | 43 +++
DAL/生产管理/模具管理/ClsSc_MouldDotCheckBill.cs | 36 +++
DAL/生产管理/模具管理/ClsSc_MouldMaintainBill.cs | 2
WebAPI/Models/HSouceOrderList.cs | 1
Model/生产管理/模具管理/ClsSc_MouldMaintainPlanBillMain.cs | 1
WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs | 39 +++
WebAPI/DLL/ClsSb_EquipRepairCheckBill.cs | 41 +++
WebAPI/Controllers/MJGL/Sc_MouldReportController.cs | 237 +++++++++++++++++++
WebAPI/WebAPI.csproj | 2
DAL/生产管理/模具管理/ClsSc_MouldMaintainPlanBill.cs | 5
WebAPI/Models/HBarCodeList.cs | 1
16 files changed, 688 insertions(+), 9 deletions(-)
diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSb_MouldRepairWorkBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSb_MouldRepairWorkBill.cs"
index 1e6dc1c..064804d 100644
--- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSb_MouldRepairWorkBill.cs"
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSb_MouldRepairWorkBill.cs"
@@ -135,6 +135,22 @@
{
//寰楀埌mainid
omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ DataSet ds = oCn.RunProcReturn("Exec h_p_Sc_MouldRepairWorkBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1,1 ", "h_p_Sc_MouldRepairWorkBill_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閲嶅鍒欓噸鏂拌幏鍙�
oCn.BeginTran();
//涓昏〃
@@ -194,6 +210,23 @@
// }
//}
//
+
+ //=========================淇濆瓨鍚庢帶鍒�
+ DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sc_MouldRepairWorkBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1,1 ", "h_p_Sc_MouldRepairWorkBill_AfterSaveCtrl");
+ 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/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBill.cs"
index 5634a35..7458fb9 100644
--- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBill.cs"
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBill.cs"
@@ -137,6 +137,22 @@
{
//寰楀埌mainid
omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ DataSet ds = oCn.RunProcReturn("Exec h_p_Sb_MouldDotCheckBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1,1 ", "h_p_Sb_MouldDotCheckBill_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閲嶅鍒欓噸鏂拌幏鍙�
oCn.BeginTran();
//涓昏〃
@@ -173,6 +189,9 @@
") ");
}
+ //鐐规瀹屾垚锛屽弽鍐欏櫒鍏风偣妫�璁″垝鍗曞瓙琛ㄦ槸鍚︾偣妫�鏍囪
+ oCn.RunProc("exec h_p_Sb_MouldDotCheck_AfterSaveCtrl " + omodel.HMouldDotCheckPlanInterID + "," + omodel.HMouldDotCheckPlanEntryID);
+
////閰嶄欢椤圭洰
//foreach (Model.ClsSc_MouldDotCheckBillSub_Item oSub in DetailCol)
//{
@@ -201,6 +220,23 @@
// }
//}
//
+
+ //=========================淇濆瓨鍚庢帶鍒�
+ DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sc_MouldDotCheckBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1,1 ", "h_p_Sc_MouldDotCheckBill_AfterSaveCtrl");
+ 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/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainBill.cs"
index 32929b1..276ef2d 100644
--- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainBill.cs"
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainBill.cs"
@@ -274,7 +274,7 @@
//}
//
- //淇濆吇瀹屾垚锛屽弽鍐欒澶囦繚鍏昏鍒掑崟瀛愯〃鏄惁鐐规鏍囪
+ //淇濆吇瀹屾垚锛屽弽鍐欏櫒鍏蜂繚鍏昏鍒掑崟瀛愯〃鏄惁鐐规鏍囪
oCn.RunProc("exec h_p_Sc_MouldMaintain_AfterSaveCtrl " + omodel.HMouldMaintainPlanInterID + "," + omodel.HMouldMaintainPlanEntryID);
//淇濆瓨鍚庢帶鍒�
diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs"
index f54c039..0db8750 100644
--- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs"
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs"
@@ -67,6 +67,7 @@
",HMaintainLevID=" + omodel.HMaintainLevID +
",HMainSourceInterID=" + omodel.HMainSourceInterID +
",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" +
+ ",HMouldID=" + omodel.HMouldID +
" where HInterID=" + lngBillKey.ToString());
//鍒犻櫎鍏宠仈
DeleteRelation(ref sReturn, lngBillKey);
@@ -145,13 +146,13 @@
"(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
",HYear,HPeriod,HRemark" +
",HCycleUnit,HCheckCycle,HBeginDate,HEndDate"+
- ",HInnerBillNo,HExplanation,HMouldMaintainRuleID,HMaintainLevID,HMainSourceInterID,HMainSourceBillNo" +
+ ",HInnerBillNo,HExplanation,HMouldMaintainRuleID,HMaintainLevID,HMainSourceInterID,HMainSourceBillNo,HMouldID" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
"," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+
",'" + omodel.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "'" +
",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "','" + omodel.HMouldMaintainRuleID + "'," + omodel.HMaintainLevID +
- "," + omodel.HMainSourceInterID + ",'" + omodel.HMainSourceBillNo + "'" +
+ "," + omodel.HMainSourceInterID + ",'" + omodel.HMainSourceBillNo + "'," + omodel.HMouldID +
") ");
//鎻掑叆瀛愯〃閰嶄欢淇℃伅
foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl)
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBillMain.cs"
index 64d5123..053bd5c 100644
--- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBillMain.cs"
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBillMain.cs"
@@ -20,5 +20,9 @@
public string HBigSafeNote;// 重大安全隐患记录
public Int64 HShiftsID;// 生产班次(Gy_Shifts)
public string HDotCheckNote;// 点检数据
+
+ public long HMouldDotCheckPlanInterID;// int --点检计划内码
+ public long HMouldDotCheckPlanEntryID;// int --点检计划子内码
+
}
}
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillMain.cs"
index bfd30a8..add8370 100644
--- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillMain.cs"
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillMain.cs"
@@ -18,5 +18,6 @@
public string HMouldMaintainRuleNo;//保养规程单号
public Int64 HMaintainLevID; //保养级别(gy_HMaintainLev)
+ public Int64 HMouldID; //器具内码
}
}
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs
index d17c116..9e1745f 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs
@@ -392,5 +392,44 @@
}
}
#endregion
+
+ #region[鍣ㄥ叿鐐规璁板綍琛紝閫夌偣妫�璁″垝鑾峰彇鐐规璁″垝娓呭崟淇℃伅]
+ [Route("Sc_MouldDotCheckPlanBill/Sc_MouldDotCheckPlanBill_PlanList")]
+ [HttpGet]
+ public object Sc_MouldDotCheckPlanBill_PlanList(string HInterID, string HDate)
+ {
+ DataSet ds;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+ ds = oCN.RunProcReturn("exec h_p_Sc_MouldDotCheck_GetPlanList " + HInterID + ",'" + HDate + "'", "h_p_Sc_MouldDotCheck_GetPlanList");
+
+ if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鏌ヨ鍒版暟鎹俊鎭紒";
+ objJsonResult.data = ds.Tables[0];
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙戠敓寮傚父锛屾病鏈夎繑鍥炰换浣曡鍒掞紒" + e.ToString();
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
+ }
+ #endregion
+
}
}
\ No newline at end of file
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldReportController.cs b/WebAPI/Controllers/MJGL/Sc_MouldReportController.cs
new file mode 100644
index 0000000..c83b66b
--- /dev/null
+++ b/WebAPI/Controllers/MJGL/Sc_MouldReportController.cs
@@ -0,0 +1,237 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using Pub_Class;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.MJGL
+{
+ public class Sc_MouldReportController : ApiController
+ {
+ private json objJsonResult = new json();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ DataSet ds;
+
+ #region 鍣ㄥ叿鐐规浠诲姟锛堜粖鏃ュ緟鐐规銆佷粖鏃ュ凡鐐规銆佷粖澶╁叏閮ㄤ换鍔★級
+ /// <summary>
+ /// 杩斿洖鍣ㄥ叿鐐规浠诲姟
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Sc_MouldDotCheckTaskReport/CheckList")]
+ [HttpGet]
+ public object CheckList(string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ ds = oCN.RunProcReturn("exec h_p_Sc_MouldDotCheckTaskReport " + user, "h_p_Sc_MouldDotCheckTaskReport");
+
+ if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ {
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds;
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳暟鎹�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鍣ㄥ叿淇濆吇浠诲姟锛堜粖鏃ュ緟淇濆吇銆佷粖鏃ュ凡淇濆吇銆佷粖澶╁叏閮ㄤ换鍔★級
+ /// <summary>
+ /// 杩斿洖鍣ㄥ叿淇濆吇浠诲姟
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Sc_MouldMaintainTaskReport/MaintainList")]
+ [HttpGet]
+ public object MaintainList(string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ ds = oCN.RunProcReturn("exec h_p_Sc_MouldMaintainTaskReport " + user, "h_p_Sc_MouldMaintainTaskReport");
+
+ if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ {
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds;
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳暟鎹�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鍣ㄥ叿缁翠慨浠诲姟锛堝緟缁翠慨銆佸凡缁翠慨銆佸叏閮ㄤ换鍔★級
+ /// <summary>
+ /// 杩斿洖鍣ㄥ叿缁翠慨浠诲姟
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Sc_MouldRepairTaskReport/RepairList")]
+ [HttpGet]
+ public object RepairList(string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ ds = oCN.RunProcReturn("exec h_p_Sc_MouldRepairTaskReport " + user, "h_p_Sc_MouldRepairTaskReport");
+
+ if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ {
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds;
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳暟鎹�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏁呴殰鐧昏璺熻釜锛堝緟缁翠慨銆佸凡缁翠慨銆佸凡楠屾敹锛�
+ /// <summary>
+ /// 杩斿洖鏁呴殰鐧昏璺熻釜
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Sc_MouldRepairCheckTaskReport/RepairCheckList")]
+ [HttpGet]
+ public object RepairCheckList(string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ ds = oCN.RunProcReturn("exec h_p_Sc_MouldRepairCheckTaskReport " + user, "h_p_Sc_MouldRepairCheckTaskReport");
+
+ if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ {
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds;
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳暟鎹�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ }
+}
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipReportController.cs b/WebAPI/Controllers/SBGL/Sb_EquipReportController.cs
new file mode 100644
index 0000000..28d4597
--- /dev/null
+++ b/WebAPI/Controllers/SBGL/Sb_EquipReportController.cs
@@ -0,0 +1,237 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using Pub_Class;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.SBGL
+{
+ public class Sb_EquipReportController : ApiController
+ {
+ private json objJsonResult = new json();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ DataSet ds;
+
+ #region 璁惧鐐规浠诲姟锛堜粖鏃ュ緟鐐规銆佷粖鏃ュ凡鐐规銆佷粖澶╁叏閮ㄤ换鍔★級
+ /// <summary>
+ /// 杩斿洖璁惧鐐规浠诲姟
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Sb_EquipDotCheckTaskReport/CheckList")]
+ [HttpGet]
+ public object CheckList(string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ ds = oCN.RunProcReturn("exec h_p_Sb_EquipDotCheckTaskReport " + user, "h_p_Sb_EquipDotCheckTaskReport");
+
+ if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ {
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds;
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳暟鎹�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 璁惧淇濆吇浠诲姟锛堜粖鏃ュ緟淇濆吇銆佷粖鏃ュ凡淇濆吇銆佷粖澶╁叏閮ㄤ换鍔★級
+ /// <summary>
+ /// 杩斿洖璁惧淇濆吇浠诲姟
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Sb_EquipMaintainTaskReport/MaintainList")]
+ [HttpGet]
+ public object MaintainList(string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ ds = oCN.RunProcReturn("exec h_p_Sb_EquipMaintainTaskReport " + user, "h_p_Sb_EquipMaintainTaskReport");
+
+ if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ {
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds;
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳暟鎹�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 璁惧缁翠慨浠诲姟锛堝緟缁翠慨銆佸凡缁翠慨銆佸叏閮ㄤ换鍔★級
+ /// <summary>
+ /// 杩斿洖璁惧缁翠慨浠诲姟
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Sb_EquipRepairTaskReport/RepairList")]
+ [HttpGet]
+ public object RepairList(string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ ds = oCN.RunProcReturn("exec h_p_Sb_EquipRepairTaskReport " + user, "h_p_Sb_EquipRepairTaskReport");
+
+ if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ {
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds;
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳暟鎹�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏁呴殰鐧昏璺熻釜锛堝緟缁翠慨銆佸凡缁翠慨銆佸凡楠屾敹锛�
+ /// <summary>
+ /// 杩斿洖鏁呴殰鐧昏璺熻釜
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Sb_EquipRepairCheckTaskReport/RepairCheckList")]
+ [HttpGet]
+ public object RepairCheckList(string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ ds = oCN.RunProcReturn("exec h_p_Sb_EquipRepairCheckTaskReport " + user, "h_p_Sb_EquipRepairCheckTaskReport");
+
+ if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ {
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds;
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳暟鎹�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ }
+}
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index bf8953e..d59bf75 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -5247,7 +5247,7 @@
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
//鑾峰彇淇濆吇椤圭洰缂栬緫鏁版嵁
- string sql = "select 淇濆吇椤圭洰ID HMaintainItemID, 淇濆吇椤圭洰浠g爜 HMaintainItemNumber,淇濆吇椤圭洰 HMaintainItem,淇濆吇閮ㄤ綅 HMaintainPart,鍏蜂綋瑕佹眰 HClaim,璐熻矗浜篒D,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜哄悕绉� HManagerName,瀛愬娉�2 HRemark,HMouldMaintainRuleID,HEquipDotCheckNo from h_v_Sc_MouldMaintainPlanBillSub_Item where 1 = 1 " + sqlWhere + "";
+ string sql = "select 淇濆吇椤圭洰ID HMaintainItemID, 淇濆吇椤圭洰浠g爜 HMaintainItemNumber,淇濆吇椤圭洰 HMaintainItem,淇濆吇閮ㄤ綅 HMaintainPart,鍏蜂綋瑕佹眰 HClaim,璐熻矗浜篒D HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜哄悕绉� HManagerName,瀛愬娉�2 HRemark,HMouldMaintainRuleID,HEquipDotCheckNo from h_v_Sc_MouldMaintainPlanBillSub_Item where 1 = 1 " + sqlWhere + "";
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainPlanBillSub_Item");
//鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs"
index d66e65e..a1d9e86 100644
--- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs"
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs"
@@ -835,6 +835,7 @@
long HEmpID = 0;
string HCusModel = ""; //瀹㈡埛鐗╂枡瑙勬牸
string HCusMaterName = ""; //瀹㈡埛鐗╂枡鍚嶇О
+ string HCheckEmpName = ""; //妫�楠屽憳鍚嶇О
DataSet Ds;
msg2 = msg2.Replace("\\", "");
@@ -858,6 +859,7 @@
HEmpID = ClsPub.isLong(ordrlist[j].HEmpID);
HCusModel = ClsPub.isStrNull(ordrlist[j].HCusModel);
HCusMaterName = ClsPub.isStrNull(ordrlist[j].HCusMaterName);
+ HCheckEmpName = ClsPub.isStrNull(ordrlist[j].HCheckEmpName);
//鏃ユ湡鑾峰彇鏂瑰紡
sDate = DateTime.Now.ToString();
//
@@ -870,6 +872,10 @@
sDate = DBUtility.ClsPub.isStrNull(ordrlist[j].HEndDate);
}
else if (CampanyName == "澶忓疂鐢靛櫒")// 鏃ユ湡锛氱敓浜ц鍗� 鏉$爜鏃ユ湡
+ {
+ sDate = DBUtility.ClsPub.isStrNull(ordrlist[j].HDate);
+ }
+ else if (CampanyName == "涔濊彵")// 鏃ユ湡锛氱敓浜ц鍗� 鏉$爜鏃ユ湡
{
sDate = DBUtility.ClsPub.isStrNull(ordrlist[j].HDate);
}
@@ -1209,6 +1215,7 @@
barcode.HEmpID2 = ordrlist[j].HEmpID;
barcode.HCusModel2 = ordrlist[j].HCusModel;
barcode.HCusMaterName2 = ordrlist[j].HCusMaterName;
+ barcode.HCheckEmpName2 = ordrlist[j].HCheckEmpName;
ListRows.Add(barcode);
k = k + 1;
n = n + 1;
@@ -1260,6 +1267,7 @@
long HEmpID2 = 0;
string HCusModel2 = "";
string HCusMaterName2 = "";
+ string HCheckEmpName2 = "";
try
{
@@ -1317,6 +1325,7 @@
HEmpID2 = ClsPub.isLong(ListRows[i].HEmpID2);
HCusModel2 = ClsPub.isStrNull(ListRows[i].HCusModel2);
HCusMaterName2 = ClsPub.isStrNull(ListRows[i].HCusMaterName2);
+ HCheckEmpName2 = ClsPub.isStrNull(ListRows[i].HCheckEmpName2);
oCN.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" +
",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" +
",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " +
@@ -1325,7 +1334,7 @@
",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " +
",HGiveAwayFlag " +
",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo" +
- ",HCoilNO,HFurnaceNO,HFactory,HAuxQty,HheatNO,HProduceDate,HExpiryDate,HEmpID,HCusModel,HCusMaterName " +
+ ",HCoilNO,HFurnaceNO,HFactory,HAuxQty,HheatNO,HProduceDate,HExpiryDate,HEmpID,HCusModel,HCusMaterName,HCheckEmpName " +
") values ("
+ "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString()
+ ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID2.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString()
@@ -1334,7 +1343,7 @@
+ ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + sDate + "'"
+ ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterID.ToString() + "," + HEntryID.ToString() + ""
+ ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag)
- + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "','" + HCoilNO2 + "','" + HFurnaceNO2 + "','" + HFactory2 + "'," + HAuxQty2 + ",'" + HheatNO2 + "','" + HProduceDate + "','" + HExpiryDate + "'," + HEmpID2.ToString() + ",'" + HCusModel2 + "','" + HCusMaterName2 + "'" + ")");
+ + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "','" + HCoilNO2 + "','" + HFurnaceNO2 + "','" + HFactory2 + "'," + HAuxQty2 + ",'" + HheatNO2 + "','" + HProduceDate + "','" + HExpiryDate + "'," + HEmpID2.ToString() + ",'" + HCusModel2 + "','" + HCusMaterName2 + "','" + HCheckEmpName2 + "'" + ")");
//HNumber = ClsPub.isStrNull(grdSub.Rows[i].Cells[HMaterID2Col].Value);
diff --git a/WebAPI/DLL/ClsSb_EquipRepairCheckBill.cs b/WebAPI/DLL/ClsSb_EquipRepairCheckBill.cs
index e9a7b99..2f2c7e7 100644
--- a/WebAPI/DLL/ClsSb_EquipRepairCheckBill.cs
+++ b/WebAPI/DLL/ClsSb_EquipRepairCheckBill.cs
@@ -55,6 +55,10 @@
",HCheckResult='" + omodel.HCheckResult + "'" +
",HExplanation='" + omodel.HExplanation + "'" +
",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
+ ",HMainSourceBillType='" + omodel.HMainSourceBillType + "'" +
+ ",HMainSourceInterID=" + omodel.HMainSourceInterID +
+ ",HMainSourceEntryID=" + omodel.HMainSourceEntryID +
+ ",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" +
" where HInterID=" + lngBillKey.ToString());
//鍒犻櫎鍏宠仈
//DeleteRelation(ref sReturn, lngBillKey);
@@ -92,6 +96,22 @@
{
//寰楀埌mainid
omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ DataSet ds = oCn.RunProcReturn("Exec h_p_Sb_EquipRepairCheckBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ,1", "h_p_Sb_EquipRepairCheckBill_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閲嶅鍒欓噸鏂拌幏鍙�
oCn.BeginTran();
//涓昏〃
@@ -100,11 +120,13 @@
",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
",HEquipID,HExplanation,HInnerBillNo,HEmpID" +
",HManagerID,HDeptID,HCheckResult,HCheckBeginDate,HMouldRepairWorkID,HRepairCheckMainID,HRepairCheckMainContent" +
+ ",HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker+ "',getdate()" +
", " + omodel.HEquipID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HEmpID.ToString() +
- "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HCheckResult + "','" + omodel.HCheckBeginDate + "'," + omodel.HMouldRepairWorkID + "," + omodel.HRepairCheckMainID + ",'" + omodel.HRepairCheckMainContent + "'" +
+ "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HCheckResult + "','" + omodel.HCheckBeginDate + "'," + omodel.HMouldRepairWorkID + "," + omodel.HRepairCheckMainID + ",'" + omodel.HRepairCheckMainContent + "','" + omodel.HMainSourceBillType +
+ "'," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "'" +
") ");
////鎻掑叆瀛愯〃
foreach (Model.ClsSb_EquipRepairCheckBillSub oSub in DetailColl)
@@ -119,6 +141,23 @@
"," + oSub.HRepairCheckID.ToString() + "," + oSub.HManagerID.ToString() + ",'" + oSub.HRepairCheckContent + "'" +
") ");
}
+
+ //=========================淇濆瓨鍚庢帶鍒�
+ DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sb_EquipRepairCheckBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1,1 ", "h_p_Sb_EquipRepairCheckBill_AfterSaveCtrl");
+ 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/WebAPI/DLL/ClsSc_MouldRepairCheckBill.cs b/WebAPI/DLL/ClsSc_MouldRepairCheckBill.cs
index 82866f8..5f96c7c 100644
--- a/WebAPI/DLL/ClsSc_MouldRepairCheckBill.cs
+++ b/WebAPI/DLL/ClsSc_MouldRepairCheckBill.cs
@@ -55,7 +55,11 @@
",HEmpID=" + omodel.HEmpID.ToString() +
",HManagerID=" + omodel.HManagerID.ToString() +
",HDeptID=" + omodel.HDeptID.ToString() +
- ",HMouldRepairWorkID=" + omodel.HMouldRepairWorkID.ToString() +
+ ",HMouldRepairWorkID=" + omodel.HMouldRepairWorkID.ToString() +
+ ",HMainSourceBillType='" + omodel.HMainSourceBillType + "'" +
+ ",HMainSourceInterID=" + omodel.HMainSourceInterID +
+ ",HMainSourceEntryID=" + omodel.HMainSourceEntryID +
+ ",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" +
",HExplanation='" + omodel.HExplanation + "'" +
",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
@@ -119,6 +123,22 @@
{
//寰楀埌mainid
omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+
+ //淇濆瓨鍓嶆帶鍒�=========================================
+ string HBillNote = "";
+ DataSet ds = oCn.RunProcReturn("Exec h_p_Sc_MouldRepairCheckBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ,1", "h_p_Sc_MouldRepairCheckBill_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閲嶅鍒欓噸鏂拌幏鍙�
oCn.BeginTran();
//涓昏〃
@@ -128,12 +148,14 @@
",HMouldID,HCheckBeginDate,HCheckResult" +
",HEmpID,HManagerID,HDeptID"+
",HInnerBillNo,HExplanation,HMouldRepairWorkID" +
+ ",HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo" +
") " +
" values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
"," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+
"," + omodel.HMouldID.ToString() + ",'" + omodel.HCheckBeginDate + "','" + omodel.HCheckResult + "'" +
"," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() +
- ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" + "," + omodel.HMouldRepairWorkID +
+ ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" + "," + omodel.HMouldRepairWorkID + ",'" + omodel.HMainSourceBillType +
+ "'," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "'" +
") ");
//鎻掑叆瀛愯〃
foreach (Model.ClsSc_MouldRepairCheckBillSub oSub in DetailColl)
@@ -163,6 +185,23 @@
// }
//}
//
+
+ //=========================淇濆瓨鍚庢帶鍒�
+ DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sc_MouldRepairCheckBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1,1 ", "h_p_Sc_MouldRepairCheckBill_AfterSaveCtrl");
+ 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/WebAPI/Models/HBarCodeList.cs b/WebAPI/Models/HBarCodeList.cs
index bbc6fad..f69b85e 100644
--- a/WebAPI/Models/HBarCodeList.cs
+++ b/WebAPI/Models/HBarCodeList.cs
@@ -75,6 +75,7 @@
public Int64 HEmpID2 { get; set; } //"鎿嶄綔鍛�";
public string HCusModel2 { get; set; } //"瀹㈡埛鐗╂枡瑙勬牸";
public string HCusMaterName2 { get; set; } //"瀹㈡埛鐗╂枡鍚嶇О";
+ public string HCheckEmpName2 { get; set; } //"妫�楠屽憳鍚嶇О";
}
}
\ No newline at end of file
diff --git a/WebAPI/Models/HSouceOrderList.cs b/WebAPI/Models/HSouceOrderList.cs
index f9c08d7..5ffb466 100644
--- a/WebAPI/Models/HSouceOrderList.cs
+++ b/WebAPI/Models/HSouceOrderList.cs
@@ -78,5 +78,6 @@
public string HEmpName { get; set; } //"鎿嶄綔鍛�";
public string HCusModel { get; set; } //"瀹㈡埛鐗╂枡瑙勬牸";
public string HCusMaterName { get; set; } //"瀹㈡埛鐗╂枡鍚嶇О";
+ public string HCheckEmpName { get; set; } //"妫�楠屽憳鍚嶇О";
}
}
\ No newline at end of file
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index ba76475..de33dc0 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -428,6 +428,7 @@
<Compile Include="Controllers\MJGL\Sc_MouldinventoryBillController.cs" />
<Compile Include="Controllers\MJGL\Sc_MouldDotCheckRuleBillController.cs" />
<Compile Include="Controllers\MJGL\Sc_MouldLifeUseBillController.cs" />
+ <Compile Include="Controllers\MJGL\Sc_MouldReportController.cs" />
<Compile Include="Controllers\MJGL\Sc_MouldScrapRequestBillController.cs" />
<Compile Include="Controllers\MJGL\Sc_MouldStatusChangeBillController.cs" />
<Compile Include="Controllers\MJGL\Sc_MouldUpperBillController.cs" />
@@ -437,6 +438,7 @@
<Compile Include="Controllers\SBGL\Gy_FixCardBillController.cs" />
<Compile Include="Controllers\SBGL\SB_EquipICMOTechParamBillController.cs" />
<Compile Include="Controllers\SBGL\Sb_EquipBeginBillController.cs" />
+ <Compile Include="Controllers\SBGL\Sb_EquipReportController.cs" />
<Compile Include="Controllers\SBGL\Sb_EquipStopBillController.cs" />
<Compile Include="Controllers\SBGL\Sb_EquipConkBookBillController.cs" />
<Compile Include="Controllers\SBGL\Sb_EquipSparepartsBillController.cs" />
--
Gitblit v1.9.1