散件出库

This commit is contained in:
2025-01-24 09:13:53 +08:00
parent 1ce9e37872
commit 553defbc94
3 changed files with 30 additions and 3 deletions
+24 -1
View File
@@ -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