From d5ca00ae21018adf8987bde8b2ab4dc7c9a3fc7f Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期一, 06 十二月 2021 16:22:40 +0800
Subject: [PATCH] 工资结算单(其他)
---
/dev/null | 337 --------------
WebAPI/DLL/工资管理/ClsPay_OtherBalBill.cs | 20
WebAPI/DLL/工资管理/ClsPay_SingleBalBill.cs | 0
WebAPI/ListModels.cs | 16
WebAPI/Controllers/Pay_GroupBalBillController.cs | 159 ------
WebAPI/Controllers/工资管理/Pay_SingleBalBillController.cs | 3
WebAPI/Models/工资管理/ClsPay_OtherBalBillMain.cs | 16
WebAPI/Models/工资管理/ClsPay_OtherBalBillSub.cs | 40 +
WebAPI/WebAPI.csproj | 9
WebAPI/Controllers/工资管理/Pay_OtherBalBillController.cs | 369 ++++++++++++++++
WebAPI/DLL/工资管理/ClsPay_GroupBalBill.cs | 356 +++++++++++++++
11 files changed, 815 insertions(+), 510 deletions(-)
diff --git a/WebAPI/Controllers/Pay_GroupBalBillController.cs b/WebAPI/Controllers/Pay_GroupBalBillController.cs
index 1a6dd6a..69329ae 100644
--- a/WebAPI/Controllers/Pay_GroupBalBillController.cs
+++ b/WebAPI/Controllers/Pay_GroupBalBillController.cs
@@ -113,164 +113,7 @@
return objJsonResult;
}
#endregion
- /// <summary>
- /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
- ///鍙傛暟锛歴tring sql銆�
- ///杩斿洖鍊硷細object銆�
- /// </summary>
- [Route("Pay_GroupBalBill/AddBill")]
- [HttpPost]
- public object AddBill([FromBody] JObject sMainSub)
- {
- var _value = sMainSub["sMainSub"].ToString();
- string msg1 = _value.ToString();
- oCN.BeginTran();
- //淇濆瓨涓昏〃
- objJsonResult = AddBillMain(msg1);
- if (objJsonResult.code == "0")
- {
- oCN.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = objJsonResult.Message;
- objJsonResult.data = null;
- return objJsonResult;
- }
- oCN.Commit();
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "鏂板鍗曟嵁鎴愬姛锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
-
- public json AddBillMain(string msg1)
- {
- string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
- string msg2 = sArray[0].ToString();
- string msg3 = sArray[1].ToString();
- try
- {
- msg2 = "[" + msg2.ToString() + "]";
- List<Pay_GroupBalBill> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Pay_GroupBalBill>>(msg2);
- string HBillType = "2202";
- long HInterID = mainList[0].HInterID;//閫掑叆type寰楀埌鐨勫崟鎹甀D
- string HBillNo = mainList[0].HBillNo;//閫掑叆type寰楀埌鐨勫崟鎹彿
- DateTime HDate = mainList[0].HDate;//鏃ユ湡
- int HYear = 2021;
- double HPeriod = 1;
- string HRemark = mainList[0].HRemark;//澶囨敞
- string HBillSubType = "2202";
- string HMaker = mainList[0].HMaker;
- string HExplanation = "0";
- string HInnerBillNo = "0";
- long HMaterID = mainList[0].HMaterID;//浜у搧ID
- long HGroupID = mainList[0].HGroupID;
- long HDeptID = mainList[0].HDeptID;
- long HProcID = mainList[0].HProcID;
- decimal HOtherSubsidy = mainList[0].HOtherSubsidy;
- decimal HOtherDeduct = mainList[0].HOtherDeduct;
- decimal HSumMoney = mainList[0].HSumMoney;
- decimal HPayMoney = mainList[0].HPayMoney;
- long HEmpID = mainList[0].HEmpID;
- long HPayType = mainList[0].HPayType;
- //long HMaterTypeID = 0;
- int HPRDORGID = mainList[0].HPRDORGID; //缁勭粐
-
- //涓昏〃
- oCN.RunProc("Insert Into Pay_GroupBalBillMain " +
- "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
- ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
- ",HGroupID,HDeptID,HPayType,HOtherSubsidy" +
- ",HOtherDeduct,HSumMoney,HPayMoney" +
- ",HExplanation,HInnerBillNo" +
- ") " +
- " values('" + HBillType + "','" + HBillSubType + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HDate + "'" +
- ", " + HYear.ToString() + "," + HPeriod.ToString() + ",'" + HRemark + "','" + HMaker + "',getdate()" +
- ", " + HGroupID.ToString() + "," + HDeptID.ToString() + "," + HPayType.ToString() + "," + HOtherSubsidy.ToString() +
- "," + HOtherDeduct.ToString() + "," + HSumMoney.ToString() + "," + HPayMoney.ToString() +
- ",'" + HExplanation + "','" + HInnerBillNo + "'" +
- ") ");
-
- //淇濆瓨瀛愯〃
- objJsonResult = AddBillSub(msg3, HInterID);
- if (objJsonResult.code == "0")
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = objJsonResult.Message;
- objJsonResult.data = null;
- return objJsonResult;
- }
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = null;
- objJsonResult.data = null;
- return objJsonResult;
- }
- catch (Exception e)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
- objJsonResult.data = null;
- return objJsonResult;
- }
- }
-
- public json AddBillSub(string msg3, long HInterID)
- {
- List<Pay_GroupBalBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Pay_GroupBalBillSub>>(msg3);
- for (int i = 0; i < subList.ToArray().Length; i++)
- {
- long HEntryID = subList[0].HEntryID;//宸ユID
- string HRemark = subList[0].HRemark;
- long HSourceInterID = subList[0].HSourceInterID;
- long HSourceEntryID = subList[0].HSourceEntryID;
- string HSourceBillNo = subList[0].HSourceBillNo;
- string HSourceBillType = subList[0].HSourceBillType;
- decimal HRelationQty = subList[0].HRelationQty;
- decimal HRelationMoney = subList[0].HRelationMoney;
- long HSourceID = subList[0].HSourceID;
- long HSqty = subList[0].HSqty;
- long HMaterID = subList[0].HMaterID;
- long HProcID = subList[0].HProcID;
- long HUnitID = subList[0].HUnitID;
- decimal HTimes = subList[0].HTimes;
- decimal HQty = subList[0].HQty;
- decimal HPrice = subList[0].HPrice;
- decimal HMoney = subList[0].HMoney;
- long HICMOInterID = subList[0].HICMOInterID;
- string HICMOBillNo = subList[0].HICMOBillNo;
- long HProcReportInterID = subList[0].HProcReportInterID;
- long HProcReportEntryID = subList[0].HProcReportEntryID;
- long HProcPlanInterID = subList[0].HProcPlanInterID;
- long HProcPlanEntryID = subList[0].HProcPlanEntryID;
- string HProcReportBillNo = subList[0].HProcReportBillNo;
- string HProcPlanBillNo = subList[0].HProcPlanBillNo;
-
- string sql = "Insert into Pay_GroupBalBillSub " +
- " (HInterID,HEntryID,HRemark" +
- ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
- ",HMaterID,HUnitID,HProcID,HTimes,HQty,HPrice,HSourceID" +
- ",HMoney,HICMOInterID,HICMOBillNo,HProcReportInterID,HProcReportEntryID,HProcReportBillNo" +
- ",HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HSqty" +
- ") values("
- + HInterID.ToString() + "," + HEntryID.ToString() + ",'" + HRemark + "'" +
- "," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "'," + HRelationQty.ToString() + "," + HRelationMoney.ToString() +
- "," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HProcID.ToString() + "," + HTimes.ToString() + "," + HQty.ToString() + "," + HPrice.ToString() + "," + HSourceID.ToString() +
- "," + HMoney.ToString() + "," + HICMOInterID.ToString() + ",'" + HICMOBillNo + "'," + HProcReportInterID.ToString() + "," + HProcReportEntryID.ToString() + ",'" + HProcReportBillNo + "'" +
- "," + HProcPlanInterID.ToString() + "," + HProcPlanEntryID.ToString() + ",'" + HProcPlanBillNo + "'," + HSqty.ToString() +
- ") ";
- oCN.RunProc(sql);
- }
-
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = null;
- objJsonResult.data = null;
- return objJsonResult;
- }
+
/// <summary>
///宸ヨ祫缁撶畻涓汉鍗曞垹闄ゅ姛鑳�
/// </summary>
diff --git a/WebAPI/Controllers/Pay_OtherBalBillController.cs b/WebAPI/Controllers/Pay_OtherBalBillController.cs
deleted file mode 100644
index 048d664..0000000
--- a/WebAPI/Controllers/Pay_OtherBalBillController.cs
+++ /dev/null
@@ -1,337 +0,0 @@
-锘縰sing 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
-{
-
- public class Pay_OtherBalBillController : ApiController
- {
- public DBUtility.ClsPub.Enum_BillStatus BillStatus;
-
- private json objJsonResult = new json();
- public DataSet ds = new DataSet();
- public WebServer webserver = new WebServer();
- SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- //DataSet ds;
-
-
- /// <summary>
- /// 杩斿洖宸ヨ祫缁撶畻涓汉鍒楄〃
- ///鍙傛暟锛歴tring sql銆�
- ///杩斿洖鍊硷細object銆�
- /// </summary>
- [Route("Pay_OtherBalBill/GetOtherBalBill")]
- [HttpGet]
- public object GetOtherBalBill(string sWhere)
- {
- try
- {
-
- ds = Sc_GetOtherBalBill(sWhere);
- 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 Sc_GetOtherBalBill(string sWhere)
- {
- if (sWhere == null || sWhere.Equals(""))
- {
- return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Pay_OtherBalBillList order by 鏃ユ湡 desc", "h_v_Pay_OtherBalBillList");
- }
- else
- {
- string sql1 = "select * from h_v_Pay_OtherBalBillList where 1 = 1 ";
- string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
- return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Pay_OtherBalBillList");
- }
-
- }
-
- #region[宸ヨ祫缁撶畻涓汉鍗曠紪杈戞椂鑾峰彇琛ㄥご鏁版嵁]
- [Route("Pay_OtherBalBill/Pay_OtherBalBillListCheckDetail")]
- [HttpGet]
- public ApiResult<DataSet> Pay_OtherBalBillListCheckDetail(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_Pay_OtherBalBillList where hmainid= " + HID + " ", "h_v_Pay_OtherBalBillList");
- 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
-
- #region[宸ヨ祫缁撶畻涓汉鍗曠紪杈戞椂鑾峰彇琛ㄤ綋鏁版嵁]
- [Route("Pay_OtherBalBill/Pay_OtherBalBillListProjectDetai")]
- [HttpGet]
- public object Pay_OtherBalBillListProjectDetai(string sqlWhere)
- {
- DataSet ds;
- try
- {
- SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- string sql1 = "SELECT HMaterID,HMaterCode,HMaterName, HDeptID,閮ㄩ棬浠g爜,閮ㄩ棬" +
- ",HGroupID,鐝粍浠g爜,鐝粍,宸ヨ祫绫诲瀷,鎽樿,鍐呴儴鍗曟嵁鍙�,琛ㄥご澶囨敞,鍒跺崟浜�,鍒跺崟鏃ユ湡" +
- ",瀹℃牳浜�,瀹℃牳鏃ユ湡,淇敼浜�,淇敼鏃ユ湡,鍏抽棴浜�, 鍏抽棴鏃ユ湡,HProcID,HProcNumber,HProcName" +
- ",HEmpID,HEmpNumber,HEmpName,宸ユ椂,鏁伴噺,宸ヤ环,閲戦 FROM h_v_Pay_OtherBalBillList where 1 = 1 ";
- string sql = sql1 + sqlWhere;
- ds = oCN.RunProcReturn(sql, "h_v_Pay_OtherBalBillList");
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- 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
- /// <summary>
- /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
- ///鍙傛暟锛歴tring sql銆�
- ///杩斿洖鍊硷細object銆�
- /// </summary>
- [Route("Pay_OtherBalBill/AddBill")]
- [HttpPost]
- public object AddBill([FromBody] JObject sMainSub)
- {
- var _value = sMainSub["sMainSub"].ToString();
- string msg1 = _value.ToString();
- oCN.BeginTran();
- //淇濆瓨涓昏〃
- objJsonResult = AddBillMain(msg1);
- if (objJsonResult.code == "0")
- {
- oCN.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = objJsonResult.Message;
- objJsonResult.data = null;
- return objJsonResult;
- }
- oCN.Commit();
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "鏂板鍗曟嵁鎴愬姛锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
-
- public json AddBillMain(string msg1)
- {
- string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
- string msg2 = sArray[0].ToString();
- string msg3 = sArray[1].ToString();
- try
- {
- msg2 = "[" + msg2.ToString() + "]";
- List<Pay_OtherBalBill> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Pay_OtherBalBill>>(msg2);
- string HBillType = "2206";
- long HInterID = mainList[0].HInterID;//閫掑叆type寰楀埌鐨勫崟鎹甀D
- string HBillNo = mainList[0].HBillNo;//閫掑叆type寰楀埌鐨勫崟鎹彿
- DateTime HDate = mainList[0].HDate;//鏃ユ湡
- int HYear = 2021;
- double HPeriod = 1;
- string HRemark = mainList[0].HRemark;//澶囨敞
- string HBillSubType = "2206";
- string HMaker = mainList[0].HMaker;
- string HExplanation = "0";
- string HInnerBillNo = "0";
- long HMaterID = mainList[0].HMaterID;//浜у搧ID
- long HGroupID = mainList[0].HGroupID;
- long HDeptID = mainList[0].HDeptID;
- long HProcID = mainList[0].HProcID;
- long HEmpID = mainList[0].HEmpID;
- long HPayType = mainList[0].HPayType;
- //long HMaterTypeID = 0;
- int HPRDORGID = mainList[0].HPRDORGID; //缁勭粐
-
- //涓昏〃
- oCN.RunProc(" Insert Into Pay_OtherBalBillMain " +
- "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
- ",HYear,HPeriod,HRemark,HMaker" +
- ",HGroupID,HDeptID,HEmpID,HPayType,HInnerBillNo,HExplanation" + ")" +
- "values('" + HBillType + "','" + HBillSubType + "'," + HInterID + ",'" + HBillNo + "','" + HDate +
- "','" + HYear + "'," + HPeriod + ",'" + HRemark + "','" + HMaker + "'," + HGroupID + ", " + HDeptID +
- "," + HEmpID + ",'" + HPayType + "','" + HInnerBillNo + "'," + HExplanation +
- ") ");
- //淇濆瓨瀛愯〃
- objJsonResult = AddBillSub(msg3, HInterID);
- if (objJsonResult.code == "0")
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = objJsonResult.Message;
- objJsonResult.data = null;
- return objJsonResult;
- }
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = null;
- objJsonResult.data = null;
- return objJsonResult;
- }
- catch (Exception e)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
- objJsonResult.data = null;
- return objJsonResult;
- }
- }
-
- public json AddBillSub(string msg3, long HInterID)
- {
- List<Pay_OtherBalBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Pay_OtherBalBillSub>>(msg3);
- for (int i = 0; i < subList.ToArray().Length; i++)
- {
- long HEntryID = subList[0].HEntryID;//宸ユID
- string HCloseMan = subList[0].HCloseMan;
- long HCloseType = subList[0].HCloseType;
- string HRemark = subList[0].HRemark;
- long HSourceInterID = subList[0].HSourceInterID;
- long HSourceEntryID = subList[0].HSourceEntryID;
- string HSourceBillNo = subList[0].HSourceBillNo;
- string HSourceBillType = subList[0].HSourceBillType;
- decimal HRelationQty = subList[0].HRelationQty;
- decimal HRelationMoney = subList[0].HRelationMoney;
- long HSourceID = subList[0].HSourceID;
- long HSqty = subList[0].HSqty;
- long HSubsidyID = subList[0].HSubsidyID;
- long HDeuctID = subList[0].HDeuctID;
- long HMaterID = subList[0].HMaterID;
- long HProcID = subList[0].HProcID;
- long HEmpID = subList[0].HEmpID;
- decimal HTimes = subList[0].HTimes;
- decimal HQty = subList[0].HQty;
- decimal HPrice = subList[0].HPrice;
- decimal HPackQty = subList[0].HPackQty;
- decimal HPackPrice = subList[0].HPackPrice;
- decimal HPackMoney = subList[0].HPackMoney;
- long HPackMaterID = subList[0].HPackMaterID;
- decimal HPriceRate = subList[0].HPriceRate;
- decimal HSubsidyTotal = subList[0].HSubsidyTotal;
- decimal HDeuctTotal = subList[0].HDeuctTotal;
- decimal HSubsidyQty = subList[0].HSubsidyQty;
- decimal HSubsidyMoney = subList[0].HSubsidyMoney;
- decimal HMoney = subList[0].HMoney;
- long HICMOInterID = subList[0].HICMOInterID;
- string HICMOBillNo = subList[0].HICMOBillNo;
- long HProcReportInterID = subList[0].HProcReportInterID;
- long HProcReportEntryID = subList[0].HProcReportEntryID;
- long HProcPlanInterID = subList[0].HProcPlanInterID;
- long HProcPlanEntryID = subList[0].HProcPlanEntryID;
- string HProcReportBillNo = subList[0].HProcReportBillNo;
- string HProcPlanBillNo = subList[0].HProcPlanBillNo;
-
- string sql = "Insert into Pay_OtherBalBillSub " +
- " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
- ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
- ",HMaterID,HProcID,HEmpID,HSourceID,HTimes,HQty,HPrice,HSqty" +
- ",HMoney,HICMOInterID,HICMOBillNo,HProcReportInterID,HProcReportEntryID,HProcReportBillNo" +
- ",HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo" +
- ",HPriceRate,HSubsidyTotal,HDeuctTotal,HSubsidyID,HDeuctID" +
- ",HPackQty,HPackPrice,HPackMoney,HPackMaterID,HSubsidyQty,HSubsidyMoney" +
- ") values("
- + HInterID.ToString() + "," + HEntryID.ToString() + ",'" + HCloseMan + "',''," + HCloseType + ",'" + HRemark + "'" +
- "," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "'," + HRelationQty.ToString() + "," + HRelationMoney.ToString() +
- "," + HMaterID.ToString() + "," + HProcID.ToString() + "," + HEmpID.ToString() + "," + HSourceID.ToString()
- + "," + HTimes.ToString() + "," + HQty.ToString() + "," + HPrice.ToString() + "," + HSqty.ToString() +
- "," + HMoney.ToString() + "," + HICMOInterID.ToString() + ",'" + HICMOBillNo + "'," + HProcReportInterID.ToString() + "," + HProcReportEntryID.ToString() + ",'" + HProcReportBillNo + "'" +
- "," + HProcPlanInterID.ToString() + "," + HProcPlanEntryID.ToString() + ",'" + HProcPlanBillNo + "'" +
- "," + HPriceRate.ToString() + "," + HSubsidyTotal.ToString() + "," + HDeuctTotal.ToString() + "," + HSubsidyID.ToString() + "," + HDeuctID.ToString() +
- "," + HPackQty.ToString() + "," + HPackPrice.ToString() + "," + HPackMoney.ToString() + "," + HPackMaterID.ToString() + "," + HSubsidyQty.ToString() + "," + HSubsidyMoney.ToString() +
- ") ";
- oCN.RunProc(sql);
- }
-
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = null;
- objJsonResult.data = null;
- return objJsonResult;
- }
-
- /// <summary>
- ///宸ヨ祫缁撶畻鍏朵粬鍗曞垹闄ゅ姛鑳�
- /// </summary>
- /// <returns></returns>
- [Route("Pay_OtherBalBill/DeltetOtherBalBill")]
- [HttpGet]
- public object Pay_OtherBalBill(string HInterID)
- {
- try
- {
- oCN.BeginTran();
- oCN.RunProc("Delete From Pay_OtherBalBillMain where HInterID = " + HInterID);
- oCN.RunProc("Delete From Pay_OtherBalBillSub where HInterID = " + HInterID);
- oCN.Commit();
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- catch (Exception e)
- {
- oCN.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
- objJsonResult.data = null;
- return objJsonResult;
- }
- }
- [Route("Pay_OtherBalBill/getOtherBalBillPrice")]
- [HttpGet]
- public object getOtherBalBillPrice(string HMaterID, string HProcID)
- {
- try
- {
- DataSet ds = oCN.RunProcReturn("select 鍗曚环 from h_v_Gy_ProcPriceList where HMaterID='" + HMaterID + "' and HProcID='" + HProcID + "'", "h_v_Gy_ProcPriceList");
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "鏌ヨ鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
- return objJsonResult;
- }
- catch (Exception e)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "Exception锛�" + e.ToString();
- objJsonResult.data = null;
- return objJsonResult;
- }
- }
- //
- }
-}
\ No newline at end of file
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_OtherBalBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_OtherBalBillController.cs"
new file mode 100644
index 0000000..e2fd0b2
--- /dev/null
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_OtherBalBillController.cs"
@@ -0,0 +1,369 @@
+锘縰sing 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
+{
+
+ public class Pay_OtherBalBillController : ApiController
+ {
+ public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+
+ private json objJsonResult = new json();
+ public DataSet ds = new DataSet();
+ public WebServer webserver = new WebServer();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ //DataSet ds;
+ public DLL.ClsPay_OtherBalBill BillNew0 = new DLL.ClsPay_OtherBalBill(); //
+ public DLL.ClsPay_OtherBalBill BillOld0 = new DLL.ClsPay_OtherBalBill(); //
+
+ /// <summary>
+ /// 杩斿洖宸ヨ祫缁撶畻涓汉鍒楄〃
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Pay_OtherBalBill/GetOtherBalBill")]
+ [HttpGet]
+ public object GetOtherBalBill(string sWhere)
+ {
+ try
+ {
+
+ ds = Sc_GetOtherBalBill(sWhere);
+ 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 Sc_GetOtherBalBill(string sWhere)
+ {
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Pay_OtherBalBillList order by 鏃ユ湡 desc", "h_v_Pay_OtherBalBillList");
+ }
+ else
+ {
+ string sql1 = "select * from h_v_Pay_OtherBalBillList where 1 = 1 ";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
+ return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Pay_OtherBalBillList");
+ }
+
+ }
+
+ #region[宸ヨ祫缁撶畻涓汉鍗曠紪杈戞椂鑾峰彇琛ㄥご鏁版嵁]
+ [Route("Pay_OtherBalBill/Pay_OtherBalBillListCheckDetail")]
+ [HttpGet]
+ public ApiResult<DataSet> Pay_OtherBalBillListCheckDetail(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_Pay_OtherBalBillList where hmainid= " + HID + " ", "h_v_Pay_OtherBalBillList");
+ 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
+
+ #region[宸ヨ祫缁撶畻涓汉鍗曠紪杈戞椂鑾峰彇琛ㄤ綋鏁版嵁]
+ [Route("Pay_OtherBalBill/Pay_OtherBalBillListProjectDetai")]
+ [HttpGet]
+ public object Pay_OtherBalBillListProjectDetai(string sqlWhere)
+ {
+ DataSet ds;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ string sql1 = "SELECT HMaterID,HMaterCode,HMaterName, HDeptID,閮ㄩ棬浠g爜,閮ㄩ棬" +
+ ",HGroupID,鐝粍浠g爜,鐝粍,宸ヨ祫绫诲瀷,鎽樿,鍐呴儴鍗曟嵁鍙�,琛ㄥご澶囨敞,鍒跺崟浜�,鍒跺崟鏃ユ湡" +
+ ",瀹℃牳浜�,瀹℃牳鏃ユ湡,淇敼浜�,淇敼鏃ユ湡,鍏抽棴浜�, 鍏抽棴鏃ユ湡,HProcID,HProcNumber,HProcName" +
+ ",HEmpID,HEmpNumber,HEmpName,宸ユ椂 HTimes ,鏁伴噺 HQty,宸ヤ环 HPrice,閲戦 HMoney ,琛ㄤ綋澶囨敞 as HRemark FROM h_v_Pay_OtherBalBillList where 1 = 1 ";
+ string sql = sql1 + sqlWhere;
+ ds = oCN.RunProcReturn(sql, "h_v_Pay_OtherBalBillList");
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ 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
+
+
+ [Route("Pay_OtherBalBill/SaveGetOtherBalBillList")]
+ [HttpPost]
+ /// <summary>
+ /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ public object SaveGetOtherBalBillList([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 UserName = "";
+ string s = "";
+ long mouldid;
+ ListModels oListModels = new ListModels();
+ try
+ {
+ ////缂栬緫鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log_second("Pay_SingleBalBill_Edit", 1, true, msg4))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ DLL.ClsPay_OtherBalBill oBill = new DLL.ClsPay_OtherBalBill();
+ List<Models.ClsPay_OtherBalBillMain> lsmain = new List<Models.ClsPay_OtherBalBillMain>();
+ msg2 = msg2.Replace("\\", "");
+ msg2 = msg2.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_Pay_OtherBalBillMain(msg2);
+ foreach (Models.ClsPay_OtherBalBillMain 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;
+ }
+ }
+ //oItem.HMaker = "";
+ UserName = oItem.HMaker; //鍒跺崟浜�
+ oItem.HBillType = "2206";
+ oItem.HBillSubType = "2206";
+ //oItem.HBillNo = ""; //鍗曟嵁鍙�
+ //oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --鏃ユ湡
+ //oItem.HInnerBillNo = ""; // --鍐呴儴鍗曟嵁鍙�
+ 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"));
+ //oItem.HEquipID = 0; //璁惧ID(Gy_EquipMent)
+ //oItem.HPeriod = 0;
+ //oItem.HCheckBeginDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); // --缁翠慨鏃ユ湡
+ //oItem.HCheckResult = ""; //楠屾敹缁撹--(姝e父锛屽紓甯�)
+ //oItem.HEmpID = 0; //楠屾敹浜�(Gy_Employee)
+ //oItem.HManagerID = 0; //璐熻矗浜�(Gy_Employee)
+ //oItem.HDeptID = 0; //楠屾敹閮ㄩ棬(Gy_Department)
+ //oItem.HExplanation = ""; //鎽樿(鏁呴殰鎻忚堪)
+ //oItem.HRemark = ""; //澶囨敞
+
+ //oItem.HMainSourceInterID = oItem.HInterID;
+
+ //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
+ if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛佹病鏈夊崟鎹棩鏈燂紝鏃犳硶淇濆瓨锛�";
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ oBill.omodel = oItem;
+ }
+ //琛ㄤ綋鏁版嵁
+ //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+ msg3 = msg3.Substring(1, msg3.Length - 2);
+ msg3 = msg3.Replace("\\", "");
+ msg3 = msg3.Replace("\n", ""); //\n
+ //msg2 = msg2.Replace("'", "鈥�");
+ List<Models.ClsPay_OtherBalBillSub> ls = new List<Models.ClsPay_OtherBalBillSub>();
+ ls = oListModels.getObjectByJson_Pay_OtherBalBillSub(msg3);
+ int i = 0;
+ foreach (Models.ClsPay_OtherBalBillSub oItemSub in ls)
+ {
+
+ i++;
+ oItemSub.HEntryID = i;
+ mouldid = oItemSub.HMaterID;
+ //oItemSub.HRepairCheckID = 0; //楠屾敹椤圭洰ID
+ //oItemSub.HRepairCheckContent = ""; //楠屾敹鍐呭
+ //oItemSub.HManagerID = 0; //璐熻矗浜篒D
+ //oItemSub.HCloseMan = ""; //琛屽叧闂�
+ oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+ oItemSub.HCloseType = false; //鍏抽棴绫诲瀷
+ //oItemSub.HRemark = ""; //澶囨敞
+ oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮�
+ oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮�
+ //oItemSub.HSourceBillNo = ""; //婧愬崟鍗曞彿
+ //oItemSub.HSourceBillType = ""; //婧愬崟绫诲瀷
+ //oItemSub.HRelationQty = 0; //鍏宠仈鏁伴噺
+ //oItemSub.HRelationMoney = 0; //鍏宠仈閲戦
+ //oItemSub.HRepairID = 0; //缁翠慨椤圭洰
+ //oItemSub.HRepairExplanation =""; //缁翠慨瑕佹眰
+ //oItemSub.HMoney = 0; //缁翠慨璐圭敤
+ oBill.DetailColl.Add(oItemSub);
+
+ }
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ 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;
+ }
+ }
+
+ /// <summary>
+ ///宸ヨ祫缁撶畻鍏朵粬鍗曞垹闄ゅ姛鑳�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Pay_OtherBalBill/DeltetOtherBalBill")]
+ [HttpGet]
+ public object Pay_OtherBalBill(string HInterID)
+ {
+ try
+ {
+ oCN.BeginTran();
+ oCN.RunProc("Delete From Pay_OtherBalBillMain where HInterID = " + HInterID);
+ oCN.RunProc("Delete From Pay_OtherBalBillSub where HInterID = " + HInterID);
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ [Route("Pay_OtherBalBill/getOtherBalBillPrice")]
+ [HttpGet]
+ public object getOtherBalBillPrice(string HMaterID, string HProcID)
+ {
+ try
+ {
+ DataSet ds = oCN.RunProcReturn("select 鍗曚环 from h_v_Gy_ProcPriceList where HMaterID='" + HMaterID + "' and HProcID='" + HProcID + "'", "h_v_Gy_ProcPriceList");
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鏌ヨ鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ //
+ }
+}
\ No newline at end of file
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SingleBalBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SingleBalBillController.cs"
index 4354e70..4a7bfe7 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SingleBalBillController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SingleBalBillController.cs"
@@ -113,10 +113,11 @@
}
return objJsonResult;
}
+ #endregion
[Route("Pay_SingleBalBill/SaveGetSingleBalBillList")]
[HttpPost]
- #endregion
+
/// <summary>
/// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
///鍙傛暟锛歴tring sql銆�
diff --git "a/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_GroupBalBill.cs" "b/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_GroupBalBill.cs"
new file mode 100644
index 0000000..a1c1f2c
--- /dev/null
+++ "b/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_GroupBalBill.cs"
@@ -0,0 +1,356 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace WebAPI.DLL
+{
+ public class ClsPay_GroupBalBill : DBUtility.ClsXt_BaseBill
+ {
+ public Model.ClsPay_GroupBalBillMain omodel = new Model.ClsPay_GroupBalBillMain();
+ public List<Model.ClsPay_GroupBalBillSub> DetailColl = new List<Model.ClsPay_GroupBalBillSub>();
+ public List<Model.ClsPay_GroupBalBillEmp> DetailEmpColl = new List<Model.ClsPay_GroupBalBillEmp>();
+
+ public ClsPay_GroupBalBill()
+ {
+ base.MvarItemKeySub = "Pay_GroupBalBillSub";
+ base.MvarItemKeySub2 = "Pay_GroupBalBillEmp";
+ base.MvarItemKeySub3 = "";
+ base.MvarItemKeySub4 = "";
+ base.MvarItemKey = "Pay_GroupBalBillMain";
+ base.MvarReportTitle = "宸ヨ祫缁撶畻鍗曪紙鐝粍锛�";
+ base.BillType = "2202";
+ base.HBillSubType = "2202";
+
+ }
+
+ #region 鍥哄畾浠g爜
+
+ ~ClsPay_GroupBalBill()
+ {
+ DetailColl = null;
+ }
+
+ #endregion 鑷畾涔夋柟娉�
+ //淇敼鍗曟嵁
+ public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+ {
+ try
+ {
+ //
+ oCn.BeginTran();
+ //鏇存柊涓昏〃
+ oCn.RunProc("UpDate Pay_GroupBalBillMain set " +
+ " HBillNo='" + omodel.HBillNo + "'" + //鍥哄畾璧嬪��===============
+ ",HDate='" + omodel.HDate + "'" +
+ ",HYear='" + omodel.HYear.ToString() + "'" +
+ ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+ ",HRemark='" + omodel.HRemark + "'" +
+ ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
+ ",HUpDateDate=getdate()" +
+ //========================================
+ ",HGroupID=" + omodel.HGroupID.ToString() +
+ ",HDeptID=" + omodel.HDeptID.ToString() +
+ ",HOtherSubsidy=" + omodel.HOtherSubsidy.ToString() +
+ ",HOtherDeduct=" + omodel.HOtherDeduct.ToString() +
+ ",HSumMoney=" + omodel.HSumMoney.ToString() +
+ ",HPayMoney=" + omodel.HPayMoney.ToString() +
+ ",HPayType=" + omodel.HPayType.ToString() +
+ ",HExplanation='" + omodel.HExplanation + "'" +
+ ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
+ " where HInterID=" + lngBillKey.ToString());
+ //鍒犻櫎鍏宠仈
+ DeleteRelation(ref sReturn, lngBillKey);
+ //鍒犻櫎瀛愯〃
+ DeleteBillSub(lngBillKey);
+ DeleteBillSub2(lngBillKey);
+ //鎻掑叆瀛愯〃
+ omodel.HInterID = lngBillKey;
+ foreach (Model.ClsPay_GroupBalBillSub oSub in DetailColl)
+ {
+ oCn.RunProc("Insert into Pay_GroupBalBillSub " +
+ " (HInterID,HEntryID,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HMaterID,HUnitID,HProcID,HTimes,HQty,HPrice,HSourceID" +
+ ",HMoney,HICMOInterID,HICMOBillNo,HProcReportInterID,HProcReportEntryID,HProcReportBillNo" +
+ ",HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HSqty" +
+ ") values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'" +
+ "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+ "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HTimes.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HSourceID.ToString() +
+ "," + oSub.HMoney.ToString() + "," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HProcReportInterID.ToString() + "," + oSub.HProcReportEntryID.ToString() + ",'" + oSub.HProcReportBillNo + "'" +
+ "," + oSub.HProcPlanInterID.ToString() + "," + oSub.HProcPlanEntryID.ToString() + ",'" + oSub.HProcPlanBillNo + "'," + oSub.HSqty.ToString() +
+ ") ");
+ }
+ //
+ //鎻掑叆瀛愯〃2
+ foreach (Model.ClsPay_GroupBalBillEmp oSubSec in DetailEmpColl)
+ {
+ oCn.RunProc("Insert into Pay_GroupBalBillEmp " +
+ " (HInterID,HEntryID,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HEmpID,HEmpRate" +
+ ",HBaseTimes,HOverTimes,HLeaveTimes,HCTPrjID" +
+ ",HBaseDays,HOverDays,HLeaveDays,HYf" +
+ ",HMoney,HOtherSubsidy,HOtherDeduct,HIsPay,HAvgFlag" +
+ ")" +
+ " values("
+ + omodel.HInterID.ToString() + "," + oSubSec.HEntryID.ToString() + ",'" + oSubSec.HRemark + "'" +
+ "," + oSubSec.HSourceInterID.ToString() + "," + oSubSec.HSourceEntryID.ToString() + ",'" + oSubSec.HSourceBillNo + "','" + oSubSec.HSourceBillType + "'," + oSubSec.HRelationQty.ToString() + "," + oSubSec.HRelationMoney.ToString() +
+ "," + oSubSec.HEmpID.ToString() + "," + oSubSec.HEmpRate.ToString() +
+ "," + oSubSec.HBaseTimes.ToString() + "," + oSubSec.HOverTimes.ToString() + "," + oSubSec.HLeaveTimes.ToString() + "," + oSubSec.HCTPrjID.ToString() +
+ "," + oSubSec.HBaseDays.ToString() + "," + oSubSec.HOverDays.ToString() + "," + oSubSec.HLeaveDays.ToString() + "," + oSubSec.HYf.ToString() +
+ "," + oSubSec.HMoney.ToString() + "," + oSubSec.HOtherSubsidy.ToString() + "," + oSubSec.HOtherDeduct.ToString() + "," + Convert.ToString(oSubSec.HIsPay ? 1 : 0) + "," + Convert.ToString(oSubSec.HAvgFlag ? 1 : 0) + ") ");
+ }
+ //foreach (Model.ClsPay_GroupBalBillSub oSub in DetailColl)
+ //{
+ // Ds = oCn.RunProcReturn("exec h_p_Pay_GroupBalBill_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 Pay_GroupBalBillMain " +
+ "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
+ ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
+ ",HGroupID,HDeptID,HPayType,HOtherSubsidy" +
+ ",HOtherDeduct,HSumMoney,HPayMoney" +
+ ",HExplanation,HInnerBillNo" +
+ ") " +
+ " 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.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HPayType.ToString() + "," + omodel.HOtherSubsidy.ToString() +
+ "," + omodel.HOtherDeduct.ToString() + "," + omodel.HSumMoney.ToString() + "," + omodel.HPayMoney.ToString() +
+ ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" +
+ ") ");
+ //
+ //鎻掑叆瀛愯〃
+ foreach (Model.ClsPay_GroupBalBillSub oSub in DetailColl)
+ {
+ oCn.RunProc("Insert into Pay_GroupBalBillSub " +
+ " (HInterID,HEntryID,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HMaterID,HUnitID,HProcID,HTimes,HQty,HPrice,HSourceID" +
+ ",HMoney,HICMOInterID,HICMOBillNo,HProcReportInterID,HProcReportEntryID,HProcReportBillNo" +
+ ",HProcPlanInterID,HProcPlanEntryID,HProcPlanBillNo,HSqty" +
+ ") values("
+ + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'" +
+ "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+ "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HTimes.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HSourceID.ToString() +
+ "," + oSub.HMoney.ToString() + "," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HProcReportInterID.ToString() + "," + oSub.HProcReportEntryID.ToString() + ",'" + oSub.HProcReportBillNo + "'" +
+ "," + oSub.HProcPlanInterID.ToString() + "," + oSub.HProcPlanEntryID.ToString() + ",'" + oSub.HProcPlanBillNo + "'," + oSub.HSqty.ToString() +
+ ") ");
+ }
+ //
+ //鎻掑叆瀛愯〃2
+ foreach (Model.ClsPay_GroupBalBillEmp oSubSec in DetailEmpColl)
+ {
+ oCn.RunProc("Insert into Pay_GroupBalBillEmp " +
+ " (HInterID,HEntryID,HRemark" +
+ ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+ ",HEmpID,HEmpRate" +
+ ",HBaseTimes,HOverTimes,HLeaveTimes,HCTPrjID" +
+ ",HBaseDays,HOverDays,HLeaveDays,HYf" +
+ ",HMoney,HOtherSubsidy,HOtherDeduct,HIsPay,HAvgFlag" +
+ ")" +
+ " values("
+ + omodel.HInterID.ToString() + "," + oSubSec.HEntryID.ToString() + ",'" + oSubSec.HRemark + "'" +
+ "," + oSubSec.HSourceInterID.ToString() + "," + oSubSec.HSourceEntryID.ToString() + ",'" + oSubSec.HSourceBillNo + "','" + oSubSec.HSourceBillType + "'," + oSubSec.HRelationQty.ToString() + "," + oSubSec.HRelationMoney.ToString() +
+ "," + oSubSec.HEmpID.ToString() + "," + oSubSec.HEmpRate.ToString() +
+ "," + oSubSec.HBaseTimes.ToString() + "," + oSubSec.HOverTimes.ToString() + "," + oSubSec.HLeaveTimes.ToString() + "," + oSubSec.HCTPrjID.ToString() +
+ "," + oSubSec.HBaseDays.ToString() + "," + oSubSec.HOverDays.ToString() + "," + oSubSec.HLeaveDays.ToString() + "," + oSubSec.HYf.ToString() +
+ "," + oSubSec.HMoney.ToString() + "," + oSubSec.HOtherSubsidy.ToString() + "," + oSubSec.HOtherDeduct.ToString() + "," + Convert.ToString(oSubSec.HIsPay ? 1 : 0) + "," + Convert.ToString(oSubSec.HAvgFlag ? 1 : 0) + ") ");
+ }
+ //
+ //foreach (Model.ClsPay_GroupBalBillSub oSub in DetailColl)
+ //{
+ // Ds = oCn.RunProcReturn("exec h_p_Pay_GroupBalBill_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 Pay_GroupBalBillMain Where HInterID=" + lngBillKey.ToString(), "Pay_GroupBalBillMain");
+ 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.HGroupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HGroupID"]);
+ omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
+ omodel.HPayType = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPayType"]);
+ omodel.HOtherSubsidy = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HOtherSubsidy"]);
+ omodel.HOtherDeduct = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HOtherDeduct"]);
+ omodel.HSumMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HSumMoney"]);
+ omodel.HPayMoney = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HPayMoney"]);
+ omodel.HExplanation = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExplanation"]);
+ omodel.HInnerBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInnerBillNo"]);
+ //
+
+ //寰幆
+ DataSet DsSub;
+ DsSub = oCn.RunProcReturn("Select * from Pay_GroupBalBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "Pay_GroupBalBillSub");
+ DetailColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+ {
+ Model.ClsPay_GroupBalBillSub oSub = new Model.ClsPay_GroupBalBillSub();
+ // 鍥哄畾璧嬪��===============================================
+ 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.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]);
+ oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]);
+ oSub.HProcID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProcID"]);
+ oSub.HSourceID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceID"]);
+ oSub.HTimes = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HTimes"]);
+ oSub.HQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQty"]);
+ oSub.HPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPrice"]);
+ oSub.HMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HMoney"]);
+ oSub.HICMOInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HICMOInterID"]);
+ oSub.HICMOBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HICMOBillNo"]);
+ oSub.HProcReportInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProcReportInterID"]);
+ oSub.HProcReportEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProcReportEntryID"]);
+ oSub.HProcReportBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HProcReportBillNo"]);
+ oSub.HProcPlanInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProcPlanInterID"]);
+ oSub.HProcPlanEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProcPlanEntryID"]);
+ oSub.HProcPlanBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HProcPlanBillNo"]);
+ oSub.HSqty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HSqty"]);
+ DetailColl.Add(oSub);
+ }
+ //寰幆瀛愯〃2
+ DataSet DsSubSec = new DataSet();
+ DsSubSec = oCn.RunProcReturn("Select * from Pay_GroupBalBillEmp Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "Pay_GroupBalBillMain");
+ DetailEmpColl.Clear();//娓呯┖
+ for (int i = 0; i < DsSubSec.Tables[0].Rows.Count; i++)
+ {
+ Model.ClsPay_GroupBalBillEmp oSubSec = new Model.ClsPay_GroupBalBillEmp();
+ // 鍥哄畾璧嬪��===============================================
+ oSubSec.HInterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HInterID"]);
+ oSubSec.HEntryID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HEntryID"]);
+ oSubSec.HSourceInterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HSourceInterID"]);
+ oSubSec.HSourceEntryID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HSourceEntryID"]);
+ oSubSec.HSourceBillType = DsSubSec.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
+ oSubSec.HSourceBillNo = DsSubSec.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
+ oSubSec.HRelationQty = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HRelationQty"]);
+ oSubSec.HRelationMoney = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HRelationMoney"]);
+ oSubSec.HCloseMan = DBUtility.ClsPub.isStrNull(DsSubSec.Tables[0].Rows[i]["HCloseMan"]);
+ oSubSec.HCloseType = DBUtility.ClsPub.isBool(DsSubSec.Tables[0].Rows[i]["HCloseType"]);
+ oSubSec.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSubSec.Tables[0].Rows[i]["HEntryCloseDate"]);
+ oSubSec.HRemark = DsSubSec.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+ //===================================================
+ oSubSec.HEmpID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HEmpID"]);
+ oSubSec.HCTPrjID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HCTPrjID"]);
+ oSubSec.HEmpRate = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HEmpRate"]);
+ oSubSec.HBaseTimes = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HBaseTimes"]);
+ oSubSec.HOverTimes = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HOverTimes"]);
+ oSubSec.HLeaveTimes = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HLeaveTimes"]);
+ oSubSec.HBaseDays = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HBaseDays"]);
+ oSubSec.HOverDays = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HOverDays"]);
+ oSubSec.HLeaveDays = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HLeaveDays"]);
+ oSubSec.HMoney = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HMoney"]);
+ oSubSec.HOtherSubsidy = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HOtherSubsidy"]);
+ oSubSec.HOtherDeduct = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HOtherDeduct"]);
+ oSubSec.HYf = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HYf"]);
+ oSubSec.HIsPay = DBUtility.ClsPub.isBool(DsSubSec.Tables[0].Rows[i]["HIsPay"]);
+ oSubSec.HAvgFlag = DBUtility.ClsPub.isBool(DsSubSec.Tables[0].Rows[i]["HAvgFlag"]);
+
+ //
+ DetailEmpColl.Add(oSubSec);
+ }
+ sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+ return true;
+ }
+ catch (Exception e)
+ {
+ sReturn = e.Message;
+ throw (e);
+ }
+ }
+
+
+ }
+
+}
diff --git a/WebAPI/DLL/ClsPay_OtherBalBill.cs "b/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_OtherBalBill.cs"
similarity index 95%
rename from WebAPI/DLL/ClsPay_OtherBalBill.cs
rename to "WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_OtherBalBill.cs"
index be97614..ef24bcd 100644
--- a/WebAPI/DLL/ClsPay_OtherBalBill.cs
+++ "b/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_OtherBalBill.cs"
@@ -3,12 +3,12 @@
using System.Text;
using System.Data;
-namespace DAL
+namespace WebAPI.DLL
{
public class ClsPay_OtherBalBill : DBUtility.ClsXt_BaseBill
{
- public Model.ClsPay_OtherBalBillMain omodel = new Model.ClsPay_OtherBalBillMain();
- public List<Model.ClsPay_OtherBalBillSub> DetailColl = new List<Model.ClsPay_OtherBalBillSub>();
+ public Models.ClsPay_OtherBalBillMain omodel = new Models.ClsPay_OtherBalBillMain();
+ public List<Models.ClsPay_OtherBalBillSub> DetailColl = new List<Models.ClsPay_OtherBalBillSub>();
public ClsPay_OtherBalBill()
{
@@ -61,7 +61,7 @@
DeleteBillSub(lngBillKey);
//鎻掑叆瀛愯〃
omodel.HInterID = lngBillKey;
- foreach (Model.ClsPay_OtherBalBillSub oSub in DetailColl)
+ foreach (Models.ClsPay_OtherBalBillSub oSub in DetailColl)
{
oCn.RunProc("Insert into Pay_OtherBalBillSub " +
" (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
@@ -83,7 +83,7 @@
") ");
}
//
- //foreach (Model.ClsPay_SingleBalBillSub oSub in DetailColl)
+ //foreach (Models.ClsPay_SingleBalBillSub oSub in DetailColl)
//{
// Ds = oCn.RunProcReturn("exec h_p_Pay_SingleBalBill_Qty " + oSub.HICMOInterID, "");
// if (Ds.Tables[0].Rows.Count == 0)
@@ -117,15 +117,15 @@
//涓昏〃
oCn.RunProc("Insert Into Pay_OtherBalBillMain " +
"(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
- ",HYear,HPeriod,HRemark,HMaker,HMakeDate,HSaveFlag" +
+ ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
",HGroupID,HDeptID,HEmpID,HPayType,HExplanation,HInnerBillNo" +
") " +
" 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.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
", " + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HPayType.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" +
") ");
//鎻掑叆瀛愯〃
- foreach (Model.ClsPay_OtherBalBillSub oSub in DetailColl)
+ foreach (Models.ClsPay_OtherBalBillSub oSub in DetailColl)
{
oCn.RunProc("Insert into Pay_OtherBalBillSub " +
" (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
@@ -147,7 +147,7 @@
") ");
}
//
- //foreach (Model.ClsPay_SingleBalBillSub oSub in DetailColl)
+ //foreach (Models.ClsPay_SingleBalBillSub oSub in DetailColl)
//{
// Ds = oCn.RunProcReturn("exec h_p_Pay_SingleBalBill_Qty " + oSub.HICMOInterID, "");
// if (Ds.Tables[0].Rows.Count == 0)
@@ -224,7 +224,7 @@
DetailColl.Clear();//娓呯┖
for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
{
- Model.ClsPay_OtherBalBillSub oSub = new Model.ClsPay_OtherBalBillSub();
+ Models.ClsPay_OtherBalBillSub oSub = new Models.ClsPay_OtherBalBillSub();
// 鍥哄畾璧嬪��===============================================
oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
diff --git a/WebAPI/DLL/ClsPay_SingleBalBill.cs "b/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_SingleBalBill.cs"
similarity index 100%
rename from WebAPI/DLL/ClsPay_SingleBalBill.cs
rename to "WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_SingleBalBill.cs"
diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs
index 1d03593..81af178 100644
--- a/WebAPI/ListModels.cs
+++ b/WebAPI/ListModels.cs
@@ -1791,7 +1791,7 @@
return list;
}
- //宸ヨ祫绠$悊 宸ヨ祫缁撶畻鍗�
+ //宸ヨ祫绠$悊 宸ヨ祫缁撶畻鍗�(涓汉)
public List<Models.ClsPay_SingleBalBillMain> getObjectByJson_Pay_SingleBalBillMain(string jsonString)
{
jsonString = "[" + jsonString.ToString() + "]";
@@ -1804,5 +1804,19 @@
List<Models.ClsPay_SingleBalBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsPay_SingleBalBillSub>>(jsonString);
return list;
}
+
+ //宸ヨ祫绠$悊 宸ヨ祫缁撶畻鍗�(鍏跺畠)
+ public List<Models.ClsPay_OtherBalBillMain> getObjectByJson_Pay_OtherBalBillMain(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Models.ClsPay_OtherBalBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsPay_OtherBalBillMain>>(jsonString);
+ return list;
+ }
+ public List<Models.ClsPay_OtherBalBillSub> getObjectByJson_Pay_OtherBalBillSub(string jsonString)
+ {
+ jsonString = "[" + jsonString.ToString() + "]";
+ List<Models.ClsPay_OtherBalBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsPay_OtherBalBillSub>>(jsonString);
+ return list;
+ }
}
}
\ No newline at end of file
diff --git "a/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_OtherBalBillMain.cs" "b/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_OtherBalBillMain.cs"
new file mode 100644
index 0000000..65ac0d9
--- /dev/null
+++ "b/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_OtherBalBillMain.cs"
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WebAPI.Models
+{
+ public class ClsPay_OtherBalBillMain:DBUtility.ClsXt_BaseBillMain
+ {
+ public Int64 HGroupID;// int //班组ID
+ public Int64 HDeptID;// int //
+ public Int64 HEmpID;// int
+ public Int64 HPayType;// int //工资类型
+ public string HExplanation;// varchar(200) --摘要
+ public string HInnerBillNo;// varchar(50) --内部单据号
+ }
+}
diff --git "a/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_OtherBalBillSub.cs" "b/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_OtherBalBillSub.cs"
new file mode 100644
index 0000000..e4ee2b5
--- /dev/null
+++ "b/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_OtherBalBillSub.cs"
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WebAPI.Models
+{
+ public class ClsPay_OtherBalBillSub:DBUtility.ClsXt_BaseBillSub
+ {
+ public DateTime HEntryCloseDate;// datetime --行关闭 (默认为'') new
+ public string HRemark;// varchar(200) --备注
+ public Int64 HMaterID;// int --物料ID
+ public Int64 HProcID;// int --工序ID
+ public Int64 HEmpID;// int --职员ID
+ public double HTimes;// decimal(18,8) --工时
+ public double HQty;// decimal(18,8) --数量
+ public double HPrice;// decimal(18,8) --工价
+ public double HMoney;// decimal(18,8) --金额
+ public Single HPriceRate;// money -- 定额浮动比率
+ public Single HSubsidyTotal;// money -- 补贴合计
+ public Single HDeuctTotal;// money -- 扣款小计
+ public Int64 HICMOInterID;// int --生产任务单ID
+ public string HICMOBillNo;// varchar(50) --生产任务单号
+ public Int64 HProcReportInterID;// int --工序汇报单ID
+ public Int64 HProcReportEntryID;// int --工序汇报单子ID
+ public string HProcReportBillNo;// varchar(50) --工序汇报单号
+ public Int64 HProcPlanInterID;// int --工序计划单ID
+ public Int64 HProcPlanEntryID;// int --工序计划单子ID
+ public string HProcPlanBillNo;// varchar(50) --工序计划单号
+ public Int64 HSourceID;
+ public long HSubsidyID;// money -- 补贴合计
+ public long HDeuctID;// money -- 扣款小计
+ public double HPackQty;// dec(18,8) --包装数量 --addnew
+ public double HPackPrice;// dec(18,8) --包装单价 --addnew
+ public double HPackMoney;// dec(18,8) --包装金额 --addnew
+ public Int64 HPackMaterID;// int --包装类型 --addnew
+ public double HSubsidyQty;
+ public double HSubsidyMoney;
+ public double HSqty;
+ }
+}
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index 23b1502..1f78313 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -347,7 +347,7 @@
<Compile Include="Controllers\MJJY\Mj_PDA_MoudlCheckController.cs" />
<Compile Include="Controllers\MoveStockBillController.cs" />
<Compile Include="Controllers\Open_PrintTemController.cs" />
- <Compile Include="Controllers\Pay_OtherBalBillController.cs" />
+ <Compile Include="Controllers\宸ヨ祫绠$悊\Pay_OtherBalBillController.cs" />
<Compile Include="Controllers\Pay_GroupBalBillController.cs" />
<Compile Include="Controllers\PurchaseOrderController.cs" />
<Compile Include="Controllers\QC_POStockInCheckBillController.cs" />
@@ -437,9 +437,10 @@
<Compile Include="DLL\ClsSc_MouldOtherOutBill.cs" />
<Compile Include="DLL\ClsSc_MouldOtherInBill.cs" />
<Compile Include="DLL\ClsSc_MouldMoveStockStepOutBill.cs" />
- <Compile Include="DLL\ClsPay_SingleBalBill.cs" />
+ <Compile Include="DLL\宸ヨ祫绠$悊\ClsPay_GroupBalBill.cs" />
+ <Compile Include="DLL\宸ヨ祫绠$悊\ClsPay_SingleBalBill.cs" />
<Compile Include="DLL\ClsSc_MouldProdBackBill.cs" />
- <Compile Include="DLL\ClsPay_OtherBalBill.cs" />
+ <Compile Include="DLL\宸ヨ祫绠$悊\ClsPay_OtherBalBill.cs" />
<Compile Include="DLL\ClsSc_MouldProdInBill.cs" />
<Compile Include="DLL\ClsSc_MouldMoveStockStepInBill.cs" />
<Compile Include="DLL\ClsSc_MouldProdMoveBill.cs" />
@@ -472,6 +473,8 @@
<Compile Include="Models\ClsKf_MateOutBillSub.cs" />
<Compile Include="Models\ClsOA_InformBillMain.cs" />
<Compile Include="Models\ClsOA_InformBillSub.cs" />
+ <Compile Include="Models\宸ヨ祫绠$悊\ClsPay_OtherBalBillMain.cs" />
+ <Compile Include="Models\宸ヨ祫绠$悊\ClsPay_OtherBalBillSub.cs" />
<Compile Include="Models\宸ヨ祫绠$悊\ClsPay_SingleBalBillMain.cs" />
<Compile Include="Models\宸ヨ祫绠$悊\ClsPay_SingleBalBillSub.cs" />
<Compile Include="Models\ClsSb_EquipDotCheckRuleBillMain.cs" />
--
Gitblit v1.9.1