From dbfebaff9e8f5b10f8037c87971fb9d3edf025d3 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期三, 02 四月 2025 17:27:29 +0800
Subject: [PATCH] 工程项目 增加 部门 字段, 工程项目 (任务类)任务大类和任务项目分类和日期, 任何一项 变化时,都要 刷新下 项目代码;通过存储过程 来 获取 项目代码

---
 WebAPI/Controllers/XSGL/YS_ContactBalController.cs |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/WebAPI/Controllers/XSGL/YS_ContactBalController.cs b/WebAPI/Controllers/XSGL/YS_ContactBalController.cs
index 2885c1c..6e96437 100644
--- a/WebAPI/Controllers/XSGL/YS_ContactBalController.cs
+++ b/WebAPI/Controllers/XSGL/YS_ContactBalController.cs
@@ -427,9 +427,11 @@
                         ds = oCN.RunProcReturn(sql, "YSYF_ContactBal");
                         if (ds.Tables[0].Rows.Count == 0)
                         {
-                            sql = "insert into YSYF_ContactBal(HRP,HCusID,HCurID,HBeginBalance) " +
+                            sql = "insert into YSYF_ContactBal(HYear,HPeriod,HRP,HCusID,HCurID,HBeginBalance) " +
                                 "values(" +
-                                "" + HFRP + "" +
+                                "YEAR(getdate())" +
+                                ",Month(getdate())" +
+                                "," + HFRP + "" +
                                 "," + HCusID + "" +
                                 "," + HCurID + "" +
                                 "," + HBeginBalance + "" +
@@ -475,9 +477,11 @@
                         ds = oCN.RunProcReturn(sql, "YSYF_ContactBal");
                         if (ds.Tables[0].Rows.Count == 0)
                         {
-                            sql = "insert into YSYF_ContactBal(HRP,HCusID,HCurID,HBeginBalance) " +
+                            sql = "insert into YSYF_ContactBal(HYear,HPeriod,HRP,HCusID,HCurID,HBeginBalance) " +
                                 "values(" +
-                                "" + HFRP + "" +
+                                "YEAR(getdate())" +
+                                ",Month(getdate())" +
+                                "," + HFRP + "" +
                                 "," + HCusID + "" +
                                 "," + HCurID + "" +
                                 "," + HBeginBalance + "" +

--
Gitblit v1.9.1