From 553defbc94e572eecbfdda3f8d7894983e6eaf97 Mon Sep 17 00:00:00 2001
From: 10191 <506754232@qq.com>
Date: Fri, 24 Jan 2025 09:13:53 +0800
Subject: [PATCH] =?UTF-8?q?=E6=95=A3=E4=BB=B6=E5=87=BA=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
SGGL/BLL/CLGL/TwInOutplanmasterService.cs | 25 ++++++++++++++++++-
.../FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx | 2 +-
.../CLGL/OutPlanMasterEdit.aspx.cs | 6 ++++-
3 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/SGGL/BLL/CLGL/TwInOutplanmasterService.cs b/SGGL/BLL/CLGL/TwInOutplanmasterService.cs
index 115f2f1b..499fe16b 100644
--- a/SGGL/BLL/CLGL/TwInOutplanmasterService.cs
+++ b/SGGL/BLL/CLGL/TwInOutplanmasterService.cs
@@ -599,7 +599,7 @@ namespace BLL
}
- public static string GetDataInCusBillCode(string projectid, string unitcode,string typeString)
+ public static string GetDataInCusBillCode(string projectid, string unitcode,string typeString,string unitWorkCode="",string Category = "")
{
if (typeString == TwConst.TypeInt.退料入库.ToString())
{
@@ -614,6 +614,29 @@ namespace BLL
cusBillCode = cusBillCode + (queryAllresult + 1).ToString().PadLeft(2, '0');
return cusBillCode;
}
+ else if (typeString == TwConst.TypeInt.散件出库.ToString())
+ {
+ //生成规则是20240919-unitcode-AP-GR01
+ string cusBillCode = string.Format("{0:yyyyMMdd}", DateTime.Now) + unitcode+"-" + unitWorkCode +"-";
+ var queryAll = new Tw_InOutMasterOutput()
+ {
+ ProjectId = projectid,
+ CusBillCode = cusBillCode,
+ Category = Category == TwConst.Category.管段.ToString() ? (int)TwConst.Category.管段 : (int)TwConst.Category.管件
+
+ };
+ var queryAllresult = GetModle(queryAll).Count();
+ if (Category == TwConst.Category.管段.ToString())
+ {
+ cusBillCode = cusBillCode + (queryAllresult + 1).ToString().PadLeft(2, '0') + "-GI-P01";
+ }
+ else
+ {
+ cusBillCode = cusBillCode + (queryAllresult + 1).ToString().PadLeft(2, '0') + "-GI-PF01";
+
+ }
+ return cusBillCode;
+ }
else
{
//生成规则是20240919-unitcode-AP-GR01
diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx
index 9f5bcfc6..1df44192 100644
--- a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx
+++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx
@@ -45,7 +45,7 @@
-
diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx.cs
index b9adce4f..115aaf95 100644
--- a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx.cs
@@ -85,7 +85,7 @@ namespace FineUIPro.Web.CLGL
txtCreateMan.Text = this.CurrUser.PersonName;
txtCreateDate.Text = DateTime.Now.ToString("yyyy-MM-dd");
drpReqUnit.SelectedValue = this.CurrUser.UnitId;
- txtCusBillCode.Text = TwInOutplanmasterService.GetDataInCusBillCode(this.CurrUser.LoginProjectId, UnitService.GetUnitByUnitId(this.CurrUser.UnitId)?.UnitCode, drpTypeInt.SelectedText);
+ txtCusBillCode.Text = TwInOutplanmasterService.GetDataInCusBillCode(this.CurrUser.LoginProjectId, UnitService.GetUnitByUnitId(drpReqUnit.SelectedValue)?.UnitCode, UnitWorkService.getUnitWorkByUnitWorkId(UnitWorkId)?.UnitWorkCode,drpTypeInt.SelectedText, drpCategory.SelectedText);
}
drpTypeInt_SelectedIndexChanged(null, null);
@@ -302,6 +302,10 @@ namespace FineUIPro.Web.CLGL
protected void drpTypeInt_SelectedIndexChanged(object sender, EventArgs e)
{
+ if (string.IsNullOrEmpty(Id))
+ {
+ txtCusBillCode.Text = TwInOutplanmasterService.GetDataInCusBillCode(this.CurrUser.LoginProjectId, UnitService.GetUnitByUnitId(drpReqUnit.SelectedValue)?.UnitCode, drpTypeInt.SelectedText, UnitWorkService.getUnitWorkByUnitWorkId(UnitWorkId)?.UnitWorkCode, drpCategory.SelectedText);
+ }
if (drpTypeInt.SelectedValue ==((int)TwConst.TypeInt.散件出库).ToString())
{
Grid1.Hidden=false;