feat(hjgl): 完善焊接任务与质量管理流程
This commit is contained in:
@@ -947,7 +947,36 @@ namespace BLL
|
||||
return month;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据当前最大编号生成带三位流水号的新编号。
|
||||
/// </summary>
|
||||
/// <param name="maxNumber">当前已分配的最大编号</param>
|
||||
/// <param name="prefix">编号前缀</param>
|
||||
/// <returns>新编号</returns>
|
||||
public static string GetThreeNumber(string maxNumber, string prefix)
|
||||
{
|
||||
if (string.IsNullOrEmpty(prefix))
|
||||
{
|
||||
throw new ArgumentException("编号前缀不能为空", "prefix");
|
||||
}
|
||||
if (string.IsNullOrEmpty(maxNumber))
|
||||
{
|
||||
return prefix + "001";
|
||||
}
|
||||
|
||||
int serial;
|
||||
if (maxNumber.Length < 3
|
||||
|| !int.TryParse(maxNumber.Substring(maxNumber.Length - 3), out serial))
|
||||
{
|
||||
throw new InvalidOperationException("当前最大编号的后三位不是有效流水号:" + maxNumber);
|
||||
}
|
||||
if (serial >= 999)
|
||||
{
|
||||
throw new InvalidOperationException("三位流水号已用完");
|
||||
}
|
||||
|
||||
return prefix + (serial + 1).ToString("D3");
|
||||
}
|
||||
public static DateTime GetQuarterlyMonths(string year, string quarterly)
|
||||
{
|
||||
string startMonth = string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user